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
|
|---|---|---|---|---|---|
b82e70d365f5eda7c217e8515cff09d8d2ab7836
|
diff --git a/src/DjangoPassword.php b/src/DjangoPassword.php
index <HASH>..<HASH> 100644
--- a/src/DjangoPassword.php
+++ b/src/DjangoPassword.php
@@ -87,7 +87,7 @@ class DjangoPassword implements PasswordInterface {
if (strpos($hash, '$') === false) {
return true;
} else {
- list($method, ,) = explode('$', $hash, 3);
+ list($method,,) = explode('$', $hash, 3);
switch (strtolower($method)) {
case 'crypt':
case 'sha256':
|
Scrutinizer Auto-Fixes (#2)
This commit consists of patches automatically generated for this project on <URL>
|
vanilla_garden-password
|
train
|
php
|
0226cc8520cef910819e78949338de1488848276
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100755
--- a/index.js
+++ b/index.js
@@ -286,6 +286,8 @@ function attemptInstall (packages, attempts, cb) {
log('-- installing %j', packages)
var done = once(function (err) {
+ clearTimeout(timeout)
+
if (!err) return cb()
if (++attempts <= 10) {
@@ -301,6 +303,14 @@ function attemptInstall (packages, attempts, cb) {
var opts = { noSave: true, command: npmCmd }
if (argv.verbose) opts.stdio = 'inherit'
+ // npm on Travis have a tendency to hang every once in a while
+ // (https://twitter.com/wa7son/status/1006859826549477378). We'll use a
+ // timeout to abort and retry the install in case it hasn't finished within 2
+ // minutes.
+ var timeout = setTimeout(function () {
+ done(new Error('npm install took too long'))
+ }, 2 * 60 * 1000)
+
install(packages, opts, done).on('error', done)
}
|
fix: gracefully handle npm timeouts (#6)
|
watson_test-all-versions
|
train
|
js
|
2c7b5a938169ebade4e1eb8fbb10653ca6c4e173
|
diff --git a/lib/codemirror.js b/lib/codemirror.js
index <HASH>..<HASH> 100644
--- a/lib/codemirror.js
+++ b/lib/codemirror.js
@@ -1276,7 +1276,7 @@ var CodeMirror = (function() {
var tc = textChanged; // textChanged can be reset by cursoractivity callback
if (selectionChanged && options.onCursorActivity)
options.onCursorActivity(instance);
- if (tc && options.onChange)
+ if (tc && options.onChange && instance)
options.onChange(instance, tc);
}
var nestedOperation = 0;
|
don't fire onChange during editor initialization
|
codemirror_CodeMirror
|
train
|
js
|
a0db6cb5d0a58af4c9361c698af81ceaa2929f9f
|
diff --git a/src/DayPicker.js b/src/DayPicker.js
index <HASH>..<HASH> 100644
--- a/src/DayPicker.js
+++ b/src/DayPicker.js
@@ -12,7 +12,7 @@ const keys = {
SPACE: 32
};
-class Caption extends Component {
+class Caption extends Component { // eslint-disable-line
render() {
const { date, locale, localeUtils, onClick } = this.props;
diff --git a/test/DayPicker.js b/test/DayPicker.js
index <HASH>..<HASH> 100644
--- a/test/DayPicker.js
+++ b/test/DayPicker.js
@@ -14,7 +14,7 @@ ExecutionEnvironment.canUseDOM = true;
const TestUtils = require("react-addons-test-utils");
-const DayPicker = require("../src/DayPicker").default;
+const DayPicker = require("../src/DayPicker").default; // eslint-disable-line
const keys = {
LEFT: 37,
|
[wip] Disable eslint not working well
Need to investigate 🤔
|
gpbl_react-day-picker
|
train
|
js,js
|
db8e37d75f374fad17c74ab9a45036a67dfd8b92
|
diff --git a/smack-resolver-javax/src/main/java/org/jivesoftware/smack/util/dns/javax/JavaxResolver.java b/smack-resolver-javax/src/main/java/org/jivesoftware/smack/util/dns/javax/JavaxResolver.java
index <HASH>..<HASH> 100644
--- a/smack-resolver-javax/src/main/java/org/jivesoftware/smack/util/dns/javax/JavaxResolver.java
+++ b/smack-resolver-javax/src/main/java/org/jivesoftware/smack/util/dns/javax/JavaxResolver.java
@@ -52,7 +52,7 @@ public class JavaxResolver extends DNSResolver implements SmackInitializer {
static {
try {
dirContext = new InitialDirContext();
- } catch (Exception e) {
+ } catch (NamingException e) {
LOGGER.log(Level.SEVERE, "Could not construct InitialDirContext", e);
}
|
Reduce scope of catched Exceptions in JavaxResolver
|
igniterealtime_Smack
|
train
|
java
|
0588267be7df7f1501dff3ce1233dca980825c14
|
diff --git a/lib/phusion_passenger/admin_tools/instance_registry.rb b/lib/phusion_passenger/admin_tools/instance_registry.rb
index <HASH>..<HASH> 100644
--- a/lib/phusion_passenger/admin_tools/instance_registry.rb
+++ b/lib/phusion_passenger/admin_tools/instance_registry.rb
@@ -105,7 +105,7 @@ module PhusionPassenger
begin
FileUtils.chmod_R(0700, path) rescue nil
FileUtils.remove_entry_secure(path)
- rescue Errno::EPERM, Errno::EACCES => e
+ rescue SystemCallError => e
puts " Warning: #{e}"
end
end
|
When cleaning stale instance directories, rescue all system call exceptions
|
phusion_passenger
|
train
|
rb
|
4c1bb38878139d3477cad6336dea001a89a3de3b
|
diff --git a/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java b/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java
index <HASH>..<HASH> 100644
--- a/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java
+++ b/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/restart/Restarter.java
@@ -525,12 +525,16 @@ public class Restarter {
public static void initialize(String[] args, boolean forceReferenceCleanup,
RestartInitializer initializer, boolean restartOnInitialize,
RestartListener... listeners) {
- if (instance == null) {
- synchronized (Restarter.class) {
- instance = new Restarter(Thread.currentThread(), args,
+ Restarter localInstance = null;
+ synchronized (Restarter.class) {
+ if (instance == null) {
+ localInstance = new Restarter(Thread.currentThread(), args,
forceReferenceCleanup, initializer, listeners);
+ instance = localInstance;
}
- instance.initialize(restartOnInitialize);
+ }
+ if (localInstance != null) {
+ localInstance.initialize(restartOnInitialize);
}
}
|
Fix broken locking in Restarter.initialize
Closes gh-<I>
|
spring-projects_spring-boot
|
train
|
java
|
9c3c57e0ef7ca25f98f1f2d826ca2c804c14a764
|
diff --git a/view/frontend/web/js/view/payment/method-renderer/embedded.js b/view/frontend/web/js/view/payment/method-renderer/embedded.js
index <HASH>..<HASH> 100755
--- a/view/frontend/web/js/view/payment/method-renderer/embedded.js
+++ b/view/frontend/web/js/view/payment/method-renderer/embedded.js
@@ -198,6 +198,9 @@ define(
// Validate before submission
if (additionalValidators.validate()) {
if (Frames.isCardValid()) {
+ // Start the loader
+ fullScreenLoader.startLoader();
+
// Submit frames form
Frames.submitCard();
}
@@ -255,7 +258,7 @@ define(
publicKey: self.getPublicKey(),
containerSelector: '#cko-form-holder',
theme: ckoTheme,
- debugMode: true,
+ debugMode: CheckoutCom.getPaymentConfig()['debug_mode'],
themeOverride: ckoThemeOverride,
frameActivated: function () {
$('#ckoPlaceOrder').attr("disabled", true);
|
Frontend JS update
Added fullscreen loader to Frames and connected Frames debug mode to module config.
|
checkout_checkout-magento2-plugin
|
train
|
js
|
7dbd812124e5baa08aa5299370e09665e0026675
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100755
--- a/setup.py
+++ b/setup.py
@@ -12,13 +12,9 @@ install_requires = [
'backports.functools_lru_cache; python_version<"3.2"',
'jedi>=0.17.0,<0.18.0',
'python-jsonrpc-server>=0.4.0',
- 'pluggy']
-
-if sys.version_info[0] == 2:
- install_requires.append('ujson<=2.0.3; platform_system!="Windows"')
-else:
- install_requires.append('ujson>=3.0.0')
-
+ 'pluggy',
+ 'ujson<=2.0.3 ; platform_system!="Windows" and python_version<"3.0"',
+ 'ujson>=3.0.0 ; python_version>"3"']
setup(
name='python-language-server',
|
Fix ujson dep for python2 (#<I>)
|
palantir_python-language-server
|
train
|
py
|
cea6e30ca59965d951210bd0b14e873839ac4b43
|
diff --git a/scripts/typescript-declarations/generate.js b/scripts/typescript-declarations/generate.js
index <HASH>..<HASH> 100644
--- a/scripts/typescript-declarations/generate.js
+++ b/scripts/typescript-declarations/generate.js
@@ -81,8 +81,8 @@ async function execute() {
// Replace callback type by simply "function"
replace.sync({
files: TMP_FILE_PATH,
- from: new RegExp("EventEmitter~callback", "g"),
- to: () => "function"
+ from: new RegExp("{EventEmitter~callback}", "g"),
+ to: () => "{function}"
});
// Generate declaration file
|
Inlcude curly brackets in replacement
|
djipco_webmidi
|
train
|
js
|
3f96729cf471e8707a7c7649af56ecb438dd0762
|
diff --git a/shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java b/shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java
index <HASH>..<HASH> 100644
--- a/shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java
+++ b/shell/src/main/java/org/jboss/seam/forge/shell/ShellImpl.java
@@ -679,11 +679,11 @@ public class ShellImpl implements Shell
try
{
reader.removeCompleter(this.completer);
- reader.addCompleter(tempCompleter);
+ if (tempCompleter!=null) { reader.addCompleter(tempCompleter); }
reader.setHistoryEnabled(false);
reader.setPrompt(message);
String line = readLine();
- reader.removeCompleter(tempCompleter);
+ if (tempCompleter!=null) { reader.removeCompleter(tempCompleter); }
reader.addCompleter(this.completer);
reader.setHistoryEnabled(true);
reader.setPrompt("");
|
fixed NPE when using basic completion (such as the one use for 'install' for facet name)
|
forge_core
|
train
|
java
|
436080e6237b80f228194ba4cdef94392b47ee7c
|
diff --git a/gstreamer.py b/gstreamer.py
index <HASH>..<HASH> 100644
--- a/gstreamer.py
+++ b/gstreamer.py
@@ -102,7 +102,8 @@ class GstPlayer(Player):
try:
self._play(media)
except Exception:
- self.idleCond.notifyAll()
+ with self.idleCond:
+ self.idleCond.notifyAll()
self.idle = True
raise
@@ -124,7 +125,8 @@ class GstPlayer(Player):
self.bin.set_state(gst.STATE_NULL)
with self.idleCond:
self.idle = True
- self.idleCond.notifyAll()
+ with self.idleCond:
+ self.idleCond.notifyAll()
def on_message(self, bus, message):
if message.type == gst.MESSAGE_ERROR:
|
gstreamer: bugfix: forgot acquiring of locks
|
bwesterb_mirte
|
train
|
py
|
903e14373e5b257c0d0698735a18ba8d765211b1
|
diff --git a/src/plotypus_scripts/plotypus.py b/src/plotypus_scripts/plotypus.py
index <HASH>..<HASH> 100644
--- a/src/plotypus_scripts/plotypus.py
+++ b/src/plotypus_scripts/plotypus.py
@@ -209,7 +209,7 @@ def _print_star(results, max_degree, fmt):
end='\t')
print('\t'.join(map(formatter, coefficients_)),
end='\t')
- trailing_zeros = 2*max_degree + 1 - len(coefficients_)
+ trailing_zeros = 2*max_degree + 1 - len(phase_shifted_coeffs)
if trailing_zeros > 0:
print('\t'.join(map(formatter,
numpy.zeros(trailing_zeros))),
|
Added extra needed trailing zero in output table.
|
astroswego_plotypus
|
train
|
py
|
9aeaea729e280b3a3bbe746dd303f89f638992d0
|
diff --git a/src/Three/Bank.php b/src/Three/Bank.php
index <HASH>..<HASH> 100644
--- a/src/Three/Bank.php
+++ b/src/Three/Bank.php
@@ -5,6 +5,18 @@ namespace Billplz\Three;
class Bank extends Request
{
/**
+ * Check Bank Account Number.
+ *
+ * @param string|int $number
+ *
+ * @return \Laravie\Codex\Response
+ */
+ public function account($number)
+ {
+ return $this->send('GET', "check/bank_account_number/{$number}");
+ }
+
+ /**
* Get list of bank for Bank Direct Feature.
*
* @return \Laravie\Codex\Response
diff --git a/src/Three/Check.php b/src/Three/Check.php
index <HASH>..<HASH> 100644
--- a/src/Three/Check.php
+++ b/src/Three/Check.php
@@ -13,6 +13,7 @@ class Check extends Request
*/
public function bankAccount($number)
{
- return $this->send('GET', "check/bank_account_number/{$number}");
+ return $this->client->resource('Bank', $this->getVersion())
+ ->account($number);
}
}
|
Passthrough request to check bank account.
|
jomweb_billplz
|
train
|
php,php
|
86b7bd4c8eb1391b209d682efc1de71aa5fb941c
|
diff --git a/jmxtrans-output/jmxtrans-output-core/src/main/java/com/googlecode/jmxtrans/model/output/support/opentsdb/OpenTSDBMessageFormatter.java b/jmxtrans-output/jmxtrans-output-core/src/main/java/com/googlecode/jmxtrans/model/output/support/opentsdb/OpenTSDBMessageFormatter.java
index <HASH>..<HASH> 100644
--- a/jmxtrans-output/jmxtrans-output-core/src/main/java/com/googlecode/jmxtrans/model/output/support/opentsdb/OpenTSDBMessageFormatter.java
+++ b/jmxtrans-output/jmxtrans-output-core/src/main/java/com/googlecode/jmxtrans/model/output/support/opentsdb/OpenTSDBMessageFormatter.java
@@ -66,7 +66,6 @@ public class OpenTSDBMessageFormatter {
private final boolean mergeTypeNamesTags;
private final boolean hostnameTag;
- private final Server server = null;
public OpenTSDBMessageFormatter(@Nonnull ImmutableList<String> typeNames,
@Nonnull ImmutableMap<String, String> tags) throws LifecycleException {
|
....need to be tidier
|
jmxtrans_jmxtrans
|
train
|
java
|
03099281f191d34a72f1c1650e8cf025096c1f38
|
diff --git a/src/MvcCore/Router/RouteMethods.php b/src/MvcCore/Router/RouteMethods.php
index <HASH>..<HASH> 100644
--- a/src/MvcCore/Router/RouteMethods.php
+++ b/src/MvcCore/Router/RouteMethods.php
@@ -287,6 +287,16 @@ trait RouteMethods
if ($errorMsgs) {
//var_dump($this->routes);
$selfClass = version_compare(PHP_VERSION, '5.5', '>') ? self::class : __CLASS__;
+ $debBack = debug_backtrace();
+ $debBackLength = count($debBack);
+ if ($debBackLength > 1) {
+ $debBackSemiFinalRec = $debBack[$debBackLength - 2];
+ $file = str_replace('\\', '/', $debBackSemiFinalRec['file']);
+ $bootstrapFilePath = '/App/Bootstrap.php';
+ if (mb_strpos($file, $bootstrapFilePath) === mb_strlen($file) - mb_strlen($bootstrapFilePath)) {
+ die('['.$selfClass.'] '.implode(' ',$errorMsgs));
+ }
+ }
throw new \InvalidArgumentException('['.$selfClass.'] '.implode(' ',$errorMsgs));
}
}
|
router - duplicate routes exception rendering from bootstrap
|
mvccore_mvccore
|
train
|
php
|
f2695daba2506d047831e39aeb521e94adec5e8d
|
diff --git a/tests/python_package_test/test_basic.py b/tests/python_package_test/test_basic.py
index <HASH>..<HASH> 100644
--- a/tests/python_package_test/test_basic.py
+++ b/tests/python_package_test/test_basic.py
@@ -1,6 +1,5 @@
# coding: utf-8
import os
-import tempfile
import lightgbm as lgb
import numpy as np
@@ -268,8 +267,7 @@ def test_cegb_affects_behavior(tmp_path):
base = lgb.Booster(train_set=ds)
for k in range(10):
base.update()
- with tempfile.NamedTemporaryFile() as f:
- basename = f.name
+ basename = str(tmp_path / "basename.txt")
base.save_model(basename)
with open(basename, 'rt') as f:
basetxt = f.read()
|
completely remove tempfile from test_basic (#<I>)
|
Microsoft_LightGBM
|
train
|
py
|
dee270d08fbabd4e98a8cb86d34293e52bbd1534
|
diff --git a/openquake/calculators/views.py b/openquake/calculators/views.py
index <HASH>..<HASH> 100644
--- a/openquake/calculators/views.py
+++ b/openquake/calculators/views.py
@@ -754,6 +754,16 @@ def view_global_poes(token, dstore):
return rst_table(tbl, header=header)
+@view.add('global_gmfs')
+def view_global_gmfs(token, dstore):
+ """
+ Display GMFs averaged on everything for debugging purposes
+ """
+ imtls = dstore['oqparam'].imtls
+ row = dstore['gmf_data/data']['gmv'].mean(axis=0)
+ return rst_table([row], header=imtls)
+
+
@view.add('mean_disagg')
def view_mean_disagg(token, dstore):
"""
|
Added view global_gmfs [skip CI]
Former-commit-id: 5d<I>e<I>aa6fb<I>fb<I>
|
gem_oq-engine
|
train
|
py
|
16f8a59962c9d25f535dfd17a80bb42acfe1a155
|
diff --git a/mapchete/io/raster.py b/mapchete/io/raster.py
index <HASH>..<HASH> 100644
--- a/mapchete/io/raster.py
+++ b/mapchete/io/raster.py
@@ -71,7 +71,7 @@ def read_raster_window(
with rasterio.Env(
**get_gdal_options(gdal_opts, is_remote=path_is_remote(input_file, s3=True))
) as env:
- logger.debug("GDAL options: %s ", env.options)
+ logger.debug("reading %s with GDAL options %s", input_files, env.options)
return _read_raster_window(
input_files,
tile,
@@ -224,7 +224,6 @@ def _get_warped_array(
dst_nodata=None
):
"""Extract a numpy array from a raster file."""
- logger.debug("reading %s", input_file)
try:
return _rasterio_read(
input_file=input_file,
|
more concise log messages when reading raster
|
ungarj_mapchete
|
train
|
py
|
ee22ae137b561eca3421a946c6327a9d1b708b71
|
diff --git a/qtpy/QtWidgets.py b/qtpy/QtWidgets.py
index <HASH>..<HASH> 100644
--- a/qtpy/QtWidgets.py
+++ b/qtpy/QtWidgets.py
@@ -63,7 +63,8 @@ elif os.environ[QT_API] in PYQT4_API:
QPrintPreviewDialog, QPrintPreviewWidget, QPrinter, QPrinterInfo)
# These objects belong to QtCore
- del (QItemSelection, QItemSelectionRange, QSortFilterProxyModel)
+ del (QItemSelection, QItemSelectionModel, QItemSelectionRange,
+ QSortFilterProxyModel)
elif os.environ[QT_API] in PYSIDE_API:
from PySide.QtGui import *
QStyleOptionViewItem = QStyleOptionViewItemV4
@@ -103,6 +104,7 @@ elif os.environ[QT_API] in PYSIDE_API:
QPrintPreviewDialog, QPrintPreviewWidget, QPrinter, QPrinterInfo)
# These objects belong to QtCore
- del (QItemSelection, QItemSelectionRange, QSortFilterProxyModel)
+ del (QItemSelection, QItemSelectionModel, QItemSelectionRange,
+ QSortFilterProxyModel)
else:
raise PythonQtError('No Qt bindings could be found')
|
QtWidgets: Remove QItemSelectionModel for PyQt4 and PySide
- It belongs to QtCore in PyQt5
- This finishes PR #<I>
|
spyder-ide_qtpy
|
train
|
py
|
51e64d4fe425d84286c665892a8dec08e02d537b
|
diff --git a/plugin/index.js b/plugin/index.js
index <HASH>..<HASH> 100644
--- a/plugin/index.js
+++ b/plugin/index.js
@@ -16,7 +16,7 @@ const expandImports = (source, resolvePath, reference) => {
let defs = queryAST.definitions
lines.some(line => {
if (line[0] === '#' && line.slice(1).split(' ')[0] === 'import') {
- const importFile = line.slice(1).split(' ')[1].slice(1, -1)
+ const importFile = line.slice(1).split(' ')[1].slice(1, -2)
const fragmentAST = gql`${BabelInlineImportHelper.getContents(importFile, path.resolve(reference, resolvePath))}`
defs = [...defs, ...fragmentAST.definitions]
}
|
Temp fix for Windows
This worked for the one person I had testing for me, but I suspect it will break the package on non-windows systems.. Will investigate later.
|
detrohutt_babel-plugin-import-graphql
|
train
|
js
|
5acbbaea2deeaf92d648f0a3501850b71943bf4a
|
diff --git a/addon/components/document-title.js b/addon/components/document-title.js
index <HASH>..<HASH> 100644
--- a/addon/components/document-title.js
+++ b/addon/components/document-title.js
@@ -45,7 +45,8 @@ export default Ember.Component.extend({
set(previous, 'showSeparatorBefore', false);
}
set(this, 'showSeparatorAfter', !replace);
- this._morph = buffer.dom.insertMorphBefore(titleTag, previous._morph.start);
+ var firstNode = previous._morph.firstNode || previous._morph.start;
+ this._morph = buffer.dom.insertMorphBefore(titleTag, firstNode);
} else {
set(this, 'showSeparatorBefore', !replace);
this._morph = buffer.dom.appendMorph(titleTag);
|
fix document-title to work on Ember <I>
|
adopted-ember-addons_ember-page-title
|
train
|
js
|
0e8132f4168d8bf3f827034d2edcdeefe0d59afb
|
diff --git a/database/factories/CurrencyFactory.php b/database/factories/CurrencyFactory.php
index <HASH>..<HASH> 100644
--- a/database/factories/CurrencyFactory.php
+++ b/database/factories/CurrencyFactory.php
@@ -1,5 +1,5 @@
<?php
-namespace AvoRed\Framework\Database\Factories;
+namespace Database\Factories;
use Illuminate\Database\Eloquent\Factories\Factory;
use Faker\Generator as Faker;
use AvoRed\Framework\Database\Models\Currency;
|
Update CurrencyFactory.php
|
avored_framework
|
train
|
php
|
243e6b652af5de88d4f12f246cb8244a833a3ff1
|
diff --git a/testapps/on_device_unit_tests/test_app/app_flask.py b/testapps/on_device_unit_tests/test_app/app_flask.py
index <HASH>..<HASH> 100644
--- a/testapps/on_device_unit_tests/test_app/app_flask.py
+++ b/testapps/on_device_unit_tests/test_app/app_flask.py
@@ -110,6 +110,7 @@ def loadUrl():
print('asked to open url', args['url'])
activity = get_android_python_activity()
activity.loadUrl(args['url'])
+ return ('', 204)
@app.route('/vibrate')
@@ -122,7 +123,8 @@ def vibrate():
if 'time' not in args:
print('ERROR: asked to vibrate but without time argument')
print('asked to vibrate', args['time'])
- return vibrate_with_pyjnius(int(float(args['time']) * 1000))
+ vibrate_with_pyjnius(int(float(args['time']) * 1000))
+ return ('', 204)
@app.route('/orientation')
@@ -135,4 +137,5 @@ def orientation():
print('ERROR: asked to orient but no dir specified')
return 'No direction specified '
direction = args['dir']
- return set_device_orientation(direction)
+ set_device_orientation(direction)
+ return ('', 204)
|
Return proper HTTP responses in webview testapp
Current Flask throws an exception if a view function returns `None`:
```
python : TypeError: The view function for 'vibrate' did not return a
valid response. The function either returned None or ended without a
return statement.
```
Maybe that was different in the past, but instead a proper response can
be returned. An empty <I> would be fine, but a <I> No Content response
is used since it better represents what's happening.
|
kivy_python-for-android
|
train
|
py
|
ef23a10dc6e9e6a55e6ad58ec663500cfc760b66
|
diff --git a/Tests/Controller/Admin/DictionaryControllerTest.php b/Tests/Controller/Admin/DictionaryControllerTest.php
index <HASH>..<HASH> 100755
--- a/Tests/Controller/Admin/DictionaryControllerTest.php
+++ b/Tests/Controller/Admin/DictionaryControllerTest.php
@@ -63,7 +63,10 @@ class DictionaryControllerTest extends AbstractAdminControllerTestCase
public function testGridAction()
{
- $this->client->request('GET', $this->generateUrl('admin.dictionary.grid'));
- $this->assertTrue($this->client->getResponse()->isRedirect($this->generateUrl('admin.dictionary.index', [], true)));
+ $this->client->request('GET', $this->generateUrl('admin.dictionary.grid'), [], [], [
+ 'HTTP_X-Requested-With' => 'XMLHttpRequest',
+ ]);
+
+ $this->assertTrue($this->client->getResponse()->isSuccessful());
}
}
|
Factory fixes, fixed repositories, tests, entities
|
WellCommerce_DictionaryBundle
|
train
|
php
|
904c76e79743f57cd37f244929a360d03144b65b
|
diff --git a/khard/address_book.py b/khard/address_book.py
index <HASH>..<HASH> 100644
--- a/khard/address_book.py
+++ b/khard/address_book.py
@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
+"""A simple class to load and manage the vcard files from disk."""
import glob
import logging
@@ -9,6 +10,10 @@ from .carddav_object import CarddavObject
class AddressBook:
+
+ """Holds the contacts inside one address book folder. On disk they are
+ stored in vcard files."""
+
def __init__(self, name, path):
self.loaded = False
self.contact_list = []
|
Add docstrings to khard.address_book
|
scheibler_khard
|
train
|
py
|
d86ca17d42d794e055aef25976d6ca8222b7a8f5
|
diff --git a/cli/command_agent.go b/cli/command_agent.go
index <HASH>..<HASH> 100644
--- a/cli/command_agent.go
+++ b/cli/command_agent.go
@@ -19,12 +19,19 @@ func (c *AgentCommand) Help() string {
func (c *AgentCommand) Run(_ []string, ui Ui) int {
config := &serf.Config{}
+
+ ui.Output("Starting Serf agent...")
serf, err := serf.Create(config)
if err != nil {
ui.Error(fmt.Sprintf("Failed to initialize Serf: %s", err))
return 1
}
+ ui.Output("Serf agent running!")
+ ui.Output("")
+ ui.Output(fmt.Sprintf("Node name: '%s'", config.NodeName))
+ ui.Output(fmt.Sprintf("Bind addr: '%s'", config.MemberlistConfig.BindAddr))
+
graceful, forceful := c.startShutdownWatcher(serf, ui)
select {
case <-graceful:
|
cli: Say that the agent is running
|
hashicorp_serf
|
train
|
go
|
028e0b12fb000d4ef646ad1e3508a209a5c145b2
|
diff --git a/src/FieldBuilder.php b/src/FieldBuilder.php
index <HASH>..<HASH> 100644
--- a/src/FieldBuilder.php
+++ b/src/FieldBuilder.php
@@ -32,6 +32,7 @@ namespace StoutLogic\AcfBuilder;
* @method FieldBuilder addGoogleMap(string $name, array $args = [])
* @method FieldBuilder addLink(string $name, array $args = [])
* @method FieldBuilder addTab(string $label, array $args = [])
+ * @method FieldBuilder addRange(string $label, array $args = [])
* @method FieldBuilder addMessage(string $label, string $message, array $args = [])
* @method GroupBuilder addGroup(string $name, array $args = [])
* @method RepeaterBuilder addRepeater(string $name, array $args = [])
|
Added missing annotation for addRange function
addRange was added to FieldsBuilder as part of <I> in <I>, however
individual functions return instances of FieldBuilder, which doesn't
include the function. IDE's display function undefined warnings as a
result.
addRange does however work as intended, so this just adds the annotation
so IDE's can provide functionality like autocompletion
|
StoutLogic_acf-builder
|
train
|
php
|
2884b13126b7aa6442708e902b0f0c4bb56ad435
|
diff --git a/app/models/foreman_chef/fact_parser.rb b/app/models/foreman_chef/fact_parser.rb
index <HASH>..<HASH> 100644
--- a/app/models/foreman_chef/fact_parser.rb
+++ b/app/models/foreman_chef/fact_parser.rb
@@ -32,9 +32,9 @@ module ForemanChef
klass.where(args).first || klass.new(args.merge(:description => description, :release_name => release_name)).tap(&:save!)
end
+ # we don't want to parse puppet environment, foreman_chef already has its own environment
def environment
- name = facts['environment'] || Setting[:default_puppet_environment]
- Environment.where(:name => name).first_or_create
+ nil
end
def architecture
|
Fixes #<I> - stop parsing chef environment as puppet environment
|
theforeman_foreman_chef
|
train
|
rb
|
39e8198aa30b90f50d88fb7b7f90a7cc30ec66dc
|
diff --git a/src/HtmlForm/Elements/Range.php b/src/HtmlForm/Elements/Range.php
index <HASH>..<HASH> 100644
--- a/src/HtmlForm/Elements/Range.php
+++ b/src/HtmlForm/Elements/Range.php
@@ -37,7 +37,10 @@ class Range extends Parents\Textbox
*/
public function __construct($name, $label, $min, $max, $args = array())
{
+ $args["attr"]["min"] = $min;
+ $args["attr"]["max"] = $max;
parent::__construct($name, $label, $args);
+
$this->min = $min;
$this->max = $max;
}
|
Added min and max to attributes array
|
jenwachter_html-form
|
train
|
php
|
23faa7751682655009158f5988d83dbc419a5a36
|
diff --git a/prow/clonerefs/run.go b/prow/clonerefs/run.go
index <HASH>..<HASH> 100644
--- a/prow/clonerefs/run.go
+++ b/prow/clonerefs/run.go
@@ -38,7 +38,11 @@ func (o Options) Run() error {
var err error
env, err = addSSHKeys(o.KeyFiles)
if err != nil {
- return fmt.Errorf("failed to add SSH keys: %v", err)
+ logrus.WithError(err).Error("Failed to add SSH keys.")
+ // Continue on error. Clones will fail with an appropriate error message
+ // that initupload can consume whereas quiting without writing the clone
+ // record log is silent and results in an errored prow job instead of a
+ // failed one.
}
}
|
Make clonerefs write errors to log on ssh error.
|
kubernetes_test-infra
|
train
|
go
|
849bb47ff69cc35f36d2ce4d45e3927c128404c6
|
diff --git a/bin/pfdicom b/bin/pfdicom
index <HASH>..<HASH> 100755
--- a/bin/pfdicom
+++ b/bin/pfdicom
@@ -19,7 +19,7 @@ import pfmisc
from pfmisc._colors import Colors
from pfmisc import other
-str_version = "1.4.16"
+str_version = "1.4.18"
str_desc = Colors.CYAN + """
__ _ _
diff --git a/pfdicom/pfdicom.py b/pfdicom/pfdicom.py
index <HASH>..<HASH> 100755
--- a/pfdicom/pfdicom.py
+++ b/pfdicom/pfdicom.py
@@ -53,7 +53,7 @@ class pfdicom(object):
#
self.str_desc = ''
self.__name__ = "pfdicom"
- self.str_version = '1.4.16'
+ self.str_version = '1.4.18'
# Directory and filenames
self.str_workingDir = ''
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ def readme():
setup(
name = 'pfdicom',
- version = '1.4.16',
+ version = '1.4.18',
description = 'Base module for parsing DICOM files in the pf* family.',
long_description = readme(),
author = 'FNNDSC',
|
Bump for pypi
|
FNNDSC_pfdicom
|
train
|
pfdicom,py,py
|
82a06a0eea3a15d03f1395eed4636f495c2b494b
|
diff --git a/raven.js b/raven.js
index <HASH>..<HASH> 100644
--- a/raven.js
+++ b/raven.js
@@ -25,18 +25,20 @@ Database.prototype.getCollections = function(cb) {
Database.prototype.save = function(collection, doc, cb) {
request.put({
- headers: {'Raven-Entity-Name': collection},
- uri: this.getUrl() + '/docs/' + doc.id,
+ headers: {'Raven-Entity-Name': collection}, // TODO: skip this if no collection string passed in?
+ // TODO: Add 'www-authenticate': 'NTLM' back into headers?
+ uri: this.getUrl() + '/docs/' + doc.id, // TODO: Autogenerate id if not passed in?
json: doc
}, function(error, response, body) {
- console.log({'error': error, 'response': response, 'body': body})
- if (!error && response.statusCode == 200) {
+
+ if (!error && response.statusCode == 201) { // 201 - Created
if (cb) cb(null, response)
- else console.log('No callback: ' + response)
}
else {
- if (cb) cb(error)
- else console.log('No callback: ' + response)
+ if (cb) {
+ if (error) cb(error)
+ else cb(new Error('Unable to create document: ' + response.statusCode + ' - ' + response.body))
+ }
}
})
}
|
little bit of cleanup and todos
|
tchype_raven-shell
|
train
|
js
|
13f8f03eeb834ae5dfa198c1ac3433d775fae11f
|
diff --git a/src/formats/kml/features/KmlNetworkLink.js b/src/formats/kml/features/KmlNetworkLink.js
index <HASH>..<HASH> 100644
--- a/src/formats/kml/features/KmlNetworkLink.js
+++ b/src/formats/kml/features/KmlNetworkLink.js
@@ -108,6 +108,18 @@ define([
return;
}
+ if(this.kmlLink.kmlRefreshMode == "onChange") {
+
+ }
+
+ if(this.kmlLink.kmlRefreshMode == "onInterval") {
+ // Important part is to cleanse this one.
+ }
+
+ if(this.kmlLink.kmlRefreshMode == "onExpire") {
+
+ }
+
if(!this.isDownloading && !this.resolvedFile) {
this.isDownloading = true;
var self = this;
|
Start implementation of refresh for the link.
|
NASAWorldWind_WebWorldWind
|
train
|
js
|
e4b88704a6b1105f9f47565d011320f456b7c65e
|
diff --git a/discovery/manager_test.go b/discovery/manager_test.go
index <HASH>..<HASH> 100644
--- a/discovery/manager_test.go
+++ b/discovery/manager_test.go
@@ -51,7 +51,7 @@ func TestTargetUpdatesOrder(t *testing.T) {
expectedTargets: nil,
},
{
- title: "Multips TPs no updates",
+ title: "Multiple TPs no updates",
updates: map[string][]update{
"tp1": {},
"tp2": {},
|
Fix misspell in manager_test.go (#<I>)
|
prometheus_prometheus
|
train
|
go
|
56a2bc5892474184924efa852a4e700b1576662f
|
diff --git a/src/Drupal/DrupalExtension/Context/DrupalContext.php b/src/Drupal/DrupalExtension/Context/DrupalContext.php
index <HASH>..<HASH> 100644
--- a/src/Drupal/DrupalExtension/Context/DrupalContext.php
+++ b/src/Drupal/DrupalExtension/Context/DrupalContext.php
@@ -1,6 +1,6 @@
<?php
-namespace Drupal\DrupalExtension\Context
+namespace Drupal\DrupalExtension\Context;
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Behat\MinkExtension\Context\MinkContext;
|
Fixing typo in DrupalContext.php.
|
jhedstrom_drupalextension
|
train
|
php
|
82208f79c93faeba585b51a2fe326e2292635630
|
diff --git a/lib/feed2email/feed.rb b/lib/feed2email/feed.rb
index <HASH>..<HASH> 100644
--- a/lib/feed2email/feed.rb
+++ b/lib/feed2email/feed.rb
@@ -14,7 +14,6 @@ require 'feed2email/version'
module Feed2Email
class Feed < Sequel::Model(:feeds)
- plugin :dirty
plugin :timestamps
one_to_many :entries
@@ -38,11 +37,13 @@ module Feed2Email
return
end
+ old_last_modified, old_etag = last_modified, etag
+
# Reset feed caching parameters unless all entries were processed. This
# makes sure the feed will be fetched on next processing.
unless process_entries
- self.last_modified = initial_value(:last_modified)
- self.etag = initial_value(:etag)
+ self.last_modified = old_last_modified
+ self.etag = old_etag
end
self.last_processed_at = Time.now
|
Use instance variables to restore last_modified/etag
Thus removing the dependency of the "dirty" Sequel plugin.
|
agorf_feed2email
|
train
|
rb
|
5d9d5b4f210d629377bdb84371c526da02bb7d76
|
diff --git a/wafer/talks/forms.py b/wafer/talks/forms.py
index <HASH>..<HASH> 100644
--- a/wafer/talks/forms.py
+++ b/wafer/talks/forms.py
@@ -148,6 +148,11 @@ class ReviewForm(forms.Form):
super(ReviewForm, self).__init__(*args, **kwargs)
+ review_range =_("(Score range: %(min)d to %(max)d)") % {
+ 'min': settings.WAFER_TALK_REVIEW_SCORES[0],
+ 'max': settings.WAFER_TALK_REVIEW_SCORES[1]
+ }
+
for aspect in ReviewAspect.objects.all():
initial = None
if self.instance:
@@ -155,9 +160,10 @@ class ReviewForm(forms.Form):
initial = self.instance.scores.get(aspect=aspect).value
except Score.DoesNotExist:
initial = None
+ # We can't use label_suffix because we're going through crispy
+ # forms, so we tack the range onto the label
self.fields['aspect_{}'.format(aspect.pk)] = forms.IntegerField(
- initial=initial, label=aspect.name,
- min_value=settings.WAFER_TALK_REVIEW_SCORES[0],
+ initial=initial, label="%s %s" % (aspect.name, review_range),
max_value=settings.WAFER_TALK_REVIEW_SCORES[1])
self.helper = FormHelper(self)
|
Add the review score range to the widget label, so it's obvious to reviewers
|
CTPUG_wafer
|
train
|
py
|
54c1cb9bffa2d6d1fa891fed260a9131434f9af7
|
diff --git a/openpnm/utils/misc.py b/openpnm/utils/misc.py
index <HASH>..<HASH> 100644
--- a/openpnm/utils/misc.py
+++ b/openpnm/utils/misc.py
@@ -5,10 +5,8 @@ import numpy as _np
import scipy as _sp
import time as _time
import copy
-from dataclasses import dataclass
from collections import OrderedDict
from docrep import DocstringProcessor
-from terminaltables import AsciiTable
class Docorator(DocstringProcessor):
|
oops forgot to remove dataclasses import from a file
|
PMEAL_OpenPNM
|
train
|
py
|
03df6156bc759a62a102466454557f3bf63e8e74
|
diff --git a/lib/chef/node_map.rb b/lib/chef/node_map.rb
index <HASH>..<HASH> 100644
--- a/lib/chef/node_map.rb
+++ b/lib/chef/node_map.rb
@@ -38,12 +38,12 @@
class Chef
class NodeMap
COLLISION_WARNING_14 = <<~EOH.gsub(/\s+/, " ").strip
- %{type_caps} %{key} from a cookbook is overriding the %{type} from core. Please upgrade your cookbook
+ %{type_caps} %{key} from a cookbook is overriding the %{type} from the client. Please upgrade your cookbook
or remove the cookbook from your run_list before the next major release of Chef.
EOH
COLLISION_WARNING_15 = <<~EOH.gsub(/\s+/, " ").strip
- %{type_caps} %{key} from core is overriding the %{type} from a cookbook. Please upgrade your cookbook
+ %{type_caps} %{key} from the client is overriding the %{type} from a cookbook. Please upgrade your cookbook
or remove the cookbook from your run_list.
EOH
|
replace "core" with "the client"
because users don't grok "core"
|
chef_chef
|
train
|
rb
|
d4a880480847d8888a2d3ca59fa618c56732937c
|
diff --git a/lib/less/parser/parser.js b/lib/less/parser/parser.js
index <HASH>..<HASH> 100644
--- a/lib/less/parser/parser.js
+++ b/lib/less/parser/parser.js
@@ -704,10 +704,7 @@ var Parser = function Parser(context, imports, fileInfo) {
expressionContainsNamed = true;
}
- // we do not support setting a ruleset as a default variable - it doesn't make sense
- // However if we do want to add it, there is nothing blocking it, just don't error
- // and remove isCall dependency below
- value = (isCall && parsers.detachedRuleset()) || parsers.expression();
+ value = parsers.detachedRuleset() || parsers.expression();
if (!value) {
if (isCall) {
|
parser – fix #<I>: allow detached rulesets as mixin argument defaults
|
less_less.js
|
train
|
js
|
a00caf560e2032d5077a837ef81b4d651596a798
|
diff --git a/src/CouchDB/Database.php b/src/CouchDB/Database.php
index <HASH>..<HASH> 100644
--- a/src/CouchDB/Database.php
+++ b/src/CouchDB/Database.php
@@ -33,6 +33,16 @@ class Database
}
/**
+ * Gets the current connection
+ *
+ * @return Connection
+ */
+ public function getConnection()
+ {
+ return $this->connection;
+ }
+
+ /**
* Find a document by a id.
*
* @param string $id
|
Add getConnection method to Database
|
Baachi_CouchDB
|
train
|
php
|
6e540a639f96cdcd8123d0cf30da5de609e0656e
|
diff --git a/parseany.go b/parseany.go
index <HASH>..<HASH> 100644
--- a/parseany.go
+++ b/parseany.go
@@ -7,10 +7,10 @@ import (
"unicode"
)
-type DateState int
+type dateState int
const (
- st_START DateState = iota
+ st_START dateState = iota
st_DIGIT
st_DIGITDASH
st_DIGITDASHALPHA
|
state constants dont need to be public
|
araddon_dateparse
|
train
|
go
|
693227a26303f959ec28aa94f412c50f9014e18b
|
diff --git a/signer/signer_test.go b/signer/signer_test.go
index <HASH>..<HASH> 100644
--- a/signer/signer_test.go
+++ b/signer/signer_test.go
@@ -1,7 +1,6 @@
package signer_test
import (
- "fmt"
"github.com/cloudfoundry/bosh-davcli/signer"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
|
Fix imported and not used: "fmt"
|
cloudfoundry_bosh-davcli
|
train
|
go
|
fd8c2b951d5451a09e17801a65b0db9cd8edc845
|
diff --git a/lib/build-graph.js b/lib/build-graph.js
index <HASH>..<HASH> 100644
--- a/lib/build-graph.js
+++ b/lib/build-graph.js
@@ -11,7 +11,7 @@ function buildGraph(parseTree) {
defaultStack = [{ node: {}, edge: {} }],
id = parseTree.id,
g = new Graph({ directed: isDirected, multigraph: isMultigraph, compound: true });
- g.setGraph(id == null ? {} : {id: id});
+ g.setGraph(id === null ? {} : {id: id});
_.each(parseTree.stmts, function(stmt) { handleStmt(g, stmt, defaultStack); });
return g;
}
diff --git a/test/read-one-test.js b/test/read-one-test.js
index <HASH>..<HASH> 100644
--- a/test/read-one-test.js
+++ b/test/read-one-test.js
@@ -39,7 +39,7 @@ describe("read", function() {
var g = read("digraph foobar {}");
expect(g.nodeCount()).to.equal(0);
expect(g.edgeCount()).to.equal(0);
- expect(g.graph()).to.eql({id: 'foobar'});
+ expect(g.graph()).to.eql({id: "foobar"});
expect(g.isDirected()).to.be.true;
});
|
Fix code style for graph id patch
|
dagrejs_graphlib-dot
|
train
|
js,js
|
21b9d7485fe3df950479157067bbd1da306592e0
|
diff --git a/pact/pact-compiler/src/main/java/eu/stratosphere/pact/compiler/plan/OptimizerNode.java b/pact/pact-compiler/src/main/java/eu/stratosphere/pact/compiler/plan/OptimizerNode.java
index <HASH>..<HASH> 100644
--- a/pact/pact-compiler/src/main/java/eu/stratosphere/pact/compiler/plan/OptimizerNode.java
+++ b/pact/pact-compiler/src/main/java/eu/stratosphere/pact/compiler/plan/OptimizerNode.java
@@ -1525,7 +1525,7 @@ public abstract class OptimizerNode implements Visitable<OptimizerNode>
public boolean keepsUniqueProperty(FieldSet uniqueSet, int input) {
for (Integer uniqueField : uniqueSet) {
- if (isFieldKept(uniqueField, input) == false) {
+ if (isFieldKept(input, uniqueField) == false) {
return false;
}
}
|
Fixed bug in uniqueness determination in optimizer node
|
apache_flink
|
train
|
java
|
461b0c5393834f482a155fb6776fb583fd899031
|
diff --git a/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/ThreadLeakControl.java b/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/ThreadLeakControl.java
index <HASH>..<HASH> 100644
--- a/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/ThreadLeakControl.java
+++ b/randomized-runner/src/main/java/com/carrotsearch/randomizedtesting/ThreadLeakControl.java
@@ -625,7 +625,7 @@ class ThreadLeakControl {
}
b.append("^^==============================================\n");
return b.toString();
- } catch (Exception e) {
+ } catch (Throwable e) {
// Ignore, perhaps not available.
}
return threadStacks(getAllStackTraces());
|
Never fail on missing mx bean,
|
randomizedtesting_randomizedtesting
|
train
|
java
|
e4cdbad4d47c922030587601b5f5e593c034dc29
|
diff --git a/lib/lanes/api/root.rb b/lib/lanes/api/root.rb
index <HASH>..<HASH> 100644
--- a/lib/lanes/api/root.rb
+++ b/lib/lanes/api/root.rb
@@ -38,7 +38,7 @@ module Lanes
end
prefix = Lanes.config.mounted_at + (parent_attribute || '')
- puts "#{prefix}/#{path}"
+
# index
get "#{prefix}/#{path}/?:id?.json", &RequestWrapper.get(model, controller, parent_attribute)
|
remove debugging puts that got checked in
|
argosity_hippo
|
train
|
rb
|
0d5170e5a5491f12de9592dd30657fb73d67e059
|
diff --git a/aws/resource_aws_sfn_activity_test.go b/aws/resource_aws_sfn_activity_test.go
index <HASH>..<HASH> 100644
--- a/aws/resource_aws_sfn_activity_test.go
+++ b/aws/resource_aws_sfn_activity_test.go
@@ -19,6 +19,7 @@ func TestAccAWSSfnActivity_basic(t *testing.T) {
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
+ ErrorCheck: testAccErrorCheck(t, sfn.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSfnActivityDestroy,
Steps: []resource.TestStep{
@@ -45,6 +46,7 @@ func TestAccAWSSfnActivity_Tags(t *testing.T) {
resource.ParallelTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
+ ErrorCheck: testAccErrorCheck(t, sfn.EndpointsID),
Providers: testAccProviders,
CheckDestroy: testAccCheckAWSSfnActivityDestroy,
Steps: []resource.TestStep{
|
tests/r/sfn_activity: Add ErrorCheck
|
terraform-providers_terraform-provider-aws
|
train
|
go
|
5df745b8a78305c8e20bc48f00a54943fdbdd72c
|
diff --git a/globus_cli/helpers/printing.py b/globus_cli/helpers/printing.py
index <HASH>..<HASH> 100644
--- a/globus_cli/helpers/printing.py
+++ b/globus_cli/helpers/printing.py
@@ -49,17 +49,23 @@ def print_table(iterable, headers_and_keys, print_headers=True):
# the same order as the headers_and_keys array
# use a special function to handle empty iterable
def get_max_colwidth(kf):
- lengths = [len(str(kf(i))) for i in iterable]
+ def _safelen(x):
+ try:
+ return len(x)
+ except TypeError:
+ return len(str(x))
+ lengths = [_safelen(kf(i)) for i in iterable]
if not lengths:
return 0
else:
return max(lengths)
+
widths = [get_max_colwidth(kf) for kf in keyfuncs]
# handle the case in which the column header is the widest thing
widths = [max(w, len(h)) for w, h in zip(widths, headers)]
# create a format string based on column widths
- format_str = ' | '.join('{:' + str(w) + '}' for w in widths)
+ format_str = six.u(' | '.join('{:' + str(w) + '}' for w in widths))
def none_to_null(val):
if val is None:
|
Fix table printing to handle unicode
This is not sufficient for us to claim broad unicode support, but rather
a patch for something I just encountered.
If there is unicode data in a table we want to print for output, we need
to handle two things:
1. str(value) is unsafe, so only do it on types that don't support
__len__ natively
2. The format string must be unicode in order to format unicode data
|
globus_globus-cli
|
train
|
py
|
77b9769460cec96c626246fdc1ac8ea8c38708b2
|
diff --git a/ServiceProvider.php b/ServiceProvider.php
index <HASH>..<HASH> 100755
--- a/ServiceProvider.php
+++ b/ServiceProvider.php
@@ -113,7 +113,12 @@ abstract class ServiceProvider {
if ($group)
{
- static::$publishGroups[$group] = $paths;
+ if ( ! array_key_exists($group, static::$publishGroups))
+ {
+ static::$publishGroups[$group] = [];
+ }
+
+ static::$publishGroups[$group] = array_merge(static::$publishGroups[$group], $paths);
}
}
@@ -126,6 +131,19 @@ abstract class ServiceProvider {
*/
public static function pathsToPublish($provider = null, $group = null)
{
+ if ($provider and $group)
+ {
+ if (empty(static::$publishes[$provider]))
+ {
+ return [];
+ }
+ if (empty(static::$publishGroups[$group]))
+ {
+ return [];
+ }
+ return array_intersect(static::$publishes[$provider], static::$publishGroups[$group]);
+ }
+
if ($group && array_key_exists($group, static::$publishGroups))
{
return static::$publishGroups[$group];
|
Bugfix for Support: ServiceProvider
- method publish() - merging tagged (marked with group) paths with already registered ones
- method pathsToPublish() - added support for selecting by both provider and group
|
illuminate_support
|
train
|
php
|
a372397b90332001b92812b1dcf73d95cb72df12
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -35,6 +35,22 @@ test('split two lines on two writes', function (t) {
input.end()
})
+test('split four lines on three writes', function (t) {
+ t.plan(2)
+
+ var input = split()
+
+ input.pipe(strcb(function (err, list) {
+ t.error(err)
+ t.deepEqual(list, ['hello', 'world', 'bye', 'world'])
+ }))
+
+ input.write('hello\nwor')
+ input.write('ld\nbye\nwo')
+ input.write('rld')
+ input.end()
+})
+
test('accumulate multiple writes', function (t) {
t.plan(2)
|
test: add a test case for char-grouped streams
Given the other test cases, I could not determine if split supports such a use case in that chunks are split in-line.
|
mcollina_split2
|
train
|
js
|
1cc60c35624d0dd9043de00391926f007d0bb60c
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -17,9 +17,13 @@ module.exports = function(config) {
browsers: ['ChromeHeadlessNoSandbox', 'ie11'],
+ browserDisconnectTimeout: '60000',
+ browserNoActivityTimeout: '60000',
+
client: {
mocha: {
- reporter: 'html'
+ reporter: 'html',
+ timeout: '60000'
}
},
|
Increase the Karma timeout to 1 minute
|
unexpectedjs_unexpected
|
train
|
js
|
9dcad830022f5dcaad4fe78efce937c9cea7dc56
|
diff --git a/query/src/test/java/org/infinispan/query/affinity/AffinityRpcTest.java b/query/src/test/java/org/infinispan/query/affinity/AffinityRpcTest.java
index <HASH>..<HASH> 100644
--- a/query/src/test/java/org/infinispan/query/affinity/AffinityRpcTest.java
+++ b/query/src/test/java/org/infinispan/query/affinity/AffinityRpcTest.java
@@ -30,17 +30,13 @@ public class AffinityRpcTest extends BaseAffinityTest {
RpcCollector rpcCollector = new RpcCollector();
- // Force initialization of all shards in all nodes before measuring RPCs due to HSEARCH-2522
- populate(1, 500);
- caches().forEach(Cache::clear);
-
cacheManagers.stream()
.flatMap(cm -> cm.getCacheNames().stream().map(cm::getCache))
.forEach(cache -> replaceRpcManager(cache, rpcCollector));
waitForClusterToForm(indexCaches);
- populate(1, 500);
+ populate(1, 100);
stream(indexCaches).forEach(c -> assertNoRPCs(c, rpcCollector));
}
|
ISPN-<I> Remove workaround in AffinityRpcTest
|
infinispan_infinispan
|
train
|
java
|
cd237fc3f99183a3a691264c697bb1dee65de5f3
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -34,11 +34,11 @@ module.exports = function (config) {
port: 8080,
- logLevel: config.LOG_INFO,
+ logLevel: config.LOG_DEBUG,
autoWatch: false,
- browsers: ['PhantomJS'],
+ browsers: ['Chrome'],
singleRun: true
});
|
Switched back to Chrome in test suite.
|
akoenig_angular-deckgrid
|
train
|
js
|
843b8910285335722db23712d3adffc7a2b726cd
|
diff --git a/ctfile/ctfile.py b/ctfile/ctfile.py
index <HASH>..<HASH> 100644
--- a/ctfile/ctfile.py
+++ b/ctfile/ctfile.py
@@ -587,6 +587,11 @@ class Molfile(CTfile):
"""
return self['Ctab'].hydrogen_atoms
+ @property
+ def as_sdfile(self):
+ """Create ``SDfile`` from ``Molfile``."""
+ return SDfile.from_molfile(self)
+
class SDfile(CTfile):
"""SDfile - each structure-data file contains structures and data for any number
|
Added property that converts "Molfile" into "SDfile".
|
MoseleyBioinformaticsLab_ctfile
|
train
|
py
|
1ec06653002b0b904ca4e90651efe1b934371fa8
|
diff --git a/source/rafcon/mvc/controllers/state_transitions.py b/source/rafcon/mvc/controllers/state_transitions.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/mvc/controllers/state_transitions.py
+++ b/source/rafcon/mvc/controllers/state_transitions.py
@@ -499,6 +499,10 @@ class StateTransitionsListController(ExtendedController):
@ExtendedController.observe("change_root_state_type", after=True)
@ExtendedController.observe("change_state_type", after=True)
def after_notification_of_parent_or_state_from_lists(self, model, prop_name, info):
+ # The method causing the change raised an exception, thus nothing was changed
+ if 'result' in info['kwargs']:
+ if isinstance(info['kwargs']['result'], str) and "CRASH" in info['kwargs']['result']:
+ return
# self.notification_logs(model, prop_name, info)
if self.no_update and info.method_name in ["change_state_type" and "change_root_state_type"]:
# print "DO_UNLOCK TRANSITION WIDGET"
|
Check for exception in state_transition observer
The notification method in the state transition controller now checks
for exceptions caused by the changing method. If one occurred, nothing
is being updated.
|
DLR-RM_RAFCON
|
train
|
py
|
eb20a9216a792fdafac1d9cc781c4db50c5aedb2
|
diff --git a/src/modelbase.js b/src/modelbase.js
index <HASH>..<HASH> 100644
--- a/src/modelbase.js
+++ b/src/modelbase.js
@@ -166,7 +166,7 @@ module.exports = function(ngin) {
self.fromList(data, function(err, list) {
// check for a single page request
- if (options.page || !pagination || (pagination && pagination.total_pages === 1)) {
+ if (options.page || _.result(options.query, 'page') || !pagination || (pagination && pagination.total_pages === 1)) {
if (options.page !== 0) list._pagination = pagination
return callback(err, list, resp)
}
|
Check query.page when testing for single page
|
sportngin_ngin_client_node
|
train
|
js
|
e120b6cf884dbda9d12bd15fcbf9c009f1fd6434
|
diff --git a/ipuz/structures/direction.py b/ipuz/structures/direction.py
index <HASH>..<HASH> 100644
--- a/ipuz/structures/direction.py
+++ b/ipuz/structures/direction.py
@@ -2,9 +2,9 @@
def validate_direction(direction):
splitted = direction.split(':')
- direction_name = direction
if len(splitted) > 2:
return False
+ direction_name = direction
if len(splitted) <= 2:
direction_name = splitted[0]
return direction_name in (
|
Minor change in logic for direction name calculation
|
svisser_ipuz
|
train
|
py
|
7e60f11f0628b57208ea038dfad2ef2e4a5eebb2
|
diff --git a/code/SVGTemplate.php b/code/SVGTemplate.php
index <HASH>..<HASH> 100755
--- a/code/SVGTemplate.php
+++ b/code/SVGTemplate.php
@@ -48,7 +48,7 @@ class SVGTemplate extends ViewableData
/**
* @var string
*/
- private $custom_base;
+ private $custom_base_path;
/**
* @var array
@@ -123,7 +123,7 @@ class SVGTemplate extends ViewableData
*/
public function customBasePath($path)
{
- $this->custom_base = trim($path, DIRECTORY_SEPARATOR);
+ $this->custom_base_path = trim($path, DIRECTORY_SEPARATOR);
return $this;
}
@@ -203,7 +203,7 @@ class SVGTemplate extends ViewableData
{
$path = BASE_PATH . DIRECTORY_SEPARATOR;
- $path .= ($this->custom_base) ? $this->custom_base : $this->stat('base_path');
+ $path .= ($this->custom_base_path) ? $this->custom_base_path : $this->stat('base_path');
$path .= DIRECTORY_SEPARATOR;
foreach($this->subfolders as $subfolder) {
$path .= $subfolder . DIRECTORY_SEPARATOR;
|
Renaming SVGTemplate::$custom_base to $custom_base_path
|
stevie-mayhew_silverstripe-svg
|
train
|
php
|
db75294ad230e06ddcee3ae6a8b457794d1add93
|
diff --git a/lib/cli/lib/initiate.js b/lib/cli/lib/initiate.js
index <HASH>..<HASH> 100644
--- a/lib/cli/lib/initiate.js
+++ b/lib/cli/lib/initiate.js
@@ -73,7 +73,7 @@ export default function(options, pkg) {
logger.log();
paddedLog('There seems to be a storybook already available in this project.');
paddedLog('Apply following command to force:\n');
- codeLog(['getstorybook -f']);
+ codeLog(['storybook init -f']);
// Add a new line for the clear visibility.
logger.log();
@@ -173,10 +173,10 @@ export default function(options, pkg) {
default:
paddedLog(`We couldn't detect your project type. (code: ${projectType})`);
paddedLog(
- "Please make sure you are running the `getstorybook` command in your project's root directory."
+ "Please make sure you are running the `storybook init` command in your project's root directory."
);
paddedLog(
- 'You can also install storybook for plain HTML snippets with `getstorybook --html` or follow some of the slow start guides: https://storybook.js.org/basics/slow-start-guide/'
+ 'You can also install storybook for plain HTML snippets with `storybook init --html` or follow some of the slow start guides: https://storybook.js.org/basics/slow-start-guide/'
);
// Add a new line for the clear visibility.
|
Update missed getstorybook occurrences
|
storybooks_storybook
|
train
|
js
|
23613a7e6ee0af75c985b9c9b40116ed77cd0a53
|
diff --git a/src/Service.php b/src/Service.php
index <HASH>..<HASH> 100644
--- a/src/Service.php
+++ b/src/Service.php
@@ -193,7 +193,7 @@ class Service extends Component
$decodedJson = $this->_getAssetContents($asset);
// Automatic refreshing of Instagram embedded assets every seven days, see issue #114 for why
- if (($decodedJson['providerName'] === 'Instagram') && $this->_hasBeenWeekSince($asset->dateModified)) {
+ if (( strtolower($decodedJson['providerName']) === 'instagram') && $this->_hasBeenWeekSince($asset->dateModified)) {
if ($this->_hasInstagramImageExpired($decodedJson['image'])) {
$decodedJson = $this->_updateInstagramFile($asset, $decodedJson['url']);
} else {
|
Set providerName to lowercase
Apparently the platformName variable is not always stored consistent as capitalized. It varies between "Instagram" and lowercase "instagram". This resulted in some embeds weren't getting refreshed.
|
spicywebau_craft-embedded-assets
|
train
|
php
|
879fc9b13c46d2200bed6e11f1204b2dabc34195
|
diff --git a/src/draw/handler/Draw.Marker.js b/src/draw/handler/Draw.Marker.js
index <HASH>..<HASH> 100644
--- a/src/draw/handler/Draw.Marker.js
+++ b/src/draw/handler/Draw.Marker.js
@@ -47,18 +47,18 @@ L.Draw.Marker = L.Draw.Feature.extend({
if (this._map) {
if (this._marker) {
- this._marker.off('click', this._onClick);
+ this._marker.off('click', this._onClick, this);
this._map
- .off('click', this._onClick)
+ .off('click', this._onClick, this)
.removeLayer(this._marker);
delete this._marker;
}
- this._mouseMarker.off('click', this._onClick);
+ this._mouseMarker.off('click', this._onClick, this);
this._map.removeLayer(this._mouseMarker);
delete this._mouseMarker;
- this._map.off('mousemove', this._onMouseMove);
+ this._map.off('mousemove', this._onMouseMove, this);
}
},
|
Pass the context in removeHooks so events will be removed correctly in the latest leaflet build.
|
Leaflet_Leaflet.draw
|
train
|
js
|
b2593cabcd9dc6b07ff603d7e8df5c50ce83255b
|
diff --git a/src/search/FindReplace.js b/src/search/FindReplace.js
index <HASH>..<HASH> 100644
--- a/src/search/FindReplace.js
+++ b/src/search/FindReplace.js
@@ -178,7 +178,7 @@ define(function (require, exports, module) {
if (state.matchIndex !== -1) {
// Convert to 1-based by adding one before showing the index.
findBar.showFindCount(StringUtils.format(Strings.FIND_MATCH_INDEX,
- state.matchIndex + 1, state.marked.length));
+ state.matchIndex + 1, state.resultSet.length));
}
}
}
|
Use resultSet array length for total match count rather than using the length of Marked Text.
|
adobe_brackets
|
train
|
js
|
b9350b42d765a15976a71b42c8b90aaea53f1c05
|
diff --git a/src/passes/pass.js b/src/passes/pass.js
index <HASH>..<HASH> 100644
--- a/src/passes/pass.js
+++ b/src/passes/pass.js
@@ -65,6 +65,12 @@ export class Pass {
this.quad = quad;
+ if(this.quad !== null) {
+
+ this.quad.frustumCulled = false;
+
+ }
+
/**
* Indicates whether the read and write buffers should be swapped after this
* pass has finished rendering.
@@ -103,8 +109,17 @@ export class Pass {
// Add the camera and the quad to the scene.
if(this.scene !== null) {
- if(this.camera !== null && this.camera.parent === null) { this.scene.add(this.camera); }
- if(this.quad !== null) { this.scene.add(this.quad); }
+ if(this.camera !== null && this.camera.parent === null) {
+
+ this.scene.add(this.camera);
+
+ }
+
+ if(this.quad !== null) {
+
+ this.scene.add(this.quad);
+
+ }
}
|
Don't let the quad be clipped.
See mrdoob/three.js#<I>.
|
vanruesc_postprocessing
|
train
|
js
|
a558848e23a3c56ba725a57a02474cb8870eefaa
|
diff --git a/src/Collection.php b/src/Collection.php
index <HASH>..<HASH> 100644
--- a/src/Collection.php
+++ b/src/Collection.php
@@ -32,7 +32,7 @@ abstract class Collection extends \Illuminate\Support\Collection
$class = $collection->get($key);
if (class_exists($class)) {
- return new $class;
+ return resolve($class);
}
return null;
|
Resolving collection instances from the container
|
ethical-jobs_laravel-storage
|
train
|
php
|
354e399d028d0028c58573eea9ba3c14faea391b
|
diff --git a/lib/mongoid/field.rb b/lib/mongoid/field.rb
index <HASH>..<HASH> 100644
--- a/lib/mongoid/field.rb
+++ b/lib/mongoid/field.rb
@@ -34,7 +34,7 @@ module Mongoid #:nodoc:
# <tt>Field.new(:score, :default => 0)</tt>
def initialize(name, options = {})
check_name!(name)
- @type = options[:type] || String
+ @type = options[:type] || Object
@name, @default = name, options[:default]
@copyable = (@default.is_a?(Array) || @default.is_a?(Hash))
@options = options
diff --git a/spec/unit/mongoid/field_spec.rb b/spec/unit/mongoid/field_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/mongoid/field_spec.rb
+++ b/spec/unit/mongoid/field_spec.rb
@@ -144,8 +144,8 @@ describe Mongoid::Field do
@field = Mongoid::Field.new(:name)
end
- it "defaults to String" do
- @field.type.should == String
+ it "defaults to Object" do
+ @field.type.should == Object
end
end
|
Changing default field type to Object instead of String
|
mongodb_mongoid
|
train
|
rb,rb
|
2fb535f522dfe2ea768e45a38cd4224ae7df4d73
|
diff --git a/src/test/java/org/eclipse/jetty/nosql/memcached/MemcachedTestServer.java b/src/test/java/org/eclipse/jetty/nosql/memcached/MemcachedTestServer.java
index <HASH>..<HASH> 100644
--- a/src/test/java/org/eclipse/jetty/nosql/memcached/MemcachedTestServer.java
+++ b/src/test/java/org/eclipse/jetty/nosql/memcached/MemcachedTestServer.java
@@ -65,8 +65,9 @@ public class MemcachedTestServer extends AbstractTestServer
e.printStackTrace();
}
- _idManager.setScavengeDelay(_scavengePeriod + 1000);
- _idManager.setScavengePeriod(_maxInactivePeriod);
+ _idManager.setScavengeDelay(_scavengePeriod * 1000);
+ _idManager.setScavengePeriod(_maxInactivePeriod);
+ _idManager.setWorkerName("node0");
try
{
|
set workerName for MemcachedSessionIdManager.
|
yyuu_jetty-nosql-memcached
|
train
|
java
|
92409766a3c69ef9024f729c59a2514316dc88a8
|
diff --git a/stackinternal_test.go b/stackinternal_test.go
index <HASH>..<HASH> 100644
--- a/stackinternal_test.go
+++ b/stackinternal_test.go
@@ -31,3 +31,34 @@ func TestCaller(t *testing.T) {
t.Errorf("got line == %v, want line == %v", got, want)
}
}
+
+type fholder struct {
+ f func() CallStack
+}
+
+func (fh *fholder) labyrinth() CallStack {
+ for {
+ return fh.f()
+ }
+}
+
+func TestTrace(t *testing.T) {
+ t.Parallel()
+
+ fh := fholder{
+ f: func() CallStack {
+ cs := Trace()
+ return cs
+ },
+ }
+
+ cs := fh.labyrinth()
+
+ lines := []int{50, 41, 55}
+
+ for i, line := range lines {
+ if got, want := cs[i].line(), line; got != want {
+ t.Errorf("got line[%d] == %v, want line[%d] == %v", i, got, i, want)
+ }
+ }
+}
|
Add additional test for Trace().
|
go-stack_stack
|
train
|
go
|
e4016d88a0013fd21aefdd33c2b20ebcd8424b01
|
diff --git a/test/features/pagecontent/content_negotiation.js b/test/features/pagecontent/content_negotiation.js
index <HASH>..<HASH> 100644
--- a/test/features/pagecontent/content_negotiation.js
+++ b/test/features/pagecontent/content_negotiation.js
@@ -49,7 +49,6 @@ describe('Content negotiation', function() {
const wrongContentTypeAccept = currentParsoidContentType
.replace(/text\/html/, 'application/json')
.replace(/\d+\.\d+\.\d+"$/, `${PARSOID_SUPPORTED_DOWNGRADE}"`);
- console.log(wrongContentTypeAccept);
return preq.get({
uri: `${server.config.labsBucketURL}/html/Main_Page`,
headers: {
|
Minor: Remove superfluous console.log()
|
wikimedia_restbase
|
train
|
js
|
1bbdf32d4f8a58d3d46a1cfb6ee244602099971d
|
diff --git a/aegea/batch.py b/aegea/batch.py
index <HASH>..<HASH> 100644
--- a/aegea/batch.py
+++ b/aegea/batch.py
@@ -438,7 +438,7 @@ def watch(args):
logger.info("Job %s %s", args.job_id, format_job_status(job_desc["status"]))
last_status = job_desc["status"]
if job_desc["status"] in {"RUNNING", "SUCCEEDED", "FAILED"}:
- logger.info("Job %s log stream: %s", args.job_id, job_desc["container"]["logStreamName"])
+ logger.info("Job %s log stream: %s", args.job_id, job_desc.get("container", {}).get("logStreamName"))
save_job_desc(job_desc)
if job_desc["status"] in {"RUNNING", "SUCCEEDED", "FAILED"}:
args.log_stream_name = job_desc["container"]["logStreamName"]
|
aegea batch watch: fix logic error when job fails before starting
|
kislyuk_aegea
|
train
|
py
|
35dd605e52a21bb8b73bd2a06279e073bba8ba12
|
diff --git a/lib/flex/http_clients/rest_client.rb b/lib/flex/http_clients/rest_client.rb
index <HASH>..<HASH> 100644
--- a/lib/flex/http_clients/rest_client.rb
+++ b/lib/flex/http_clients/rest_client.rb
@@ -5,7 +5,7 @@ module Flex
def request(method, path, data=nil)
options = Configuration.http_client_options
- url = Configuration.base_uri.join(path)
+ url = "#{Configuration.base_uri}#{path}"
args = options.merge( :method => method.to_s.downcase.to_sym,
:url => url,
:payload => data )
|
fix for bad url in rest_client.rb
|
elastics_elastics
|
train
|
rb
|
e1b7fa7e5c93a823df8ac265b64b00e557af42e1
|
diff --git a/server.js b/server.js
index <HASH>..<HASH> 100644
--- a/server.js
+++ b/server.js
@@ -127,6 +127,8 @@ Server.prototype.onHttpRequest = function (req, res) {
var params
try {
params = parseHttpRequest(req, { trustProxy: self._trustProxy })
+ params.httpReq = req
+ params.httpRes = res
} catch (err) {
debug('sent error %s', err.message)
res.end(bencode.encode({
|
server: save HTTP req/res in params
For GH issue #<I>
|
webtorrent_bittorrent-tracker
|
train
|
js
|
c379ad8e891bfa638a0b4425c63eef98519534ef
|
diff --git a/bridge.go b/bridge.go
index <HASH>..<HASH> 100644
--- a/bridge.go
+++ b/bridge.go
@@ -353,6 +353,8 @@ func (b *bridge) SyncSourceFor(id ProjectIdentifier) error {
return b.sm.SyncSourceFor(id)
}
+func (b *bridge) Release() { b.sm.Release() }
+
// versionTypeUnion represents a set of versions that are, within the scope of
// this solver run, equivalent.
//
diff --git a/source_manager.go b/source_manager.go
index <HASH>..<HASH> 100644
--- a/source_manager.go
+++ b/source_manager.go
@@ -66,6 +66,11 @@ type SourceManager interface {
// DeduceRootProject takes an import path and deduces the corresponding
// project/source root.
DeduceProjectRoot(ip string) (ProjectRoot, error)
+
+ // Release lets go of any locks held by the SourceManager. Once called, it is
+ // no longer safe to call methods against it; all method calls will
+ // immediately result in errors.
+ Release()
}
// A ProjectAnalyzer is responsible for analyzing a given path for Manifest and
|
Add Release() to the SourceManager interface
This is already being used by dep.
|
sdboyer_gps
|
train
|
go,go
|
93ba46bd5185eda8d12b98604b3a6675d477be56
|
diff --git a/flubber/futures/_task.py b/flubber/futures/_task.py
index <HASH>..<HASH> 100644
--- a/flubber/futures/_task.py
+++ b/flubber/futures/_task.py
@@ -2,6 +2,8 @@
# This file is part of flubber. See the NOTICE for more information.
#
+import sys
+
from flubber.futures._base import Executor, Future
from flubber.locks import Semaphore
from flubber.queue import Queue
@@ -20,8 +22,8 @@ class _WorkItem(object):
return
try:
result = self.fn(*self.args, **self.kwargs)
- except BaseException as e:
- self.future.set_exception(e)
+ except BaseException:
+ self.future.set_exception(sys.exc_info()[1])
else:
self.future.set_result(result)
|
Don't store full exc_info on futures
|
saghul_evergreen
|
train
|
py
|
a107365c75ec22f2eda392f89b1a9bec62d622c3
|
diff --git a/safe/engine/interpolation.py b/safe/engine/interpolation.py
index <HASH>..<HASH> 100644
--- a/safe/engine/interpolation.py
+++ b/safe/engine/interpolation.py
@@ -313,6 +313,11 @@ def interpolate_polygon_raster(source, target,
verify(source.is_vector)
verify(source.is_polygon_data)
+ if attribute_name is None:
+ attribute_name = target.get_name()
+ # FIXME (Ole): Launder for shape files (sucks)
+ attribute_name = str(attribute_name[:10])
+
# Run underlying clipping algorithm
polygon_geometry = source.get_geometry(as_geometry_objects=True)
@@ -402,7 +407,7 @@ def interpolate_raster_vector_points(source, target,
N = len(target)
if attribute_name is None:
attribute_name = source.get_name()
- # FIXME (Ole): Launder for shape files
+ # FIXME (Ole): Launder for shape files (sucks)
attribute_name = str(attribute_name[:10])
try:
|
dealt with case where attribute_name is None
|
inasafe_inasafe
|
train
|
py
|
bf714ac3d20e4b208fc682d58399e6b799356e69
|
diff --git a/tinydb/database.py b/tinydb/database.py
index <HASH>..<HASH> 100644
--- a/tinydb/database.py
+++ b/tinydb/database.py
@@ -37,7 +37,7 @@ def _get_doc_id(doc_id, eid):
if doc_id is not None:
raise TypeError('cannot pass both eid and doc_id')
- warnings.warn('eid has been renamed to doc_ids', DeprecationWarning)
+ warnings.warn('eid has been renamed to doc_id', DeprecationWarning)
return eid
else:
return doc_id
|
Chore: Fix typo in warning, should be singular (#<I>)
|
msiemens_tinydb
|
train
|
py
|
3631ee0841cda651fc8fb06192faa3741e0e2a22
|
diff --git a/src/Core/Request/AbstractApiRequest.php b/src/Core/Request/AbstractApiRequest.php
index <HASH>..<HASH> 100644
--- a/src/Core/Request/AbstractApiRequest.php
+++ b/src/Core/Request/AbstractApiRequest.php
@@ -250,12 +250,12 @@ abstract class AbstractApiRequest implements ClientRequestInterface, ContextAwar
/**
* @param Client $client
- * @param array $headers
+ * @param array|null $headers
* @return ApiResponseInterface
*/
public function executeWithClient(Client $client, array $headers = null)
{
- if (!is_null($this->externalUserId)) {
+ if (!is_null($this->externalUserId) && !isset($headers[self::EXTERNAL_USER_HEADER])) {
$headers[self::EXTERNAL_USER_HEADER] = $this->externalUserId;
}
return $client->execute($this, $headers);
|
fix(ClientLogging): change priority of headers for external user id
|
commercetools_commercetools-php-sdk
|
train
|
php
|
6ab00ccee7f090f52ab8fdd93521a1ac81222eac
|
diff --git a/lib/installlib.php b/lib/installlib.php
index <HASH>..<HASH> 100644
--- a/lib/installlib.php
+++ b/lib/installlib.php
@@ -515,6 +515,7 @@ function install_cli_database(array $options, $interactive) {
$CFG->version = '';
$CFG->release = '';
$version = null;
+ $release = null;
// read $version and $release
require($CFG->dirroot.'/version.php');
|
helping IDEs with undefined variable detection
|
moodle_moodle
|
train
|
php
|
c314c13a31fc140c08aef8727b75da39b1bf74e8
|
diff --git a/src/livestreamer/plugins/ilive.py b/src/livestreamer/plugins/ilive.py
index <HASH>..<HASH> 100644
--- a/src/livestreamer/plugins/ilive.py
+++ b/src/livestreamer/plugins/ilive.py
@@ -71,7 +71,7 @@ class ILive(Plugin):
"live": True
}
- match = re.search("(http(s)?://.+/server.php\?id=\d+)",
+ match = re.search("(http(s)?://.+/server\d?.php\?id=\d+)",
res.text)
if match:
token_url = match.group(1)
|
Fix ilive Plugin
Resolves #<I>
Token now is requested by server2.php, regular expression will match this now
Also mobile streams gone? or they need special plugin installed to work.
Maybe someone can install it and take a look at the traffic...
|
streamlink_streamlink
|
train
|
py
|
cbbac044a340ce2e7976cc817c7241b2d312e667
|
diff --git a/code/model/LDAPGateway.php b/code/model/LDAPGateway.php
index <HASH>..<HASH> 100644
--- a/code/model/LDAPGateway.php
+++ b/code/model/LDAPGateway.php
@@ -21,7 +21,11 @@ class LDAPGateway extends Object
public function __construct()
{
parent::__construct();
- $this->ldap = new Zend\Ldap\Ldap($this->config()->options);
+ // due to dependency injection this class can be created without any LDAP options set
+ // and \Zend\Ldap\Ldap will throw a warning with an empty array
+ if(count($this->config()->options)) {
+ $this->ldap = new Zend\Ldap\Ldap($this->config()->options);
+ }
}
/**
|
FIX Zend LDAP will crash during DI when no LDAP settings are provided
|
silverstripe_silverstripe-activedirectory
|
train
|
php
|
d34df38c2bd26d268189211f4b70ac7abc522c99
|
diff --git a/simplesqlite/core.py b/simplesqlite/core.py
index <HASH>..<HASH> 100644
--- a/simplesqlite/core.py
+++ b/simplesqlite/core.py
@@ -126,6 +126,8 @@ class SimpleSQLite(object):
if isinstance(database_src, SimpleSQLite):
self.__connection = database_src.connection
self.__database_path = database_src.database_path
+
+ self.debug_query = database_src.debug_query
return
if isinstance(database_src, sqlite3.Connection):
|
Modify to passing debug_query flag
|
thombashi_SimpleSQLite
|
train
|
py
|
d47d52a2f40af584ef628e1f58969ff8b90d57e5
|
diff --git a/examples/Example2_ScheduledReporters.py b/examples/Example2_ScheduledReporters.py
index <HASH>..<HASH> 100644
--- a/examples/Example2_ScheduledReporters.py
+++ b/examples/Example2_ScheduledReporters.py
@@ -50,8 +50,6 @@ results = workspace.getScheduledReporterResults()
print('\t...and put these results into a pandas dataframe: import pandas as pd \n pd.DataFrame(result)')
-resultframe = pandas.DataFrame(results)
-resultframe.columns = ['ticks','stop1','stop2','sheep','wolves']
print(resultframe)
print(workspace.report("ticks"))
print('\n3) Shutdown the server to release compute resources using: nl4py.stopServer()')
|
getScheduledReporterResults now returns a pandas dataframe. Example adjusted accordingly
|
chathika_NL4Py
|
train
|
py
|
e9fa672a0777c41d086ca000a94aa2cba2ce444d
|
diff --git a/src/parsers/markdown/standardize-ast/transformers-htmltag/br.js b/src/parsers/markdown/standardize-ast/transformers-htmltag/br.js
index <HASH>..<HASH> 100644
--- a/src/parsers/markdown/standardize-ast/transformers-htmltag/br.js
+++ b/src/parsers/markdown/standardize-ast/transformers-htmltag/br.js
@@ -21,7 +21,6 @@ module.exports = function transformATag (
content: '',
attributes
})
- openTags.add(resultNode)
result.pushData(resultNode)
return result
}
|
Don't store BR tags as open (#<I>)
|
Originate_text-runner
|
train
|
js
|
cbc0734d616635054af4736c263dcc530583d52b
|
diff --git a/lib/ronin/engine/engine.rb b/lib/ronin/engine/engine.rb
index <HASH>..<HASH> 100644
--- a/lib/ronin/engine/engine.rb
+++ b/lib/ronin/engine/engine.rb
@@ -28,6 +28,7 @@ require 'ronin/model/has_authors'
require 'ronin/model/cacheable'
require 'ronin/ui/output/helpers'
+require 'data_paths/finders'
require 'parameters'
module Ronin
@@ -45,6 +46,7 @@ module Ronin
# * {Model::HasLicense}
# * {Model::HasAuthors}
# * {Model::Cacheable}
+ # * [DataPaths::Finders](http://rubydoc.info/gems/data_paths)
# * [Parameters](http://rubydoc.info/gems/parameters)
# * {ClassMethods}
#
@@ -57,6 +59,7 @@ module Ronin
Model::HasLicense,
Model::HasAuthors,
Model::Cacheable,
+ DataPaths::Finders,
Parameters
base.send :extend, ClassMethods
|
Include DataPaths::Finders into all Engines.
|
ronin-ruby_ronin
|
train
|
rb
|
4a442ffcec7cc19cbdde16bbdd61d37221d879d6
|
diff --git a/lib/connection.js b/lib/connection.js
index <HASH>..<HASH> 100644
--- a/lib/connection.js
+++ b/lib/connection.js
@@ -189,6 +189,9 @@ Connection.prototype._allocateId = function _allocateId(stream, id) {
stream.id = id;
this.emit('new_stream', stream, id);
+ // * handling stream errors as connection errors
+ stream.on('error', this.emit.bind(this, 'error'));
+
return id;
};
diff --git a/lib/stream.js b/lib/stream.js
index <HASH>..<HASH> 100644
--- a/lib/stream.js
+++ b/lib/stream.js
@@ -230,6 +230,12 @@ Stream.prototype._receive = function _receive(frame, ready) {
this._onPriority(frame);
}
+ // * If it's an invalid stream level frame, emit error
+ else if (frame.type !== 'WINDOW_UPDATE') {
+ this._log.error({ frame: frame }, 'Invalid stream level frame');
+ this.emit('error', 'PROTOCOL_ERROR');
+ }
+
// * Any frame may signal the end of the stream with the END_STREAM flag
if (frame.flags.END_STREAM) {
this.push(null);
|
Stream: rejecting invalid stream level frame with PROTOCOL_ERROR
|
molnarg_node-http2-protocol
|
train
|
js,js
|
428bfd2554a2573574b80c38a02e73282047733a
|
diff --git a/src/compiler.js b/src/compiler.js
index <HASH>..<HASH> 100644
--- a/src/compiler.js
+++ b/src/compiler.js
@@ -6,11 +6,14 @@ import {
cond,
equals,
identity,
+ ifElse,
join,
map,
pipe,
toPairs,
- type
+ type,
+ unary,
+ when
} from 'ramda';
import { transform } from 'babel-core';
@@ -34,14 +37,10 @@ const compileCSS = pipe(
* @return {String}
*/
function compileProps(props) {
- const transformKey = cond([
- [equals('className'), always('class')],
- [T, dasherize]
- ]);
- const transformValue = cond([
- [item => type(item) === 'Object', compileCSS],
- [T, JSON.stringify]
- ]);
+ const transformKey = when(equals('className'), always('class'));
+ const transformValue = ifElse(item => type(item) === 'Object',
+ compileCSS, unary(JSON.stringify));
+
const stringify = pipe(
toPairs,
map(([key, value]) => `${transformKey(key)}=${transformValue(value)}`),
|
Replace cond by ifElse
|
rung-tools_rung-cli
|
train
|
js
|
152261413dd4f3287e3417a4c57a76285c2a7587
|
diff --git a/pkg/social/google_oauth.go b/pkg/social/google_oauth.go
index <HASH>..<HASH> 100644
--- a/pkg/social/google_oauth.go
+++ b/pkg/social/google_oauth.go
@@ -48,6 +48,7 @@ func (s *SocialGoogle) UserInfo(client *http.Client, token *oauth2.Token) (*Basi
}
return &BasicUserInfo{
+ Id: fmt.Sprintf("%d", data.Id),
Name: data.Name,
Email: data.Email,
Login: data.Email,
|
Added Id to BasicUserInfo returns
|
grafana_grafana
|
train
|
go
|
2238492c513152f7f97c05082ca68d44b33c1e97
|
diff --git a/command/image/build.go b/command/image/build.go
index <HASH>..<HASH> 100644
--- a/command/image/build.go
+++ b/command/image/build.go
@@ -138,7 +138,6 @@ func (out *lastProgressOutput) WriteProgress(prog progress.Progress) error {
}
func runBuild(dockerCli *command.DockerCli, options buildOptions) error {
-
var (
buildCtx io.ReadCloser
err error
@@ -333,7 +332,11 @@ func runBuild(dockerCli *command.DockerCli, options buildOptions) error {
// Windows: show error message about modified file permissions if the
// daemon isn't running Windows.
if response.OSType != "windows" && runtime.GOOS == "windows" && !options.quiet {
- fmt.Fprintln(dockerCli.Out(), `SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.`)
+ fmt.Fprintln(dockerCli.Out(), "SECURITY WARNING: You are building a Docker "+
+ "image from Windows against a non-Windows Docker host. All files and "+
+ "directories added to build context will have '-rwxr-xr-x' permissions. "+
+ "It is recommended to double check and reset permissions for sensitive "+
+ "files and directories.")
}
// Everything worked so if -q was provided the output from the daemon
|
Some things just need to be line wrapped.
|
docker_cli
|
train
|
go
|
6012308b7e052471b65152ca1f060b1a8ee02498
|
diff --git a/flask_appbuilder/static/appbuilder/js/ab_filters.js b/flask_appbuilder/static/appbuilder/js/ab_filters.js
index <HASH>..<HASH> 100644
--- a/flask_appbuilder/static/appbuilder/js/ab_filters.js
+++ b/flask_appbuilder/static/appbuilder/js/ab_filters.js
@@ -92,7 +92,7 @@ var AdminFilters = function(element, labels, form, filters, active_filters) {
var $field = $(form[name])
$field.attr('name', '_flt_0_' + name);
$field.attr('class', ' filter_val ' + $field.attr('class'));
- alert($("input < *",$field).html());
+ alert($("* < input",$field).html());
$el.append(
$('<td/>').append($field)
);;
|
Update ab_filters.js
|
dpgaspar_Flask-AppBuilder
|
train
|
js
|
bdfde6aed1f859b91b6a8bbdd8e9626ab6ebd723
|
diff --git a/go/engine/login_current_device.go b/go/engine/login_current_device.go
index <HASH>..<HASH> 100644
--- a/go/engine/login_current_device.go
+++ b/go/engine/login_current_device.go
@@ -72,6 +72,20 @@ func (e *LoginCurrentDevice) Run(ctx *Context) error {
return errNoDevice
}
+ // Make sure the device ID is still valid.
+ me, err := libkb.LoadMe(libkb.LoadUserArg{
+ PublicKeyOptional: true,
+ ForceReload: true,
+ })
+ if err != nil {
+ e.G().Log.Debug("error loading user profile: %#v", err)
+ return err
+ }
+ if !me.HasDeviceInCurrentInstall() {
+ e.G().Log.Debug("current device is not valid")
+ return errNoDevice
+ }
+
// at this point, there is a user config either for the current user or for e.username
// and it has a device id, so this should be a provisioned device. Thus, they should
// just login normally.
|
check whether the current device is still valid during login
|
keybase_client
|
train
|
go
|
48edae4009f68f26664458cf81f72e51b79c8813
|
diff --git a/spec/lib/tox/client_spec.rb b/spec/lib/tox/client_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/lib/tox/client_spec.rb
+++ b/spec/lib/tox/client_spec.rb
@@ -80,4 +80,10 @@ RSpec.describe Tox::Client do
end
end
end
+
+ describe '#running?' do
+ it 'returns false by default' do
+ expect(subject.running?).to eq false
+ end
+ end
end
|
Add spec for Tox::Client#running?
|
toxon_tox.rb
|
train
|
rb
|
8bb9df206068dcff549e33243ae3a5a4b671efd1
|
diff --git a/user_management/api/views.py b/user_management/api/views.py
index <HASH>..<HASH> 100644
--- a/user_management/api/views.py
+++ b/user_management/api/views.py
@@ -230,11 +230,10 @@ class VerifyAccountView(views.APIView):
Set user as a class attribute or raise an `InvalidExpiredToken`.
"""
- max_age = getattr(
- settings,
- 'VERIFY_ACCOUNT_EXPIRY',
- self.DEFAULT_VERIFY_ACCOUNT_EXPIRY,
- )
+ try:
+ max_age = settings.VERIFY_ACCOUNT_EXPIRY
+ except AttributeError:
+ max_age = self.DEFAULT_VERIFY_ACCOUNT_EXPIRY
try:
email_data = signing.loads(kwargs['token'], max_age=max_age)
|
Replace getattr with a try..except
|
incuna_django-user-management
|
train
|
py
|
65dc59384639a5b0ff4f9b8f41669fca6a815030
|
diff --git a/file_picker/views.py b/file_picker/views.py
index <HASH>..<HASH> 100755
--- a/file_picker/views.py
+++ b/file_picker/views.py
@@ -32,7 +32,10 @@ class FilePickerBase(object):
self.field_names = model._meta.get_all_field_names()
self.field_labels = {}
for field_name in model._meta.get_all_field_names():
- field = model._meta.get_field(field_name)
+ try:
+ field = model._meta.get_field(field_name)
+ except models.FieldDoesNotExist:
+ continue
if isinstance(field, (models.ImageField, models.FileField)):
self.field = field_name
self.field_names.remove(field_name)
|
don't die on fields that don't exist
|
caktus_django-file-picker
|
train
|
py
|
871263d5d947022a91563b9b78229957bd66fef8
|
diff --git a/hawtio-system/src/main/java/io/hawt/web/filters/ContentSecurityPolicyFilter.java b/hawtio-system/src/main/java/io/hawt/web/filters/ContentSecurityPolicyFilter.java
index <HASH>..<HASH> 100644
--- a/hawtio-system/src/main/java/io/hawt/web/filters/ContentSecurityPolicyFilter.java
+++ b/hawtio-system/src/main/java/io/hawt/web/filters/ContentSecurityPolicyFilter.java
@@ -12,7 +12,6 @@ import javax.servlet.http.HttpServletResponse;
import io.hawt.web.ServletHelpers;
import io.hawt.web.auth.keycloak.KeycloakServlet;
-
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
|
and new line, sheesh
|
hawtio_hawtio
|
train
|
java
|
0bf7e6b23c4b426e77d2c70c4d0a6e942a99ba2d
|
diff --git a/lib/jitsu.js b/lib/jitsu.js
index <HASH>..<HASH> 100644
--- a/lib/jitsu.js
+++ b/lib/jitsu.js
@@ -53,7 +53,7 @@ jitsu.use(flatiron.plugins.cli, {
string: true
},
raw: {
- description: 'jitsu will only output line-delimited raw JSON ( useful for piping )',
+ description: 'jitsu will only output line-delimited raw JSON (useful for piping)',
boolean: true
}
}
|
[minor] Minor change in help text
|
nodejitsu_jitsu
|
train
|
js
|
fd4ff050c46c0eac288250db0928da1986311150
|
diff --git a/provider/oracle/instance_test.go b/provider/oracle/instance_test.go
index <HASH>..<HASH> 100644
--- a/provider/oracle/instance_test.go
+++ b/provider/oracle/instance_test.go
@@ -12,6 +12,7 @@ import (
gc "gopkg.in/check.v1"
"github.com/juju/juju/core/instance"
+ corenetwork "github.com/juju/juju/core/network"
"github.com/juju/juju/environs"
"github.com/juju/juju/environs/config"
"github.com/juju/juju/environs/context"
@@ -136,7 +137,7 @@ func (i instanceSuite) TestOpenPorts(c *gc.C) {
err = instance.OpenPorts(i.callCtx, "0", []jujunetwork.IngressRule{
{
- PortRange: jujunetwork.PortRange{
+ PortRange: corenetwork.PortRange{
FromPort: 0,
ToPort: 0,
},
@@ -162,7 +163,7 @@ func (i instanceSuite) TestClosePorts(c *gc.C) {
err = instance.ClosePorts(i.callCtx, "0", []jujunetwork.IngressRule{
{
- PortRange: jujunetwork.PortRange{
+ PortRange: corenetwork.PortRange{
FromPort: 0,
ToPort: 0,
},
|
Fixes tests in provider/oracle for modules relocated to core/network.
|
juju_juju
|
train
|
go
|
6801d2da7a4203bc6e72969437e2c0593811c557
|
diff --git a/src/components/DesktopComponent.js b/src/components/DesktopComponent.js
index <HASH>..<HASH> 100644
--- a/src/components/DesktopComponent.js
+++ b/src/components/DesktopComponent.js
@@ -76,6 +76,12 @@ class DesktopComponent {
// if it can have multiple ex. VerticalBox
this.element.deleteAt(this.children.indexOf(child));
child.element.destroy();
+ } else if (this.exists(child.element.close)) {
+ // we have a window that we want to close
+ if (!child.closing) {
+ // we are already closing, so we don't want to do it again
+ child.element.close();
+ }
}
const index = this.children.indexOf(child);
this.children.splice(index, 1);
diff --git a/src/components/Window.js b/src/components/Window.js
index <HASH>..<HASH> 100644
--- a/src/components/Window.js
+++ b/src/components/Window.js
@@ -56,6 +56,7 @@ class Window extends DesktopComponent {
this.props.menuBar
);
this.element.onClosing(() => {
+ this.closing = true;
this.props.onClose();
this.element.close();
if (this.props.lastWindow) {
|
Add support for deleting window. Fixes #<I>
|
kusti8_proton-native
|
train
|
js,js
|
9621610ab7c10a321e3db40d3cbf03d4b7cfab0d
|
diff --git a/app/aid/proxy/proxy.go b/app/aid/proxy/proxy.go
index <HASH>..<HASH> 100644
--- a/app/aid/proxy/proxy.go
+++ b/app/aid/proxy/proxy.go
@@ -45,7 +45,7 @@ const (
func New() *Proxy {
p := &Proxy{
ipRegexp: regexp.MustCompile(`[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+`),
- proxyRegexp: regexp.MustCompile(`http[s]?://[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+`),
+ proxyRegexp: regexp.MustCompile(`https?://([\w]*:[\w]*@)?[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+`),
allIps: map[string]string{},
all: map[string]bool{},
usable: make(map[string]*ProxyForHost),
|
Proxy: support for filling in user name and password
|
henrylee2cn_pholcus
|
train
|
go
|
83ef8ba0eb412968909eae4b1bf80d804286eab4
|
diff --git a/requests_gpgauthlib/gpgauth_session.py b/requests_gpgauthlib/gpgauth_session.py
index <HASH>..<HASH> 100644
--- a/requests_gpgauthlib/gpgauth_session.py
+++ b/requests_gpgauthlib/gpgauth_session.py
@@ -185,6 +185,7 @@ class GPGAuthSession(Session):
.replace('\\\\', '\\')
).replace('\\ ', ' ')
+ logger.debug('User token to decrypt: %s', encrypted_user_auth_token)
logger.info('Decrypting the user authentication token; '
'password prompt expected')
@@ -197,7 +198,7 @@ class GPGAuthSession(Session):
user_auth_token = self.gpg.decrypt(encrypted_user_auth_token, always_trust=True, passphrase=passphrase)
if not user_auth_token.ok:
- raise GPGAuthStage1Exception("Auth token decryption failed")
+ raise GPGAuthStage1Exception("Auth token decryption failed: %s", user_auth_token.status)
logger.info('user_auth_token: %s', user_auth_token)
return str(user_auth_token)
|
Add debug statement to help debug stage1 errors
|
liip_requests_gpgauthlib
|
train
|
py
|
Subsets and Splits
Java Commits in Train Set
Queries for all entries where the diff_languages column is 'java', providing a filtered dataset but without deeper analysis.
Java Commits Test Data
Returns a subset of 5000 entries from the dataset where the programming language difference is Java, providing basic filtering for exploration.
Java Commits Sample
Retrieves the first 1,000 records where the 'diff_languages' column is 'java', providing limited insight into the specific data entries.
Java Commits Validation Sample
Retrieves a sample of entries from the validation dataset where the diff languages are Java, providing limited insight into specific Java-related data points.
Java Commits in Validation
This query retrieves a limited sample of entries from the validation dataset where the programming language difference is Java, providing basic filtering with minimal insight.
Java Commits Sample
This query retrieves a sample of 100 records where the 'diff_languages' is 'java', providing basic filtering but limited analytical value.
Java Commits Sample
Retrieves 100 samples where the language difference is Java, providing basic filtering but minimal analytical value.
Java Commits Sample
Retrieves 10 samples where the diff_languages column is 'java', providing basic examples of data entries with this specific language.
Java Commits Validation Sample
Retrieves 1,000 records where the differences in languages are marked as Java, providing a snapshot of that specific subset but limited to raw data.
Java Commits Sample
This query retrieves 1000 random samples from the dataset where the programming language is Java, offering limited insight beyond raw data.