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 |
|---|---|---|---|---|---|
b83e3c2b4d3a614770a54354efe6daace5310704 | diff --git a/src/Pixie/QueryBuilder/QueryBuilderHandler.php b/src/Pixie/QueryBuilder/QueryBuilderHandler.php
index <HASH>..<HASH> 100644
--- a/src/Pixie/QueryBuilder/QueryBuilderHandler.php
+++ b/src/Pixie/QueryBuilder/QueryBuilderHandler.php
@@ -450,7 +450,7 @@ class QueryBuilderHandler
*/
public function orWhereIn($key, array $values)
{
- return $this->where($key, 'IN', $values, 'OR');
+ return $this->_where($key, 'IN', $values, 'OR');
}
/**
@@ -461,7 +461,7 @@ class QueryBuilderHandler
*/
public function orWhereNotIn($key, array $values)
{
- return $this->where($key, 'NOT IN', $values, 'OR');
+ return $this->_where($key, 'NOT IN', $values, 'OR');
}
/** | Bug fix, correct _where method for orWhereIn and orWhereNotIn calls | skipperbent_pecee-pixie | train | php |
317858ac76d9dc81a11bc6626eb949d231eb6f0a | diff --git a/airflow/cli/cli_parser.py b/airflow/cli/cli_parser.py
index <HASH>..<HASH> 100644
--- a/airflow/cli/cli_parser.py
+++ b/airflow/cli/cli_parser.py
@@ -178,7 +178,7 @@ ARG_OUTPUT = Arg(
"-o",
"--output",
),
- help=("Output format. Allowed values: json, yaml, table (default: table)"),
+ help="Output format. Allowed values: json, yaml, table (default: table)",
metavar="(table, json, yaml)",
choices=("table", "json", "yaml"),
default="table", | Remove unneeded parentheses from Python file (#<I>) | apache_airflow | train | py |
7f98b544e3b29c7ffdb8cb4a2ad1da5d1a8c611c | diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb
index <HASH>..<HASH> 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -100,7 +100,7 @@ module ActionView
# number_to_currency(1234567890.506, :precision => 3) # => $1,234,567,890.506
# number_to_currency(1234567890.506, :locale => :fr) # => 1 234 567 890,506 €
#
- # number_to_currency(1234567890.50, :negative_format => "(%u%n)")
+ # number_to_currency(-1234567890.50, :negative_format => "(%u%n)")
# # => ($1,234,567,890.51)
# number_to_currency(1234567890.50, :unit => "£", :separator => ",", :delimiter => "")
# # => £1234567890,50 | Negative format example should use a negative number | rails_rails | train | rb |
492e734654f972c058257d429251314660ae61ad | diff --git a/interfaces/Stringable.php b/interfaces/Stringable.php
index <HASH>..<HASH> 100644
--- a/interfaces/Stringable.php
+++ b/interfaces/Stringable.php
@@ -28,7 +28,7 @@ interface Stringable
*
* @return string
*/
- public function toString();
+ public function toString() : string;
/**
* {@see self::toString()} | [Core] Stringable: hint the return type for toString() while leaving the magic __toString() as-is to avoid conflicts | unyx_core | train | php |
4391161bc09493084e2f23027d73511cb0352083 | diff --git a/lib/emittance/dispatcher/registration_collection_proxy.rb b/lib/emittance/dispatcher/registration_collection_proxy.rb
index <HASH>..<HASH> 100644
--- a/lib/emittance/dispatcher/registration_collection_proxy.rb
+++ b/lib/emittance/dispatcher/registration_collection_proxy.rb
@@ -6,6 +6,8 @@ module Emittance
# A collection proxy for registrations. Can include multiple key/value pairs.
#
class RegistrationCollectionProxy
+ include Enumerable
+
# @param lookup_term the term initially used to lookup the registrations
# @param mappings [Hash] the mappings of identifiers to their respective registrations
def initialize(lookup_term, mappings)
@@ -13,12 +15,13 @@ module Emittance
@mappings = mappings
end
- # @param args args passed to +Array#each+
- # @param blk block passed to +Array#each+
# @return [RegistrationCollectionProxy] self
- def each(*args, &blk)
- arrays.flatten.each(*args, &blk)
- self
+ def each
+ return enum_for(:each) unless block_given?
+
+ arrays.flatten.each do |registration|
+ yield registration
+ end
end
# @return [Boolean] true if there are no registrations at all, false otherwise | include enumerable in RegistrationCollectionProxy | aastronautss_emittance | train | rb |
66f720749f9c7053ad7559d719c6ca0f47d14436 | diff --git a/source/core/oxsysrequirements.php b/source/core/oxsysrequirements.php
index <HASH>..<HASH> 100644
--- a/source/core/oxsysrequirements.php
+++ b/source/core/oxsysrequirements.php
@@ -16,7 +16,7 @@
* along with OXID eShop Community Edition. If not, see <http://www.gnu.org/licenses/>.
*
* @link http://www.oxid-esales.com
- * @copyright (C) OXID eSales AG 2003-2014
+ * @copyright (C) OXID eSales AG 2003-2015
* @version OXID eShop CE
*/
@@ -603,9 +603,9 @@ class oxSysRequirements
/**
* Checks PHP version.
- * < PHP 5.2.0 - red.
- * PHP 5.2.0-5.2.9 - yellow.
- * PHP 5.2.10 or higher - green.
+ * < PHP 5.3.0 - red.
+ * PHP 5.3.0-5.3.24 - yellow.
+ * PHP 5.3.25 or higher - green.
*
* @return integer
*/ | ESDEV-<I> Fix system php version requirements check method description | OXID-eSales_oxideshop_ce | train | php |
a963bc8b861b75e9e7c77cc8ba7673a4581c1513 | diff --git a/lib/upgrade/upgrade_supported.go b/lib/upgrade/upgrade_supported.go
index <HASH>..<HASH> 100644
--- a/lib/upgrade/upgrade_supported.go
+++ b/lib/upgrade/upgrade_supported.go
@@ -223,8 +223,8 @@ func readRelease(archiveName, dir, url string) (string, error) {
}
defer resp.Body.Close()
- switch runtime.GOOS {
- case "windows":
+ switch path.Ext(archiveName) {
+ case ".zip":
return readZip(archiveName, dir, io.LimitReader(resp.Body, maxArchiveSize))
default:
return readTarGz(archiveName, dir, io.LimitReader(resp.Body, maxArchiveSize)) | lib/upgrade: Let Mac load .zip archives (#<I>)
There is no need to do this switch based on the current OS, instead do
it based on what the archive actually appears to be.
(Tested; works.) | syncthing_syncthing | train | go |
84d3748a7fe753f016c9428588c05bf0c1ef06a3 | diff --git a/lib/datasets/seaborn-data.rb b/lib/datasets/seaborn-data.rb
index <HASH>..<HASH> 100644
--- a/lib/datasets/seaborn-data.rb
+++ b/lib/datasets/seaborn-data.rb
@@ -38,15 +38,15 @@ module Datasets
@metadata.name = "seaborn: #{name}"
@metadata.url = URL_FORMAT % {name: name}
- @data_path = cache_dir_path + (name + ".csv")
@name = name
end
def each(&block)
return to_enum(__method__) unless block_given?
- download(@data_path, @metadata.url)
- CSV.open(@data_path, headers: :first_row, converters: :all) do |csv|
+ data_path = cache_dir_path + "#{@name}.csv"
+ download(data_path, @metadata.url)
+ CSV.open(data_path, headers: :first_row, converters: :all) do |csv|
csv.each do |row|
record = prepare_record(row)
yield record | seaborn: reduce needless instance variable | red-data-tools_red-datasets | train | rb |
2ab2b48debd0486996005499ec3ca365c0128016 | diff --git a/openquake/hazardlib/site.py b/openquake/hazardlib/site.py
index <HASH>..<HASH> 100644
--- a/openquake/hazardlib/site.py
+++ b/openquake/hazardlib/site.py
@@ -215,10 +215,8 @@ class SiteCollection(object):
num_values = data.shape[1]
result = numpy.empty((total_sites, num_values))
result.fill(placeholder)
- #for i in xrange(num_values):
- # result[:, i].put(self.indices, data[:, i])
- for i, idx in enumerate(self.indices):
- result[idx] = data[i]
+ for i in xrange(num_values):
+ result[:, i].put(self.indices, data[:, i])
return result
def filter(self, mask): | site:
Restore the original numpy-based SiteCollection `expand` algorithm.
While slower than a plain Python implementation with small datasets,
the advantage of numpy really shows through with larger datasets.
I've been meaning to reverse this change for a while, since I found
in profiling run that this change was indeed not faster. | gem_oq-engine | train | py |
80feb8c0b4b581255315e0f99fe8a77385302ba7 | diff --git a/forms/gridfield/GridFieldPrintButton.php b/forms/gridfield/GridFieldPrintButton.php
index <HASH>..<HASH> 100644
--- a/forms/gridfield/GridFieldPrintButton.php
+++ b/forms/gridfield/GridFieldPrintButton.php
@@ -91,9 +91,14 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
* Export core.
*/
public function generatePrintData($gridField) {
- $printColumns = ($this->printColumns)
- ? $this->printColumns
- : singleton($gridField->getModelClass())->summaryFields();
+ if($this->printColumns) {
+ $printColumns = $this->printColumns;
+ } else if($dataCols = $gridField->getConfig()->getComponentByType('GridFieldDataColumns')) {
+ $printColumns = $dataCols->getDisplayFields($gridField);
+ } else {
+ $printColumns = singleton($gridField->getModelClass())->summaryFields();
+ }
+
$header = null;
if($this->printHasHeader){
$header = new ArrayList(); | Respect displayFields in GridFieldPrintButton
Provides more coherent and expected default behaviour | silverstripe_silverstripe-framework | train | php |
8b3bcfa3036a2cf08675b9d6217e39c9ffbac1a7 | diff --git a/helper.go b/helper.go
index <HASH>..<HASH> 100644
--- a/helper.go
+++ b/helper.go
@@ -105,3 +105,35 @@ func GetAllValues(req *http.Request) map[string]string {
vars.RUnlock()
return values
}
+
+// This function returns the route of given Request
+func (m *Mux) GetRequestRoute(req *http.Request) string {
+ cleanURL(&req.URL.Path)
+ for _, r := range m.Routes[req.Method] {
+ if r.Atts != 0 {
+ if r.Atts&SUB != 0 {
+ if len(req.URL.Path) >= r.Size {
+ if req.URL.Path[:r.Size] == r.Path {
+ return r.Path
+ }
+ }
+ }
+ if r.Match(req) {
+ return r.Path
+ }
+ }
+ if req.URL.Path == r.Path {
+ return r.Path
+ }
+ }
+
+ for _, s := range m.Routes[static] {
+ if len(req.URL.Path) >= s.Size {
+ if req.URL.Path[:s.Size] == s.Path {
+ return s.Path
+ }
+ }
+ }
+
+ return "NonFound"
+} | added GetRequestRoute function to get Route of given Request | go-zoo_bone | train | go |
10ff0e0e6f327976cf9998b44a54168a568a0264 | diff --git a/lib/Doctrine/DBAL/Logging/SQLLogger.php b/lib/Doctrine/DBAL/Logging/SQLLogger.php
index <HASH>..<HASH> 100644
--- a/lib/Doctrine/DBAL/Logging/SQLLogger.php
+++ b/lib/Doctrine/DBAL/Logging/SQLLogger.php
@@ -40,7 +40,7 @@ interface SQLLogger
*
* @param string $sql The SQL to be executed.
* @param array $params The SQL parameters.
- * @param float $executionMS The microtime difference it took to execute this query.
+ * @param array $types The SQL parameter types.
* @return void
*/
public function startQuery($sql, array $params = null, array $types = null); | [DDC-<I>] Fixed wrong docblock. | doctrine_dbal | train | php |
415e37a3a8b0fb158e91ccf6d42e65c92d7d3b97 | diff --git a/lib/rollbar.rb b/lib/rollbar.rb
index <HASH>..<HASH> 100644
--- a/lib/rollbar.rb
+++ b/lib/rollbar.rb
@@ -128,6 +128,9 @@ module Rollbar
return 'ignored' if ignored?(exception)
+ exception_level = filtered_level(exception)
+ level = exception_level if exception_level
+
begin
report(level, message, exception, extra)
rescue Exception => e
@@ -191,6 +194,8 @@ module Rollbar
end
def filtered_level(exception)
+ return unless exception
+
filter = configuration.exception_level_filters[exception.class.name]
if filter.respond_to?(:call)
filter.call(exception)
diff --git a/spec/rollbar_spec.rb b/spec/rollbar_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/rollbar_spec.rb
+++ b/spec/rollbar_spec.rb
@@ -725,6 +725,15 @@ describe Rollbar do
Rollbar.error(exception)
end
+ it 'sends the correct filtered level' do
+ Rollbar.configure do |config|
+ config.exception_level_filters = { 'NameError' => 'warning' }
+ end
+
+ Rollbar.error(exception)
+ expect(Rollbar.last_report[:level]).to be_eql('warning')
+ end
+
it "should work with an IO object as rack.errors" do
logger_mock.should_receive(:info).with('[Rollbar] Success') | Fix filtered levels.
After new interface changes we lost this feature :-/. This PRs re-enables it.
BTW, ignore exceptions should be still working before this PR. | rollbar_rollbar-gem | train | rb,rb |
7748d74fa49cf3d3dd7b322f103c9520f1889d7f | diff --git a/common/addressing.go b/common/addressing.go
index <HASH>..<HASH> 100644
--- a/common/addressing.go
+++ b/common/addressing.go
@@ -16,17 +16,9 @@ func ValidEndpointAddress(addr net.IP) bool {
// Not supported yet
return false
case net.IPv6len:
- // TODO: check if it's possible to have this verification from the const
- // values that we have.
- // node id may not be 0
- if addr[10] == 0 && addr[11] == 0 && addr[12] == 0 && addr[13] == 0 {
- return false
- }
-
- // endpoint id may not be 0
- if addr[14] == 0 && addr[15] == 0 {
- return false
- }
+ // If addr with NodeIPv6Mask is equal to addr means that have zeros from
+ // 112 to 128.
+ return !addr.Mask(NodeIPv6Mask).Equal(addr)
}
return true
@@ -48,7 +40,7 @@ func ValidNodeAddress(addr net.IP) bool {
return false
}
- // node address must contain 0 suffix
+ // lxc address must contain 0 suffix
if addr[14] != 0 || addr[15] != 0 {
return false
} | Decreased complexity on endpoint address validation | cilium_cilium | train | go |
3671a5cc6bc80032f2c86fab63dfd8236beb45ef | diff --git a/library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java b/library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java
index <HASH>..<HASH> 100644
--- a/library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java
+++ b/library/src/main/java/me/imid/swipebacklayout/lib/SwipeBackLayout.java
@@ -496,7 +496,16 @@ public class SwipeBackLayout extends FrameLayout {
}
mIsScrollOverValid = true;
}
- return ret;
+ boolean directionCheck = false;
+ if (mEdgeFlag == EDGE_LEFT || mEdgeFlag == EDGE_RIGHT) {
+ directionCheck = !mDragHelper.checkTouchSlop(ViewDragHelper.DIRECTION_VERTICAL, i);
+ } else if (mEdgeFlag == EDGE_BOTTOM) {
+ directionCheck = !mDragHelper
+ .checkTouchSlop(ViewDragHelper.DIRECTION_HORIZONTAL, i);
+ } else if (mEdgeFlag == EDGE_ALL) {
+ directionCheck = true;
+ }
+ return ret & directionCheck;
}
@Override | modify view capturing process to avoid wrong operation | ikew0ng_SwipeBackLayout | train | java |
95067859d263d932867ff4e4e9fd1be88f0ad9b3 | diff --git a/pkg/minikube/constants/constants_gendocs.go b/pkg/minikube/constants/constants_gendocs.go
index <HASH>..<HASH> 100644
--- a/pkg/minikube/constants/constants_gendocs.go
+++ b/pkg/minikube/constants/constants_gendocs.go
@@ -18,6 +18,10 @@ limitations under the License.
package constants
+import (
+ "k8s.io/client-go/util/homedir"
+)
+
var SupportedVMDrivers = [...]string{
"virtualbox",
"vmwarefusion",
@@ -25,3 +29,5 @@ var SupportedVMDrivers = [...]string{
"xhyve",
"hyperv",
}
+
+var DefaultMountDir = homedir.HomeDir() | Fix gendocs, function DefaultMountDir was missing | kubernetes_minikube | train | go |
d6fb093ce8cb895fbcc5d52a8bf8b5f62d9a245f | diff --git a/fusesoc/provider/github.py b/fusesoc/provider/github.py
index <HASH>..<HASH> 100644
--- a/fusesoc/provider/github.py
+++ b/fusesoc/provider/github.py
@@ -7,10 +7,11 @@ import tarfile
if sys.version_info[0] >= 3:
import urllib.request as urllib
+ from urllib.error import URLError
else:
import urllib
+ from urllib2 import URLError
-from urllib.error import URLError
class GitHub(object):
def __init__(self, core_name, config, core_root, cache_root): | github.py: Fix import of URLError for python 2
URLError lives in another lib in python 2.
Problem found and fixed by Bruno Morais | olofk_fusesoc | train | py |
3c3ea836f6075004558bb7ac1f2597224582e815 | diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -39,6 +39,7 @@ classifiers = ['Development Status :: 4 - Beta',
install_reqs = [
'funcsigs>=0.4',
+ 'ipython>=4.0.0',
'matplotlib>=1.4.0',
'mock>=1.1.2',
'numpy>=1.9.1', | BLD: Adds IPython to setup.py | quantopian_pyfolio | train | py |
bf341042588067bce3357ea22d122c6152966aee | diff --git a/raiden/accounts.py b/raiden/accounts.py
index <HASH>..<HASH> 100644
--- a/raiden/accounts.py
+++ b/raiden/accounts.py
@@ -4,6 +4,7 @@ import json
import os
import sys
from binascii import hexlify, unhexlify
+from json import JSONDecodeError
from ethereum.tools import keys
from ethereum.slogging import get_logger
@@ -66,7 +67,13 @@ class AccountManager:
with open(fullpath) as data_file:
data = json.load(data_file)
self.accounts[str(data['address']).lower()] = str(fullpath)
- except (KeyError, OSError, IOError, json.decoder.JSONDecodeError) as ex:
+ except (
+ IOError,
+ JSONDecodeError,
+ KeyError,
+ OSError,
+ UnicodeDecodeError
+ ) as ex:
# Invalid file - skip
if f.startswith('UTC--'):
# Should be a valid account file - warn user | Don't choke on binary files in keystore path
Catch UnicodeDecodeError in AccountManager which may be caused by non-JSON binary files. | raiden-network_raiden | train | py |
d529dcb23b7d27dda2d88e86b43bdead1b4c09c8 | diff --git a/header.go b/header.go
index <HASH>..<HASH> 100644
--- a/header.go
+++ b/header.go
@@ -103,6 +103,7 @@ func (h *header) Marshal(p []byte) (n int) {
}
p = p[2+len(ext.Bytes):]
}
+ *_type = 0
if len(p) != 0 {
panic("header length changed")
} | Terminate extension chains when marshalling header
This is important if the buffer is being reused, and isn't necessarily zeroed. | anacrolix_utp | train | go |
ddf49165839a5f812f98b65b1bc32fc0ce3dcbad | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -7,6 +7,13 @@ var util = require('util')
var debug = require('debug')('array-index')
/**
+ * JavaScript Array "length" is bound to an unsigned 32-bit int.
+ * See: http://stackoverflow.com/a/6155063/376773
+ */
+
+var MAX_LENGTH = Math.pow(2, 32)
+
+/**
* Module exports.
*/
@@ -127,7 +134,12 @@ function setLength (v) {
*/
function ensureLength (_length) {
- var length = _length | 0
+ var length
+ if (_length > MAX_LENGTH) {
+ length = MAX_LENGTH
+ } else {
+ length = _length | 0
+ }
var cur = ArrayIndex.prototype.__length__ | 0
var num = length - cur
if (num > 0) { | ensure that the "length" property has the same maximum as regular Arrays | TooTallNate_array-index | train | js |
32564aa5f0b5407733b903577cab6597d36af34d | diff --git a/test/unit/preferences.js b/test/unit/preferences.js
index <HASH>..<HASH> 100644
--- a/test/unit/preferences.js
+++ b/test/unit/preferences.js
@@ -56,6 +56,34 @@ exports['Preferences.read'] = {
done();
},
+ readEmptyFile: function(test) {
+ test.expect(1);
+
+ var defaultValue = 'value';
+ this.readFile = this.sandbox.stub(fs, 'readFile', (file, handler) => {
+ handler(null, '');
+ });
+
+ Preferences.read('key', defaultValue).then(result => {
+ test.equal(result, defaultValue);
+ test.done();
+ });
+ },
+
+ readError: function(test) {
+ test.expect(1);
+
+ var defaultValue = 'value';
+ this.readFile = this.sandbox.stub(fs, 'readFile', (file, handler) => {
+ handler(new Error('this should not matter'));
+ });
+
+ Preferences.read('key', defaultValue).then(result => {
+ test.equal(result, defaultValue);
+ test.done();
+ });
+ },
+
readWithDefaults: function(test) {
test.expect(1); | t2 crash-reporter: more preferences.json tests | tessel_t2-cli | train | js |
f6384fbce3de3da4519aa9122f42035b70b97a9b | diff --git a/malcolm/modules/pva/controllers/pvaservercomms.py b/malcolm/modules/pva/controllers/pvaservercomms.py
index <HASH>..<HASH> 100644
--- a/malcolm/modules/pva/controllers/pvaservercomms.py
+++ b/malcolm/modules/pva/controllers/pvaservercomms.py
@@ -119,6 +119,8 @@ class PvaImplementation(Loggable):
self._controller = controller
self._field = field
self._request = pv_request
+ self.log.debug(
+ "Mri %r field %r got request %s", mri, field, pv_request.toDict())
def _dict_to_path_value(self, pv_request):
value = pv_request.toDict() | Add logging message for every pva request | dls-controls_pymalcolm | train | py |
4377932ef18d8c91db5bf6b50eefd339ebbf0f3b | diff --git a/pkg/oc/cli/cmd/idle.go b/pkg/oc/cli/cmd/idle.go
index <HASH>..<HASH> 100644
--- a/pkg/oc/cli/cmd/idle.go
+++ b/pkg/oc/cli/cmd/idle.go
@@ -514,7 +514,7 @@ func (o *IdleOptions) RunIdle(f *clientcmd.Factory) error {
return err
}
- externalKubeExtensionClient := kextensionsclient.New(kclient.Core().RESTClient())
+ externalKubeExtensionClient := kextensionsclient.New(kclient.Extensions().RESTClient())
delegScaleGetter := appsmanualclient.NewDelegatingScaleNamespacer(appsV1Client, externalKubeExtensionClient)
scaleAnnotater := utilunidling.NewScaleAnnotater(delegScaleGetter, appClient.Apps(), kclient.Core(), func(currentReplicas int32, annotations map[string]string) {
annotations[unidlingapi.IdledAtAnnotation] = nowTime.UTC().Format(time.RFC3339) | oc idle: actually use the right type of client
Passing a Core internal client's RESTClient to a versioned extensions
client constructor creates an Frankensteinian monstrosity that pretends
to be an extensions client but uses core URLs. Instead, pass an internal
extensions client to the constructor, which results in a well-formed client. | openshift_origin | train | go |
32b3fa7b9d4fae258ba18143f197efc5ff7e5d6a | diff --git a/src/Resources/contao/pattern/PatternPageTree.php b/src/Resources/contao/pattern/PatternPageTree.php
index <HASH>..<HASH> 100644
--- a/src/Resources/contao/pattern/PatternPageTree.php
+++ b/src/Resources/contao/pattern/PatternPageTree.php
@@ -124,11 +124,14 @@ class PatternPageTree extends Pattern
$arrPages = array_values(array_filter($arrPages));
- $this->writeToTemplate($arrPages);
+ $this->writeToTemplate($arrPages->fetchAll());
}
else
{
- $this->writeToTemplate(\PageModel::findById($this->Value->singlePage));
+ if (($objPage = \PageModel::findById($this->Value->singlePage)) !== null)
+ {
+ $this->writeToTemplate($objPage->row());
+ }
}
}
} | Return arrData instead of the model | agoat_contao-customcontentelements-bundle | train | php |
1645634f4d3b18eb4841c4fd203067e28d646b14 | diff --git a/web/src/main/java/uk/ac/ebi/atlas/utils/NumberUtils.java b/web/src/main/java/uk/ac/ebi/atlas/utils/NumberUtils.java
index <HASH>..<HASH> 100644
--- a/web/src/main/java/uk/ac/ebi/atlas/utils/NumberUtils.java
+++ b/web/src/main/java/uk/ac/ebi/atlas/utils/NumberUtils.java
@@ -39,7 +39,7 @@ public class NumberUtils {
// P-values less than 10E-10 are shown as '< 10^-10'
private static final Double MIN_REPORTED_VALUE = 1E-10d;
private static final String TEN = "10";
- private static final String MULTIPLY_HTML_CODE = " × ";
+ private static final String MULTIPLY_HTML_CODE = " \u00D7 ";
private static final String E_PATTERN = "#.##E0";
private static final String E = "E";
private static final String SUP_PRE = "<span style=\"vertical-align: super;\">"; | now using unicode character for multiplier sign in NumberFormat | ebi-gene-expression-group_atlas | train | java |
a17dff051b404bca12e3e36406fed5945fd5c30d | diff --git a/peek_plugin_base/__init__.py b/peek_plugin_base/__init__.py
index <HASH>..<HASH> 100644
--- a/peek_plugin_base/__init__.py
+++ b/peek_plugin_base/__init__.py
@@ -1,4 +1,4 @@
__project__ = 'Synerty Peek'
__copyright__ = '2016, Synerty'
__author__ = 'Synerty'
-__version__ = '0.4.2'
\ No newline at end of file
+__version__ = '0.5.0'
\ No newline at end of file
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -6,7 +6,7 @@ from setuptools import find_packages
pip_package_name = "peek-plugin-base"
py_package_name = "peek_plugin_base"
-package_version = '0.4.2'
+package_version = '0.5.0'
egg_info = "%s.egg-info" % pip_package_name
if os.path.isdir(egg_info): | Updated to version <I> | Synerty_peek-plugin-base | train | py,py |
dd3aa1d11cfd22d52f9404d4b00172a72e592dda | diff --git a/modeshape-jcr/src/main/java/org/modeshape/jcr/query/qom/JcrArithmeticOperand.java b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/qom/JcrArithmeticOperand.java
index <HASH>..<HASH> 100644
--- a/modeshape-jcr/src/main/java/org/modeshape/jcr/query/qom/JcrArithmeticOperand.java
+++ b/modeshape-jcr/src/main/java/org/modeshape/jcr/query/qom/JcrArithmeticOperand.java
@@ -31,7 +31,8 @@ import org.modeshape.jcr.api.query.qom.QueryObjectModelConstants;
/**
*
*/
-public class JcrArithmeticOperand extends ArithmeticOperand implements org.modeshape.jcr.api.query.qom.ArithmeticOperand {
+public class JcrArithmeticOperand extends ArithmeticOperand
+ implements org.modeshape.jcr.api.query.qom.ArithmeticOperand, JcrDynamicOperand {
private static final long serialVersionUID = 1L; | MODE-<I> Added another fix for the JcrArithmeticOperand to implement JcrDynamicOperand. I visually inspected all of the JCR QOM implementations in ModeShape (org.modeshape.jcr.query.qom), and I belive the inheritance hierarchy is correct.
git-svn-id: <URL> | ModeShape_modeshape | train | java |
5349a5c49b41dab3b4ca35d6291a4e687302e664 | diff --git a/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java b/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java
index <HASH>..<HASH> 100644
--- a/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java
+++ b/meta/src/main/java/com/alibaba/otter/canal/meta/MemoryMetaManager.java
@@ -83,7 +83,8 @@ public class MemoryMetaManager extends AbstractCanalLifeCycle implements CanalMe
}
public synchronized List<ClientIdentity> listAllSubscribeInfo(String destination) throws CanalMetaManagerException {
- return destinations.get(destination);
+ // fixed issue #657, fixed ConcurrentModificationException
+ return Lists.newArrayList(destinations.get(destination));
}
public Position getCursor(ClientIdentity clientIdentity) throws CanalMetaManagerException { | fixed issue #<I>, fixed ConcurrentModificationException | alibaba_canal | train | java |
9b4834fae0b4210b6f58bfbd94e86a41995d418e | diff --git a/symfit/core/fit.py b/symfit/core/fit.py
index <HASH>..<HASH> 100644
--- a/symfit/core/fit.py
+++ b/symfit/core/fit.py
@@ -8,8 +8,7 @@ import sympy
from sympy.core.relational import Relational
import numpy as np
from scipy.optimize import minimize
-from scipy.integrate import ode, odeint
-from scipy.interpolate import interp1d
+from scipy.integrate import odeint
from symfit.core.argument import Parameter, Variable
from symfit.core.support import seperate_symbols, keywordonly, sympy_to_py, cache, key2str, deprecated | Deleted some unused imports. | tBuLi_symfit | train | py |
78ff08bdfbfa6ffa4a9d3e93068b3e00d662f64d | diff --git a/limpyd/model.py b/limpyd/model.py
index <HASH>..<HASH> 100644
--- a/limpyd/model.py
+++ b/limpyd/model.py
@@ -373,12 +373,13 @@ class RedisModel(RedisProxyCommand):
raise e
else:
# Clear the cache for each cacheable field
- for field_name, value in kwargs.items():
- field = field = getattr(self, field_name)
- if not field.cacheable or not field.has_cache():
- continue
- field_cache = field.get_cache()
- field_cache.clear()
+ if self.cacheable:
+ for field_name, value in kwargs.items():
+ field = field = getattr(self, field_name)
+ if not field.cacheable or not field.has_cache():
+ continue
+ field_cache = field.get_cache()
+ field_cache.clear()
return result
except Exception, e: | Optimize hmset to not clear cache if not cacheable
Instead of testing each field for cacheability in all cases, we do it
only if the object is cacheable. | limpyd_redis-limpyd | train | py |
a0720061c8d049276d19164e0cc087b358691733 | diff --git a/ui/src/admin/containers/AdminChronografPage.js b/ui/src/admin/containers/AdminChronografPage.js
index <HASH>..<HASH> 100644
--- a/ui/src/admin/containers/AdminChronografPage.js
+++ b/ui/src/admin/containers/AdminChronografPage.js
@@ -79,20 +79,10 @@ class AdminChronografPage extends Component {
}
}
- handleBatchDeleteUsers = () => {
- console.log('Delete Users')
- }
-
- handleBatchRemoveOrgFromUsers = arg => {
- console.log(arg)
- }
-
- handleBatchAddOrgToUsers = arg => {
- console.log(arg)
- }
- handleBatchChangeUsersRole = arg => {
- console.log(arg)
- }
+ handleBatchDeleteUsers = () => {}
+ handleBatchRemoveOrgFromUsers = () => {}
+ handleBatchAddOrgToUsers = () => {}
+ handleBatchChangeUsersRole = () => {}
handleUpdateUserRole = () => (user, currentRole, newRole) => {
console.log(user, currentRole, newRole) | Clear console logs on batch actions for now | influxdata_influxdb | train | js |
ade0a7b0a7336f5fb44498113055ebde7124f250 | diff --git a/hotdoc/core/database.py b/hotdoc/core/database.py
index <HASH>..<HASH> 100644
--- a/hotdoc/core/database.py
+++ b/hotdoc/core/database.py
@@ -189,6 +189,9 @@ class Database:
with open(os.path.join(self.__private_folder, 'all_comments.json'), 'w', encoding='utf8') as f:
f.write(json.dumps(resolved_comments, default=serialize, indent=2))
+ with open(os.path.join(self.__private_folder, 'symbol_index.json'), 'w', encoding='utf8') as f:
+ f.write(json.dumps(list(self.__symbols.keys()), default=serialize, indent=2))
+
def __get_aliases(self, name):
return self.__aliases[name] | database: Dump symbol index in a file | hotdoc_hotdoc | train | py |
ff517245a72d847342d7e8c914147b1932829df3 | diff --git a/includes/class-plugin.php b/includes/class-plugin.php
index <HASH>..<HASH> 100644
--- a/includes/class-plugin.php
+++ b/includes/class-plugin.php
@@ -930,7 +930,8 @@ class Plugin {
return;
}
- $bytes = strlen( serialize( $wp_object_cache->cache ) );
+ // TODO: find a better method to determine cache size as using `serialize` is discouraged.
+ $bytes = strlen( serialize( $wp_object_cache->cache ) ); // phpcs:ignore WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize
$debug = sprintf(
// translators: %1$d = number of objects. %2$s = human-readable size of cache. %3$s = name of the used client. | ignored warning & added todo for `serialize` function | tillkruss_redis-cache | train | php |
565e477184ec32f545646a60c9760598d25ccf65 | diff --git a/lib/adminlib.php b/lib/adminlib.php
index <HASH>..<HASH> 100644
--- a/lib/adminlib.php
+++ b/lib/adminlib.php
@@ -6569,6 +6569,12 @@ class admin_setting_enablemobileservice extends admin_setting_configcheckbox {
*/
public function get_setting() {
global $CFG;
+
+ //for install cli script, $CFG->defaultuserroleid is not set so return 0
+ if (empty($CFG->defaultuserroleid)) {
+ return 0;
+ }
+
$webservicesystem = $CFG->enablewebservices;
require_once($CFG->dirroot . '/webservice/lib.php');
$webservicemanager = new webservice();
@@ -6588,6 +6594,12 @@ class admin_setting_enablemobileservice extends admin_setting_configcheckbox {
*/
public function write_setting($data) {
global $DB, $CFG;
+
+ //for install cli script, $CFG->defaultuserroleid is not set so do nothing
+ if (empty($CFG->defaultuserroleid)) {
+ return '';
+ }
+
$servicename = MOODLE_OFFICIAL_MOBILE_SERVICE;
require_once($CFG->dirroot . '/webservice/lib.php'); | MDL-<I> remove Undefined property: stdClass:: during installation with cli script | moodle_moodle | train | php |
c80407e5f0ebcb7fbc0a60ce8cc1584fcf918fa0 | diff --git a/cocaine/tools/interactive/__init__.py b/cocaine/tools/interactive/__init__.py
index <HASH>..<HASH> 100644
--- a/cocaine/tools/interactive/__init__.py
+++ b/cocaine/tools/interactive/__init__.py
@@ -55,7 +55,7 @@ class BaseEditor(object):
with printer('Editing "%s"', self.name):
with tempfile.NamedTemporaryFile(delete=False) as fh:
name = fh.name
- fh.write(json.dumps(content))
+ fh.write(json.dumps(content, indent=4))
ec = None | [Editor] Dumps json with `indent` | cocaine_cocaine-tools | train | py |
cb90eccbd6391a3b0617e22c7d9672df1fd46fd5 | diff --git a/eqcorrscan/utils/Sfile_util.py b/eqcorrscan/utils/Sfile_util.py
index <HASH>..<HASH> 100644
--- a/eqcorrscan/utils/Sfile_util.py
+++ b/eqcorrscan/utils/Sfile_util.py
@@ -276,7 +276,8 @@ def readpicks(sfilename):
del headerend
for line in f:
if 'headerend' in locals():
- if len(line.rstrip('\n').rstrip('\r'))==80 and (line[79]==' ' or line[79]=='4'):
+ if len(line.rstrip('\n').rstrip('\r')) in [80,79] and \
+ (line[79]==' ' or line[79]=='4' or line [79]=='\n'):
pickline+=[line]
elif line[79]=='7':
header=line | Failed to read in seisan'd sfiles
Seisan removes trailling space on pick lines sometimes, now accomodated'
Former-commit-id: <I>c<I>d<I>a<I>e<I>e<I>b5a<I>e<I>b | eqcorrscan_EQcorrscan | train | py |
22862ef319f4e5cd111c58b68b7e540bb8fa9cc4 | diff --git a/tests/tacl_test_case.py b/tests/tacl_test_case.py
index <HASH>..<HASH> 100644
--- a/tests/tacl_test_case.py
+++ b/tests/tacl_test_case.py
@@ -17,7 +17,7 @@ class TaclTestCase (unittest.TestCase):
for common_file in dircmp.common_files:
actual_path = os.path.join(dircmp.left, common_file)
expected_path = os.path.join(dircmp.right, common_file)
- if os.path.splitext(common_file)[0] == '.csv':
+ if os.path.splitext(common_file)[1] == '.csv':
self._compare_results_files(actual_path, expected_path)
else:
self._compare_non_results_files(actual_path, expected_path) | Corrected problem in test comparison of files. | ajenhl_tacl | train | py |
289a7a24bb771a851fd16521116802ffbdbfffb9 | diff --git a/katcp/core.py b/katcp/core.py
index <HASH>..<HASH> 100644
--- a/katcp/core.py
+++ b/katcp/core.py
@@ -181,7 +181,7 @@ class Message(object):
args = "(" + ", ".join(escaped_args) + ")"
else:
args = ""
- return "<Message %(tp)s %(name)s %(args)s>" % locals()
+ return "<Message %s %s %s>" % (tp, name, args)
def __eq__(self, other):
if not isinstance(other, Message): | Avoid use of locals() in call in repr as being somewhat unexpected and fragile. :)
git-svn-id: <URL> | ska-sa_katcp-python | train | py |
9a284ffe9bf94471c6d60288c4c0da65901a9d46 | diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -64,10 +64,10 @@ author = u'Kytos Project'
# built documents.
#
# The short X.Y version.
-version = u'2017.1'
+version = u'2017.2'
show_version = False
# The full version, including alpha/beta/rc tags.
-release = u'2017.1rc1'
+release = u'2017.2b1.dev0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/pyof/__init__.py b/pyof/__init__.py
index <HASH>..<HASH> 100644
--- a/pyof/__init__.py
+++ b/pyof/__init__.py
@@ -3,4 +3,4 @@
This package is a library that parses and creates OpenFlow Messages.
It contains all implemented versions of OpenFlow protocol
"""
-__version__ = '2017.1rc1'
+__version__ = '2017.2b1.dev0' | Updating version to <I>b1.dev0 | kytos_python-openflow | train | py,py |
5b9cdd9bdf2ac3b239602561d11a70e063502f8a | diff --git a/presto-main/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java b/presto-main/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java
index <HASH>..<HASH> 100644
--- a/presto-main/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java
+++ b/presto-main/src/main/java/com/facebook/presto/sql/planner/LocalExecutionPlanner.java
@@ -2419,6 +2419,7 @@ public class LocalExecutionPlanner
private static Function<Page, Page> enforceLayoutProcessor(List<Symbol> expectedLayout, Map<Symbol, Integer> inputLayout)
{
int[] channels = expectedLayout.stream()
+ .peek(symbol -> checkArgument(inputLayout.containsKey(symbol), "channel not found for symbol: %s", symbol))
.mapToInt(inputLayout::get)
.toArray(); | Refactor enforceLayoutProcessor
Throw a message with a more specific text about what channel is missing.
This helps a lot when debugging an optimizer change. | prestodb_presto | train | java |
1389af7ffb1e405bcf14c9b101a36aaef846eedb | diff --git a/lib/prepare-params.js b/lib/prepare-params.js
index <HASH>..<HASH> 100644
--- a/lib/prepare-params.js
+++ b/lib/prepare-params.js
@@ -32,7 +32,15 @@ module.exports = function(event, context) {
break;
case 'query':
// TODO cast qstring params
- params[param.name] = event.request.querystring[param.name];
+ if (param.type === 'object') {
+ try {
+ params[param.name] = JSON.parse(event.request.querystring[param.name]);
+ } catch {
+ params[param.name] = 'error' // let the validator err
+ }
+ } else {
+ params[param.name] = event.request.querystring[param.name];
+ }
break;
case 'path':
params[param.name] = event.request.path[param.name]; | support json "object" type in query | Losant_bravado-core | train | js |
074939be7c221a722a9fd741d1650e200416214b | diff --git a/builder/pod-build.go b/builder/pod-build.go
index <HASH>..<HASH> 100644
--- a/builder/pod-build.go
+++ b/builder/pod-build.go
@@ -18,11 +18,18 @@ func (p *Pod) Build() {
os.RemoveAll(p.target)
os.MkdirAll(p.target, 0777)
+ p.preparePodVersion()
apps := p.processAci()
p.writePodManifest(apps)
}
+func (p *Pod) preparePodVersion() {
+ if p.manifest.Name.Version() == "" {
+ p.manifest.Name = *spec.NewACFullName(p.manifest.Name.Name() + ":" + utils.GenerateVersion())
+ }
+}
+
func (p *Pod) processAci() []schema.RuntimeApp {
apps := []schema.RuntimeApp{}
for _, e := range p.manifest.Pod.Apps { | set generated version of pod if not set | blablacar_dgr | train | go |
a559c8472ce5283d22f394d9cb1685ae2b5f0fda | diff --git a/core/sawtooth/validator_config.py b/core/sawtooth/validator_config.py
index <HASH>..<HASH> 100644
--- a/core/sawtooth/validator_config.py
+++ b/core/sawtooth/validator_config.py
@@ -295,7 +295,7 @@ class ValidatorDefaultConfig(sawtooth.config.Config):
# topological configuration
self['TopologyAlgorithm'] = 'RandomWalk'
- self['InitialConnectivity'] = 1
+ self['InitialConnectivity'] = 0
self['TargetConnectivity'] = 3
self['MaximumConnectivity'] = 15
self['MinimumConnectivity'] = 1 | Set InitialConnectivity to 0 by default
This allows starting up a single validator. After this change,
production/test networks with more than one validator should set
InitialConnectivity to a value greater than 0. | hyperledger_sawtooth-core | train | py |
5f4a118ea3ef90b99418176d2ab8b493f0402c6d | diff --git a/p2p/host/peerstore/test/keybook_suite.go b/p2p/host/peerstore/test/keybook_suite.go
index <HASH>..<HASH> 100644
--- a/p2p/host/peerstore/test/keybook_suite.go
+++ b/p2p/host/peerstore/test/keybook_suite.go
@@ -4,6 +4,7 @@ import (
"sort"
"testing"
+ ic "github.com/libp2p/go-libp2p-crypto"
peer "github.com/libp2p/go-libp2p-peer"
pt "github.com/libp2p/go-libp2p-peer/test"
@@ -144,7 +145,7 @@ func testInlinedPubKeyAddedOnRetrieve(kb pstore.KeyBook) func(t *testing.T) {
}
// Key small enough for inlining.
- _, pub, err := pt.RandTestKeyPair(32)
+ _, pub, err := ic.GenerateKeyPair(ic.Ed25519, 256)
if err != nil {
t.Error(err)
} | fix the inline key test
RandTestKeyPair uses RSA keys but we now forbid any RSA key under <I> bits. | libp2p_go-libp2p | train | go |
e385e59a098cd661ea1ea4257c9a5735c5c32bc6 | diff --git a/dvc/version.py b/dvc/version.py
index <HASH>..<HASH> 100644
--- a/dvc/version.py
+++ b/dvc/version.py
@@ -6,7 +6,7 @@
import os
import subprocess
-_BASE_VERSION = "2.0.0a3"
+_BASE_VERSION = "2.0.0a4"
def _generate_version(base_version): | dvc: bump to <I>a4 | iterative_dvc | train | py |
a85ab752c1e32b02cd4b089862c25c1c00be0de7 | diff --git a/commands/command_logs.go b/commands/command_logs.go
index <HASH>..<HASH> 100644
--- a/commands/command_logs.go
+++ b/commands/command_logs.go
@@ -96,15 +96,17 @@ func sortedLogs() []string {
return []string{}
}
- names := make([]string, 0, len(fileinfos))
+ names := make([]string, len(fileinfos))
+ fileCount := 0
for index, info := range fileinfos {
if info.IsDir() {
continue
}
+ fileCount += 1
names[index] = info.Name()
}
- return names
+ return names[0:fileCount]
}
func init() { | can't modify the names array if its len is 0 | git-lfs_git-lfs | train | go |
c7445cdcf32f75ac6e471e7190d1b6820dbe206e | diff --git a/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java b/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
+++ b/src/main/java/org/codehaus/groovy/ast/stmt/TryCatchStatement.java
@@ -33,8 +33,8 @@ import java.util.List;
public class TryCatchStatement extends Statement {
private static final String IS_RESOURCE = "_IS_RESOURCE";
private Statement tryStatement;
- private List<ExpressionStatement> resourceStatements = new ArrayList<>();
- private List<CatchStatement> catchStatements = new ArrayList<>();
+ private final List<ExpressionStatement> resourceStatements = new ArrayList<>(4);
+ private final List<CatchStatement> catchStatements = new ArrayList<>(4);
private Statement finallyStatement; | Trivial tweak: set the initial capacity of statement lists | apache_groovy | train | java |
fb4f17f271fd68edb05617ba9725dee6cdb58027 | diff --git a/lib/chef_zero/endpoints/principal_endpoint.rb b/lib/chef_zero/endpoints/principal_endpoint.rb
index <HASH>..<HASH> 100644
--- a/lib/chef_zero/endpoints/principal_endpoint.rb
+++ b/lib/chef_zero/endpoints/principal_endpoint.rb
@@ -11,15 +11,25 @@ module ChefZero
json = get_data(request, request.rest_path[0..1] + [ 'users', name ], :nil)
if json
type = 'user'
+ org_member = true
else
json = get_data(request, request.rest_path[0..1] + [ 'clients', name ], :nil)
- type = 'client'
+ if json
+ type = 'client'
+ org_member = true
+ else
+ json = get_data(request, [ 'users', name ], :nil)
+ type = 'user'
+ org_member = false
+ end
end
if json
json_response(200, {
'name' => name,
'type' => type,
- 'public_key' => JSON.parse(json)['public_key'] || PUBLIC_KEY
+ 'public_key' => JSON.parse(json)['public_key'] || PUBLIC_KEY,
+ 'authz_id' => '0'*32,
+ 'org_member' => org_member
})
else
error(404, 'Principal not found') | Report authz id and whether principal is a member of the org | chef_chef-zero | train | rb |
8e1261bc95d36ab0c905661fec488e9bfeedba6b | diff --git a/src/integration/engine_test.go b/src/integration/engine_test.go
index <HASH>..<HASH> 100644
--- a/src/integration/engine_test.go
+++ b/src/integration/engine_test.go
@@ -1272,13 +1272,7 @@ func (self *EngineSuite) TestDerivativeQueryWithOnePoint(c *C) {
}
]`)
- self.runQuery("select derivative(column_one) from foo", c, `[
- {
- "points": [],
- "name": "foo",
- "fields": ["derivative"]
- }
- ]`)
+ self.runQuery("select derivative(column_one) from foo", c, `[]`)
}
func (self *EngineSuite) TestDistinctQuery(c *C) { | series with no points don't return anything | influxdata_influxdb | train | go |
6e988e65ef40d5e8fd1d61ab2a977aed3c52a84c | diff --git a/emannotationschemas/models.py b/emannotationschemas/models.py
index <HASH>..<HASH> 100644
--- a/emannotationschemas/models.py
+++ b/emannotationschemas/models.py
@@ -17,6 +17,7 @@ from typing import Sequence
import logging
Base = declarative_base()
+FlatBase = declarative_base()
field_column_map = {
# SegmentationField: Numeric,
@@ -392,7 +393,7 @@ def make_flat_model_from_schema(table_name: str,
table_metadata=None,
with_crud_columns=False,
)
- FlatAnnotationModel = type(table_name, (Base,), annotation_dict)
+ FlatAnnotationModel = type(table_name, (FlatBase,), annotation_dict)
annotation_models.set_model(table_name,
FlatAnnotationModel, flat=True) | use seperate declarative base for flat models | seung-lab_EMAnnotationSchemas | train | py |
f4b03e8e923dd0808fca85ff97737a0972b8323a | diff --git a/Kwf_js/Utils/DoubleTapToGo.js b/Kwf_js/Utils/DoubleTapToGo.js
index <HASH>..<HASH> 100644
--- a/Kwf_js/Utils/DoubleTapToGo.js
+++ b/Kwf_js/Utils/DoubleTapToGo.js
@@ -63,7 +63,13 @@ Kwf.namespace('Kwf.Utils');
if ($(element).hasClass('kwfDoubleTapHandler')) return;
$(element).addClass('kwfDoubleTapHandler');
- $(element).on('touchstart', function(e) {
+ $(element).on('touchend', function(e) {
+
+ if (touchMoved) {
+ touchMoved = false;
+ return;
+ }
+
e.stopPropagation();
var currentTarget = $(e.currentTarget); | DoubleTapToGo check for touchmove on touchend | koala-framework_koala-framework | train | js |
800fd1aee5cbd2d903c097fa0c09dcdb92b669b6 | diff --git a/lib/storey/gen_dump_command.rb b/lib/storey/gen_dump_command.rb
index <HASH>..<HASH> 100644
--- a/lib/storey/gen_dump_command.rb
+++ b/lib/storey/gen_dump_command.rb
@@ -43,8 +43,8 @@ module Storey
command_parts += [
Utils.command_line_switches_from(switches),
schemas_switches,
- database,
]
+ command_parts << database if database_url.blank?
command_parts.compact.join(' ')
end
diff --git a/spec/storey/gen_dump_command_spec.rb b/spec/storey/gen_dump_command_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/storey/gen_dump_command_spec.rb
+++ b/spec/storey/gen_dump_command_spec.rb
@@ -31,6 +31,21 @@ module Storey
end
end
+ context "connection string is passed in" do
+ let(:options) do
+ {
+ structure_only: true,
+ file: 'myfile.sql',
+ database_url: "postgres://user:pass@ip.com:5432/db",
+ database: "testdb",
+ }
+ end
+
+ it "ignores the `database` value" do
+ expect(command).to_not match /testdb/
+ end
+ end
+
context "connection string is set in Storey" do
before do
Storey.configuration.database_url = "postgres://user:pass@ip.com:5432/db" | GenDumpCommand does not insert database if connection string is given | ramontayag_storey | train | rb,rb |
a4d8c4ffadca14ebb941003082e607a96eacb409 | diff --git a/packages/material-ui/src/Container/Container.js b/packages/material-ui/src/Container/Container.js
index <HASH>..<HASH> 100644
--- a/packages/material-ui/src/Container/Container.js
+++ b/packages/material-ui/src/Container/Container.js
@@ -78,11 +78,12 @@ const ContainerRoot = experimentalStyled(
maxWidth: Math.max(theme.breakpoints.values.xs, 444),
},
}),
- ...(styleProps.maxWidth !== 'xs' && {
- [theme.breakpoints.up(styleProps.maxWidth)]: {
- maxWidth: `${theme.breakpoints.values[styleProps.maxWidth]}${theme.breakpoints.unit}`,
- },
- }),
+ ...(styleProps.maxWidth &&
+ styleProps.maxWidth !== 'xs' && {
+ [theme.breakpoints.up(styleProps.maxWidth)]: {
+ maxWidth: `${theme.breakpoints.values[styleProps.maxWidth]}${theme.breakpoints.unit}`,
+ },
+ }),
}),
); | [Container] Fix maxWidth="false" resulting in incorrect css (#<I>) | mui-org_material-ui | train | js |
69b00acd615324708acdbac5c7f8237fa73db488 | diff --git a/contrib/externs/angular-1.6.js b/contrib/externs/angular-1.6.js
index <HASH>..<HASH> 100644
--- a/contrib/externs/angular-1.6.js
+++ b/contrib/externs/angular-1.6.js
@@ -1638,7 +1638,7 @@ angular.$http.prototype.get = function(url, opt_config) {};
angular.$http.prototype.head = function(url, opt_config) {};
/**
- * @param {string} url
+ * @param {string|!Object} url
* @param {angular.$http.Config=} opt_config
* @return {!angular.$http.HttpPromise}
*/ | Update Angular <I> externs to accept !Object in JSONP call, for trusted types
Follows <URL> | google_closure-compiler | train | js |
050439a5c5102697cf47b9717c62c409f20c70eb | diff --git a/test/holygrail.spec.js b/test/holygrail.spec.js
index <HASH>..<HASH> 100644
--- a/test/holygrail.spec.js
+++ b/test/holygrail.spec.js
@@ -74,6 +74,9 @@ describe('Holy Grail Layout', function() {
// for IE8
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
+ // refresh the scrollview boundingClientRect, for Opera 12
+ dom.scrollview = dom.$scrollview.getBoundingClientRect();
+
expect(dom.bottomContent.top).toBeLessThan(dom.scrollview.top + dom.scrollview.height + scrollTop);
// clean-up after yourself | Refresh the scrollview boundingclientrect before scrolling it, to fix the scroll test spec in opera <I>. | ghinda_gridlayout | train | js |
58768059b7561389ff0d5d20c558d1d1878324b2 | diff --git a/src/adafruit_blinka/microcontroller/bcm283x/pin.py b/src/adafruit_blinka/microcontroller/bcm283x/pin.py
index <HASH>..<HASH> 100644
--- a/src/adafruit_blinka/microcontroller/bcm283x/pin.py
+++ b/src/adafruit_blinka/microcontroller/bcm283x/pin.py
@@ -142,6 +142,10 @@ spiPorts = (
(0, SCLK, MOSI, MISO),
(1, SCLK_1, MOSI_1, MISO_1),
(2, SCLK_2, MOSI_2, MISO_2),
+ (3, D3, D2, D1), #SPI3 on Pi4/CM4
+ (4, D7, D6, D5), #SPI4 on Pi4/CM4
+ (5, D15, D14, D13), #SPI5 on Pi4/CM4
+
)
# ordered as uartId, txId, rxId | Add additional SPI ports for BCM<I>
Currently the additional SPI ports on the Pi4 or CM4 are not usable in Blinka without doing this change manually.
SPI6 uses the same pins as the default SPI1 pins. | adafruit_Adafruit_Blinka | train | py |
62584379db2db1f83d4aa3ad609bd7ac95848596 | diff --git a/kie-internal/src/main/java/org/kie/runtime/StatelessKnowledgeSession.java b/kie-internal/src/main/java/org/kie/runtime/StatelessKnowledgeSession.java
index <HASH>..<HASH> 100644
--- a/kie-internal/src/main/java/org/kie/runtime/StatelessKnowledgeSession.java
+++ b/kie-internal/src/main/java/org/kie/runtime/StatelessKnowledgeSession.java
@@ -16,6 +16,8 @@
package org.kie.runtime;
+import org.kie.event.KnowledgeRuntimeEventManager;
+
/**
* StatelessKnowledgeSession provides a convenience API, wrapping StatefulKnowledgeSession. It avoids the need to
@@ -115,7 +117,7 @@ package org.kie.runtime;
*/
public interface StatelessKnowledgeSession
extends
- StatelessKieSession {
+ StatelessKieSession, KnowledgeRuntimeEventManager {
} | Fixing class cast exception when using loggers, due to inconsistency in the interface hierarchy | kiegroup_drools | train | java |
c05cb4087a4d39efca33c77cd505d0817d0b253a | diff --git a/ratelimit/ratelimit_test.go b/ratelimit/ratelimit_test.go
index <HASH>..<HASH> 100644
--- a/ratelimit/ratelimit_test.go
+++ b/ratelimit/ratelimit_test.go
@@ -26,8 +26,8 @@ func TestUnaryServerInterceptor_RateLimitPass(t *testing.T) {
info := &grpc.UnaryServerInfo{
FullMethod: "FakeMethod",
}
- req, err := interceptor(nil, nil, info, handler)
- assert.Nil(t, req)
+ resp, err := interceptor(nil, nil, info, handler)
+ assert.Nil(t, resp)
assert.EqualError(t, err, errMsgFake)
}
@@ -45,8 +45,8 @@ func TestUnaryServerInterceptor_RateLimitFail(t *testing.T) {
info := &grpc.UnaryServerInfo{
FullMethod: "FakeMethod",
}
- req, err := interceptor(nil, nil, info, handler)
- assert.Nil(t, req)
+ resp, err := interceptor(nil, nil, info, handler)
+ assert.Nil(t, resp)
assert.EqualError(t, err, "rpc error: code = ResourceExhausted desc = FakeMethod is rejected by grpc_ratelimit middleware, please retry later.")
} | change the name of UnaryServerInterceptor's return (#<I>) | grpc-ecosystem_go-grpc-middleware | train | go |
da3c41ba9e95d9f28455456303a8a11d9b66b8b0 | diff --git a/src/iframeResizer.js b/src/iframeResizer.js
index <HASH>..<HASH> 100644
--- a/src/iframeResizer.js
+++ b/src/iframeResizer.js
@@ -129,7 +129,7 @@
}
function isMessageForUs(){
- return msgId === '' + msg.substr(0,msgIdLen); //''+Protects against non-string msg
+ return msgId === ('' + msg).substr(0,msgIdLen); //''+Protects against non-string msg
}
function forwardMsgFromIFrame(){ | Preventing error wehen message is an object
This method throwed "TypeError: Object #<Object> has no method 'substr'" when the message was an object. | davidjbradshaw_iframe-resizer | train | js |
4a160be1ade109e2092d8632b4fece516acfba96 | diff --git a/pefile.py b/pefile.py
index <HASH>..<HASH> 100644
--- a/pefile.py
+++ b/pefile.py
@@ -2750,7 +2750,7 @@ class PE:
# The number of imports parsed in this file
self.__total_import_symbols = 0
- fast_load = fast_load or globals()["fast_load"]
+ fast_load = fast_load if fast_load is not None else globals()["fast_load"]
try:
self.__parse__(name, data, fast_load)
except: | Fix handling of pefile.PE(fast_load=False)
The fast_load argument value in pefile.PE() constructor
needs to be explicitly checked for being None. The existing
truthy/falsy check means that fast_load=False always falls
back to the global value (which, when set to True, causes a
fast load even though user explicitly requested a full load). | erocarrera_pefile | train | py |
482934eca409988ca16bb6d209ad341fd959c01e | diff --git a/securimage_play.php b/securimage_play.php
index <HASH>..<HASH> 100644
--- a/securimage_play.php
+++ b/securimage_play.php
@@ -52,7 +52,7 @@ $img = new Securimage();
//$img->audio_use_noise = true;
//$img->degrade_audio = false;
//$img->sox_binary_path = 'sox';
-//$img->lame_binary_path = '/usr/bin/lame'; // for mp3 audio support
+//Securimage::$lame_binary_path = '/usr/bin/lame'; // for mp3 audio support
// To use an alternate language, uncomment the following and download the files from phpcaptcha.org
// $img->audio_path = $img->securimage_path . '/audio/es/'; | Update $lame_binary_path usage to static | dapphp_securimage | train | php |
7a3ad9f3e301a61e06e4f2dc9ac17ac9504668fe | diff --git a/nipap-www/nipapwww/public/controllers.js b/nipap-www/nipapwww/public/controllers.js
index <HASH>..<HASH> 100644
--- a/nipap-www/nipapwww/public/controllers.js
+++ b/nipap-www/nipapwww/public/controllers.js
@@ -1046,7 +1046,7 @@ nipapAppControllers.controller('PoolEditController', function ($scope, $routePar
// Mangle avps
query_data.avps = {};
- $scope.prefix.avps.forEach(function(avp) {
+ $scope.pool.avps.forEach(function(avp) {
query_data.avps[avp.attribute] = avp.value;
});
query_data.avps = JSON.stringify(query_data.avps); | www: Fix edit pool page
Fix bug in add pool page which prohibited changes from being saved.
Fixes #<I> | SpriteLink_NIPAP | train | js |
64d62578dc25fe981ff4f3c5a1a1be34be662259 | diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -29,9 +29,10 @@ wch.unwatch = async function(root) {
return quest.json(req, {root}).then(success)
}
+wch.connect = sock.connect
+
// Plugin events
wch.on = function(evt, fn) {
- sock.connect()
return events.on(evt, fn)
}
@@ -53,7 +54,6 @@ wch.stream = function(root, opts) {
return stream
async function watch() {
- await sock.connect()
// Rewatch on server restart.
rewatcher = events.on('connect', () => { | force user to call `wch.connect` | aleclarson_wch | train | js |
668f7321264af838cecd5c2b2fb57a01ece71857 | diff --git a/dist.py b/dist.py
index <HASH>..<HASH> 100644
--- a/dist.py
+++ b/dist.py
@@ -183,9 +183,9 @@ class Distribution:
commands (currently, this only happens if user asks for
help)."""
- # late import because of mutual dependence between these classes
+ # late import because of mutual dependence between these modules
from distutils.cmd import Command
-
+ from distutils.core import usage
# We have to parse the command line a bit at a time -- global
# options, then the first command, then its options, and so on -- | Add missing import of 'usage' string. | pypa_setuptools | train | py |
3cb092ef0a06221bfe9c390adf7eef3ed672fc6a | diff --git a/src/widgets/PopUpManager.js b/src/widgets/PopUpManager.js
index <HASH>..<HASH> 100644
--- a/src/widgets/PopUpManager.js
+++ b/src/widgets/PopUpManager.js
@@ -119,7 +119,14 @@ define(function (require, exports, module) {
keyEvent.stopImmediatePropagation();
_removePopUp($popUp, true);
- EditorManager.focusEditor();
+
+ // TODO: right now Menus and Context Menus do not take focus away from
+ // the editor. We need to have a focus manager to correctly manage focus
+ // between editors and other UI elements.
+ // For now we don't set focus here and assume individual popups
+ // adjust focus if necessary
+ // See story in Trello card #404
+ //EditorManager.focusEditor();
}
break; | fixes <I> by not setting focus when popup is closed | adobe_brackets | train | js |
927b34e41e2ed0050dbeccbc7c3dffaeb2969949 | diff --git a/tracing/plugin/otlp.go b/tracing/plugin/otlp.go
index <HASH>..<HASH> 100644
--- a/tracing/plugin/otlp.go
+++ b/tracing/plugin/otlp.go
@@ -33,6 +33,7 @@ import (
"go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/sdk/resource"
+ "go.opentelemetry.io/otel/sdk/trace"
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.4.0"
)
@@ -49,7 +50,11 @@ func init() {
if cfg.Endpoint == "" {
return nil, fmt.Errorf("no OpenTelemetry endpoint: %w", plugin.ErrSkipPlugin)
}
- return newExporter(ic.Context, cfg)
+ exp, err := newExporter(ic.Context, cfg)
+ if err != nil {
+ return nil, err
+ }
+ return trace.NewBatchSpanProcessor(exp), nil
},
})
plugin.Register(&plugin.Registration{ | tracing: fix panic on startup when configured
When support for http/protobuf was added, the OTLP tracing processor
plugin was mistakenly changed to return a raw OTLP exporter instance.
Consequently, the type-assertion to a trace.SpanProcessor inside the
tracing pluigin would panic if the processor plugin was configured.
Modify the OTLP plugin to return a BatchSpanProcessor derived from the
exporter once more. | containerd_containerd | train | go |
399e49f10462a7374782e24a15d6dcb6ccc848ce | diff --git a/lib/shhh/app/commands/command.rb b/lib/shhh/app/commands/command.rb
index <HASH>..<HASH> 100644
--- a/lib/shhh/app/commands/command.rb
+++ b/lib/shhh/app/commands/command.rb
@@ -60,6 +60,10 @@ module Shhh
raise Shhh::Errors::AbstractMethodCalled.new(:run)
end
+ def to_s
+ "#{self.class.short_name.to_s.bold.yellow}, with options: #{cli.args.argv.join(' ').gsub(/--/, '').bold.green}"
+ end
+
end
end
end | Add nice #to_s to all commands | kigster_sym | train | rb |
6d272e3174afc05b4621c9770db0ceb8da385e46 | diff --git a/plugin/forward/health.go b/plugin/forward/health.go
index <HASH>..<HASH> 100644
--- a/plugin/forward/health.go
+++ b/plugin/forward/health.go
@@ -25,7 +25,6 @@ func (p *Proxy) Check() error {
func (p *Proxy) send() error {
hcping := new(dns.Msg)
hcping.SetQuestion(".", dns.TypeNS)
- hcping.RecursionDesired = false
m, _, err := p.client.Exchange(hcping, p.addr)
// If we got a header, we're alright, basically only care about I/O errors 'n stuff | plugin/forward: set the RD bit in the hc (#<I>)
My routers acts funny when it sees it non RD query; make this HC as
boring as possible | coredns_coredns | train | go |
9686706997c9399e1e54610dca9225e34de236ac | diff --git a/safe/utilities/analysis.py b/safe/utilities/analysis.py
index <HASH>..<HASH> 100644
--- a/safe/utilities/analysis.py
+++ b/safe/utilities/analysis.py
@@ -70,7 +70,7 @@ from safe.common.signals import (
ANALYSIS_DONE_SIGNAL)
from safe_extras.pydispatch import dispatcher
from safe.common.exceptions import BoundingBoxError, NoValidLayerError
-
+from safe.utilities.resources import resource_url
PROGRESS_UPDATE_STYLE = styles.PROGRESS_UPDATE_STYLE
INFO_STYLE = styles.INFO_STYLE
@@ -78,7 +78,10 @@ WARNING_STYLE = styles.WARNING_STYLE
KEYWORD_STYLE = styles.KEYWORD_STYLE
SUGGESTION_STYLE = styles.SUGGESTION_STYLE
SMALL_ICON_STYLE = styles.SMALL_ICON_STYLE
-LOGO_ELEMENT = styles.logo_element()
+LOGO_ELEMENT = m.Image(
+ resource_url(styles.logo_element()),
+ 'InaSAFE Logo')
+
LOGGER = logging.getLogger('InaSAFE') | [BACKPORT] Fix #<I> - logo does not display in dock during processing. | inasafe_inasafe | train | py |
1ac631d329a965a262211b44b837193030acefbb | diff --git a/spec/unit/resource_controller/data_access_spec.rb b/spec/unit/resource_controller/data_access_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/resource_controller/data_access_spec.rb
+++ b/spec/unit/resource_controller/data_access_spec.rb
@@ -20,6 +20,22 @@ describe ActiveAdmin::ResourceController::DataAccess do
expect(chain).to receive(:ransack).with(params[:q]).once.and_return(Post.ransack)
controller.send :apply_filtering, chain
end
+
+ context "params includes empty values" do
+ let(:params) do
+ { q: {id_eq: 1, position_eq: ""} }
+ end
+ it "should return relation without empty filters" do
+ expect(Post).to receive(:ransack).with(params[:q]).once.and_wrap_original do |original, *args|
+ chain = original.call(*args)
+ expect(chain.conditions.size).to eq(1)
+ chain
+ end
+ controller.send :apply_filtering, Post
+ end
+ end
+
+
end
describe "sorting" do | added test to check blank params are not included while filtering | activeadmin_activeadmin | train | rb |
1884ed6fbafac7704ac4a1023b609ee40266842e | diff --git a/lib/locabulary/json_creator.rb b/lib/locabulary/json_creator.rb
index <HASH>..<HASH> 100644
--- a/lib/locabulary/json_creator.rb
+++ b/lib/locabulary/json_creator.rb
@@ -2,6 +2,7 @@ require "google/api_client"
require "google_drive"
require 'highline/import'
require 'locabulary'
+require 'locabulary/item'
require 'json'
module Locabulary
@@ -59,13 +60,8 @@ module Locabulary
end
def convert_to_json(data)
- json_array = []
- data.each do |row|
- data_map = {}
- Item::ATTRIBUTE_NAMES.each do |key|
- data_map[key] = row.fetch(key) { row.fetch(key.to_s, nil) }
- end
- json_array << data_map
+ json_array = data.map do |row|
+ Locabulary::Item.new(row).to_h
end
@json_data = JSON.pretty_generate("predicate_name" => predicate_name, "values" => json_array)
end | Removing repetition of initialization knowledge | ndlib_locabulary | train | rb |
ae0b4d4ccb936a98c2edeae9f73305b79da4d876 | diff --git a/jaraco/mongodb/tests/test_compat.py b/jaraco/mongodb/tests/test_compat.py
index <HASH>..<HASH> 100644
--- a/jaraco/mongodb/tests/test_compat.py
+++ b/jaraco/mongodb/tests/test_compat.py
@@ -44,3 +44,12 @@ def test_save_no_id_extant_docs(database):
assert database.test_coll.count() == 1
compat.save(database.test_coll, doc)
assert database.test_coll.count() == 2
+
+
+def test_save_adds_id(database):
+ """
+ Ensure _id is added to an inserted document.
+ """
+ doc = dict(foo='bar')
+ compat.save(database.test_coll, doc)
+ assert '_id' in doc | Add test capturing expectation that document is mutated on an insert. | jaraco_jaraco.mongodb | train | py |
d61032a219337f6f445b06e9b973c6ca4ea6bbdc | diff --git a/src/main/java/com/conveyal/gtfs/GTFSFeed.java b/src/main/java/com/conveyal/gtfs/GTFSFeed.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/conveyal/gtfs/GTFSFeed.java
+++ b/src/main/java/com/conveyal/gtfs/GTFSFeed.java
@@ -104,7 +104,7 @@ public class GTFSFeed implements Cloneable, Closeable {
new FeedInfo.Loader(this).loadTable(zip);
// maybe we should just point to the feed object itself instead of its ID, and null out its stoptimes map after loading
if (feedId == null) {
- feedId = zip.getName().replaceAll("\\.zip$", "");
+ feedId = new File(zip.getName()).getName().replaceAll("\\.zip$", "");
LOG.info("Feed ID is undefined, pester maintainers to include a feed ID. Using file name {}.", feedId); // TODO log an error, ideally feeds should include a feedID
}
else { | fix feed IDs to use file name not file path. | conveyal_gtfs-lib | train | java |
698b3ef4acff617f73e1b82b06bce4927a955373 | diff --git a/src/main/java/com/datumbox/common/dataobjects/Dataframe.java b/src/main/java/com/datumbox/common/dataobjects/Dataframe.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/datumbox/common/dataobjects/Dataframe.java
+++ b/src/main/java/com/datumbox/common/dataobjects/Dataframe.java
@@ -32,7 +32,6 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.Random;
import java.util.Set;
import org.apache.commons.csv.CSVFormat;
import org.apache.commons.csv.CSVParser;
@@ -277,7 +276,7 @@ public final class Dataframe implements Serializable, Collection<Record> {
*/
@Override
public boolean contains(Object o) {
- return records.containsValue(o);
+ return records.containsValue((Record)o);
}
/**
@@ -386,7 +385,7 @@ public final class Dataframe implements Serializable, Collection<Record> {
public boolean removeAll(Collection<?> c) {
boolean modified = false;
for(Object o : c) {
- modified |= remove(o);
+ modified |= remove((Record)o);
}
if(modified) {
recalculateMeta(); | Fixing imports and casts. | datumbox_datumbox-framework | train | java |
c9d665cad56f0326339096a4491f2ca0cd23e484 | diff --git a/agouti_dsl.go b/agouti_dsl.go
index <HASH>..<HASH> 100644
--- a/agouti_dsl.go
+++ b/agouti_dsl.go
@@ -6,7 +6,6 @@ import (
"github.com/sclevine/agouti/phantom"
"github.com/sclevine/agouti/webdriver"
"time"
- "fmt"
)
const PHANTOM_HOST = "127.0.0.1" | Removed extra fmt package import | sclevine_agouti | train | go |
1612ef979176cab2a38560925def12a0cff47578 | diff --git a/hamlpy/elements.py b/hamlpy/elements.py
index <HASH>..<HASH> 100644
--- a/hamlpy/elements.py
+++ b/hamlpy/elements.py
@@ -4,13 +4,13 @@ import re
class Element(object):
"""contains the pieces of an element and can populate itself from haml element text"""
- self_closing_tags = ('meta', 'img', 'link', 'script', 'br', 'hr')
+ self_closing_tags = ('meta', 'img', 'link', 'br', 'hr')
ELEMENT = '%'
ID = '#'
CLASS = '.'
- HAML_REGEX = re.compile(r"(?P<tag>%\w+)?(?P<id>#\w*)?(?P<class>\.[\w\.-]*)*(?P<attributes>\{.*\})?(?P<selfclose>/)?(?P<django>=)?(?P<inline>[^\w\.#\{].*)?")
+ HAML_REGEX = re.compile(r"(?P<tag>%\w+)?(?P<id>#[\w-]*)?(?P<class>\.[\w\.-]*)*(?P<attributes>\{.*\})?(?P<selfclose>/)?(?P<django>=)?(?P<inline>[^\w\.#\{].*)?")
def __init__(self, haml):
self.haml = haml | adding hyphens to the CSS selector regex | jessemiller_HamlPy | train | py |
b2573d221d6082002a38d9e35c4f424d80cab33a | diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -99,6 +99,8 @@ export function serializeComponents (props) {
return;
}
+ if (props[component] === undefined) { return; }
+
if (props[component].constructor === Function) { return; }
var ind = Object.keys(components).indexOf(component.split('__')[0]); | Adding a check for if a component has not been set yet | supermedium_aframe-react | train | js |
c10b9d9075258c4b46fad1dece926e7bf790a9bc | diff --git a/src/Leviu/Html/View.php b/src/Leviu/Html/View.php
index <HASH>..<HASH> 100644
--- a/src/Leviu/Html/View.php
+++ b/src/Leviu/Html/View.php
@@ -55,14 +55,14 @@ class View
//standard js file
//$this->js[] = URL . 'js/jquery-2.1.4.min.js';
- $this->js[] = URL . 'js/main.js';
- $this->js[] = URL . 'js/ajax.js';
+ //$this->js[] = URL . 'js/main.js';
+ //$this->js[] = URL . 'js/ajax.js';
//$this->js[] = URL . 'js/application.js';
//standard css file
- $this->css[] = URL . 'css/style.css';
+ //$this->css[] = URL . 'css/style.css';
- $this->title = 'App_Mk0';
+ $this->title = 'App';
}
/** | Change standard loaded css and js file | linna_framework | train | php |
b07577d53d3ad36a1e3d8729287145991e65eedf | diff --git a/Tone/source/Source.js b/Tone/source/Source.js
index <HASH>..<HASH> 100644
--- a/Tone/source/Source.js
+++ b/Tone/source/Source.js
@@ -144,7 +144,7 @@ function(Tone){
*/
Tone.Source.prototype.start = function(time, offset, duration){
if (this.isUndef(time) && this._synced){
- time = Tone.Transport.position;
+ time = Tone.Transport.seconds;
} else {
time = this.toSeconds(time);
}
@@ -178,7 +178,7 @@ function(Tone){
*/
Tone.Source.prototype.stop = function(time){
if (this.isUndef(time) && this._synced){
- time = Tone.Transport.position;
+ time = Tone.Transport.seconds;
} else {
time = this.toSeconds(time);
} | using Tone.seconds instead of Tone.position in start/stop
so that it can be fed straight into getStateAtTime | Tonejs_Tone.js | train | js |
0a2b33db80fb995e8365d42c555bbf266336e356 | diff --git a/classes/Gems/Loader.php b/classes/Gems/Loader.php
index <HASH>..<HASH> 100644
--- a/classes/Gems/Loader.php
+++ b/classes/Gems/Loader.php
@@ -54,6 +54,12 @@ class Gems_Loader extends Gems_Loader_LoaderAbstract
/**
*
+ * @var Gems_Export
+ */
+ protected $export;
+
+ /**
+ *
* @var Gems_Model
*/
protected $models;
@@ -116,6 +122,15 @@ class Gems_Loader extends Gems_Loader_LoaderAbstract
/**
*
+ * @return Gems_Export
+ */
+ public function getExport()
+ {
+ return $this->_getClass('export');
+ }
+
+ /**
+ *
* @return Gems_Model
*/
public function getModels() | Fix, forgot to move export from project to gems loader | GemsTracker_gemstracker-library | train | php |
e6358009c4b459dc1ee6dc1d843d2f870ddcb1c5 | diff --git a/spec/opal/core/time_spec.rb b/spec/opal/core/time_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/opal/core/time_spec.rb
+++ b/spec/opal/core/time_spec.rb
@@ -61,7 +61,7 @@ describe Time do
end
describe '#utc_offset' do
- context 'returns 0 if the date is UTC' do
+ it 'returns 0 if the date is UTC' do
Time.new.utc.utc_offset.should == 0
end
end | Avoid should outside of nil in spec/opal | opal_opal | train | rb |
69a9da08de0196dcadb74609fc2d864db90830c0 | diff --git a/fmt/fmtutil/fmtutil.go b/fmt/fmtutil/fmtutil.go
index <HASH>..<HASH> 100644
--- a/fmt/fmtutil/fmtutil.go
+++ b/fmt/fmtutil/fmtutil.go
@@ -5,6 +5,8 @@ import (
"encoding/json"
"expvar"
"fmt"
+
+ "github.com/grokify/gotilla/encoding/jsonutil"
)
var (
@@ -35,6 +37,16 @@ func PrintJSON(in interface{}) error {
return nil
}
+// PrintJSONMore pretty prints anything using supplied indentation.
+func PrintJSONMore(in interface{}, jsonPrefix, jsonIndent string) error {
+ j, err := jsonutil.MarshalSimple(in, jsonPrefix, jsonIndent)
+ if err != nil {
+ return err
+ }
+ fmt.Println(string(j))
+ return nil
+}
+
// PrintJSON pretty prints anything using a default indentation
func PrintJSONMin(in interface{}) error {
if j, err := json.Marshal(in); err != nil { | add fmtutil.PrintJSONMore to support compact JSON | grokify_gotilla | train | go |
3d0a0dab7dabaa25533e9b5ced530da14b1df1f6 | diff --git a/tests/test_widgets.py b/tests/test_widgets.py
index <HASH>..<HASH> 100644
--- a/tests/test_widgets.py
+++ b/tests/test_widgets.py
@@ -37,8 +37,11 @@ class TestFrame(Frame):
layout = Layout([1, 18, 1])
self.add_layout(layout)
self._reset_button = Button("Reset", self._reset)
- self.label = Label("Group 1:", height=label_height)
- layout.add_widget(self.label, 1)
+
+ # Test that layout.add_widget returns the widget
+ self.label = layout.add_widget(
+ Label("Group 1:", height=label_height), 1)
+
layout.add_widget(TextBox(5,
label="My First Box:",
name="TA", | Update unit tests to check the change to add_widget | peterbrittain_asciimatics | train | py |
1ee4677a2f489c754e944538b6fc6741184aaab8 | diff --git a/colr/__main__.py b/colr/__main__.py
index <HASH>..<HASH> 100755
--- a/colr/__main__.py
+++ b/colr/__main__.py
@@ -125,11 +125,13 @@ def main(argd):
clr = get_colr(txt, argd)
- # Justify options...
+ # Center, ljust, rjust, or not.
clr = justify(clr, argd)
-
- print(str(clr), file=fd, end=end)
- return 0
+ if clr:
+ print(str(clr), file=fd, end=end)
+ return 0
+ # Error while building Colr.
+ return 1
def get_colr(txt, argd): | Woops, clr is None on errors. | welbornprod_colr | train | py |
ce82236a3c10920345b00ebbe2cdfae5a80457d9 | diff --git a/nodeconductor/structure/serializers.py b/nodeconductor/structure/serializers.py
index <HASH>..<HASH> 100644
--- a/nodeconductor/structure/serializers.py
+++ b/nodeconductor/structure/serializers.py
@@ -486,11 +486,13 @@ class ProjectPermissionSerializer(PermissionFieldFilteringMixin,
core_serializers.AugmentedSerializerMixin,
serializers.HyperlinkedModelSerializer):
+ customer_name = serializers.ReadOnlyField(source='project.customer.name')
+
class Meta(object):
model = models.ProjectPermission
fields = (
'url', 'pk', 'role', 'created', 'expiration_time', 'created_by',
- 'project', 'project_uuid', 'project_name',
+ 'project', 'project_uuid', 'project_name', 'customer_name'
) + STRUCTURE_PERMISSION_USER_FIELDS['fields']
related_paths = { | Render customer name in project permission serializer. | opennode_waldur-core | train | py |
09599e0229688eceee9c3e7578c171dfb0cb1360 | diff --git a/src/discoursegraphs/discoursegraph.py b/src/discoursegraphs/discoursegraph.py
index <HASH>..<HASH> 100644
--- a/src/discoursegraphs/discoursegraph.py
+++ b/src/discoursegraphs/discoursegraph.py
@@ -941,11 +941,10 @@ def get_span(docgraph, node_id, debug=False):
span : list of str
sorted list of token nodes (token node IDs)
"""
- if debug is True:
- if is_directed_acyclic_graph(docgraph) is False:
- warnings.warn(
- ("Can't reliably extract span '{0}' from cyclical graph'{1}'."
- "Maximum recursion depth may be exceeded.").format(node_id,
+ if debug is True and is_directed_acyclic_graph(docgraph) is False:
+ warnings.warn(
+ ("Can't reliably extract span '{0}' from cyclical graph'{1}'."
+ "Maximum recursion depth may be exceeded.").format(node_id,
docgraph))
span = []
if docgraph.ns+':token' in docgraph.node[node_id]: | quantifiedcode: Avoid consecutive if-statements | arne-cl_discoursegraphs | train | py |
d3dafbb7f294c2482287c99e36596fe36f94fb2f | diff --git a/tests/test_api.py b/tests/test_api.py
index <HASH>..<HASH> 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -79,6 +79,7 @@ def test_pull_success(request_mocker, download_url, query_project):
download_url(request_mocker)
with CliRunner().isolated_filesystem():
os.mkdir('.wandb')
+ os.mkdir('wandb')
res = api.pull("test/test")
assert res[0].status_code == 200
@@ -88,6 +89,7 @@ def test_pull_existing_file(request_mocker, mocker, download_url, query_project)
download_url(request_mocker)
with CliRunner().isolated_filesystem():
os.mkdir('.wandb')
+ os.mkdir('wandb')
with open("model.json", "w") as f:
f.write("{}")
mocked = mocker.patch.object( | Try to fix circleci tests. | wandb_client | train | py |
d479c6bff6d4d3c7eb185aaee27de177fd61756b | diff --git a/core/src/main/java/com/graphhopper/util/ViaInstruction.java b/core/src/main/java/com/graphhopper/util/ViaInstruction.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/com/graphhopper/util/ViaInstruction.java
+++ b/core/src/main/java/com/graphhopper/util/ViaInstruction.java
@@ -42,6 +42,9 @@ public class ViaInstruction extends Instruction
public int getViaCount()
{
+ if (viaPosition < 0)
+ throw new IllegalStateException("Uninitialized via count in instruction " + getName());
+
return viaPosition;
} | throw exception if via count is uninitialized | graphhopper_graphhopper | train | java |
efca0fe0f2c02e59482e35193b05dcb4d987d33c | diff --git a/lib/aws4signer.js b/lib/aws4signer.js
index <HASH>..<HASH> 100644
--- a/lib/aws4signer.js
+++ b/lib/aws4signer.js
@@ -60,6 +60,11 @@ const aws4signer = (esRequest, parent) => {
esRequest.region = parent.options.awsRegion
}
+ // refreshes the token if has expired.
+ credentials.get(err => {
+ if (err) throw err
+ })
+
esRequest.headers = Object.assign({ host: urlObj.hostname, 'Content-Type': 'application/json' }, esRequest.headers)
esRequest.path = `${urlObj.pathname}?${urlObj.searchParams.toString()}`
aws4.sign(esRequest, credentials) | check if credential has expired
and trigger a refresh | taskrabbit_elasticsearch-dump | train | js |
62121577bd309d1f61f67af81deb17fec273cf6e | diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb
index <HASH>..<HASH> 100644
--- a/test/unit/user_test.rb
+++ b/test/unit/user_test.rb
@@ -57,13 +57,15 @@ class UserTest < ActiveSupport::TestCase
end
def test_should_reset_password
- @user.update_attributes(:password => 'new password', :password_confirmation => 'new password')
- assert_equal @user, User.authenticate(@user.login, @user.password)
+ user = User.make(:login => "foo", :password => "barbarbar")
+ user.update_attributes(:password => 'new password', :password_confirmation => 'new password')
+ assert_equal user, User.authenticate(user.login, user.password)
end
def test_should_not_rehash_password
- @user.update_attributes(:login => 'quentin2')
- assert_equal @user, User.authenticate('quentin2', @user.password)
+ user = User.make(:login => "foo", :password => "barbarbar")
+ user.update_attributes(:login => 'quentin2')
+ assert_equal user, User.authenticate('quentin2', user.password)
end
def test_should_authenticate_user | fix two more tests like that
(cherry picked from commit <I>f<I>f6d<I>f1abc<I>bed<I>a2a5f7b<I>) | Graylog2_graylog2-server | train | rb |
d83f227459fc09513a5dbc49abf07d84a7c0f97e | diff --git a/chess/__init__.py b/chess/__init__.py
index <HASH>..<HASH> 100644
--- a/chess/__init__.py
+++ b/chess/__init__.py
@@ -1736,7 +1736,7 @@ class Board(BaseBoard):
"""
transposition_key = self._transposition_key()
repetitions = 1
- switchyard = collections.deque()
+ switchyard = []
while self.move_stack and repetitions < 5:
move = self.pop()
@@ -1784,7 +1784,7 @@ class Board(BaseBoard):
transpositions.update((transposition_key, ))
# Count positions.
- switchyard = collections.deque()
+ switchyard = []
while self.move_stack:
move = self.pop()
switchyard.append(move) | Use list for stacks (rather than deque) | niklasf_python-chess | train | py |
cb925a2977ef861b5b5313b320aeb92eb7cdb205 | diff --git a/Auth/OpenID/Consumer.php b/Auth/OpenID/Consumer.php
index <HASH>..<HASH> 100644
--- a/Auth/OpenID/Consumer.php
+++ b/Auth/OpenID/Consumer.php
@@ -2089,7 +2089,7 @@ class Auth_OpenID_SuccessResponse extends Auth_OpenID_ConsumerResponse {
foreach ($msg_args as $key => $value) {
if (!$this->isSigned($ns_uri, $key)) {
- return null;
+ unset($msg_args[$key]);
}
} | As written in doc, don't erase signed args when some of the args are unsigned | openid_php-openid | train | php |
8fd3b9153686ba4b91da62c90a80690afbcb7873 | diff --git a/src/Scheduler.php b/src/Scheduler.php
index <HASH>..<HASH> 100644
--- a/src/Scheduler.php
+++ b/src/Scheduler.php
@@ -96,7 +96,9 @@ class Scheduler extends ArrayObject
});
if (--$this->minutes > 0) {
$wait = max(60 - (time() - $start), 0);
- sleep($wait);
+ if (!getenv('TOAST')) {
+ sleep($wait);
+ }
$this->now += 60;
$this->process();
} | don't actually sleep when in testing mode | monolyth-php_croney | train | php |
2fa57aa520a211cfb09306bb8a8e7bf411dfd651 | diff --git a/pharen.php b/pharen.php
index <HASH>..<HASH> 100755
--- a/pharen.php
+++ b/pharen.php
@@ -1252,7 +1252,7 @@ class SpliceWrapper extends UnquoteWrapper{
if(MacroNode::$ghosting){
return "";
}
- return $this->compile_exprs($this->get_exprs(), $prefix);
+ return $this->compile_exprs($this->get_exprs(), $prefix, __FUNCTION__);
}
public function compile_statement($prefix=""){
@@ -1263,7 +1263,7 @@ class SpliceWrapper extends UnquoteWrapper{
if(MacroNode::$ghosting){
return "";
}
- return $this->compile_exprs($this->get_exprs(), "", True);
+ return $this->compile_exprs($this->get_exprs(), "", __FUNCTION__, True);
}
} | Make SpliceWrapper use the correct function on the exprs it contains.
Before, it was assumed that splicing would only be done on things that are compiled to statements. Since now splicing is done where expressions are expected, SpliceWrapper must be able to handle this situation by not using compile_statement all the time. | Scriptor_pharen | train | php |
2056fa317f56b1eae5938347aaea9d5cec462ad4 | diff --git a/shinken/macroresolver.py b/shinken/macroresolver.py
index <HASH>..<HASH> 100644
--- a/shinken/macroresolver.py
+++ b/shinken/macroresolver.py
@@ -156,24 +156,6 @@ class MacroResolver(Borg):
env['NAGIOS__' + o.__class__.__name__.upper() + cmacro[1:].upper()] = o.customs[cmacro]
return env
- clss = [d.__class__ for d in data]
- for o in data:
- for cls in clss:
- if o.__class__ == cls:
- macros = cls.macros
- for macro in macros:
-# print "Macro in %s : %s" % (o.__class__, macro)
- prop = macros[macro]
- value = self.get_value_from_element(o, prop)
-# print "Value: %s" % value
- env['NAGIOS_'+macro] = value
- if hasattr(o, 'customs'):
- # make NAGIOS__HOSTMACADDR from _MACADDR
- for cmacro in o.customs:
- env['NAGIOS__' + o.__class__.__name__.upper() + cmacro[1:].upper()] = o.customs[cmacro]
-
- return env
-
# This function will look at elements in data (and args if it filled)
# to replace the macros in c_line with real value. | *forgot to remove leftover code before the ast commit. | Alignak-monitoring_alignak | train | py |
6e9f4868579be26f9aab5c1b0d91d8123280fa31 | diff --git a/go/teams/chain_parse.go b/go/teams/chain_parse.go
index <HASH>..<HASH> 100644
--- a/go/teams/chain_parse.go
+++ b/go/teams/chain_parse.go
@@ -38,8 +38,9 @@ type SCTeamMembers struct {
}
type SCTeamParent struct {
- ID SCTeamID `json:"id"`
- Seqno keybase1.Seqno `json:"seqno"`
+ ID SCTeamID `json:"id"`
+ Seqno keybase1.Seqno `json:"seqno"`
+ SeqType keybase1.SeqType `json:"seq_type"`
}
type SCSubteam struct {
diff --git a/go/teams/create.go b/go/teams/create.go
index <HASH>..<HASH> 100644
--- a/go/teams/create.go
+++ b/go/teams/create.go
@@ -392,8 +392,9 @@ func makeSubteamTeamSection(subteamName keybase1.TeamName, subteamID keybase1.Te
Name: (*SCTeamName)(&subteamName2),
ID: (SCTeamID)(subteamID),
Parent: &SCTeamParent{
- ID: SCTeamID(parentTeam.GetID()),
- Seqno: parentTeam.GetLatestSeqno() + 1, // the seqno of the *new* parent link
+ ID: SCTeamID(parentTeam.GetID()),
+ Seqno: parentTeam.GetLatestSeqno() + 1, // the seqno of the *new* parent link
+ SeqType: keybase1.SeqType_SEMIPRIVATE,
},
PerTeamKey: &SCPerTeamKey{
Generation: 1, | sending seqtype from client (#<I>) | keybase_client | train | go,go |
cb7a2beab79062dbe2d7e8ae530f059a9e63da96 | diff --git a/go/teams/loader2.go b/go/teams/loader2.go
index <HASH>..<HASH> 100644
--- a/go/teams/loader2.go
+++ b/go/teams/loader2.go
@@ -270,11 +270,16 @@ func (l *TeamLoader) verifyLink(ctx context.Context,
return &signer, proofSet, nil
}
- if link.outerLink.LinkType.RequiresAdminPermission() {
- // Reassign signer, might set implicitAdmin
- proofSet, signer, err = l.verifyAdminPermissions(ctx, state, me, link, readSubteamID, user.ToUserVersion(), proofSet)
- } else {
+ var isReaderOrAbove bool
+ if !link.outerLink.LinkType.RequiresAdminPermission() {
err = l.verifyWriterOrReaderPermissions(ctx, state, link, user.ToUserVersion())
+ isReaderOrAbove = (err == nil)
+ }
+ if link.outerLink.LinkType.RequiresAdminPermission() || !isReaderOrAbove {
+ // Check for admin permissions if they are not an on-chain reader/writer
+ // because they might be an implicit admin.
+ // Reassigns signer, might set implicitAdmin.
+ proofSet, signer, err = l.verifyAdminPermissions(ctx, state, me, link, readSubteamID, user.ToUserVersion(), proofSet)
}
return &signer, proofSet, err
} | check for implicit admins when need reader power | keybase_client | train | go |
71b02fb93c466d6d182e8800b70eec6a41410311 | diff --git a/lib/joint/FrictionJoint.js b/lib/joint/FrictionJoint.js
index <HASH>..<HASH> 100644
--- a/lib/joint/FrictionJoint.js
+++ b/lib/joint/FrictionJoint.js
@@ -39,6 +39,7 @@ var Velocity = require('../common/Velocity');
var Position = require('../common/Position');
var Joint = require('../Joint');
+var Body = require('../Body');
FrictionJoint.TYPE = 'friction-joint';
@@ -117,6 +118,28 @@ function FrictionJoint(def, bodyA, bodyB, anchor) {
// K = invI1 + invI2
}
+FrictionJoint.prototype._serialize = function() {
+ return {
+ type: this.m_type,
+ bodyA: this.m_bodyA,
+ bodyB: this.m_bodyB,
+ collideConnected: this.m_collideConnected,
+
+ maxForce: this.m_maxForce,
+ maxTorque: this.m_maxTorque,
+
+ localAnchorA: this.m_localAnchorA,
+ localAnchorB: this.m_localAnchorB,
+ };
+};
+
+FrictionJoint._deserialize = function(data, world, restore) {
+ data.bodyA = restore(Body, data.bodyA, world);
+ data.bodyB = restore(Body, data.bodyB, world);
+ var joint = new FrictionJoint(data);
+ return joint;
+};
+
/**
* The local anchor point relative to bodyA's origin.
*/ | FrictionJoint serializer | shakiba_planck.js | train | js |
d8154d43ee152185430d7ece478761200be71773 | diff --git a/upup/pkg/fi/cloudup/apply_cluster.go b/upup/pkg/fi/cloudup/apply_cluster.go
index <HASH>..<HASH> 100644
--- a/upup/pkg/fi/cloudup/apply_cluster.go
+++ b/upup/pkg/fi/cloudup/apply_cluster.go
@@ -1424,7 +1424,8 @@ func (n *nodeUpConfigBuilder) buildWarmPoolImages(ig *kops.InstanceGroup) []stri
// Add component and addon images that impact startup time
// TODO: Exclude images that only run on control-plane nodes in a generic way
desiredImagePrefixes := []string{
- "602401143452.dkr.ecr.us-west-2.amazonaws.com/", // Amazon VPC CNI
+ // Ignore images hosted in private ECR repositories as containerd cannot actually pull these
+ //"602401143452.dkr.ecr.us-west-2.amazonaws.com/", // Amazon VPC CNI
// Ignore images hosted on docker.io until a solution for rate limiting is implemented
//"docker.io/calico/",
//"docker.io/cilium/", | Ignore images hosted in private ECR repositories as containerd cannot actually pull these | kubernetes_kops | 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.