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
|
---|---|---|---|---|---|
8b898adaedf83229aa1678bc7280c86188ccafea
|
diff --git a/pyontutils/parcellation.py b/pyontutils/parcellation.py
index <HASH>..<HASH> 100755
--- a/pyontutils/parcellation.py
+++ b/pyontutils/parcellation.py
@@ -1914,6 +1914,9 @@ class PaxLabels(LabelsBase):
if s not in ss:
ss.append(s)
for art in arts:
+ artifacts = combined_record[a][-1]
+ if art not in artifacts:
+ artifacts.append(art)
if s not in struct_prov:
struct_prov[s] = [art]
elif art not in struct_prov[s]:
|
parc pax add abbrev dupe artifact to the class not just to axioms
|
tgbugs_pyontutils
|
train
|
py
|
2a974bb79c570eb3d1a19cf6ae9c8c50e8e92d53
|
diff --git a/blocks/site_main_menu/block_site_main_menu.php b/blocks/site_main_menu/block_site_main_menu.php
index <HASH>..<HASH> 100644
--- a/blocks/site_main_menu/block_site_main_menu.php
+++ b/blocks/site_main_menu/block_site_main_menu.php
@@ -89,6 +89,20 @@ class block_site_main_menu extends block_list {
}
if (!$ismoving) {
$actions = course_get_cm_edit_actions($mod, -1);
+
+ // Add the action move.
+ $modcontext = context_module::instance($mod->id);
+ $hasmanageactivities = has_capability('moodle/course:manageactivities', $modcontext);
+ if ($hasmanageactivities) {
+ $baseurl = new moodle_url('/course/mod.php', array('sesskey' => sesskey()));
+ $actions['move'] = new action_menu_link_primary(
+ new moodle_url($baseurl, array('copy' => $mod->id)),
+ new pix_icon('t/move', get_string('move'), 'moodle', array('class' => 'iconsmall', 'title' => '')),
+ null,
+ array('title' => get_string('move'))
+ );
+ }
+
$editbuttons = html_writer::tag('div',
$courserenderer->course_section_cm_edit_actions($actions, $mod, array('donotenhance' => true)),
array('class' => 'buttons')
|
MDL-<I> Main Menu Block loses ability to move resource or activity up or down (add back exact same behavior than in <I>)
|
moodle_moodle
|
train
|
php
|
e034289dcf5668200ac4b425ef2113d805dd0b08
|
diff --git a/lib/Bob/Dsl.php b/lib/Bob/Dsl.php
index <HASH>..<HASH> 100644
--- a/lib/Bob/Dsl.php
+++ b/lib/Bob/Dsl.php
@@ -142,6 +142,7 @@ function template($file)
# cmd - Command with arguments as String or List. Lists get joined by a single space.
# callback - A callback which receives the success as Boolean
# and the Process instance as second argument (optional).
+# timeout - Timeout for the process, defaults to 60 seconds.
#
# Examples
#
@@ -158,7 +159,7 @@ function template($file)
# });
#
# Returns nothing.
-function sh($cmd, $callback = null)
+function sh($cmd, $callback = null, $timeout = 60)
{
$cmd = join(' ', (array) $cmd);
$showCmd = strlen($cmd) > 42 ? substr($cmd, 0, 42).'...' : $cmd;
@@ -172,6 +173,8 @@ function sh($cmd, $callback = null)
println("bob: sh($showCmd)", STDERR);
$process = new Process($cmd);
+ $process->setTimeout($timeout);
+
$process->run(function($type, $output) {
$type == 'err' ? fwrite(STDERR, $output) : print($output);
});
|
Added timeout argument to sh() helper
|
CHH_bob
|
train
|
php
|
79d332569f1afd5a48eafc2f84a53f9b9b03823c
|
diff --git a/raven/base.py b/raven/base.py
index <HASH>..<HASH> 100644
--- a/raven/base.py
+++ b/raven/base.py
@@ -408,7 +408,7 @@ class Client(object):
protocol=self.protocol_version,
signature=signature,
timestamp=timestamp,
- client='raven/%s' % (raven.VERSION,),
+ client='raven-python/%s' % (raven.VERSION,),
api_key=self.public_key
),
'Content-Type': 'application/octet-stream',
diff --git a/tests/client/tests.py b/tests/client/tests.py
index <HASH>..<HASH> 100644
--- a/tests/client/tests.py
+++ b/tests/client/tests.py
@@ -102,7 +102,8 @@ class ClientTest(TestCase):
data='eJyrVkrLz1eyUlBKSixSqgUAIJgEVA==',
headers={
'Content-Type': 'application/octet-stream',
- 'X-Sentry-Auth': 'Sentry sentry_timestamp=1328055286.51, sentry_signature=signature, sentry_client=raven/%s, sentry_version=2.0, sentry_key=public' % (raven.VERSION,)
+ 'X-Sentry-Auth': 'Sentry sentry_timestamp=1328055286.51, sentry_signature=signature, '
+ 'sentry_client=raven-python/%s, sentry_version=2.0, sentry_key=public' % (raven.VERSION,)
},
)
|
Adjust client string to be raven-python
|
elastic_apm-agent-python
|
train
|
py,py
|
fd4a4013fc036033374ce88fcc66d0d8aec14d38
|
diff --git a/lib/chawk.rb b/lib/chawk.rb
index <HASH>..<HASH> 100644
--- a/lib/chawk.rb
+++ b/lib/chawk.rb
@@ -1,6 +1,5 @@
require "chawk/version"
require 'data_mapper'
-require 'dm-is-tree'
require 'quantizer'
require 'models'
require 'addr'
|
Remove reference (Caught in CI server)
|
queuetue_chawk-gem
|
train
|
rb
|
f5be2ded4bc9e1841435b7b80849e26c7f8dbe52
|
diff --git a/cake/libs/controller/components/email.php b/cake/libs/controller/components/email.php
index <HASH>..<HASH> 100644
--- a/cake/libs/controller/components/email.php
+++ b/cake/libs/controller/components/email.php
@@ -360,7 +360,7 @@ class EmailComponent extends Object{
$viewClass = $viewClass . 'View';
loadView($this->Controller->view);
}
- $View = new View($this->Controller);
+ $View = new $viewClass($this->Controller);
$View->layout = $this->layout;
$msg = null;
|
Adding fix to EmailComponent, would not use custom view.
git-svn-id: <URL>
|
cakephp_cakephp
|
train
|
php
|
e76208c0790598c94a2cac8633ffca31a1a38982
|
diff --git a/lib/runtime/entry.js b/lib/runtime/entry.js
index <HASH>..<HASH> 100644
--- a/lib/runtime/entry.js
+++ b/lib/runtime/entry.js
@@ -146,7 +146,16 @@ Ep.runGetters = function () {
var exportsKeyCount = exportsKeys.length;
for (var i = 0; i < exportsKeyCount; ++i) {
var key = exportsKeys[i];
- this.namespace[key] = this.exports[key];
+ var desc = Object.getOwnPropertyDescriptor(this.exports, key);
+ if (hasOwn.call(desc, "value")) {
+ // If this.exports[key] is a simple property, simply copy its
+ // value over to this.namespace[key].
+ this.namespace[key] = desc.value;
+ } else {
+ // Avoid triggering getters until necessary.
+ desc.configurable = true;
+ Object.defineProperty(this.namespace, key, desc);
+ }
}
}
|
Be careful not to trigger exports getter properties unnecessarily.
|
benjamn_reify
|
train
|
js
|
52dc1b2a81f0a5dd4e20e0aac3b5ad0465527c5b
|
diff --git a/js/h5p.js b/js/h5p.js
index <HASH>..<HASH> 100644
--- a/js/h5p.js
+++ b/js/h5p.js
@@ -156,13 +156,6 @@ H5P.init = function (target) {
});
}
- // Check if we should add and display a fullscreen button for this H5P using
- // the deprecated variable for backwards compatability.
- if (contentData.fullScreen == 1 && H5P.canHasFullScreen) {
- H5P.jQuery('<div class="h5p-content-controls"><div role="button" tabindex="0" class="h5p-enable-fullscreen" title="' + H5P.t('fullscreen') + '"></div></div>').prependTo($container).children().click(function () {
- H5P.fullScreen($container, instance);
- });
- }
// Create action bar
var $actions = H5P.jQuery('<ul class="h5p-actions"></ul>');
|
Refactor canHasFullScreen
HFP-<I>
|
h5p_h5p-php-library
|
train
|
js
|
f994f69927c01cb36305aecd1e64c4de427191fe
|
diff --git a/src/Validator.php b/src/Validator.php
index <HASH>..<HASH> 100644
--- a/src/Validator.php
+++ b/src/Validator.php
@@ -173,9 +173,7 @@ class Validator
$modulus = '97';
if (function_exists('bcmod')) {
- return PHP_VERSION_ID >= 70200
- ? bcmod($bigInt, $modulus, 0)
- : bcmod($bigInt, $modulus);
+ return bcmod($bigInt, $modulus, 0);
}
$take = 5;
|
Removed no longer needed PHP version check (#<I>)
|
jschaedl_iban-validation
|
train
|
php
|
e7cc7fa6782beff50b835371ec23c6c9a1e1afa3
|
diff --git a/config/routes.rb b/config/routes.rb
index <HASH>..<HASH> 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,3 +1,3 @@
Rails.application.routes.draw do
- match SecureHeaders::ContentSecurityPolicy::FF_CSP_ENDPOINT => "content_security_policy#scribe"
-end
\ No newline at end of file
+ post SecureHeaders::ContentSecurityPolicy::FF_CSP_ENDPOINT => "content_security_policy#scribe"
+end
|
CSP endpoint only accepts POST requests. Fixes Rails 4 compatibility.
|
twitter_secure_headers
|
train
|
rb
|
59b7e1b6ccf4c048691c7c9bc98a74ae9e79d74c
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -122,7 +122,7 @@ class Snekfetch extends transport.Extension {
then(resolver, rejector) {
if (this.response) return Promise.resolve(this.response);
- if (this._response) return this._response;
+ if (this._response) return this._response.then(resolver, rejector);
// eslint-disable-next-line no-return-assign
return this._response = transport.finalizeRequest.call(this)
.then(({ response, raw, redirect, headers }) => {
|
pass resolver/rejector to promise in then call
|
devsnek_snekfetch
|
train
|
js
|
98fc02e28e0147509ddfe4e601a97859a0e47cfc
|
diff --git a/rtv/content.py b/rtv/content.py
index <HASH>..<HASH> 100644
--- a/rtv/content.py
+++ b/rtv/content.py
@@ -310,14 +310,7 @@ class SubredditContent(BaseContent):
else:
if '/' in name:
- parse = name.split('/')
- name = parse[0]
-
- if parse[1] == 'top':
- display_type = 'top'
-
- elif parse[1] == 'new':
- display_type = 'new'
+ name, display_type = name.split('/')
try:
with loader():
@@ -326,10 +319,10 @@ class SubredditContent(BaseContent):
raise SubredditNameError(name)
if display_type == 'top':
- return cls('/r/'+sub.display_name, sub.get_top_from_all(limit=None), loader)
+ return cls('/r/'+sub.display_name + '/top', sub.get_top_from_all(limit=None), loader)
elif display_type == 'new':
- return cls('/r/'+sub.display_name, sub.get_new(limit=None), loader)
+ return cls('/r/'+sub.display_name + '/new', sub.get_new(limit=None), loader)
else:
return cls('/r/'+sub.display_name, sub.get_hot(limit=None), loader)
|
Removed parse and added more descriptive taglines
|
michael-lazar_rtv
|
train
|
py
|
45e8c25f68d409d2f8b5112bfaacc5091d87a7b0
|
diff --git a/zarr/indexing.py b/zarr/indexing.py
index <HASH>..<HASH> 100644
--- a/zarr/indexing.py
+++ b/zarr/indexing.py
@@ -829,18 +829,14 @@ def pop_fields(selection):
return fields, selection
-def int_to_slice(dim_selection):
- return slice(dim_selection, dim_selection + 1, 1)
-
-
def make_slice_selection(selection):
ls = []
for dim_selection in selection:
if is_integer(dim_selection):
- ls.append(int_to_slice(dim_selection))
+ ls.append(slice(dim_selection, dim_selection + 1, 1))
elif isinstance(dim_selection, np.ndarray):
if len(dim_selection) == 1:
- ls.append(int_to_slice(dim_selection[0]))
+ ls.append(slice(dim_selection[0], dim_selection[0] + 1, 1))
else:
raise ArrayIndexError()
else:
|
removes int_to_slice and moves logic inline
|
zarr-developers_zarr
|
train
|
py
|
f9b5104ca32fb006bef0cfa0622ef2df23abe4f2
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -28,7 +28,7 @@ module.exports = exports = function define (definition) {
return Object.defineProperties(
new (mixinable.bind.apply(mixinable, [mixinable].concat(args)))(),
{
- clone: {
+ __clone__: {
value: create.bind.apply(create, [create].concat(args))
},
__implementations__: {
|
refactor: mark clone method as internal
|
untool_mixinable
|
train
|
js
|
c6215ae4ff694f85ece5f65b29615df09a85d77d
|
diff --git a/github/CheckRun.py b/github/CheckRun.py
index <HASH>..<HASH> 100644
--- a/github/CheckRun.py
+++ b/github/CheckRun.py
@@ -276,7 +276,6 @@ class CheckRun(github.GithubObject.CompletableGithubObject):
self._name = github.GithubObject.NotSet
self._node_id = github.GithubObject.NotSet
self._output = github.GithubObject.NotSet
- self._output = github.GithubObject.NotSet
self._pull_requests = github.GithubObject.NotSet
self._started_at = github.GithubObject.NotSet
self._status = github.GithubObject.NotSet
|
Removed duplicate code (#<I>)
Remove a duplicate line in the CheckRun class.
|
PyGithub_PyGithub
|
train
|
py
|
9e1edb71f52f5059e746641f302c8bbaed46f73b
|
diff --git a/lib/veritas/logic/proposition/false.rb b/lib/veritas/logic/proposition/false.rb
index <HASH>..<HASH> 100644
--- a/lib/veritas/logic/proposition/false.rb
+++ b/lib/veritas/logic/proposition/false.rb
@@ -2,18 +2,55 @@ module Veritas
module Logic
class Proposition
class False < Proposition
+
+ # Return the inverse proposition class
+ #
+ # @example
+ # False.inverse # => True
+ #
+ # @return [Class<True>]
+ #
+ # @api public
def self.inverse
True
end
+ # Evaluate the proposition
+ #
+ # @example
+ # False.call # => false
+ #
+ # @return [false]
+ #
+ # @api public
def self.call
false
end
+ # Logically AND the proposition with another expression
+ #
+ # @example
+ # false_proposition.and(other) # => false_proposition
+ #
+ # @param [Expression] other
+ #
+ # @return [self]
+ #
+ # @api public
def and(other)
self
end
+ # Logically OR the proposition with another expression
+ #
+ # @example
+ # false_proposition.or(other) # => other
+ #
+ # @param [Expression] other
+ #
+ # @return [Expression]
+ #
+ # @api public
def or(other)
other
end
|
Added YARD docs for False proposition
|
dkubb_axiom
|
train
|
rb
|
a8cc5bd6104fe69756ae188e1482eedd5840d34b
|
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index <HASH>..<HASH> 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -2259,8 +2259,7 @@ class EntryPoint(object):
return self._load()
def _load(self):
- module = __import__(self.module_name, globals(), globals(),
- ['__name__'])
+ module = __import__(self.module_name, fromlist=['__name__'], level=0)
try:
return functools.reduce(getattr, self.attrs, module)
except AttributeError as exc:
|
Don't allow imports relative to the pkg_resources module.
|
pypa_setuptools
|
train
|
py
|
008999f20d461c7eece8e5341092894a391d3f7d
|
diff --git a/src/components/VProgressCircular/VProgressCircular.js b/src/components/VProgressCircular/VProgressCircular.js
index <HASH>..<HASH> 100644
--- a/src/components/VProgressCircular/VProgressCircular.js
+++ b/src/components/VProgressCircular/VProgressCircular.js
@@ -12,7 +12,7 @@ export default {
fill: {
type: String,
- default: () => this.indeterminate ? 'none' : 'transparent'
+ default () { return this.indeterminate ? 'none' : 'transparent' }
},
indeterminate: Boolean,
|
Fix VProgressCircular's error in a-la-carte import (#<I>)
* Fix VProgressCircular's error in a-la-carte import
Fix a case where importing VProgressCircular to declare as app local component triggers the arrow function behavior (`this` will be undefined).
* fix eslint
|
vuetifyjs_vuetify
|
train
|
js
|
3269b238a7a6ac8efa793716ff6f9c6959c1ef5d
|
diff --git a/version.php b/version.php
index <HASH>..<HASH> 100644
--- a/version.php
+++ b/version.php
@@ -5,7 +5,7 @@
// database to determine whether upgrades should
// be performed (see lib/db/*.php)
-$version = 2003041600; // The current version is a date (YYYYMMDDXX)
+$version = 2003042100; // The current version is a date (YYYYMMDDXX)
-$release = "1.0.9 development"; // User-friendly version number
+$release = "1.0.9 - development"; // User-friendly version number
|
Updated (to make the new release notes show up for CVS people :-)
|
moodle_moodle
|
train
|
php
|
4ae2e3a7e26a26cd014fafca517dc88507e21ab8
|
diff --git a/elpy/refactor.py b/elpy/refactor.py
index <HASH>..<HASH> 100644
--- a/elpy/refactor.py
+++ b/elpy/refactor.py
@@ -50,7 +50,10 @@ something wrong.
"""
+import xmlrpclib
+
try:
+ from rope.base.exceptions import RefactoringError
from rope.base.project import Project
from rope.base.libutils import path_to_resource
from rope.base import change as rope_change
@@ -243,7 +246,11 @@ class Refactor(object):
available=ROPE_AVAILABLE)
def refactor_rename_at_point(self, offset, new_name, in_hierarchy, docs):
"""Rename the symbol at point."""
- refactor = Rename(self.project, self.resource, offset)
+ try:
+ refactor = Rename(self.project, self.resource, offset)
+ except RefactoringError as e:
+ raise xmlrpclib.Fault(str(e),
+ code=400)
changes = refactor.get_changes(new_name, in_hierarchy=in_hierarchy,
docs=docs)
return translate_changes(changes)
|
Catch RefactoringError from Rope.
Fixes #<I>
|
jorgenschaefer_elpy
|
train
|
py
|
0ce4c55b5b7a5e9fa6660701481516afc8b65298
|
diff --git a/openquake/calculators/disaggregation.py b/openquake/calculators/disaggregation.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/disaggregation.py
+++ b/openquake/calculators/disaggregation.py
@@ -362,7 +362,7 @@ class DisaggregationCalculator(base.HazardCalculator):
if name.startswith('rup_')) # total number of ruptures
grp_ids = dstore['grp_ids'][:]
maxweight = min(int(numpy.ceil(totrups / (oq.concurrent_tasks or 1))),
- oq.ruptures_per_block * 10) # at maximum 5000
+ oq.ruptures_per_block * 8) # at maximum 4000
rlzs_by_gsim = self.full_lt.get_rlzs_by_gsim_list(grp_ids)
num_eff_rlzs = len(self.full_lt.sm_rlzs)
task_inputs = []
|
Less ruptures per block [skip CI]
|
gem_oq-engine
|
train
|
py
|
227cac6292dc434682b572f0c989438390283916
|
diff --git a/ratcave/utils/coordinates.py b/ratcave/utils/coordinates.py
index <HASH>..<HASH> 100644
--- a/ratcave/utils/coordinates.py
+++ b/ratcave/utils/coordinates.py
@@ -8,7 +8,7 @@ class Coordinates(IterObservable):
def __init__(self, *args, **kwargs):
super(Coordinates, self).__init__(**kwargs)
- self._array = np.array(args, dtype=float)
+ self._array = np.array(args, dtype=np.float32)
def __repr__(self):
arg_str = ', '.join(['{}={}'.format(*el) for el in zip('xyz', self._array)])
@@ -27,7 +27,7 @@ class Coordinates(IterObservable):
# Note: Index counts backwards from end of array to increase compatibility with Quaternions.
@property
def x(self):
- return self[-3].view()
+ return self[-3]
@x.setter
def x(self, value):
|
making Coords float<I> arrays makes using them as uniforms directly simpler. This increases coupling, unfortunately; but using <I>-bit arrays is becoming more of a package-wide rule, so maybe it's fine for now.
|
ratcave_ratcave
|
train
|
py
|
9a7c743cf472af4bff1928f7ec3eb01e992afd54
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -84,6 +84,7 @@ Flash.prototype = mapboxgl.util.inherit(mapboxgl.Control, {
// that's probably a lot of repainting.
if(Number.isSafeInteger(e.detail.fadeout)){
clearTimeout(message)
+ message.style.transitionDuration = '0s'
message.style.transitionProperty = ''
message.style.opacity = 1;
@@ -91,7 +92,7 @@ Flash.prototype = mapboxgl.util.inherit(mapboxgl.Control, {
message.style.transitionDuration = e.detail.fadeout + 's'
message.style.transitionProperty = 'opacity'
message.style.opacity = 0
- }) // Omitting the delay arg to setTimeout defaults to 0
+ }, 700)
} else {
message.classList.remove(flash.options.fadeoutClass)
}
|
Fiddle with the timeing of the fadein/out
|
sleepycat_mapbox-gl-flash
|
train
|
js
|
096c1fe832b0d808e20687cbde2d0e33e36f0d13
|
diff --git a/lib/capybara/rspec.rb b/lib/capybara/rspec.rb
index <HASH>..<HASH> 100644
--- a/lib/capybara/rspec.rb
+++ b/lib/capybara/rspec.rb
@@ -5,7 +5,6 @@ require 'capybara/rspec/matchers'
require 'capybara/rspec/features'
RSpec.configure do |config|
- config.expose_dsl_globally = false if config.respond_to? :expose_dsl_globally
config.include Capybara::DSL, :type => :feature
config.include Capybara::RSpecMatchers, :type => :feature
|
Don't force expose_dsl_globally=false
Don't force expose_dsl_globally=false on driver maintainers
|
teamcapybara_capybara
|
train
|
rb
|
27ebb3dc8cb57d17a2ef7aa0e358489bc7bf4c86
|
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
@@ -186,8 +186,9 @@ module ActiveRecord
end
def clear_stale_cached_connections! # :nodoc:
+ reap
end
- deprecate :clear_stale_cached_connections!
+ deprecate :clear_stale_cached_connections! => "Please use #reap instead"
# Check-out a database connection from the pool, indicating that you want
# to use it. You should call #checkin when you no longer need this.
|
deprecated clear_stale_active_connections! can call #reap instead of no-op'ing, #reap does the same thing
|
rails_rails
|
train
|
rb
|
37b353d4cd7e803acf07508117f59ae127d94f97
|
diff --git a/lib/imageruby/pureruby.rb b/lib/imageruby/pureruby.rb
index <HASH>..<HASH> 100644
--- a/lib/imageruby/pureruby.rb
+++ b/lib/imageruby/pureruby.rb
@@ -108,10 +108,6 @@ public
destpointer = (y_dest*width+x)*3
(0..image.width-1).each do |x_orig|
- if block_given?
- next if yield(x_orig,y_orig, Color.from_rgb(255,255,255))
- end
-
color = orig_pixel_data[origpointer..origpointer+2]
alpha = image.alpha_data[y_orig*image.width+x_orig]
|
removed unused block on draw! method
|
tario_imageruby
|
train
|
rb
|
1268eb9e29bff8ef776942e333b936dfb5739b9d
|
diff --git a/src/main/java/act/inject/DependencyInjectorBase.java b/src/main/java/act/inject/DependencyInjectorBase.java
index <HASH>..<HASH> 100644
--- a/src/main/java/act/inject/DependencyInjectorBase.java
+++ b/src/main/java/act/inject/DependencyInjectorBase.java
@@ -57,7 +57,7 @@ public abstract class DependencyInjectorBase<DI extends DependencyInjectorBase<D
@Override
public void fireInjectedEvent(Object bean, BeanSpec spec) {
- Class c = bean.getClass();
+ Class c = spec.rawType();
List<DependencyInjectionListener> list = listeners.get(c);
if (null != list) {
for (DependencyInjectionListener listener : list) {
|
fix NPE in DependencyInjectorBase.fireInjectEvent when bean is null
|
actframework_actframework
|
train
|
java
|
cef9649ce17ee8c812d4157ebb18db03ae85606b
|
diff --git a/examples/advanced/demo.js b/examples/advanced/demo.js
index <HASH>..<HASH> 100644
--- a/examples/advanced/demo.js
+++ b/examples/advanced/demo.js
@@ -19,14 +19,16 @@ $.when(
var geojson = responseGeojson[0]
// Create hash table for easy reference
- var dataHash = {}
- data.forEach(function(item) {
- if(item.label) dataHash[item.label] = item.value
- })
+ var dataHash = data.reduce(function(hash, item) {
+ if(item.label) {
+ hash[item.label] = isNaN(item.value) ? null : +item.value
+ }
+ return hash
+ }, {})
// Add value from hash table to geojson properties
geojson.features.forEach(function(item) {
- item.properties.incidents = +dataHash[item.properties._feature_id] || null
+ item.properties.incidents = dataHash[item.properties._feature_id] || null
})
L.choropleth(geojson, {
|
Improve data join in advanced example per code review
|
timwis_leaflet-choropleth
|
train
|
js
|
8f9d10cdf21a1079e26c889fa6da72a453378612
|
diff --git a/packages/core/src/tracing/instrumentation/protocols/graphql.js b/packages/core/src/tracing/instrumentation/protocols/graphql.js
index <HASH>..<HASH> 100644
--- a/packages/core/src/tracing/instrumentation/protocols/graphql.js
+++ b/packages/core/src/tracing/instrumentation/protocols/graphql.js
@@ -218,7 +218,7 @@ function addFieldsAndArguments(span, definition) {
return arg.name && typeof arg.name.value === 'string' ? arg.name.value : '?';
});
}
- }, {});
+ });
});
}
|
fix(tracing): remove superfluous argument
This was an array.reduce call at some time and the accumulator has not
been deleted when changing it ot array.forEach.
|
instana_nodejs-sensor
|
train
|
js
|
e0665b91e3d55567d445d39318cf2aa02b04b1da
|
diff --git a/code/admins/NewsAdmin.php b/code/admins/NewsAdmin.php
index <HASH>..<HASH> 100644
--- a/code/admins/NewsAdmin.php
+++ b/code/admins/NewsAdmin.php
@@ -43,11 +43,11 @@ class NewsAdmin extends ModelAdmin {
)
);
}
- elseif(!$siteConfig->AllowTags) {
- /** @todo also remove Tag from the root. This is not the way, feature disabled in NewsSiteConfigExtension */
- $form->Fields()->removeByName('Tag');
- }
- if(!$siteConfig->AllowExport){
+// elseif(!$siteConfig->AllowTags) {
+// /** @todo also remove Tag from the root. This is not the way, feature disabled in NewsSiteConfigExtension */
+// $form->Fields()->removeByName('Tag');
+// }
+ if($this->modelClass == "News" && !$siteConfig->AllowExport){
$form->Fields()
->fieldByName("News")
->getConfig()
|
AllowTags shouldn't be live yet :)
|
Firesphere_silverstripe-newsmodule
|
train
|
php
|
fec941081477a517ba870f3f215802957f753b08
|
diff --git a/plugins/provisioners/puppet/provisioner/puppet.rb b/plugins/provisioners/puppet/provisioner/puppet.rb
index <HASH>..<HASH> 100644
--- a/plugins/provisioners/puppet/provisioner/puppet.rb
+++ b/plugins/provisioners/puppet/provisioner/puppet.rb
@@ -159,7 +159,8 @@ module VagrantPlugins
:manifest => @manifest_file)
env[:machine].communicate.sudo(command) do |type, data|
- env[:ui].info(data.chomp, :prefix => false)
+ data.chomp!
+ env[:ui].info(data, :prefix => false) if !data.empty?
end
end
diff --git a/plugins/provisioners/puppet/provisioner/puppet_server.rb b/plugins/provisioners/puppet/provisioner/puppet_server.rb
index <HASH>..<HASH> 100644
--- a/plugins/provisioners/puppet/provisioner/puppet_server.rb
+++ b/plugins/provisioners/puppet/provisioner/puppet_server.rb
@@ -71,7 +71,8 @@ module VagrantPlugins
env[:ui].info I18n.t("vagrant.provisioners.puppet_server.running_puppetd")
env[:vm].channel.sudo(command) do |type, data|
- env[:ui].info(data.chomp, :prefix => false)
+ data.chomp!
+ env[:ui].info(data, :prefix => false) if !data.empty?
end
end
end
|
Omit empty lines in Puppet provisioner output
The sudo() block and/or the Puppet provisioner often returns newline
characters as separate strings. This makes the chomp() ineffective and
results in extraneous spacing between the output lines.
Separate out the call to chomp() so that we only do it once. Then only
output info if that line is not an empty string.
|
hashicorp_vagrant
|
train
|
rb,rb
|
edb31c888192861c7164906c0879c440d6109b41
|
diff --git a/Classes/Hooks/PageRenderer.php b/Classes/Hooks/PageRenderer.php
index <HASH>..<HASH> 100644
--- a/Classes/Hooks/PageRenderer.php
+++ b/Classes/Hooks/PageRenderer.php
@@ -111,13 +111,16 @@ class PageRenderer implements SingletonInterface
foreach ($allowedGridTypes as $gridTypes) {
$gridTypes = trim($gridTypes);
if ($gridTypes !== '*') {
+ if (empty($gridClasses)) {
+ $gridClasses .= 't3-allow-gridtype ';
+ }
$gridTypes = explode(',', $gridTypes);
foreach ($gridTypes as $gridType) {
- $gridClasses .= 't3-allow-gridtype t3-allow-gridtype-' . $gridType . ' ';
+ $gridClasses .= 't3-allow-gridtype-' . $gridType . ' ';
}
}
}
- if ($classes !== 't3-allow-all') {
+ if ($classes !== 't3-allow-all' && !empty($gridClasses)) {
$classes .= 't3-allow-gridelements_pi1 ';
}
}
|
[BUGFIX] Assign t3-allowed-gridtype only once
Resolves: #<I>
Releases: master, 7-0
Change-Id: I<I>b<I>d<I>fb<I>c5ceb5c<I>b<I>e<I>d<I>
Reviewed-on: <URL>
|
TYPO3-extensions_gridelements
|
train
|
php
|
af3525bf174d0774b61464f9cc8ab8441babc7ae
|
diff --git a/examples/flask_alchemy/test_demoapp.py b/examples/flask_alchemy/test_demoapp.py
index <HASH>..<HASH> 100644
--- a/examples/flask_alchemy/test_demoapp.py
+++ b/examples/flask_alchemy/test_demoapp.py
@@ -1,10 +1,9 @@
-import os
import unittest
-import tempfile
import demoapp
import demoapp_factories
+
class DemoAppTestCase(unittest.TestCase):
def setUp(self):
|
Remove useless imports from flask alchemy demo
|
FactoryBoy_factory_boy
|
train
|
py
|
a79d45449c446222d882a4aaca37f40cce7949db
|
diff --git a/lib/discordrb/voice/network.rb b/lib/discordrb/voice/network.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/voice/network.rb
+++ b/lib/discordrb/voice/network.rb
@@ -256,7 +256,6 @@ module Discordrb::Voice
# Disconnects the websocket and kills the thread
def destroy
- @client.close
@heartbeat_running = false
end
|
Don't bother to close the VWS when destroying as Discord will do it for us
|
meew0_discordrb
|
train
|
rb
|
d90051679d6a852646df623ad2b5338f337718f1
|
diff --git a/test/acceptance/test_flexi_time.rb b/test/acceptance/test_flexi_time.rb
index <HASH>..<HASH> 100644
--- a/test/acceptance/test_flexi_time.rb
+++ b/test/acceptance/test_flexi_time.rb
@@ -57,7 +57,7 @@ class TestFlexiTime < Test::Unit::TestCase
def _expect(r, pattern)
- stat = r.expect(pattern,1)
+ stat = r.expect(pattern, 3)
raise "Didn't find #{pattern} before timeout" if stat.nil?
stat
end
|
Needed to increase expect() timeout to avoid false test negatives
|
kjellm_achoo
|
train
|
rb
|
0de0bc57b66b8cca94f6cef2f383cf2dd83945d6
|
diff --git a/tests/full_game.py b/tests/full_game.py
index <HASH>..<HASH> 100755
--- a/tests/full_game.py
+++ b/tests/full_game.py
@@ -45,6 +45,12 @@ def play_full_game():
target = random.choice(card.targets)
print("Playing %r on %r" % (card, target))
card.play(target=target)
+
+ if player.choice:
+ choice = random.choice(player.choice.cards)
+ print("Choosing card %r" % (choice))
+ player.choice.choose(choice)
+
continue
# Randomly attack with whatever can attack
@@ -53,12 +59,6 @@ def play_full_game():
character.attack(random.choice(character.targets))
continue
- if player.choice:
- choice = random.choice(player.choice.cards)
- print("Choosing card %r" % (choice))
- player.choice.choose(choice)
- continue
-
game.end_turn()
|
full_game.py: Fix choosing Discover cards at end of turn
|
jleclanche_fireplace
|
train
|
py
|
2f5314f13b2ef3ab78911b9f2c408867849a58c4
|
diff --git a/lib/crash_log/payload.rb b/lib/crash_log/payload.rb
index <HASH>..<HASH> 100644
--- a/lib/crash_log/payload.rb
+++ b/lib/crash_log/payload.rb
@@ -78,8 +78,9 @@ module CrashLog
# Various meta data about this notifier gem
def notifier
{
- :name => "CrashLog gem",
- :version => CrashLog::VERSION
+ :name => "CrashLog",
+ :version => CrashLog::VERSION,
+ :platform => defined?(RUBY_PLATFORM) ? RUBY_PLATFORM : nil
}
end
|
Notifier ident sends platform version for statistics
|
crashlog_crashlog
|
train
|
rb
|
376293b6898d86ba30324858905abec70fa4dead
|
diff --git a/src/urh/controller/CompareFrameController.py b/src/urh/controller/CompareFrameController.py
index <HASH>..<HASH> 100644
--- a/src/urh/controller/CompareFrameController.py
+++ b/src/urh/controller/CompareFrameController.py
@@ -1184,10 +1184,13 @@ class CompareFrameController(QWidget):
@pyqtSlot(bool)
def on_writeable_changed(self, writeable_status: bool):
+ hidden_rows = {i for i in range(self.protocol_model.row_count) if self.ui.tblViewProtocol.isRowHidden(i)}
self.protocol_model.is_writeable = writeable_status
self.proto_tree_model.set_copy_mode(writeable_status)
self.ui.cbDecoding.setDisabled(writeable_status)
self.refresh()
+ for row in hidden_rows:
+ self.ui.tblViewProtocol.hide_row(row)
@pyqtSlot()
def on_project_updated(self):
|
keep hidden rows when entering writeable mode
|
jopohl_urh
|
train
|
py
|
ae29913761e22aef8e894b65bb5fe1f5ce60c523
|
diff --git a/src/services/statemanager.js b/src/services/statemanager.js
index <HASH>..<HASH> 100644
--- a/src/services/statemanager.js
+++ b/src/services/statemanager.js
@@ -39,7 +39,7 @@ ngeo.StateManager = function(ngeoLocation, ngeoUsedKeyRegexp) {
/**
* @type {boolean}
*/
- this.useLocalStorage = true;
+ this.useLocalStorage = false;
try {
if ('localStorage' in window) {
|
Disable the localstorage by default
|
camptocamp_ngeo
|
train
|
js
|
aea9841aa1f673b6b43f897809491b2bf9aa48fa
|
diff --git a/decode.go b/decode.go
index <HASH>..<HASH> 100644
--- a/decode.go
+++ b/decode.go
@@ -113,6 +113,13 @@ func unify(data interface{}, rv reflect.Value) error {
return unifyInt(data, rv)
}
switch k {
+ case reflect.Ptr:
+ elem := reflect.New(rv.Type().Elem())
+ err := unify(data, reflect.Indirect(elem))
+ if err == nil {
+ rv.Set(elem)
+ }
+ return err
case reflect.Struct:
return unifyStruct(data, rv)
case reflect.Map:
@@ -182,7 +189,7 @@ func unifyMap(mapping interface{}, rv reflect.Value) error {
}
for k, v := range tmap {
rvkey := indirect(reflect.New(rv.Type().Key()))
- rvval := indirect(reflect.New(rv.Type().Elem()))
+ rvval := reflect.Indirect(reflect.New(rv.Type().Elem()))
if err := unify(v, rvval); err != nil {
return err
}
|
fix a bug decoding pointer-valued maps
|
lytics_confl
|
train
|
go
|
9886b88a3b6455bf9d567c091e36514d04a7faba
|
diff --git a/guides/rails_guides/markdown/renderer.rb b/guides/rails_guides/markdown/renderer.rb
index <HASH>..<HASH> 100644
--- a/guides/rails_guides/markdown/renderer.rb
+++ b/guides/rails_guides/markdown/renderer.rb
@@ -9,7 +9,7 @@ module RailsGuides
<<-HTML
<div class="code_container">
<pre class="brush: #{brush_for(language)}; gutter: false; toolbar: false">
-#{ERB::Util.h(code).strip}
+#{ERB::Util.h(code)}
</pre>
</div>
HTML
|
Do not strip code blocks, otherwise we may get misaligned output
[ci skip]
|
rails_rails
|
train
|
rb
|
b9f56060174dc68a95a169ee226d0c412aae6fc6
|
diff --git a/app/templates/entry/client-entry.js b/app/templates/entry/client-entry.js
index <HASH>..<HASH> 100644
--- a/app/templates/entry/client-entry.js
+++ b/app/templates/entry/client-entry.js
@@ -164,9 +164,6 @@ async function start ({ app, router<%= store ? ', store, storeKey' : '' %> }<%=
app.mount('#q-app')
}, false) // on deviceready
<% } else { %>
- <% if (ctx.mode.capacitor) { %>
- app.config.globalProperties.$q.capacitor = window.Capacitor
- <% } %>
app.mount('#q-app')
<% } %>
|
chore(ui): addition to previous commit
|
quasarframework_quasar
|
train
|
js
|
3ec071f098774f32d71d864a5f2a34a7517d6f05
|
diff --git a/lib/knife-solo/ssh_command.rb b/lib/knife-solo/ssh_command.rb
index <HASH>..<HASH> 100644
--- a/lib/knife-solo/ssh_command.rb
+++ b/lib/knife-solo/ssh_command.rb
@@ -56,7 +56,6 @@ module KnifeSolo
:description => 'The startup script on the remote server containing variable definitions'
option :sudo_command,
- :short => '-S SUDO_COMMAND',
:long => '--sudo-command SUDO_COMMAND',
:description => 'The command to use instead of sudo for admin privileges'
|
Removed the short option for --sudo-command
Nixed the potentially confusing/annoying short option for specifying a
custom "sudo" command in ssh_command.rb
|
matschaffer_knife-solo
|
train
|
rb
|
a255d1e2cec2dae6b47e14c79205920e9a958ba6
|
diff --git a/skyfield/tests/test_planetarylib.py b/skyfield/tests/test_planetarylib.py
index <HASH>..<HASH> 100644
--- a/skyfield/tests/test_planetarylib.py
+++ b/skyfield/tests/test_planetarylib.py
@@ -25,7 +25,8 @@ def test_frame_rotation():
]
r = frame.rotation_at(ts.tdb_jd(tdb))
delta = r - spiceypy_matrix
- assert (delta < 1e-16).all() # we agree to roughly float64 precision!
+ print(delta)
+ assert (delta < 1e-16).all() # nearly float64 precision
# Second, a moment when the angle W is more than 2500 radians.
@@ -37,7 +38,7 @@ def test_frame_rotation():
]
r = frame.rotation_at(ts.tdb_jd(tdb))
delta = r - spiceypy_matrix
- assert (delta < 2e-13).all() # 4 digits are lost in large W radians
+ assert (delta < 2e-13).all() # a few digits are lost in large W radians
def test_frame_rotation2():
et_seconds = 259056665.0
|
Commit print statement for Travis CI
|
skyfielders_python-skyfield
|
train
|
py
|
56160b49686ad6c2f6a14624377676905995b466
|
diff --git a/lib/specinfra/helper/detect_os/suse.rb b/lib/specinfra/helper/detect_os/suse.rb
index <HASH>..<HASH> 100644
--- a/lib/specinfra/helper/detect_os/suse.rb
+++ b/lib/specinfra/helper/detect_os/suse.rb
@@ -11,6 +11,16 @@ class Specinfra::Helper::DetectOs::Suse < Specinfra::Helper::DetectOs
release = $1
end
{ :family => family, :release => release }
+ elsif run_command('ls /etc/SuSE-release').success? and run_command('zypper -V').success?
+ line = run_command('cat /etc/SuSE-release').stdout
+ if line =~ /SUSE Linux Enterprise Server (\d+)/
+ release = $1
+ family = 'suse'
+ elsif line =~ /openSUSE (\d+\.\d+|\d+)/
+ release = $1
+ family = 'opensuse'
+ end
+ { :family => family, :release => release }
end
end
end
|
Updated suse.rb to detect OS info on SUSE <I> machine
Current logic in suse.rb helper file is fetching OS info from /etc/os-release file.
But this os-release file is not present on SUSE <I> machine so we need to have the older logic as well, which will detect the OS info from /etc/SuSE-release file.
|
mizzy_specinfra
|
train
|
rb
|
1b47215e68e0126b2e4e845b5f8842771c75073c
|
diff --git a/core/src/main/java/hudson/model/ParametersAction.java b/core/src/main/java/hudson/model/ParametersAction.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/model/ParametersAction.java
+++ b/core/src/main/java/hudson/model/ParametersAction.java
@@ -26,7 +26,6 @@ package hudson.model;
import hudson.Util;
import hudson.EnvVars;
import hudson.diagnosis.OldDataMonitor;
-import hudson.matrix.MatrixChildAction;
import hudson.model.Queue.QueueAction;
import hudson.model.labels.LabelAssignmentAction;
import hudson.model.queue.SubTask;
@@ -56,7 +55,7 @@ import static com.google.common.collect.Sets.newHashSet;
* that were specified when scheduling.
*/
@ExportedBean
-public class ParametersAction implements Action, Iterable<ParameterValue>, QueueAction, EnvironmentContributingAction, LabelAssignmentAction, MatrixChildAction {
+public class ParametersAction implements Action, Iterable<ParameterValue>, QueueAction, EnvironmentContributingAction, LabelAssignmentAction {
private final List<ParameterValue> parameters;
|
Removing MatrixChildAction dependency.
(cherry picked from commit <I>d<I>c<I>da<I>d<I>b<I>e4ac<I>)
|
jenkinsci_jenkins
|
train
|
java
|
1f0cb73be8a92496d308dc5286ea0fbe3d277a33
|
diff --git a/includes/entities/class-fs-plugin-license.php b/includes/entities/class-fs-plugin-license.php
index <HASH>..<HASH> 100755
--- a/includes/entities/class-fs-plugin-license.php
+++ b/includes/entities/class-fs-plugin-license.php
@@ -121,6 +121,18 @@
}
/**
+ * Check if license is not expired.
+ *
+ * @author Vova Feldman (@svovaf)
+ * @since 1.2.1
+ *
+ * @return bool
+ */
+ function is_valid() {
+ return ! $this->is_expired();
+ }
+
+ /**
* @author Vova Feldman (@svovaf)
* @since 1.0.6
*
|
[license] Added helper method.
|
Freemius_wordpress-sdk
|
train
|
php
|
5e1b97d45d66186a3158d8bd998150fdd8ae861d
|
diff --git a/transfer/adapterbase.go b/transfer/adapterbase.go
index <HASH>..<HASH> 100644
--- a/transfer/adapterbase.go
+++ b/transfer/adapterbase.go
@@ -10,9 +10,10 @@ import (
)
const (
- // objectExpirationGracePeriod is the grace period applied to objects
- // when checking whether or not they have expired.
- objectExpirationGracePeriod = 5 * time.Second
+ // objectExpirationToTransfer is the duration we expect to have passed
+ // from the time that the object's expires_at property is checked to
+ // when the transfer is executed.
+ objectExpirationToTransfer = 5 * time.Second
)
// adapterBase implements the common functionality for core adapters which
|
transfer: be more clear about the meaning of `objectExpirationToTransfer`
|
git-lfs_git-lfs
|
train
|
go
|
6e83e6e9b5d0efc91ea08c9e09c50ea30c3c2727
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -27,15 +27,16 @@ class PyTest(TestCommand):
setup(
name='flask-hmacauth',
- version='0.1',
+ version='0.2',
requires=['flask'],
cmdclass = {'test': PyTest},
url='http://www.github.com/Phillipmartin/flask-hmacauth',
+ include_package_data=True,
license='MIT',
author='Philip Martin',
author_email='[email protected]',
description='A module to simplify working with HMAC auth in Flask apps',
- py_modules = ["flask-hmacauth"],
+ py_modules = ["flask_hmacauth"],
long_description=read_md('README.md'),
zip_safe=False,
tests_require = ['pytest', 'flask-testing'],
|
fix setup.py and increment version #
|
Phillipmartin_flask-hmacauth
|
train
|
py
|
c421679db553a136d2f794da8038299b1f68ae78
|
diff --git a/app/models/hyrax/group.rb b/app/models/hyrax/group.rb
index <HASH>..<HASH> 100644
--- a/app/models/hyrax/group.rb
+++ b/app/models/hyrax/group.rb
@@ -7,12 +7,26 @@ module Hyrax
DEFAULT_NAME_PREFIX
end
+ ##
+ # @return [Hyrax::Group]
+ def self.from_key(key)
+ new(key.slice!(name_prefix))
+ end
+
def initialize(name)
@name = name
end
attr_reader :name
+ ##
+ # @return [String] a local identifier for this group; for use (e.g.) in ACL
+ # data
+ def group_key
+ self.class.name_prefix + name
+ end
+ alias user_key group_key
+
def to_sipity_agent
sipity_agent || create_sipity_agent!
end
diff --git a/app/services/hyrax/access_control_list.rb b/app/services/hyrax/access_control_list.rb
index <HASH>..<HASH> 100644
--- a/app/services/hyrax/access_control_list.rb
+++ b/app/services/hyrax/access_control_list.rb
@@ -201,12 +201,7 @@ module Hyrax
private
def id_for(agent:)
- case agent
- when Hyrax::Group
- "#{Hyrax::Group.name_prefix}#{agent.name}"
- else
- agent.user_key.to_s
- end
+ agent.user_key.to_s
end
end
|
add ACL key handling for Hyrax::Group
knowledge about how the ACL keys are handled for Groups is spread throughout the
codebase. treating this information as an attribute on the group seems cleaner.
`Hyrax::Group#user_key` is provided for easy compatibility with `::User`.
|
samvera_hyrax
|
train
|
rb,rb
|
a32342ddd2e5afb316542af0232e96181160807f
|
diff --git a/inplaceeditform/media/js/DateTimeShortcutsInitial.js b/inplaceeditform/media/js/DateTimeShortcutsInitial.js
index <HASH>..<HASH> 100644
--- a/inplaceeditform/media/js/DateTimeShortcutsInitial.js
+++ b/inplaceeditform/media/js/DateTimeShortcutsInitial.js
@@ -8,7 +8,7 @@ function DateTimeShortcutsInitial() {
calendar_load = CalendarNamespace;
}
catch(err) {
- setTimeout(DateTimeShortcutsInitial, 3000);
+ setTimeout(DateTimeShortcutsInitial, 500);
}
if (datetime_load != null && calendar_load != null && gettext_load !=null){
DateTimeShortcuts.init();
|
See #<I> I prefer <I> second
|
django-inplaceedit_django-inplaceedit
|
train
|
js
|
be16b0064e35756087518325a00cb94bbce2cf14
|
diff --git a/hcsr04sensor/sensor.py b/hcsr04sensor/sensor.py
index <HASH>..<HASH> 100644
--- a/hcsr04sensor/sensor.py
+++ b/hcsr04sensor/sensor.py
@@ -51,7 +51,8 @@ class Measurement(object):
time_passed = sonar_signal_on - sonar_signal_off
distance_cm = time_passed * ((speed_of_sound * 100) / 2)
sample.append(distance_cm)
- GPIO.cleanup()
+ # Only cleanup the pins used to prevent clobbering any others in use by the program
+ GPIO.cleanup(self.trig_pin, self.echo_pin)
sorted_sample = sorted(sample)
return sorted_sample[5]
|
Update sensor.py
Updated GPIO.cleanup statement to only affect the trigger and echo pins. If this module is used as part of a program that uses other GPIO inputs/outputs, this will prevent resetting the other pins.
|
alaudet_hcsr04sensor
|
train
|
py
|
eef0abf430ac54504ad77e72ea3c6e076741b73f
|
diff --git a/src/server/pps/server/api_server.go b/src/server/pps/server/api_server.go
index <HASH>..<HASH> 100644
--- a/src/server/pps/server/api_server.go
+++ b/src/server/pps/server/api_server.go
@@ -2070,6 +2070,10 @@ func job(kubeClient *kube.Client, jobInfo *persist.JobInfo, jobShimImage string,
Name: "pach-bin",
MountPath: "/pach-bin",
})
+ var imagePullSecrets []api.LocalObjectReference
+ for _, secret := range jobInfo.Transform.ImagePullSecrets {
+ imagePullSecrets = append(imagePullSecrets, api.LocalObjectReference{Name: secret})
+ }
return &batch.Job{
TypeMeta: unversioned.TypeMeta{
@@ -2116,8 +2120,9 @@ func job(kubeClient *kube.Client, jobInfo *persist.JobInfo, jobShimImage string,
VolumeMounts: volumeMounts,
},
},
- RestartPolicy: "Never",
- Volumes: volumes,
+ RestartPolicy: "Never",
+ Volumes: volumes,
+ ImagePullSecrets: imagePullSecrets,
},
},
},
|
Propagate image pull secrets to jobs.
|
pachyderm_pachyderm
|
train
|
go
|
3658438ceb3dfdc863c1f13f98edc045cb8a869e
|
diff --git a/src/lib/baseClient.js b/src/lib/baseClient.js
index <HASH>..<HASH> 100644
--- a/src/lib/baseClient.js
+++ b/src/lib/baseClient.js
@@ -325,8 +325,23 @@ define([
new Error("Not a directory: " + path)
);
}
+ var fullPath = this.makePath(path);
return this.ensureAccess('r').
- then(util.curry(store.getNode, this.makePath(path))).
+ then(util.curry(store.getNode, fullPath)).
+ then(function(node) {
+ if((!node) || Object.keys(node.data).length === 0) {
+ return store.isForced(fullPath).
+ then(function(isForced) {
+ if(isForced) {
+ return node;
+ } else {
+ return sync.updateDataNode(fullPath);
+ }
+ });
+ } else {
+ return node;
+ }
+ }).
get('data').then(function(listing) {
return listing ? Object.keys(listing) : [];
});
|
BaseClient#getListing: attempt to fetch directory listing from remote, if it's part of a tree that isn't synced
|
remotestorage_remotestorage.js
|
train
|
js
|
bae788ddf287d29ecb9d1c243ab5e2265aa1d821
|
diff --git a/code/dataobjects/Block.php b/code/dataobjects/Block.php
index <HASH>..<HASH> 100644
--- a/code/dataobjects/Block.php
+++ b/code/dataobjects/Block.php
@@ -15,7 +15,6 @@ class Block extends DataObject implements PermissionProvider{
"CanViewType" => "Enum('Anyone, LoggedInUsers, OnlyTheseUsers', 'Anyone')",
'ExtraCSSClasses' => 'Varchar',
// these are legacy fields, in place to make migrations from old blocks version easier
- 'Title' => 'Varchar(255)',
'Weight' => 'Int',
'Area' => 'Varchar',
'Published' => 'Boolean',
|
removed duplicate Title DB field from Block model
|
sheadawson_silverstripe-blocks
|
train
|
php
|
42df8a2589b35ca7de01b26ffa5fc4c6873a7f9d
|
diff --git a/packages/docs/themes/cerebral-website/page/__content/page__content.bemhtml.js b/packages/docs/themes/cerebral-website/page/__content/page__content.bemhtml.js
index <HASH>..<HASH> 100644
--- a/packages/docs/themes/cerebral-website/page/__content/page__content.bemhtml.js
+++ b/packages/docs/themes/cerebral-website/page/__content/page__content.bemhtml.js
@@ -8,7 +8,7 @@ block('page').elem('content').match(function () {
content: [
{
elem: 'col',
- elemMods: { sw: 24, lw: 5, mol: true },
+ elemMods: { sw: 24, lw: 5, sol: true, mol: true },
content: { block: 'side-nav' }
},
{
|
fix: side-nav last for small screens
|
cerebral_cerebral
|
train
|
js
|
da9a680d5577ee0931e4d89048b95e12a8f432ff
|
diff --git a/lib/instance/multi_thread_bundle_queue.rb b/lib/instance/multi_thread_bundle_queue.rb
index <HASH>..<HASH> 100644
--- a/lib/instance/multi_thread_bundle_queue.rb
+++ b/lib/instance/multi_thread_bundle_queue.rb
@@ -33,6 +33,7 @@ module RightScale
def initialize(&continuation)
super(&continuation)
@active = false
+ @thread = nil
@mutex = Mutex.new
@queue = Queue.new
@thread_name_to_queue = {}
@@ -56,7 +57,7 @@ module RightScale
def activate
@mutex.synchronize do
unless @active
- Thread.new { run }
+ @thread = Thread.new { run }
@active = true
end
end
@@ -143,6 +144,7 @@ module RightScale
# invoke continuation (off of this thread which is going away).
@mutex.synchronize { @active = false }
EM.next_tick { @continuation.call } if @continuation
+ @thread = nil
end
# Pushes a context to a thread based on a name determined from the context.
|
fixed multi_thread_bundle_queue not keeping thread object as a member
|
rightscale_right_link
|
train
|
rb
|
f9093fbe0fea755067344bdad8183ab74bba5889
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -46,8 +46,8 @@ setup(
include_package_data=True,
install_requires=[
"attrdict>=2.0.0,<3",
- "eth-keyfile>=0.4.0,<1.0.0",
- "eth-keys>=0.1.0b4,<0.2.0",
+ "eth-keyfile>=0.5.0,<0.6.0",
+ "eth-keys>=0.2.0b1,<0.3.0",
"eth-utils>=1.0.0b1,<2",
"hexbytes>=0.1.0b0,<1",
"eth-rlp>=0.1.0a2,<1",
|
upgrade eth-keys, eth-keyfile for latest eth-utils
|
ethereum_eth-account
|
train
|
py
|
84b36bd1491916d978ea1369380340fd193b1dcd
|
diff --git a/lib/mongo/collection/view/map_reduce.rb b/lib/mongo/collection/view/map_reduce.rb
index <HASH>..<HASH> 100644
--- a/lib/mongo/collection/view/map_reduce.rb
+++ b/lib/mongo/collection/view/map_reduce.rb
@@ -237,7 +237,9 @@ module Mongo
end
def validate_collation!(server)
- raise Error::UnsupportedCollation.new if options[:collation] && !server.features.collation_enabled?
+ if (options[:collation] || options[Operation::COLLATION]) && !server.features.collation_enabled?
+ raise Error::UnsupportedCollation.new
+ end
end
end
end
diff --git a/spec/mongo/collection/view/map_reduce_spec.rb b/spec/mongo/collection/view/map_reduce_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/mongo/collection/view/map_reduce_spec.rb
+++ b/spec/mongo/collection/view/map_reduce_spec.rb
@@ -528,6 +528,19 @@ describe Mongo::Collection::View::MapReduce do
map_reduce.to_a
}.to raise_exception(Mongo::Error::UnsupportedCollation)
end
+
+ context 'when a String key is used' do
+
+ let(:options) do
+ { 'collation' => { locale: 'en_US', strength: 2 } }
+ end
+
+ it 'raises an exception' do
+ expect {
+ map_reduce.to_a
+ }.to raise_exception(Mongo::Error::UnsupportedCollation)
+ end
+ end
end
end
end
|
RUBY-<I> Check map reduce options for collation String key
|
mongodb_mongo-ruby-driver
|
train
|
rb,rb
|
a3dba49a3342cfd71d17668ea2a2496f2996ee26
|
diff --git a/bin/lambda-deploy.js b/bin/lambda-deploy.js
index <HASH>..<HASH> 100755
--- a/bin/lambda-deploy.js
+++ b/bin/lambda-deploy.js
@@ -90,7 +90,7 @@ program.flatEnvironment = Object.keys(program.environment).reduce(function(curre
//
// Actual content of the script
//
-let workingDirectory = path.resolve(__dirname);
+let workingDirectory = path.join(path.resolve(__dirname), 'deploy');
async.waterfall(
[
|
Fix working path to properly point to a subdirectory
|
Testlio_lambda-tools
|
train
|
js
|
f4e988990abc4e2e3408af5bf07bb08203347252
|
diff --git a/sysconfig.py b/sysconfig.py
index <HASH>..<HASH> 100644
--- a/sysconfig.py
+++ b/sysconfig.py
@@ -354,7 +354,7 @@ def _init_posix():
# load the installed pyconfig.h:
try:
filename = get_config_h_filename()
- parse_config_h(file(filename), g)
+ parse_config_h(open(filename), g)
except IOError, msg:
my_msg = "invalid Python installation: unable to open %s" % filename
if hasattr(msg, "strerror"):
|
Anna Ravenscroft identified many occurrences of "file" used to open a file
in the stdlib and changed each of them to use "open" instead. At this
time there are no other known occurrences that can be safely changed (in
Lib and all subdirectories thereof).
|
pypa_setuptools
|
train
|
py
|
216073011cd285dcf906368930252e8a61247fd9
|
diff --git a/checkout_session.go b/checkout_session.go
index <HASH>..<HASH> 100644
--- a/checkout_session.go
+++ b/checkout_session.go
@@ -102,6 +102,7 @@ type CheckoutSessionPaymentIntentDataParams struct {
StatementDescriptor *string `form:"statement_descriptor"`
StatementDescriptorSuffix *string `form:"statement_descriptor_suffix"`
TransferData *CheckoutSessionPaymentIntentDataTransferDataParams `form:"transfer_data"`
+ TransferGroup *string `form:"transfer_group"`
}
// CheckoutSessionSetupIntentDataParams is the set of parameters allowed for the setup intent
|
Add support for `TransferGroup` on Checkout `Session`
|
stripe_stripe-go
|
train
|
go
|
caf8ba629785220370040e107da6200de4ed027b
|
diff --git a/linkcheck/checker/const.py b/linkcheck/checker/const.py
index <HASH>..<HASH> 100644
--- a/linkcheck/checker/const.py
+++ b/linkcheck/checker/const.py
@@ -139,6 +139,7 @@ PARSE_EXTENSIONS = {
PARSE_MIMETYPES = (
"text/html",
+ "application/xhtml+xml",
"text/css",
"application/x-shockwave-flash",
)
diff --git a/linkcheck/checker/httpurl.py b/linkcheck/checker/httpurl.py
index <HASH>..<HASH> 100644
--- a/linkcheck/checker/httpurl.py
+++ b/linkcheck/checker/httpurl.py
@@ -606,7 +606,7 @@ Use URL %(newurl)s instead for checking.""") % {
"""
if not (self.valid and self.headers):
return False
- if headers.get_content_type(self.headers) != "text/html":
+ if headers.get_content_type(self.headers) not in ("text/html", "application/xhtml+xml"):
return False
return self.encoding_supported()
|
Really allow parsing of XHTML files; I forgot some places to adjust the MIME checking.
git-svn-id: <URL>
|
wummel_linkchecker
|
train
|
py,py
|
8c863f0d905468e37730f4c59792a51a843ae125
|
diff --git a/packages/react-router-navigation/src/DefaultRenderer.js b/packages/react-router-navigation/src/DefaultRenderer.js
index <HASH>..<HASH> 100644
--- a/packages/react-router-navigation/src/DefaultRenderer.js
+++ b/packages/react-router-navigation/src/DefaultRenderer.js
@@ -136,6 +136,7 @@ class DefaultRenderer extends React.Component<Props> {
return (
<CardStack
{...transitionProps}
+ cardStyle={this.props.cardStyle}
scenes={scenes}
mode={this.props.mode || 'card'}
headerMode={Platform.OS === 'ios' ? 'float' : 'screen'}
|
Pass cardStyle to a CardStack component
|
winoteam_react-router-navigation
|
train
|
js
|
7da2080a3dfbe0ca74ff9408f29e6006c0cf05d0
|
diff --git a/lnwallet/channel.go b/lnwallet/channel.go
index <HASH>..<HASH> 100644
--- a/lnwallet/channel.go
+++ b/lnwallet/channel.go
@@ -3260,7 +3260,7 @@ func (lc *LightningChannel) getUnsignedAckedUpdates() []channeldb.LogUpdate {
chanID := lnwire.NewChanIDFromOutPoint(&lc.channelState.FundingOutpoint)
// Fetch the last remote update that we have signed for.
- lastRemoteCommitted := lc.remoteCommitChain.tip().theirMessageIndex
+ lastRemoteCommitted := lc.remoteCommitChain.tail().theirMessageIndex
// Fetch the last remote update that we have acked.
lastLocalCommitted := lc.localCommitChain.tail().theirMessageIndex
|
lnwallet: use tail() instead of tip() in getUnsignedAckedUpdates
The previous behavior would allow updates to be overwritten in some
scenarios. Upon restart, this would lead to a missing settle/fail in
the update logs.
|
lightningnetwork_lnd
|
train
|
go
|
32a01826fbc560e431546f404c65a6a6389d1d57
|
diff --git a/buildbot/status/mail.py b/buildbot/status/mail.py
index <HASH>..<HASH> 100644
--- a/buildbot/status/mail.py
+++ b/buildbot/status/mail.py
@@ -33,6 +33,9 @@ class Domain(util.ComparableMixin):
self.domain = domain
def getAddress(self, name):
+ """If name is already an email address, pass it through."""
+ if '@' in name:
+ return name
return name + "@" + self.domain
|
(fixes #<I>) Permit mixed mode user names/email addresses for buildbot.status.mail.Domain
|
buildbot_buildbot
|
train
|
py
|
ed30b6deca6897fa95cb0499b8ecc28552e19d2b
|
diff --git a/etcdserver/sender.go b/etcdserver/sender.go
index <HASH>..<HASH> 100644
--- a/etcdserver/sender.go
+++ b/etcdserver/sender.go
@@ -108,11 +108,11 @@ func httpPost(c *http.Client, url string, cid uint64, data []byte) bool {
switch resp.StatusCode {
case http.StatusPreconditionFailed:
// TODO: shutdown the etcdserver gracefully?
- log.Panicf("clusterID mismatch")
+ log.Fatalf("etcd: conflicting cluster ID with the target cluster (%s != %s). Exiting.", resp.Header.Get("X-Etcd-Cluster-ID"), strutil.IDAsHex(cid))
return false
case http.StatusForbidden:
// TODO: stop the server
- log.Panicf("the member has been removed")
+ log.Fatalf("etcd: this member has been permanently removed from the cluster. Exiting.")
return false
case http.StatusNoContent:
return true
|
etcdserver: exit program when node is removed
Originally added in <I>dd2d7bce<I>bb6d<I>e<I>ead,
and removed by mistake when refactor cluster.
|
etcd-io_etcd
|
train
|
go
|
08b113a8d055e2dbff403c93ebbfe72247442da1
|
diff --git a/src/server/worker/api_server.go b/src/server/worker/api_server.go
index <HASH>..<HASH> 100644
--- a/src/server/worker/api_server.go
+++ b/src/server/worker/api_server.go
@@ -965,6 +965,10 @@ func (a *APIServer) uploadOutput(pachClient *client.APIClient, dir string, tag s
// Open local file that is being uploaded
f, err := os.Open(filePath)
if err != nil {
+ // if the error is that the spout marker file is missing, that's fine, just skip to the next file
+ if strings.Contains(err.Error(), "out/marker") {
+ return nil
+ }
return fmt.Errorf("os.Open(%s): %v", filePath, err)
}
defer func() {
|
fix test issue for spout marker
|
pachyderm_pachyderm
|
train
|
go
|
448ee83f05ebb95d78e78870268bb363d0ff7cb1
|
diff --git a/graphics/nbinput.py b/graphics/nbinput.py
index <HASH>..<HASH> 100644
--- a/graphics/nbinput.py
+++ b/graphics/nbinput.py
@@ -5,9 +5,6 @@ http://code.activestate.com/recipes/134892/#c5
import sys
import select
-import tty
-import termios
-import time
class NonBlockingInput:
@@ -38,11 +35,9 @@ class _GetchUnix:
def __init__(self):
# Import termios now or else you'll get the Unix version on the Mac.
import tty
- import sys
import termios
def enter(self):
- import sys
import tty
import termios
@@ -51,6 +46,7 @@ class _GetchUnix:
return self
def exit(self, type_, value, traceback):
+ import termios
termios.tcsetattr(sys.stdin, termios.TCSADRAIN, self.old_settings)
def char(self):
@@ -94,6 +90,7 @@ class _GetchMacCarbon:
pass
def char(self):
+ import Carbon
if Carbon.Evt.EventAvail(0x0008)[0] == 0: # 0x0008 is the keyDownMask
return ''
else:
@@ -110,7 +107,7 @@ class _GetchMacCarbon:
def main():
- # Use like this
+ import time
with NonBlockingInput() as nbi:
while True:
|
Fixed nbinput (hopefully), needs testing on win/mac
|
olls_graphics
|
train
|
py
|
03d0e48201a5f9fc58091f57ebdfccbe519fda52
|
diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/lib.php
+++ b/mod/quiz/lib.php
@@ -3049,6 +3049,9 @@ function get_question_data( $question ) {
case DESCRIPTION:
// nothing to do
break;
+ case MULTIANSWER:
+ // nothing to do
+ break;
default:
error("No handler for question type $question->qtype in get_question");
}
|
Added missing handler for exporting Cloze type questions
|
moodle_moodle
|
train
|
php
|
b8b7049f39b2037981652a43ab911164acb4d009
|
diff --git a/zipline/finance/performance/period.py b/zipline/finance/performance/period.py
index <HASH>..<HASH> 100644
--- a/zipline/finance/performance/period.py
+++ b/zipline/finance/performance/period.py
@@ -457,7 +457,7 @@ class PerformancePeriod(object):
self.ending_cash + self.ending_value)
account.total_positions_value = \
getattr(self, 'total_positions_value', self.ending_value)
- account.total_positions_value = \
+ account.total_positions_exposure = \
getattr(self, 'total_positions_exposure', self.ending_exposure)
account.regt_equity = \
getattr(self, 'regt_equity', self.ending_cash)
|
BUG: Fixes incorrect value assignment in perf period
|
quantopian_zipline
|
train
|
py
|
92faa18158da929ed1b618acffb5c51c1e064970
|
diff --git a/models/classes/webhooks/WebhookRegistryManagerInterface.php b/models/classes/webhooks/WebhookRegistryManagerInterface.php
index <HASH>..<HASH> 100644
--- a/models/classes/webhooks/WebhookRegistryManagerInterface.php
+++ b/models/classes/webhooks/WebhookRegistryManagerInterface.php
@@ -26,5 +26,5 @@ use oat\tao\model\webhooks\configEntity\Webhook;
interface WebhookRegistryManagerInterface
{
- public function addWebhookConfig(Webhook $webhook, string $event);
+ public function addWebhookConfig(Webhook $webhook, string $event): void;
}
|
fix: addWebhookConfig is having return type
|
oat-sa_tao-core
|
train
|
php
|
fc695c5cb3a6bc6ff0d9d513cd63dbed8899e2e3
|
diff --git a/simpleai/search/traditional.py b/simpleai/search/traditional.py
index <HASH>..<HASH> 100644
--- a/simpleai/search/traditional.py
+++ b/simpleai/search/traditional.py
@@ -138,7 +138,7 @@ def _search(problem, fringe, graph_search=False, depth_limit=None,
while fringe:
if viewer:
- viewer.event('new_iteration', list(fringe))
+ viewer.event('new_iteration', fringe.sorted())
node = fringe.pop()
@@ -176,4 +176,4 @@ def _search(problem, fringe, graph_search=False, depth_limit=None,
fringe.append(n)
if viewer:
- viewer.event('finished', fringe, None, 'goal not found')
+ viewer.event('finished', fringe.sorted(), None, 'goal not found')
|
change the way to pass the fringe to viewers
|
simpleai-team_simpleai
|
train
|
py
|
2c65d7167ebba75bc2819d7972776b2738e3a1e4
|
diff --git a/Datagrid/ListMapper.php b/Datagrid/ListMapper.php
index <HASH>..<HASH> 100644
--- a/Datagrid/ListMapper.php
+++ b/Datagrid/ListMapper.php
@@ -47,7 +47,8 @@ class ListMapper extends BaseMapper
$fieldDescriptionOptions['identifier'] = true;
if (!isset($fieldDescriptionOptions['route']['name'])) {
- $fieldDescriptionOptions['route']['name'] = 'edit';
+ $routeName = $this->admin->isGranted('EDIT') ? 'edit' : 'show';
+ $fieldDescriptionOptions['route']['name'] = $routeName;
}
if (!isset($fieldDescriptionOptions['route']['parameters'])) {
|
ListMapper::addIdentifier() working when user is only granetd for "VIEW" action.
|
sonata-project_SonataAdminBundle
|
train
|
php
|
2353a73da8d4bd9e97985f847f63f1cdbcfeaebc
|
diff --git a/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientGraphQuery.java b/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientGraphQuery.java
index <HASH>..<HASH> 100644
--- a/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientGraphQuery.java
+++ b/graphdb/src/main/java/com/tinkerpop/blueprints/impls/orient/OrientGraphQuery.java
@@ -153,7 +153,7 @@ public class OrientGraphQuery extends DefaultGraphQuery {
if (limit == 0) return Collections.emptyList();
OTransaction transaction = ((OrientBaseGraph) graph).getRawGraph().getTransaction();
- if (transaction.isActive() && transaction.getEntryCount() > 0 || hasCustomPredicate()) {
+ if (hasCustomPredicate()) {
// INSIDE TRANSACTION QUERY DOESN'T SEE IN MEMORY CHANGES, UNTIL
// SUPPORTED USED THE BASIC IMPL
String[] classes = allSubClassesLabels();
|
Fix backward compatiblility issue with custom TinkerPop predicates
Related to #<I>
|
orientechnologies_orientdb
|
train
|
java
|
aa8dfa4f9b0c18425135e0d7bdc04a2f064ba467
|
diff --git a/doctest_helper.rb b/doctest_helper.rb
index <HASH>..<HASH> 100644
--- a/doctest_helper.rb
+++ b/doctest_helper.rb
@@ -32,8 +32,13 @@ def file_content(name, type)
define_method('initialize') do |test, env:, aut:|; end
define_method('complete') do; end
when 'steps'
- define_method('initialize') do |env:, page_object:|; end
- define_method('verify_result') do; end
+ define_method('initialize') do |env:, page_object:|
+ @env = env
+ @page_object = page_object
+ end
+ define_method('verify_result') do
+ @page_object.click_element
+ end
when 'page'
define_method('initialize') do |env:|; end
define_method('click_element') do; end
|
use page_object duck type in steps test
|
igor-starostenko_tune_spec
|
train
|
rb
|
7b7c2ae768cbb59b6c46b36ef39d63b2e2679877
|
diff --git a/app/models/concerns/hyrax/ability.rb b/app/models/concerns/hyrax/ability.rb
index <HASH>..<HASH> 100644
--- a/app/models/concerns/hyrax/ability.rb
+++ b/app/models/concerns/hyrax/ability.rb
@@ -413,10 +413,8 @@ module Hyrax
# Returns true if the current user is the depositor of the specified work
# @param document_id [String] the id of the document.
def user_is_depositor?(document_id)
- Hyrax::WorkRelation.new.search_with_conditions(
- id: document_id,
- DepositSearchBuilder.depositor_field => current_user.user_key
- ).any?
+ doc = Hyrax::SolrService.search_by_id(document_id, fl: 'depositor_ssim')
+ current_user.user_key == doc.fetch('depositor_ssim').first
end
def curation_concerns_models
|
check solr directly for depositor instead of going through ActiveFedora
|
samvera_hyrax
|
train
|
rb
|
e94e7b553e178843c1d240cc7ac4043c5cbd0a0e
|
diff --git a/lib/active_admin/views/title_bar.rb b/lib/active_admin/views/title_bar.rb
index <HASH>..<HASH> 100644
--- a/lib/active_admin/views/title_bar.rb
+++ b/lib/active_admin/views/title_bar.rb
@@ -47,7 +47,7 @@ module ActiveAdmin
end
def build_action_items
- insert_tag(view_factory.action_items, @action_items) if @action_items.any?
+ insert_tag(view_factory.action_items, @action_items)
end
end
|
Removing the condition to build the action items, to facilitate the use of JS to add buttons
|
activeadmin_activeadmin
|
train
|
rb
|
cf8d04355e8332e93081a6e88d343fd94051ce77
|
diff --git a/picopt.py b/picopt.py
index <HASH>..<HASH> 100755
--- a/picopt.py
+++ b/picopt.py
@@ -93,14 +93,15 @@ def humanize_bytes(num_bytes, precision=1):
return '%.*f %s' % (precision, factored_bytes, factor_suffix)
-def does_external_program_run(prog):
+def does_external_program_run(prog, options):
"""test to see if the external programs can be run"""
try:
null = open('/dev/null')
subprocess.call([prog, '-h'], stdout=null, stderr=null)
result = True
except OSError:
- print("couldn't run %s" % prog)
+ if options.verbose:
+ print("couldn't run %s" % prog)
result = False
return result
@@ -110,7 +111,7 @@ def program_reqs(options):
"""run the external program tester on the required binaries"""
for program_name in PROGRAMS:
val = getattr(options, program_name) \
- and does_external_program_run(program_name)
+ and does_external_program_run(program_name, options)
setattr(options, program_name, val)
do_lossless = options.optipng or options.advpng or options.pngout
|
only remark about missing programs in verbose mode"
|
ajslater_picopt
|
train
|
py
|
853a8e40f1af49f976195b0eac38a8759707738c
|
diff --git a/richtextfx/src/main/java/org/fxmisc/richtext/ParagraphBox.java b/richtextfx/src/main/java/org/fxmisc/richtext/ParagraphBox.java
index <HASH>..<HASH> 100644
--- a/richtextfx/src/main/java/org/fxmisc/richtext/ParagraphBox.java
+++ b/richtextfx/src/main/java/org/fxmisc/richtext/ParagraphBox.java
@@ -69,7 +69,7 @@ class ParagraphBox<S, PS> extends Region {
public void setIndex(int index) { this.index.setValue(index); }
public int getIndex() { return index.getValue(); }
- public ParagraphBox(Paragraph<S, PS> par, BiConsumer<? super TextExt, S> applyStyle, BiConsumer<TextFlow, PS> applyParagraphStyle) {
+ ParagraphBox(Paragraph<S, PS> par, BiConsumer<? super TextExt, S> applyStyle, BiConsumer<TextFlow, PS> applyParagraphStyle) {
this.getStyleClass().add("paragraph-box");
this.text = new ParagraphText<>(par, applyStyle);
applyParagraphStyle.accept(this.text, par.getParagraphStyle());
|
Made ParagraphBox Constructor package-private: no longer needs to be public now that skin has been removed and this class was moved to richtext package.
|
FXMisc_RichTextFX
|
train
|
java
|
58a39c691e55135c2ad82d6e904c57892e577c7b
|
diff --git a/lib/xmlconv/config.rb b/lib/xmlconv/config.rb
index <HASH>..<HASH> 100644
--- a/lib/xmlconv/config.rb
+++ b/lib/xmlconv/config.rb
@@ -31,7 +31,7 @@ module XmlConv
'grammar_dir' => data_dir,
'group_commissions' => {}, ## Commission per Group in percent
'invoice_format' => "Commission %s-%s",
- 'invoice_item_format' => "Commission %s\nCHF %1.2f Turnover\nout of %i transmitted invoices",
+ 'invoice_item_format' => "Commission %s\n%s %1.2f Turnover\nout of %i transmitted invoices",
'log_file' => STDERR,
'log_level' => 'INFO',
'mail_host' => 'localhost',
|
Fix bug in Group-based invoicing
|
zdavatz_xmlconv
|
train
|
rb
|
97714855c92be1aab5e211478f814babde660730
|
diff --git a/src/Message/FraudStatusChangeResponse.php b/src/Message/FraudStatusChangeResponse.php
index <HASH>..<HASH> 100644
--- a/src/Message/FraudStatusChangeResponse.php
+++ b/src/Message/FraudStatusChangeResponse.php
@@ -2,8 +2,8 @@
namespace Omnipay\TwoCheckoutPlus\Message;
-use Omnipay\Common\Message\AbstractResponse;
use Omnipay\Common\Message\NotificationInterface;
+use Omnipay\Common\Message\AbstractResponse;
class FraudStatusChangeResponse extends AbstractResponse implements NotificationInterface
{
|
someday I gonna kill someone for this shit...
|
collizo4sky_omnipay-2checkout
|
train
|
php
|
165a7c1083cce4f6b9eb4e96bec555d61be3ff9d
|
diff --git a/ethereum/tools/tester.py b/ethereum/tools/tester.py
index <HASH>..<HASH> 100644
--- a/ethereum/tools/tester.py
+++ b/ethereum/tools/tester.py
@@ -157,14 +157,12 @@ class State(object):
class Chain(object):
def __init__(self, alloc=base_alloc, env=None, genesis=None):
if genesis:
- self.chain = pow_chain.Chain(genesis, reset_genesis=True)
+ if genesis.env.config['CONSENSUS_STRATEGY'] == 'hybrid_casper':
+ self.chain = hybrid_casper_chain.Chain(genesis)
+ else:
+ self.chain = pow_chain.Chain(genesis)
else:
- self.chain = pow_chain.Chain(
- mk_basic_state(
- alloc,
- None,
- get_env(env)),
- reset_genesis=True)
+ self.chain = pow_chain.Chain(mk_basic_state(alloc, None, get_env(env)))
self.cs = get_consensus_strategy(self.chain.env.config)
self.block = mk_block_from_prevstate(
self.chain, timestamp=self.chain.state.timestamp + 1)
|
Add support for alloc & env in Chain
|
ethereum_pyethereum
|
train
|
py
|
c218a46c0db68491069e14d5fea99cfe70c09287
|
diff --git a/lib/ast/block.rb b/lib/ast/block.rb
index <HASH>..<HASH> 100644
--- a/lib/ast/block.rb
+++ b/lib/ast/block.rb
@@ -7,6 +7,12 @@ module Atomy
children [:contents], [:arguments]
generate
+ def prepare_all
+ dup.tap do |x|
+ x.contents = x.contents.collect(&:prepare_all)
+ end
+ end
+
def block_arguments
BlockArguments.new @arguments
end
|
don't expand a block's arguments
|
vito_atomy
|
train
|
rb
|
9a78a0ad662891ab46cb0922c340f8ccbff76470
|
diff --git a/src/SmartlabelManager.js b/src/SmartlabelManager.js
index <HASH>..<HASH> 100644
--- a/src/SmartlabelManager.js
+++ b/src/SmartlabelManager.js
@@ -497,7 +497,7 @@ SmartLabelManager.prototype.getSmartText = function (text, maxWidth, maxHeight,
else if (ellipsesStr) {
maxWidthWithEll = maxWidth - (2 * dotWidth);
if (maxWidthWithEll > minWidth) {
- ellipsesStr = '...';
+ ellipsesStr = '..';
} else {
maxWidthWithEll = maxWidth - dotWidth;
if (maxWidthWithEll > minWidth) {
@@ -685,7 +685,7 @@ SmartLabelManager.prototype.getSmartText = function (text, maxWidth, maxHeight,
text = text.replace(slLib.spanAdditionRegx, slLib.spanAdditionReplacer);
text = text.replace(
/(<br\s*\/*\>)/g,
- '<span class="' + [className, ' ', className2].join('') + '">$1</span>'
+ '<span class="' + [slLib.classNameWithTag, ' ', slLib.classNameWithTagBR].join('') + '">$1</span>'
);
container.innerHTML = text;
|
RED-<I>: fixed js error when html tags are present
|
fusioncharts_fusioncharts-smartlabel
|
train
|
js
|
b8d315756f0925fcdbe06cfd6071d9089a6756a9
|
diff --git a/src/blackdoor/util/Misc.java b/src/blackdoor/util/Misc.java
index <HASH>..<HASH> 100644
--- a/src/blackdoor/util/Misc.java
+++ b/src/blackdoor/util/Misc.java
@@ -35,6 +35,21 @@ public class Misc {
}
/**
+ * Convert the bytes of an IPv4 address to an "IPv4-mapped IPv6 address" according to RFC2373
+ * @param v4 32 bits representing an IPv4 address
+ * @return 16 bytes representing an IPv4-mapped IPv6 address for v4
+ */
+ public static byte[] v426(byte[] v4){
+ if(v4.length != 4){
+ throw new RuntimeException("v4 must be 4 bytes that represent an IPv4 address.");
+ }
+ byte[] v6 = new byte[16];
+ System.arraycopy(v4, 0, v6, 12, 4);
+ System.arraycopy(new byte[]{(byte) 0xff, (byte) 0xff}, 0, v6, 10, 2);
+ return v6;
+ }
+
+ /**
* Same as getHammingDistance but uses java's BitSet class
* Probably not as quick as getHammingDistance
* @param a
|
Added method to convert IPv4 bytes to IPv6 Bytes
|
blackdoor_blackdoor
|
train
|
java
|
39dd5d1f77fbd1e48b468a6059e605af98fd9143
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -11,7 +11,7 @@ root_dir = os.path.abspath(os.path.dirname(__file__))
def get_version():
- version_re = re.compile(r"^__version__ = '([\w_.]+)'$")
+ version_re = re.compile(r"^__version__ = '([\w_.-]+)'$")
with open(os.path.join(root_dir, 'src', 'xworkflows', '__init__.py')) as f:
for line in f:
match = version_re.match(line[:-1])
|
Better regex for __version__ matching.
|
rbarrois_xworkflows
|
train
|
py
|
7ed79e56721069e90686a52d11eb7430d4cbf96e
|
diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js
index <HASH>..<HASH> 100644
--- a/src/jquery.gridster.js
+++ b/src/jquery.gridster.js
@@ -114,7 +114,7 @@
* @constructor
*/
function Gridster(el, options) {
- this.options = $.extend(true, defaults, options);
+ this.options = $.extend(true, {}, defaults, options);
this.$el = $(el);
this.$wrapper = this.$el.parent();
this.$widgets = this.$el.children(
|
fix(gridster): leaking options with multiple Gridster instances
`defaults` was being overwritten.
See [jQuery documentation](<URL>):
> Keep in mind that the target object (first argument) will be modified, and will also be returned from $.extend().
|
ducksboard_gridster.js
|
train
|
js
|
8c0899aac9c53ae5e2a341aef70e20ced4951b82
|
diff --git a/src/com/opera/core/systems/preferences/OperaFilePreferences.java b/src/com/opera/core/systems/preferences/OperaFilePreferences.java
index <HASH>..<HASH> 100644
--- a/src/com/opera/core/systems/preferences/OperaFilePreferences.java
+++ b/src/com/opera/core/systems/preferences/OperaFilePreferences.java
@@ -121,7 +121,11 @@ public class OperaFilePreferences extends AbstractOperaPreferences {
}
public void set(OperaPreference preference) {
- super.set(FilePreference.convert(this, preference));
+ if (!(preference instanceof FilePreference)) {
+ super.set(FilePreference.convert(this, preference));
+ } else {
+ super.set(preference);
+ }
}
/**
@@ -130,8 +134,6 @@ public class OperaFilePreferences extends AbstractOperaPreferences {
* method separately unless you wish to perform a forced write of the cache to disk.
*/
protected void write() {
- //throw new UnsupportedOperationException("Not implemented yet");
-
try {
Wini ini = new Wini(preferenceFile);
|
set() now checking whether preference is of correct type before attempting conversion
|
operasoftware_operaprestodriver
|
train
|
java
|
dd7b1e4d76f52b7bed856b0ebdf4fb2363f83bcc
|
diff --git a/shinken/daemons/schedulerdaemon.py b/shinken/daemons/schedulerdaemon.py
index <HASH>..<HASH> 100644
--- a/shinken/daemons/schedulerdaemon.py
+++ b/shinken/daemons/schedulerdaemon.py
@@ -254,7 +254,7 @@ class Shinken(BaseSatellite):
# We only need to change some value
self.program_start = max(0, self.program_start + difference)
- if not hasattr(self, "conf"):
+ if not hasattr(self.sched, "conf"):
# Race condition where time change before getting conf
return
|
Fix : For sched to skip compensate
|
Alignak-monitoring_alignak
|
train
|
py
|
864eb452c405a529da1b2166932468fd96a5bf89
|
diff --git a/metrique/cubes/sqldata/generic.py b/metrique/cubes/sqldata/generic.py
index <HASH>..<HASH> 100644
--- a/metrique/cubes/sqldata/generic.py
+++ b/metrique/cubes/sqldata/generic.py
@@ -181,7 +181,6 @@ class Generic(pyclient):
pass # leave as-is
except Exception as e:
logger.error('Error updating creation time; %s' % e)
- batch_updates = self._prep_objects(batch_updates)
return batch_updates
def _activity_backwards(self, val, removed, added):
|
removed ```_prep_objects``` call from activity import
_prep_objects is not doing anything there, _oid is already in the object (copied from the parent version).
We are not overriding it with the purpose of being used in activity_import in any of our cubes
(we will be overriding it for use in get_objects)
|
kejbaly2_metrique
|
train
|
py
|
7d3af8be906606ea971999666001ef862497d6fb
|
diff --git a/src/Database/index.js b/src/Database/index.js
index <HASH>..<HASH> 100644
--- a/src/Database/index.js
+++ b/src/Database/index.js
@@ -471,7 +471,10 @@ Database.prototype = {
if (attrConfig.onUpdate) config.onUpdate = attrConfig.onUpdate;
if (attrConfig.constraints === false) config.constraints = false;
if (attrConfig.otherKey) config.otherKey = attrConfig.otherKey;
+ if (attrConfig.targetKey) config.targetKey = attrConfig.targetKey;
if (attrConfig.foreignKey) config.foreignKey = attrConfig.foreignKey;
+ if (attrConfig.sourceKey) config.sourceKey = attrConfig.sourceKey;
+
try {
this.models[modelName][attrConfig.type]( this.models[attrConfig.model], config);
|
add support for targetKey and sourceKey in sequelize associations
|
wejs_we-core
|
train
|
js
|
0c24dff7e0514621d745ea633d23ca4c37702009
|
diff --git a/climlab/process/time_dependent_process.py b/climlab/process/time_dependent_process.py
index <HASH>..<HASH> 100644
--- a/climlab/process/time_dependent_process.py
+++ b/climlab/process/time_dependent_process.py
@@ -89,13 +89,17 @@ class TimeDependentProcess(Process):
self.diagnostics.update(proc.diagnostics)
proc._update_time()
- def compute_diagnostics(self):
- '''Compute all tendencies and diagnostics, but don't update model state.'''
+ def compute_diagnostics(self, num_iter=3):
+ '''Compute all tendencies and diagnostics, but don't update model state.
+ By default it will call step_forward() 3 times to make sure all
+ subprocess coupling is accounted for. The number of iterations can
+ be changed with the input argument.'''
# This might create a time problem because it updates the time counter...
this_state = copy.deepcopy(self.state)
- self.step_forward()
- for name, value in self.state.iteritems():
- self.state[name][:] = this_state[name][:]
+ for n in range(num_iter):
+ self.step_forward()
+ for name, value in self.state.iteritems():
+ self.state[name][:] = this_state[name][:]
def _update_time(self):
'''Increment the timestep counter by one.
|
Better compute_diagnostics(). Now iterates three times (by default) through the timestep, to make sure all subprocess coupling is occurring properly. So now we can finally calculate the instantaneous OLR!
|
brian-rose_climlab
|
train
|
py
|
2ca27dbca3fd0434e8111b8d6e29b5cc0221d34b
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -278,7 +278,7 @@ async function activate() {
logger.line();
let APP_VERSION = await getAppVersion();
- logger.title( _.pad( `Welcome to version generator v${ APP_VERSION }.`, LINE_LENGHT ) );
+ logger.title( _.pad( `Welcome to Version Generator v${ APP_VERSION }`, LINE_LENGHT ) );
await validateGitRepository();
|
Tweaked the wording of the welcoming message
|
Zelgadis87_npm-versionator
|
train
|
js
|
36a4fe9e81bcf5e897a9cd4bbf5d0e021b9c0678
|
diff --git a/test/mockauthserver.js b/test/mockauthserver.js
index <HASH>..<HASH> 100644
--- a/test/mockauthserver.js
+++ b/test/mockauthserver.js
@@ -9,7 +9,13 @@ var _clients = {
'test-client': {
clientId: 'test-client',
accessToken: 'test-token',
- scopes: ['auth:*'],
+ scopes: ['auth:credentials'],
+ expires: new Date(2092, 0, 0, 0, 0, 0, 0)
+ },
+ 'delegating-client': {
+ clientId: 'delegating-client',
+ accessToken: 'test-token',
+ scopes: ['auth:can-delegate'],
expires: new Date(2092, 0, 0, 0, 0, 0, 0)
}
};
|
Added support for delegating scopes
|
taskcluster_taskcluster-lib-testing
|
train
|
js
|
5520d828c7c4d861460128ff416acd947052cd17
|
diff --git a/src/sap.m/test/sap/m/visual/MenuButton.spec.js b/src/sap.m/test/sap/m/visual/MenuButton.spec.js
index <HASH>..<HASH> 100644
--- a/src/sap.m/test/sap/m/visual/MenuButton.spec.js
+++ b/src/sap.m/test/sap/m/visual/MenuButton.spec.js
@@ -23,12 +23,6 @@ describe("sap.m.MenuButton", function() {
expect(takeScreenshot(oPage)).toLookAs('menubutton_menu_items_enabled');
});
- it('Menu button parts are visible and aligned', function() {
- var oPage = element(by.id("page0"));
-
- expect(takeScreenshot(oPage)).toLookAs('menu_buttons_in_page');
- });
-
it('Change to Compact Mode', function() {
var oSelect = element(by.id("density_select")),
oCompactItem = element(by.id("item_compact")),
|
[INTERNAL] sap.m.MenuButton: visual tests images does not shoot the same thing
After a recent change, after which the whole page was shot for all the test cases,
there was two test cases, which were shooting the same thing. Now one of them is not
performed anymore.
Change-Id: I<I>f<I>a<I>b3a<I>bc<I>e<I>cf6aeab<I>c
|
SAP_openui5
|
train
|
js
|
b9249f908a63d73de09671fa2ccdf01880451d1b
|
diff --git a/exchangelib/account.py b/exchangelib/account.py
index <HASH>..<HASH> 100644
--- a/exchangelib/account.py
+++ b/exchangelib/account.py
@@ -4,6 +4,7 @@ from __future__ import unicode_literals
from collections import defaultdict
from locale import getlocale
from logging import getLogger
+import warnings
from cached_property import threaded_cached_property
from future.utils import python_2_unicode_compatible
@@ -102,7 +103,6 @@ class Account(object):
@property
def folders(self):
- import warnings
warnings.warn('The Account.folders mapping is deprecated. Use Account.root.walk() instead')
folders_map = defaultdict(list)
for f in self.root.walk():
diff --git a/exchangelib/folders.py b/exchangelib/folders.py
index <HASH>..<HASH> 100644
--- a/exchangelib/folders.py
+++ b/exchangelib/folders.py
@@ -374,7 +374,7 @@ class Folder(RegisterMixIn, SearchableMixIn):
if self.root and not isinstance(self.root, RootOfHierarchy):
raise ValueError("'root' %r must be a RootOfHierarchy instance" % self.root)
# Set a default folder class for new folders. A folder class cannot be changed after saving.
- if self.folder_id is None and self.folder_class is None:
+ if self.id is None and self.folder_class is None:
self.folder_class = self.CONTAINER_CLASS
@property
|
folder_id is just id now. Move import
|
ecederstrand_exchangelib
|
train
|
py,py
|
acfbe0f5771c559f76a33aab496bb87e14257dc3
|
diff --git a/concrete/src/User/UserInfo.php b/concrete/src/User/UserInfo.php
index <HASH>..<HASH> 100644
--- a/concrete/src/User/UserInfo.php
+++ b/concrete/src/User/UserInfo.php
@@ -246,6 +246,7 @@ class UserInfo extends ConcreteObject implements AttributeObjectInterface, Permi
$r = $this->connection->executeQuery('UPDATE Blocks set uID = ? WHERE uID = ?', [(int) USER_SUPER_ID, (int) $this->getUserID()]);
$r = $this->connection->executeQuery('UPDATE Pages set uID = ? WHERE uID = ?', [(int) USER_SUPER_ID, (int) $this->getUserID()]);
$r = $this->connection->executeQuery('UPDATE DownloadStatistics set uID = 0 WHERE uID = ?', [(int) $this->getUserID()]);
+ $this->connection->executeQuery('DELETE FROM authTypeConcreteCookieMap WHERE uID = ?', [(int) $this->getUserID()]);
$this->entityManager->remove($this->entity);
$this->entityManager->flush();
|
Remove records from authTypeConcreteCookieMap when user is deleted
|
concrete5_concrete5
|
train
|
php
|
6e6185c26f7e8e7e5f9bab7ade39c97b9f860d11
|
diff --git a/lib/enju_leaf/user.rb b/lib/enju_leaf/user.rb
index <HASH>..<HASH> 100644
--- a/lib/enju_leaf/user.rb
+++ b/lib/enju_leaf/user.rb
@@ -106,7 +106,7 @@ module EnjuLeaf
end
end
- def export(options = {format: :tsv})
+ def export(options = {format: :txt})
header = %w(
username
email
@@ -154,7 +154,7 @@ module EnjuLeaf
lines << nil
end
}
- if options[:format] == :tsv
+ if options[:format] == :txt
users.map{|u| u.join("\t")}.unshift(header).join("\r\n")
else
users
|
changed file extension from "tsv" to "txt"
|
next-l_enju_leaf
|
train
|
rb
|
cd50965c60ab3fb5ff3139aee0a803f2f2680299
|
diff --git a/src/components/overlaypanel/OverlayPanel.js b/src/components/overlaypanel/OverlayPanel.js
index <HASH>..<HASH> 100644
--- a/src/components/overlaypanel/OverlayPanel.js
+++ b/src/components/overlaypanel/OverlayPanel.js
@@ -116,6 +116,7 @@ export class OverlayPanel extends Component {
hide() {
if (this.isVisible()) {
this.container.style.display = 'none';
+ DomHandler.removeClass(this.container, 'p-overlaypanel-flipped');
this.unbindDocumentClickListener();
if (this.props.onHide) {
|
Fixed #<I> - OverlayPanel's icon is in the wrong position after window is resized
|
primefaces_primereact
|
train
|
js
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.