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
|
|---|---|---|---|---|---|
652ed5e22594dce5f91299e1ef27e90c9a29a595
|
diff --git a/live_tests/helpers/configuration.py b/live_tests/helpers/configuration.py
index <HASH>..<HASH> 100644
--- a/live_tests/helpers/configuration.py
+++ b/live_tests/helpers/configuration.py
@@ -1,5 +1,4 @@
import os
-import sys
# Default settings for testing.
LOCATION = os.getenv('PROFITBRICKS_LOCATION', 'us/lasdev')
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -52,7 +52,7 @@ setup(
author_email='baldwin@stackpointcloud.com',
url='https://github.com/profitbricks/profitbricks-sdk-python',
download_url='https://github.com/profitbricks/profitbricks-sdk-python/tarball/2.3.1',
- install_requires=['requests>=2.0.0','six>=1.10.0'],
+ install_requires=['requests>=2.0.0', 'six>=1.10.0'],
packages=['profitbricks'],
platforms='any',
test_suite='profitbricks.test.test_profitbricks',
|
Applied flake8 rules to:
* live_tests/helpers/configuration.py
* setup.py
|
profitbricks_profitbricks-sdk-python
|
train
|
py,py
|
2b864577d3aeefb4fd38c5b189d7896c38b54649
|
diff --git a/views/show.blade.php b/views/show.blade.php
index <HASH>..<HASH> 100644
--- a/views/show.blade.php
+++ b/views/show.blade.php
@@ -75,7 +75,7 @@ LogViewer
<p>Are you sure you wish to continue?</p>
</div>
<div class="modal-footer">
- {!! HTML::link($url.'/'.$date.'/delete', 'Yes', array('class' => 'btn btn-success')) !!}
+ <a class="btn btn-success" href="{{ $url.'/'.$date.'/delete' }}">Yes</a>
<button class="btn btn-danger" data-dismiss="modal">No</button>
</div>
</div>
|
Removed remaining usage of the html component
|
BootstrapCMS_LogViewer
|
train
|
php
|
1c57d4afb138b09f132ce4f2d6e00352236062c3
|
diff --git a/polyfills/Event/hashchange/polyfill.js b/polyfills/Event/hashchange/polyfill.js
index <HASH>..<HASH> 100644
--- a/polyfills/Event/hashchange/polyfill.js
+++ b/polyfills/Event/hashchange/polyfill.js
@@ -1,18 +1,18 @@
(function (global) {
- var
- hash = global.location.hash,
- func = function () {
+ var hash = global.location.hash;
+
+ function poll () {
if (hash !== global.location.hash) {
hash = global.location.hash;
global.dispatchEvent(new Event('hashchange'));
}
- setTimeout(func, 200);
+ setTimeout(poll, 500);
};
// Make sure a check for 'onhashchange' in window will pass (note: setting to undefined IE<9 causes 'Not implemented' error)
global.onhashchange = function() {};
- func();
+ poll();
})(this);
|
Tidy up hashchange a bit
|
Financial-Times_polyfill-service
|
train
|
js
|
246b124be3361b40b44cb4fd2f7a6c7fb6dc7aa0
|
diff --git a/examples/full-event-client-example.py b/examples/full-event-client-example.py
index <HASH>..<HASH> 100644
--- a/examples/full-event-client-example.py
+++ b/examples/full-event-client-example.py
@@ -16,7 +16,7 @@ Implement the API found here for code/token exchange:
https://discord.com/developers/docs/topics/oauth2#authorization-code-grant-access-token-exchange-example
(NOTE: Redirect URI is needed and should be what's set in your Dev Application's OAuth2 screen)
'''
-token = exchange_code(code_grant)
+token = exchange_code(code_grant) # noqa: F821 undefined name 'exchange_code' See PR #110
# Now authenticate with the token we got (Save to skip authorization later)
c.authenticate(token['access_token'])
|
Update full-event-client-example.py
|
qwertyquerty_pypresence
|
train
|
py
|
20490bd1762a32d34d5cb85b7f404c14975534e2
|
diff --git a/lib/picasa/client.rb b/lib/picasa/client.rb
index <HASH>..<HASH> 100644
--- a/lib/picasa/client.rb
+++ b/lib/picasa/client.rb
@@ -74,7 +74,7 @@ module Picasa
end
def credentials
- {user_id: user_id}.tap do |credentials|
+ {:user_id => user_id}.tap do |credentials|
credentials[:authorization_header] = authorization_header if authorization_header
end
end
|
changed to <I> hash style
|
morgoth_picasa
|
train
|
rb
|
83be4deaffda14c9e5d3cb00559fe0213252d95c
|
diff --git a/piplicenses.py b/piplicenses.py
index <HASH>..<HASH> 100644
--- a/piplicenses.py
+++ b/piplicenses.py
@@ -31,6 +31,7 @@ from __future__ import (division, print_function,
import sys
import glob
import os
+import codecs
import argparse
from functools import partial
from email.parser import FeedParser
@@ -124,7 +125,9 @@ def get_packages(args):
for test_file in glob.glob(license_file_base):
if os.path.exists(test_file):
license_file = test_file
- with open(test_file) as license_file_handle:
+ with codecs.open(test_file,
+ encoding='utf-8',
+ errors='replace') as license_file_handle:
file_lines = license_file_handle.readlines()
try:
# python 3 is happy with maybe-Unicode files
|
Open license file works well with Windows and Python <I> #<I>
|
raimon49_pip-licenses
|
train
|
py
|
f2bdd2d62307c7c0dece402747fe1c78e0856e81
|
diff --git a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
index <HASH>..<HASH> 100644
--- a/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
+++ b/subprojects/parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
@@ -361,14 +361,12 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object> implements Groov
this.sourceUnit = sourceUnit;
this.moduleNode = new ModuleNode(sourceUnit);
- CharStream charStream = createCharStream(sourceUnit);
-
- this.lexer = new GroovyLangLexer(charStream);
+ this.lexer = new GroovyLangLexer(createCharStream(sourceUnit));
this.parser =
new GroovyLangParser(
new CommonTokenStream(this.lexer));
- this.parser.setErrorHandler(new DescriptiveErrorStrategy(charStream));
+ this.parser.setErrorHandler(new DescriptiveErrorStrategy(this.lexer.getInputStream()));
this.tryWithResourcesASTTransformation = new TryWithResourcesASTTransformation(this);
this.groovydocManager = GroovydocManager.getInstance();
|
Trivial refactoring: use the char stream of lexer instead
|
apache_groovy
|
train
|
java
|
b7d0d65369777bddc16138ec0a2ae22d8d95ff9a
|
diff --git a/src/article/editor/EditorPackage.js b/src/article/editor/EditorPackage.js
index <HASH>..<HASH> 100644
--- a/src/article/editor/EditorPackage.js
+++ b/src/article/editor/EditorPackage.js
@@ -90,6 +90,7 @@ import EditReferenceWorkflow from './EditReferenceWorkflow'
// FIXME: this should be shared
import CollectionEditor from '../metadata/CollectionEditor'
+import ModelPreviewComponent from '../shared/ModelPreviewComponent'
export default {
name: 'ManscruptEditor',
@@ -119,6 +120,7 @@ export default {
// HACK: to get components working taken from metadata editor
config.addComponent('entity', NodeModelEditor)
+ config.addComponent('model-preview', ModelPreviewComponent)
config.addComponent('front-matter', FrontMatterComponent)
config.addComponent('back-matter', CompositeModelComponent)
|
Bring back reference header for edit reference workflow.
|
substance_texture
|
train
|
js
|
f3ef5bfa12ce5dec5f2e9df61c27beafb3274986
|
diff --git a/leaflet.snap.js b/leaflet.snap.js
index <HASH>..<HASH> 100644
--- a/leaflet.snap.js
+++ b/leaflet.snap.js
@@ -178,7 +178,10 @@ L.Draw.Feature.SnapMixin = {
}
if (!this._mouseMarker) {
+ this._map.on('layeradd', this._snap_on_enabled, this);
return;
+ }else{
+ this._map.off('layeradd', this._snap_on_enabled, this);
}
if (!this._snapper) {
|
Fixed issue #<I> (second version)
|
makinacorpus_Leaflet.Snap
|
train
|
js
|
4878cec0e4dd898f42f7c79d536f2df912c897e3
|
diff --git a/builder/amazon/ebs/builder.go b/builder/amazon/ebs/builder.go
index <HASH>..<HASH> 100644
--- a/builder/amazon/ebs/builder.go
+++ b/builder/amazon/ebs/builder.go
@@ -46,6 +46,8 @@ func (b *Builder) Prepare(raws ...interface{}) error {
// Accumulate any errors
errs := common.CheckUnusedConfig(md)
+ errs = packer.MultiErrorAppend(errs, b.config.AccessConfig.Prepare()...)
+ errs = packer.MultiErrorAppend(errs, b.config.RunConfig.Prepare()...)
// Accumulate any errors
if b.config.AMIName == "" {
|
builder/amazon/ebs: validate access config
|
hashicorp_packer
|
train
|
go
|
45f3e5ea5afd56ae452fe9fb0a5f94743995cf79
|
diff --git a/integration/lifecycle/lifecycle_test.go b/integration/lifecycle/lifecycle_test.go
index <HASH>..<HASH> 100644
--- a/integration/lifecycle/lifecycle_test.go
+++ b/integration/lifecycle/lifecycle_test.go
@@ -573,6 +573,23 @@ var _ = Describe("Creating a container", func() {
Expect(stdout).To(gbytes.Say(" root "))
})
+ if os.Getenv("BTRFS_SUPPORTED") != "" { // VFS driver does not support this feature`
+ It("sees the root directory as owned by the container's root user", func() {
+ stdout := gbytes.NewBuffer()
+ process, err := container.Run(garden.ProcessSpec{
+ User: "root",
+ Path: "sh",
+ Args: []string{"-c", "ls -al / | head -n 2"},
+ }, garden.ProcessIO{Stdout: stdout, Stderr: GinkgoWriter})
+ Expect(err).ToNot(HaveOccurred())
+
+ Expect(process.Wait()).To(Equal(0))
+ Expect(stdout).NotTo(gbytes.Say("nobody"))
+ Expect(stdout).NotTo(gbytes.Say("65534"))
+ Expect(stdout).To(gbytes.Say(" root "))
+ })
+ }
+
It("sees alice-owned files as owned by alice", func() {
stdout := gbytes.NewBuffer()
process, err := container.Run(garden.ProcessSpec{
|
Test that / directory is owned by correct uid in unprivileged containers
[finishes #<I>]
|
cloudfoundry-attic_garden-linux
|
train
|
go
|
98fc411704eda1b5ece6038a9bb54a70c391f53c
|
diff --git a/extension/sample-template/lib/sample.js b/extension/sample-template/lib/sample.js
index <HASH>..<HASH> 100644
--- a/extension/sample-template/lib/sample.js
+++ b/extension/sample-template/lib/sample.js
@@ -4,20 +4,16 @@
* Sample report used in standard and multitenant version
*/
-var winston = require("winston"),
- util = require("util"),
+var util = require("util"),
async = require("async"),
_ = require("underscore"),
join = require("path").join,
fs = require("fs"),
Q = require("q");
-
-var logger = winston.loggers.get('jsreport');
-
module.exports = function (reporter, definition) {
- this.reporter.initializeListener.add(definition.name, this, function () {
+ reporter.initializeListener.add(definition.name, this, function () {
if (!reporter.settings.get("sample-created")) {
var dataObj = {
|
refactoring - bootstrapper
|
jsreport_jsreport-sample-template
|
train
|
js
|
27c7911a6eef65b4655cf35821f0400906f6974a
|
diff --git a/MAVProxy/modules/lib/rline.py b/MAVProxy/modules/lib/rline.py
index <HASH>..<HASH> 100644
--- a/MAVProxy/modules/lib/rline.py
+++ b/MAVProxy/modules/lib/rline.py
@@ -2,7 +2,7 @@
readline handling for mavproxy
'''
-import sys, glob
+import sys, glob, os
rline_mpstate = None
@@ -41,7 +41,14 @@ def complete_command(text):
def complete_filename(text):
'''complete a filename'''
- return glob.glob(text+'*')
+
+ #ensure directories have trailing slashes:
+ list = glob.glob(text+'*')
+ for idx, val in enumerate(list):
+ if os.path.isdir(val):
+ list[idx] = (val + os.path.sep)
+
+ return list
def complete_parameter(text):
'''complete a parameter'''
|
rline: Tab completed files distinguish directories with trailing slash.
|
ArduPilot_MAVProxy
|
train
|
py
|
25918c332fa1076c2f309d9a0111cd1c3d677224
|
diff --git a/duct.py b/duct.py
index <HASH>..<HASH> 100644
--- a/duct.py
+++ b/duct.py
@@ -193,7 +193,7 @@ class Then(Expression):
return right_status
def __repr__(self):
- return "{}.then({})".format(repr(self._left), repr(self._right))
+ return "{0}.then({1})".format(repr(self._left), repr(self._right))
# Pipe uses another thread to run the left side of the pipe in parallel with
@@ -242,7 +242,7 @@ class Pipe(Expression):
return left_status
def __repr__(self):
- return "{}.pipe({})".format(repr(self._left), repr(self._right))
+ return "{0}.pipe({1})".format(repr(self._left), repr(self._right))
def trim_if_string(x):
|
zero length field names in format broke Python <I>
|
oconnor663_duct.py
|
train
|
py
|
355ff83e74f6e27c79033b8dfb899e3a3b529049
|
diff --git a/hugolib/config_test.go b/hugolib/config_test.go
index <HASH>..<HASH> 100644
--- a/hugolib/config_test.go
+++ b/hugolib/config_test.go
@@ -742,6 +742,7 @@ theme_param="themevalue2"
b := newB(c)
b.WithEnviron(
+ "HUGO_ENABLEGITINFO", "false",
// imaging.anchor is a string, and it's not possible
// to set a child attribute.
"HUGO_IMAGING_ANCHOR_FOO", "top",
|
config: Set HUGO_ENABLEGITINFO=false override in Set_in_string
This allows TestLoadConfigWithOsEnvOverrides/Set_in_string to PASS
even if there is no .git directory, e.g. during Debian package build.
|
gohugoio_hugo
|
train
|
go
|
3e01ac8bd363ac808f09a313343350644ac08f61
|
diff --git a/processor.js b/processor.js
index <HASH>..<HASH> 100644
--- a/processor.js
+++ b/processor.js
@@ -80,6 +80,14 @@ module.exports = function(signaller) {
// extract the metadata from the input data
srcData = parts[1];
+
+ // if we got data from ourself, then this is pretty dumb
+ // but if we have then throw it away
+ if (srcData && srcData.id === signaller.id) {
+ return console.warn('got data from ourself, discarding');
+ }
+
+ // get the source state
srcState = signaller.peers.get(srcData && srcData.id) || srcData;
if (typeof handler == 'function') {
|
Added console.warn line when we receive a message from ourself (faulty signaling server)
|
rtc-io_rtc-signaller
|
train
|
js
|
a498371005c4ba631a0b24e568bfe8a78e19fe84
|
diff --git a/packages/babel-register/src/node.js b/packages/babel-register/src/node.js
index <HASH>..<HASH> 100644
--- a/packages/babel-register/src/node.js
+++ b/packages/babel-register/src/node.js
@@ -111,9 +111,11 @@ function hookExtensions(_exts) {
});
}
-hookExtensions(DEFAULT_EXTENSIONS);
+register({
+ extensions: DEFAULT_EXTENSIONS,
+});
-export default function (opts?: Object = {}) {
+export default function register(opts?: Object = {}) {
if (opts.extensions) hookExtensions(opts.extensions);
if (opts.cache === false) cache = null;
@@ -128,8 +130,8 @@ export default function (opts?: Object = {}) {
transformOpts.ignore = [
new RegExp(
"^" +
- escapeRegExp(process.cwd() + path.sep) +
- ".*" +
+ escapeRegExp(process.cwd()) +
+ "(?:" + path.sep + ".*)?" +
escapeRegExp(path.sep + "node_modules" + path.sep)
, "i"),
];
|
Ensure the ignore regex is consistent and initialized fully. (#<I>)
|
babel_babel
|
train
|
js
|
c5e1efca7fdcd69bc1859ab943c46a2f1890e356
|
diff --git a/src/Vector.php b/src/Vector.php
index <HASH>..<HASH> 100644
--- a/src/Vector.php
+++ b/src/Vector.php
@@ -37,7 +37,7 @@ final class Vector extends Matrix
*/
public function getSize(): int
{
- return count($this->internal[0]);
+ return $this->getColumnCount();
}
/**
|
Make `getSize()` more explicitly an alias of `getColumnCount()`.
|
mcordingley_LinearAlgebra
|
train
|
php
|
68861702e474502043fbd4664b70b6254b8bba1d
|
diff --git a/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb b/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb
index <HASH>..<HASH> 100644
--- a/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb
+++ b/decidim-admin/app/controllers/decidim/admin/newsletters_controller.rb
@@ -36,6 +36,7 @@ module Decidim
def create
enforce_permission_to :create, :newsletter
@form = form(NewsletterForm).from_params(params)
+ @form.images = images_block_context unless has_images_block_context?
CreateNewsletter.call(@form, content_block, current_user) do
on(:ok) do |newsletter|
@@ -59,6 +60,7 @@ module Decidim
def update
enforce_permission_to :update, :newsletter, newsletter: newsletter
@form = form(NewsletterForm).from_params(params)
+ @form.images = images_block_context unless has_images_block_context?
UpdateNewsletter.call(newsletter, @form, current_user) do
on(:ok) do |newsletter|
@@ -156,6 +158,14 @@ module Decidim
@content_block_for_newsletter ||= @newsletter.template
end
+
+ def images_block_context
+ form(NewsletterForm).from_model(content_block).images
+ end
+
+ def has_images_block_context?
+ @form.images && @form.valid?
+ end
end
end
end
|
Fix newsletter create and update actions (#<I>)
* Add images block context when creating and editing a newsletter
* Remove trailing whitespace
|
decidim_decidim
|
train
|
rb
|
563e15567640afca3befd2af484a45c84aa159f8
|
diff --git a/lib/apprepo/upload_descriptor.rb b/lib/apprepo/upload_descriptor.rb
index <HASH>..<HASH> 100644
--- a/lib/apprepo/upload_descriptor.rb
+++ b/lib/apprepo/upload_descriptor.rb
@@ -1,10 +1,13 @@
module AppRepo
class UploadDescriptor
- attr_accessor :appcode
+
+ attr_accessor :appcode # required
+ attr_accessor :ipa # can be inferred anyway (glob or metadata)
+ attr_accessor :metadata # optional, allows re-uploading same binary without metadata change
def initialize(appcode)
self.appcode = appcode
- puts 'Initializing "AppRepo:UploadDescriptor with appcode "' + self.appcode + '"'
+ UI.message('Initializing "AppRepo:UploadDescriptor with appcode "' + self.appcode + '"')
end
end
end
|
upload descriptor should have all required data now
|
suculent_apprepo
|
train
|
rb
|
da96ed5f48423248760bd0cf617d18d38579b26d
|
diff --git a/fstream-npm.js b/fstream-npm.js
index <HASH>..<HASH> 100644
--- a/fstream-npm.js
+++ b/fstream-npm.js
@@ -151,7 +151,9 @@ Packer.prototype.applyIgnores = function (entry, partial, entryObj) {
entry.match(/^\..*\.swp$/) ||
entry === '.DS_Store' ||
entry.match(/^\._/) ||
- entry.match(/^.*\.orig$/)
+ entry.match(/^.*\.orig$/) ||
+ // Package locks are never allowed in tarballs -- use shrinkwrap instead
+ entry === 'package-lock.json'
) {
return false
}
|
ignores: always ignore package-lock.json (#<I>)
|
npm_fstream-npm
|
train
|
js
|
e7d39cfb8f24394b4828c14abef7e78630623ede
|
diff --git a/pkg/sockops/sockops.go b/pkg/sockops/sockops.go
index <HASH>..<HASH> 100644
--- a/pkg/sockops/sockops.go
+++ b/pkg/sockops/sockops.go
@@ -306,13 +306,11 @@ func bpfLoadMapProg(object string, load string) error {
func SkmsgEnable() error {
err := bpfCompileProg(cIPC, oIPC)
if err != nil {
- log.Error(err)
return err
}
err = bpfLoadMapProg(oIPC, eIPC)
if err != nil {
- log.Error(err)
return err
}
log.Info("Sockmsg Enabled, bpf_redir loaded")
@@ -360,12 +358,10 @@ func bpfLoadAttachProg(object string, load string, mapName string) (int, int, er
func SockmapEnable() error {
err := bpfCompileProg(cSockops, oSockops)
if err != nil {
- log.Error(err)
return err
}
progID, mapID, err := bpfLoadAttachProg(oSockops, eSockops, sockMap)
if err != nil {
- log.Error(err)
return err
}
log.Infof("Sockmap Enabled: bpf_sockops prog_id %d and map_id %d loaded", progID, mapID)
|
sockops: Remove duplicate error logging
If the compilation or loading of the sock_ops programs fail, we log the
error twice, first in the XXXEnable functions, then in the calling
function. This commit keeps only the error logging in Daemon.init().
|
cilium_cilium
|
train
|
go
|
aaa8c4895f6542e9425d5b3a664ae83b9cb8ebbd
|
diff --git a/gns3server/version.py b/gns3server/version.py
index <HASH>..<HASH> 100644
--- a/gns3server/version.py
+++ b/gns3server/version.py
@@ -23,7 +23,7 @@
# or negative for a release candidate or beta (after the base version
# number has been incremented)
-__version__ = "2.1.0rc3"
+__version__ = "2.1.0dev9"
__version_info__ = (2, 1, 0, -99)
# If it's a git checkout try to add the commit
|
Development on <I>dev9
|
GNS3_gns3-server
|
train
|
py
|
07633b2559e9f953dd98d422de093d2b0859e99e
|
diff --git a/core/src/main/java/hudson/model/FullDuplexHttpChannel.java b/core/src/main/java/hudson/model/FullDuplexHttpChannel.java
index <HASH>..<HASH> 100644
--- a/core/src/main/java/hudson/model/FullDuplexHttpChannel.java
+++ b/core/src/main/java/hudson/model/FullDuplexHttpChannel.java
@@ -38,7 +38,9 @@ import jenkins.util.FullDuplexHttpService;
* Builds a {@link Channel} on top of two HTTP streams (one used for each direction.)
*
* @author Kohsuke Kawaguchi
+ * @deprecated Unused.
*/
+@Deprecated
abstract public class FullDuplexHttpChannel extends FullDuplexHttpService {
private Channel channel;
private final boolean restricted;
|
Also deprecating FullDuplexHttpChannel as it is now unused.
|
jenkinsci_jenkins
|
train
|
java
|
143c4845a6a46e0872ade86d182695a06946d294
|
diff --git a/test/ext/function/gate.js b/test/ext/function/gate.js
index <HASH>..<HASH> 100644
--- a/test/ext/function/gate.js
+++ b/test/ext/function/gate.js
@@ -1,6 +1,6 @@
'use strict';
-var toArray = require('es5-ext/lib/Object/to-array')
+var toArray = require('es5-ext/lib/Array/from')
, deferred = require('../../../lib/deferred');
module.exports = function (t, a) {
diff --git a/test/extend.js b/test/extend.js
index <HASH>..<HASH> 100644
--- a/test/extend.js
+++ b/test/extend.js
@@ -1,6 +1,6 @@
'use strict';
-var toArray = require('es5-ext/lib/Object/to-array')
+var toArray = require('es5-ext/lib/Array/from')
, isPromise = require('../lib/is-promise');
module.exports = function (t, a) {
|
Keep up to date with es5-ext
|
medikoo_deferred
|
train
|
js,js
|
22083b401c539705ed777ff43dc1ca8e21aabdb9
|
diff --git a/tomlv/main.go b/tomlv/main.go
index <HASH>..<HASH> 100644
--- a/tomlv/main.go
+++ b/tomlv/main.go
@@ -20,6 +20,8 @@ func usage() {
log.Printf("Usage: %s toml-file [ toml-file ... ]\n",
path.Base(os.Args[0]))
flag.PrintDefaults()
+
+ os.Exit(1)
}
func main() {
|
It's probably a good idea to quit when showing usage.
|
lytics_confl
|
train
|
go
|
19e127e65d8080477e404afb1333bec016ff7a1c
|
diff --git a/lionengine-core/src/main/java/com/b3dgs/lionengine/core/PlayerAbstract.java b/lionengine-core/src/main/java/com/b3dgs/lionengine/core/PlayerAbstract.java
index <HASH>..<HASH> 100644
--- a/lionengine-core/src/main/java/com/b3dgs/lionengine/core/PlayerAbstract.java
+++ b/lionengine-core/src/main/java/com/b3dgs/lionengine/core/PlayerAbstract.java
@@ -104,7 +104,7 @@ public abstract class PlayerAbstract implements Audio
public void play()
{
final String name = media.getPath();
- if (Medias.getResourcesLoader() != null)
+ if (Medias.getResourcesLoader().isPresent())
{
if (cache == null)
{
|
#<I>: null check replaced by ifPresent.
|
b3dgs_lionengine
|
train
|
java
|
4fff53f07a111a6b16751701489a270d2c1692fc
|
diff --git a/php/commands/plugin.php b/php/commands/plugin.php
index <HASH>..<HASH> 100644
--- a/php/commands/plugin.php
+++ b/php/commands/plugin.php
@@ -220,7 +220,7 @@ class Plugin_Command extends \WP_CLI\CommandWithUpgrade {
*
* ## EXAMPLES
*
- * cd $(wp theme path)
+ * cd $(wp plugin path)
*/
function path( $args, $assoc_args ) {
$path = untrailingslashit( WP_PLUGIN_DIR );
|
Change cd $(wp theme path) is cd $(wp plugin path) in plugin.php
|
wp-cli_export-command
|
train
|
php
|
528073b5930ba8718da7933597aaf9eb7bfc4206
|
diff --git a/keanu-python/tests/test_coal_mining.py b/keanu-python/tests/test_coal_mining.py
index <HASH>..<HASH> 100644
--- a/keanu-python/tests/test_coal_mining.py
+++ b/keanu-python/tests/test_coal_mining.py
@@ -19,7 +19,7 @@ def test_coalmining():
m.late_rate = kn.Exponential(1.0)
m.years = np.array(data.index)
- m.beforeSwitch = m.switchpoint > m.years
+ # m.beforeSwitch = m.switchpoint > m.years
# m.rates = kn.DoubleIf([1, 1], beforeSwitch, m.early_rate, m.late_rate)
# m.disasters = kn.Poisson(m.rates)
|
sanity check that I've identified the offending line that hangs AppVeyor
|
improbable-research_keanu
|
train
|
py
|
5c84d4e262946dd50ff1877a2a847349d819774d
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -576,7 +576,7 @@ if __name__ == "__main__":
},
name = "Shinken",
- version = "0.8",
+ version = "1.0",
packages = find_packages(),
package_data = {'' : package_data},
description = "Shinken is a monitoring tool compatible with Nagios configuration and plugins",
|
setup.py: bump the version to <I>
|
Alignak-monitoring_alignak
|
train
|
py
|
d4b487ed1b276be230440e60ab3cdc81e73cff47
|
diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py
index <HASH>..<HASH> 100644
--- a/tests/unit/utils/test_utils.py
+++ b/tests/unit/utils/test_utils.py
@@ -33,3 +33,14 @@ class UtilsTestCase(TestCase):
out = salt.utils.get_module_environment({})
assert out == {}
assert isinstance(out, dict)
+
+ def test_get_module_environment_opts(self):
+ '''
+ Test for salt.utils.get_module_environment
+
+ :return:
+ '''
+ expectation = {'message': 'Melting hard drives'}
+ _globals = {'__opts__': {'system-environment': {'salt.in.system': expectation}},
+ '__file__': '/daemons/loose/in/system.py'}
+ assert salt.utils.get_module_environment(_globals) == expectation
|
Add unit test to get opts from the environment
|
saltstack_salt
|
train
|
py
|
248f7477968a53d5e4b5ba2e9e7139242cf527aa
|
diff --git a/Rule/Validator.php b/Rule/Validator.php
index <HASH>..<HASH> 100644
--- a/Rule/Validator.php
+++ b/Rule/Validator.php
@@ -92,7 +92,6 @@ class Validator
*/
public function validateRule(Rule $rule, array $restrictions = array())
{
- $isValid = true;
/** @var \Claroline\CoreBundle\Rule\Constraints\AbstractConstraint[] $usedConstraints */
$usedConstraints = array();
/** @var \Claroline\CoreBundle\Rule\Constraints\AbstractConstraint[] $existedConstraints */
@@ -112,15 +111,20 @@ class Validator
}
}
+ $validatedConstraints = 0;
+ $nbConstraints = count($usedConstraints);
+
$associatedLogs = $this->getAssociatedLogs($usedConstraints, $restrictions);
foreach ($usedConstraints as $usedConstraint) {
$usedConstraint->setAssociatedLogs($associatedLogs);
- $isValid = $isValid && $usedConstraint->validate();
+ if ($usedConstraint->validate()) {
+ $validatedConstraints++;
+ }
}
- return ($isValid) ? $associatedLogs : $isValid;
+ return ($validatedConstraints === $nbConstraints) ? $associatedLogs : false;
}
/**
|
[CoreBundle] Count validated constraint on a rule to know validation status
|
claroline_Distribution
|
train
|
php
|
331ad93adfac36b37c0f41942010a03b495bd2ae
|
diff --git a/cmd/ebitenmobile/main.go b/cmd/ebitenmobile/main.go
index <HASH>..<HASH> 100644
--- a/cmd/ebitenmobile/main.go
+++ b/cmd/ebitenmobile/main.go
@@ -92,6 +92,10 @@ func main() {
flag.Usage()
}
+ if args[0] != "bind" {
+ flag.Usage()
+ }
+
var flagset flag.FlagSet
flagset.StringVar(&buildO, "o", "", "")
flagset.StringVar(&buildGcflags, "gcflags", "", "")
@@ -139,13 +143,8 @@ func main() {
log.Fatal(err)
}
- switch args[0] {
- case "bind":
- if err := doBind(args, &flagset, buildTarget); err != nil {
- log.Fatal(err)
- }
- default:
- flag.Usage()
+ if err := doBind(args, &flagset, buildTarget); err != nil {
+ log.Fatal(err)
}
}
|
cmd/ebitenmobile: fail earlier when a wrong subcommand is specified
Updates #<I>
|
hajimehoshi_ebiten
|
train
|
go
|
c1875f8efd7b3bafa93116362ffd5111a6f2a4e2
|
diff --git a/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/actions/ProjectActions.java b/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/actions/ProjectActions.java
index <HASH>..<HASH> 100644
--- a/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/actions/ProjectActions.java
+++ b/jenkins/plugin/src/main/java/com/hp/octane/plugins/jenkins/actions/ProjectActions.java
@@ -50,7 +50,11 @@ public class ProjectActions extends TransientProjectActionFactory {
}
public void doRun(StaplerRequest req, StaplerResponse res) throws IOException, ServletException {
- project.doBuildWithParameters(req, res, null);
+ if (project.isParameterized()) {
+ project.doBuildWithParameters(req, res, null);
+ } else {
+ project.doBuild(req, res, null);
+ }
}
}
|
fixing the tests for the paremetrization support
|
hpsa_hpe-application-automation-tools-plugin
|
train
|
java
|
a7056b8d740e19d3d26716daad8af222e46a357a
|
diff --git a/src/Illuminate/Http/Request.php b/src/Illuminate/Http/Request.php
index <HASH>..<HASH> 100755
--- a/src/Illuminate/Http/Request.php
+++ b/src/Illuminate/Http/Request.php
@@ -30,6 +30,16 @@ class Request extends SymfonyRequest {
}
/**
+ * Get the request method.
+ *
+ * @return string
+ */
+ public function method()
+ {
+ return $this->getMethod();
+ }
+
+ /**
* Get the root URL for the application.
*
* @return string
|
Added method short-cut to request.
|
laravel_framework
|
train
|
php
|
010290e548c0878c04fe951a48d3ff3db6d976f5
|
diff --git a/zinnia/ping.py b/zinnia/ping.py
index <HASH>..<HASH> 100644
--- a/zinnia/ping.py
+++ b/zinnia/ping.py
@@ -82,7 +82,7 @@ class ExternalUrlsPinger(threading.Thread):
external_urls = self.find_external_urls(self.entry)
external_urls_pingable = self.find_pingback_urls(external_urls)
- for url, server_name in external_urls_pingable:
+ for url, server_name in external_urls_pingable.items():
reply = self.pingback_url(server_name, url)
self.results.append(reply)
|
fixing iteration in ping external urls
|
Fantomas42_django-blog-zinnia
|
train
|
py
|
dc4a4bd94b35cd66afff1da6ae92dc1d6f087a83
|
diff --git a/rows/cli.py b/rows/cli.py
index <HASH>..<HASH> 100755
--- a/rows/cli.py
+++ b/rows/cli.py
@@ -1216,12 +1216,15 @@ def csv_clean(
empty_columns.remove(key)
if not empty_columns:
break
- field_indexes = [
- header.index(field_name)
- for field_name in header
- if field_name not in empty_columns
- ]
- create_new_row = lambda row: [row[index].strip() for index in field_indexes]
+ if empty_columns:
+ field_indexes = [
+ header.index(field_name)
+ for field_name in header
+ if field_name not in empty_columns
+ ]
+ create_new_row = lambda row: [row[index].strip() for index in field_indexes]
+ else:
+ create_new_row = lambda row: [value.strip() for value in row]
if in_place:
temp_path = Path(tempfile.mkdtemp())
@@ -1233,7 +1236,7 @@ def csv_clean(
output_fobj = open_compressed(
destination, mode="w", encoding=output_encoding, buffering=buffer_size
)
- writer = csv.writer(output_fobj)
+ writer = csv.writer(output_fobj, dialect=csv.excel)
writer.writerow(create_new_row(header))
for row in tqdm(reader, desc="Converting file"):
row = create_new_row(row)
|
Optimize csv-clean
|
turicas_rows
|
train
|
py
|
6fb1f14bc8ebff7c8f53937053e4e73f80555364
|
diff --git a/Classes/Domain/Model/AbstractType.php b/Classes/Domain/Model/AbstractType.php
index <HASH>..<HASH> 100644
--- a/Classes/Domain/Model/AbstractType.php
+++ b/Classes/Domain/Model/AbstractType.php
@@ -114,7 +114,7 @@ abstract class AbstractType
*/
public function deleteDocumentById(string $id): bool
{
- $response = $this->request('DELETE', '/' . $id);
+ $response = $this->request('DELETE', '/_doc/' . $id);
$treatedContent = $response->getTreatedContent();
return $response->getStatusCode() === 200 && $treatedContent['result'] === 'deleted';
|
BUGFIX: Use correct path when deleting a document by id (#<I>)
BUGFIX: Use correct path to delete a document via id
|
Flowpack_Flowpack.ElasticSearch
|
train
|
php
|
9a223c557a7b530c984680dd4ef95e204aa07a59
|
diff --git a/lib/google_places/request.rb b/lib/google_places/request.rb
index <HASH>..<HASH> 100644
--- a/lib/google_places/request.rb
+++ b/lib/google_places/request.rb
@@ -9,13 +9,13 @@ module GooglePlaces
SPOT_URL = 'https://maps.googleapis.com/maps/api/place/details/json'
def self.spots(options = {})
- pp options
+ # pp options
request = new(SPOTS_LIST_URL, options)
request.parsed_response
end
def self.spot(options = {})
- pp options
+ # pp options
request = new(SPOT_URL, options)
request.parsed_response
end
|
Update lib/google_places/request.rb
|
qpowell_google_places
|
train
|
rb
|
b2117a0d7d3c039b1b44ad4c4baff80c9a5de761
|
diff --git a/src/FamilySearch.js b/src/FamilySearch.js
index <HASH>..<HASH> 100644
--- a/src/FamilySearch.js
+++ b/src/FamilySearch.js
@@ -116,9 +116,6 @@ var FS = module.exports = function(opts){
};
}
- if(!opts['redirect_uri'] && !opts['auth_callback']) {
- throw 'redirect_uri must be set';
- }
self.settings.redirectUri = opts['redirect_uri'] || opts['auth_callback']; // auth_callback is deprecated
self.settings.autoSignin = opts['auto_signin'];
diff --git a/test/unit/helpers.js b/test/unit/helpers.js
index <HASH>..<HASH> 100644
--- a/test/unit/helpers.js
+++ b/test/unit/helpers.js
@@ -134,7 +134,6 @@ beforeEach(function() {
global.FS = new FamilySearch({
'client_id': 'mock',
'environment': 'sandbox',
- 'redirect_uri': 'mock',
'http_function': httpMock,
'deferred_function': q.defer,
'access_token': 'mock'
|
remove requirement on redirect_uri; closes #<I>
|
FamilySearch_familysearch-javascript-sdk
|
train
|
js,js
|
15958c714b0112fc3840c61abfa5585d1cc5ecb9
|
diff --git a/src/dedicatedProcessStrategy.js b/src/dedicatedProcessStrategy.js
index <HASH>..<HASH> 100644
--- a/src/dedicatedProcessStrategy.js
+++ b/src/dedicatedProcessStrategy.js
@@ -46,14 +46,15 @@ export default function(options, requestOptions, converterPath, id, cb) {
const {
tmpDir,
timeout,
- pathToElectron
+ pathToElectron,
+ allowLocalFilesAccess
} = options;
const settingsFilePath = path.resolve(path.join(tmpDir, id + 'settings.html'));
debugStrategy('saving settings in temporal file..');
- saveFile(tmpDir, settingsFilePath, JSON.stringify({ ...requestOptions, converterPath }), (saveFileErr) => {
+ saveFile(tmpDir, settingsFilePath, JSON.stringify({ ...requestOptions, converterPath, allowLocalFilesAccess }), (saveFileErr) => {
const childArgs = [];
let debugMode = false,
|
[update] allowLocalFilesAccess as a global option
|
bjrmatos_electron-html-to
|
train
|
js
|
de09b1284238925c3fa8a5f201d93ee46683d226
|
diff --git a/app/Library/Twig/Front.php b/app/Library/Twig/Front.php
index <HASH>..<HASH> 100644
--- a/app/Library/Twig/Front.php
+++ b/app/Library/Twig/Front.php
@@ -86,7 +86,7 @@ class Front extends Base
throw new Exception("Missing page element template");
}
- return $this->container->view->fetch("elements/{$element->template}", ['data' => $element]);
+ return $this->container->view->fetch("elements/{$element->template}", ['element' => $element]);
}
/**
|
Changed element "data" key to "element"
|
PitonCMS_Engine
|
train
|
php
|
f7bea9a7a2915da196e6ed8aae644ca20b8068be
|
diff --git a/src/core/widget/widget.js b/src/core/widget/widget.js
index <HASH>..<HASH> 100644
--- a/src/core/widget/widget.js
+++ b/src/core/widget/widget.js
@@ -202,6 +202,10 @@
this.eventNamespace = `.swns-${this.guid}`;
+ /* LOCKS */
+
+ this._locks = {};
+
/* CALLBACKS */
if ( this._variables () === false ) return this.destroy ();
@@ -412,21 +416,21 @@
/* LOCKING */
- lock () {
+ lock ( namespace ) {
- this._lock = true;
+ this._locks[namespace] = true;
}
- unlock () {
+ unlock ( namespace ) {
- this._lock = false;
+ delete this._locks[namespace];
}
- isLocked () {
+ isLocked ( namespace ) {
- return !!this._lock;
+ return !!this._locks[namespace];
}
|
Widget: added support for multiple locks
|
svelto_svelto
|
train
|
js
|
697bf4b1c2da621186b80138dc488f04021d3ac1
|
diff --git a/test/WorkaroundSpec.js b/test/WorkaroundSpec.js
index <HASH>..<HASH> 100644
--- a/test/WorkaroundSpec.js
+++ b/test/WorkaroundSpec.js
@@ -64,6 +64,20 @@ describe("working around on Firefox and Webkit to fix resources not being render
});
});
+ it("should remove the workaround div before the callback has been called", function () {
+ var renderFinished = false,
+ svg = '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100"></svg>';
+
+ rasterizeHTML.renderSvg(svg, null, function () {
+ expect($(".rasterizeHTML_js_FirefoxWorkaround")).not.toExist();
+ renderFinished = true;
+ });
+
+ waitsFor(function () {
+ return renderFinished;
+ }, "rasterizeHTML.renderSvg", 2000);
+ });
+
it("should remove the workaround div once the canvas has been rendered even if an error occurs when drawing on the canvas", function () {
var canvas = jasmine.createSpyObj("canvas", ["getContext"]),
context = jasmine.createSpyObj("context", ["drawImage"]);
|
Add test for preceding fix, better late than never
|
cburgmer_rasterizeHTML.js
|
train
|
js
|
8fc75d2d25c866bc5a0f03c74f132a4ef21b3610
|
diff --git a/lib/deployer.js b/lib/deployer.js
index <HASH>..<HASH> 100644
--- a/lib/deployer.js
+++ b/lib/deployer.js
@@ -252,7 +252,9 @@ async function _updateSite(siteId, tree, manifest, content) {
* @return {Object} content
*/
async function _content(Section) {
- const contentSections = await Section.scope('content').findAll({ include: 'records' });
+ const { Record } = Section.sequelize.models;
+ const order = Utils.map(Record.DEFAULT_ORDER, (o) => { o.unshift('records'); return o; });
+ const contentSections = await Section.scope('content').findAll({ include: 'records', order });
return Utils.reduce(contentSections, (memo, section) => {
/* eslint-disable-next-line no-param-reassign */
memo[section.name] = Utils.map(section.records, record => record.get('content'));
|
Deploy ordered records (#<I>)
So the hosting platform can import them in the right order.
|
vapid_vapid
|
train
|
js
|
e1f4a9cc8f7844e8c4d11a6a77fd4488883f84ae
|
diff --git a/framework/db/Connection.php b/framework/db/Connection.php
index <HASH>..<HASH> 100644
--- a/framework/db/Connection.php
+++ b/framework/db/Connection.php
@@ -249,6 +249,11 @@ class Connection extends Component
*/
public $pdoClass;
/**
+ * @var boolean whether to enable [savepoint](http://en.wikipedia.org/wiki/Savepoint).
+ * Note that if the underlying DBMS does not support savepoint, setting this property to be true will have no effect.
+ */
+ public $enableSavepoint = true;
+ /**
* @var Transaction the currently active transaction
*/
private $_transaction;
diff --git a/framework/db/Schema.php b/framework/db/Schema.php
index <HASH>..<HASH> 100644
--- a/framework/db/Schema.php
+++ b/framework/db/Schema.php
@@ -294,7 +294,7 @@ abstract class Schema extends Object
*/
public function supportsSavepoint()
{
- return true;
+ return $this->db->enableSavepoint;
}
/**
|
Added Connection::enableSavepoint.
|
yiisoft_yii2
|
train
|
php,php
|
39466dc3a2a999b6c519b05b9f575188c6860ee0
|
diff --git a/examples/py/bybit-positions.py b/examples/py/bybit-positions.py
index <HASH>..<HASH> 100644
--- a/examples/py/bybit-positions.py
+++ b/examples/py/bybit-positions.py
@@ -23,7 +23,7 @@ exchange.verbose = True # uncomment for debugging
# -----------------------------------------------------------------------------
-symbol = 'BTC/USDT:USDT'
+symbol = 'BTC/USDT:USDT' # https://docs.ccxt.com/en/latest/manual.html#contract-naming-conventions
market = exchange.market(symbol)
params = {'subType':'linear' if market['linear'] else 'inverse'}
linear_positions = exchange.fetch_positions([ symbol ], params)
|
examples/py/bybit-positions.py upgrade and fix #<I>
|
ccxt_ccxt
|
train
|
py
|
5c47a5d4483cf76c0a7be1db8e4fe8f6f8aae48e
|
diff --git a/master/buildbot/db/model.py b/master/buildbot/db/model.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/db/model.py
+++ b/master/buildbot/db/model.py
@@ -21,10 +21,14 @@ import sqlalchemy as sa
import migrate
import migrate.versioning.schema
import migrate.versioning.repository
-import migrate.versioning.exceptions
from twisted.python import util, log
from buildbot.db import base
+try:
+ from migrate import exceptions
+except ImportError:
+ from migrate.versioning import exceptions
+
class Model(base.DBConnectorComponent):
"""
DBConnector component to handle the database model; an instance is available
@@ -345,7 +349,7 @@ class Model(base.DBConnectorComponent):
# migrate.api doesn't let us hand in an engine
schema = migrate.versioning.schema.ControlledSchema(engine, self.repo_path)
db_version = schema.version
- except migrate.versioning.exceptions.DatabaseNotControlledError:
+ except exceptions.DatabaseNotControlledError:
return False
return db_version == repo_version
|
Fix integration with SQLAlchemy-migrate-<I>.
SQLAlchemy-migrate moved all exceptions to migrate.exceptions.
|
buildbot_buildbot
|
train
|
py
|
28178fe360fe2ce0f284e276999c55ec153dbb8d
|
diff --git a/test/phantom-html2pdf.test.js b/test/phantom-html2pdf.test.js
index <HASH>..<HASH> 100644
--- a/test/phantom-html2pdf.test.js
+++ b/test/phantom-html2pdf.test.js
@@ -14,7 +14,8 @@ describe('phantom-html2pdf.js', function() {
'papersize': {format: 'A4', orientation: 'portrait', border: '1cm'}
};
- pdf.convert(pdfOptions, function (result) {
+ pdf.convert(pdfOptions, function (err, result) {
+ assert(!err, "Error is empty");
result.toBuffer(function (buffer) {
assert(buffer, 'A buffer is returned');
assert(buffer.length > 0, 'The generated buffer is not empty');
|
fixes tests failing due to convert method arguments change
|
bauhausjs_phantom-html2pdf
|
train
|
js
|
79eef9516a1ee7f7124e58b1dc3e631793a4c936
|
diff --git a/mackup.py b/mackup.py
index <HASH>..<HASH> 100755
--- a/mackup.py
+++ b/mackup.py
@@ -914,11 +914,16 @@ def is_process_running(process_name):
Returns:
(bool): True if the process is running
"""
- DEVNULL = open(os.devnull, 'wb')
- returncode = subprocess.call(['/usr/bin/pgrep', process_name],
- stdout=DEVNULL)
+ is_running = False
- return bool(returncode == 0)
+ # On systems with pgrep, check if the given process is running
+ if os.path.isfile('/usr/bin/pgrep'):
+ DEVNULL = open(os.devnull, 'wb')
+ returncode = subprocess.call(['/usr/bin/pgrep', process_name],
+ stdout=DEVNULL)
+ is_running = bool(returncode == 0)
+
+ return is_running
def remove_acl(path):
|
On systems with pgrep, check if the given process is running
|
lra_mackup
|
train
|
py
|
8d0ae72755d121eb31119d35b2566043266d4722
|
diff --git a/src/feat/models/applicationjson.py b/src/feat/models/applicationjson.py
index <HASH>..<HASH> 100644
--- a/src/feat/models/applicationjson.py
+++ b/src/feat/models/applicationjson.py
@@ -265,17 +265,27 @@ def _parse_meta(meta_items):
return [i.strip() for i in meta_items.value.split(",")]
-def render_inline(meta):
+def get_parsed_meta(meta):
if not IMetadata.providedBy(meta):
return []
parsed = [_parse_meta(i) for i in meta.get_meta('json')]
+ return parsed
+
+
+def render_inline(meta):
+ parsed = get_parsed_meta(meta)
return ['render-inline'] in parsed
+def prevent_inline(meta):
+ parsed = get_parsed_meta(meta)
+ return ['prevent-inline'] in parsed
+
+
def render_compact_submodel(submodel, item, context):
if render_inline(item):
pass
- elif not IAttribute.providedBy(submodel):
+ elif not IAttribute.providedBy(submodel) or prevent_inline(item):
if item.reference is not None:
return item.reference.resolve(context)
else:
|
Implement meta data preventing application/json writer of inlining the attribute values.
|
f3at_feat
|
train
|
py
|
df81cd63c0f5ffeb5eac3ea6f55205f7274cb165
|
diff --git a/Processor/ZipProcessor.php b/Processor/ZipProcessor.php
index <HASH>..<HASH> 100644
--- a/Processor/ZipProcessor.php
+++ b/Processor/ZipProcessor.php
@@ -20,7 +20,7 @@ class ZipProcessor extends BaseProcessor implements ProcessorInterface
$params = array('-r');
if (isset($this->options['password']) && $this->options['password']) {
- $params[] = '-P '.$this->options['password'];
+ $params[] = '-P "'.$this->options['password'].'"';
}
if (isset($this->options['compression_ratio']) && $this->options['compression_ratio'] >= 0) {
|
add apostrophe to allow special characters in password
Surround password in parameter option with " to allow passwords like "password:)"
|
dizda_CloudBackupBundle
|
train
|
php
|
4d01f18906a338d6fa5531468a05bddf67f610ff
|
diff --git a/src/java/com/threerings/admin/client/ConfigEditorPanel.java b/src/java/com/threerings/admin/client/ConfigEditorPanel.java
index <HASH>..<HASH> 100644
--- a/src/java/com/threerings/admin/client/ConfigEditorPanel.java
+++ b/src/java/com/threerings/admin/client/ConfigEditorPanel.java
@@ -66,11 +66,14 @@ public class ConfigEditorPanel extends JPanel
// create our objects tabbed pane
add(_oeditors = new JTabbedPane(JTabbedPane.LEFT));
+ // If they don't fit, make them scroll, since wrapped vertical tabs eats insane sceen space
+ _oeditors.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
+
// add a handy label at the bottom
- add(new JLabel("Fields outline in red have been modified " +
- "but not yet committed."), VGroupLayout.FIXED);
- add(new JLabel("Press return in a modified field to commit " +
- "the change."), VGroupLayout.FIXED);
+ add(new JLabel("Fields outline in red have been modified but not yet committed."),
+ VGroupLayout.FIXED);
+ add(new JLabel("Press return in a modified field to commit the change."),
+ VGroupLayout.FIXED);
}
@Override
|
We've got enough of these in yohoho now that with some
text settings, you get two columns of tabs, which is...Bad.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@<I> <I>f4-<I>e9-<I>-aa3c-eee0fc<I>fb1
|
threerings_narya
|
train
|
java
|
c4c35cae51ad15e161d907d2bc7dbef231f47649
|
diff --git a/tests/user-switching-test.php b/tests/user-switching-test.php
index <HASH>..<HASH> 100644
--- a/tests/user-switching-test.php
+++ b/tests/user-switching-test.php
@@ -9,6 +9,12 @@ abstract class User_Switching_Test extends WP_UnitTestCase {
parent::setUp();
+ // Hide deprecated warnings on PHP 7 so the use of deprecated constructors in WordPress
+ // don't cause our tests to fail
+ if ( version_compare( PHP_VERSION, 7, '>=' ) ) {
+ error_reporting( E_ALL & ~E_DEPRECATED );
+ }
+
$roles = array(
'admin' => 'administrator',
'editor' => 'editor',
|
Hide deprecated warnings on PHP 7 so the use of deprecated constructors in WordPress don't cause our tests to fail.
|
johnbillion_user-switching
|
train
|
php
|
153dbb3b53d661e4fe026c32019be7305e32b234
|
diff --git a/www/javascript/swat-date-entry.js b/www/javascript/swat-date-entry.js
index <HASH>..<HASH> 100644
--- a/www/javascript/swat-date-entry.js
+++ b/www/javascript/swat-date-entry.js
@@ -87,7 +87,11 @@ SwatDateEntry.prototype.lookup = function(table_name, key)
SwatDateEntry.prototype.reverseLookup = function(table_name, key)
{
- return this.reverse_lookup_table[table_name][key];
+ var value = this.reverse_lookup_table[table_name][key];
+ if (value === undefined) {
+ value = null;
+ }
+ return value;
};
SwatDateEntry.prototype.setCalendar = function(calendar)
diff --git a/www/javascript/swat-time-entry.js b/www/javascript/swat-time-entry.js
index <HASH>..<HASH> 100644
--- a/www/javascript/swat-time-entry.js
+++ b/www/javascript/swat-time-entry.js
@@ -95,7 +95,11 @@ SwatTimeEntry.prototype.lookup = function(table_name, key)
SwatTimeEntry.prototype.reverseLookup = function(table_name, key)
{
- return this.reverse_lookup_table[table_name][key];
+ var value = this.reverse_lookup_table[table_name][key];
+ if (value === undefined) {
+ value = null;
+ }
+ return value;
};
SwatTimeEntry.prototype.setDateEntry = function(date_entry)
|
Return null instead of undefined when value is not in lookup table.
|
silverorange_swat
|
train
|
js,js
|
6955dd3482c95f454d52f95c4787305385240d2d
|
diff --git a/test/pipeline-test-2.js b/test/pipeline-test-2.js
index <HASH>..<HASH> 100644
--- a/test/pipeline-test-2.js
+++ b/test/pipeline-test-2.js
@@ -64,7 +64,6 @@ test('make the search index, removing the pipeline stage that bumps text to lowe
new docProc.RemoveStopWords(si.options),
new docProc.CalculateTermFrequency(si.options),
new docProc.CreateCompositeVector(si.options),
- new docProc.CreateSortVectors(si.options),
new docProc.FieldedSearch(si.options)
)).on('data', function (data) {
t.looseEqual(
|
test(tests): fix pipeline test
The new docproc doesnt create sort vectors, so remover sort vector stage from pipeline test
|
fergiemcdowall_search-index-adder
|
train
|
js
|
35756026a47ce12292183c2112e804e8078c5ca5
|
diff --git a/lib/i18n/tasks/output/terminal.rb b/lib/i18n/tasks/output/terminal.rb
index <HASH>..<HASH> 100644
--- a/lib/i18n/tasks/output/terminal.rb
+++ b/lib/i18n/tasks/output/terminal.rb
@@ -7,9 +7,11 @@ module I18n
def missing(missing)
$stderr.puts bold cyan "Missing keys and translations (#{missing.length})"
- $stderr.puts "#{bold 'Legend:'} #{red '✗'} key missing, #{yellow bold '∅'} translation blank, #{blue bold '='} value equal to base locale; #{cyan 'value in base locale'}"
- key_col_width = missing.map { |x| x[:key] }.max_by(&:length).length + 2
- missing.each { |m| print_missing_translation m, key_col_width: key_col_width }
+ unless missing.empty? then
+ $stderr.puts "#{bold 'Legend:'} #{red '✗'} key missing, #{yellow bold '∅'} translation blank, #{blue bold '='} value equal to base locale; #{cyan 'value in base locale'}"
+ key_col_width = missing.map { |x| x[:key] }.max_by(&:length).length + 2
+ missing.each { |m| print_missing_translation m, key_col_width: key_col_width }
+ end
end
def unused(unused)
|
Fix undefined method `length' for nil:NilClass if no missing found
|
glebm_i18n-tasks
|
train
|
rb
|
6d79843bf1103d3f7280f7cea56be88f20122a39
|
diff --git a/src/AbstractResult.php b/src/AbstractResult.php
index <HASH>..<HASH> 100644
--- a/src/AbstractResult.php
+++ b/src/AbstractResult.php
@@ -168,7 +168,9 @@ abstract class AbstractResult implements \SeekableIterator, \Countable
*/
final public function rewind()
{
- $this->seek(0);
+ if ($this->position > 0) {
+ $this->seek(0);
+ }
}
|
Only reset the result set if we have advanced into it
|
duncan3dc_sql-class
|
train
|
php
|
84ecd54a0d9990392e61b031b302765f8aa1004f
|
diff --git a/google-cloud-pubsub/acceptance/pubsub_helper.rb b/google-cloud-pubsub/acceptance/pubsub_helper.rb
index <HASH>..<HASH> 100644
--- a/google-cloud-pubsub/acceptance/pubsub_helper.rb
+++ b/google-cloud-pubsub/acceptance/pubsub_helper.rb
@@ -91,9 +91,8 @@ end
def clean_up_pubsub_snapshots
puts "Cleaning up pubsub snapshots after tests."
- snapshots = $pubsub.snapshots
- $snapshot_names.each do |snapshot_name|
- if snapshot = (snapshots.detect { |s| s.name.split("/").last == snapshot_name })
+ $pubsub.snapshots.all do |snapshot|
+ if snapshot.name.include? $snapshot_prefix
snapshot.delete
end
end
|
Update Pub/Sub cleanup
We continue to see Pub/Sub snapshots reach the limit. Update the cleanup
so that it calls #all so the records are returned so they can be deleted.
|
googleapis_google-cloud-ruby
|
train
|
rb
|
edaa45c2dc0e00a52819efa9eb9227210ba1abd4
|
diff --git a/lib/phusion_passenger/railz/application_spawner.rb b/lib/phusion_passenger/railz/application_spawner.rb
index <HASH>..<HASH> 100644
--- a/lib/phusion_passenger/railz/application_spawner.rb
+++ b/lib/phusion_passenger/railz/application_spawner.rb
@@ -321,7 +321,7 @@ private
# isn't copy-on-write friendly.
# - Rails >= 2.2 already preloads application sources by default, so no need
# to do that again.
- if GC.copy_on_write_friendly? && !::Rails::Initializer.respond_to?(:load_application_classes)
+ if GC.copy_on_write_friendly? && !::Rails::Initializer.method_defined?(:load_application_classes)
Dir.glob('app/{models,controllers,helpers}/*.rb').each do |file|
require_dependency canonicalize_path(file)
end
|
Fix Rails app preloading: load_application_classes is an instance method of Rails::Initializer. Partially fixes issue #<I>.
|
phusion_passenger
|
train
|
rb
|
601bab9ddcc6034b875a6ace59c39ae88d60fafb
|
diff --git a/aiosqlite/core.py b/aiosqlite/core.py
index <HASH>..<HASH> 100644
--- a/aiosqlite/core.py
+++ b/aiosqlite/core.py
@@ -149,9 +149,11 @@ class Connection(Thread):
try:
await self._execute(self._conn.close)
except Exception:
- LOG.exception("exception occurred while closing connection")
- self._running = False
- self._connection = None
+ LOG.info("exception occurred while closing connection")
+ raise
+ finally:
+ self._running = False
+ self._connection = None
@contextmanager
async def execute(self, sql: str, parameters: Iterable[Any] = None) -> Cursor:
|
Allow caller to handle close() exception, reduce logger to "info"
|
jreese_aiosqlite
|
train
|
py
|
30a39bd738fb3ca6793cf5ea8dee8dfb7c9d9260
|
diff --git a/JSAT/src/jsat/datatransform/DataModelPipeline.java b/JSAT/src/jsat/datatransform/DataModelPipeline.java
index <HASH>..<HASH> 100644
--- a/JSAT/src/jsat/datatransform/DataModelPipeline.java
+++ b/JSAT/src/jsat/datatransform/DataModelPipeline.java
@@ -36,11 +36,8 @@ public class DataModelPipeline implements Classifier, Regressor, Parameterized
@ParameterHolder(skipSelfNamePrefix = true)
private Regressor baseRegressor;
- @ParameterHolder(skipSelfNamePrefix = true)
private DataTransformProcess learnedDtp;
- @ParameterHolder(skipSelfNamePrefix = true)
private Classifier learnedClassifier;
- @ParameterHolder(skipSelfNamePrefix = true)
private Regressor learnedRegressor;
/**
|
removed ParamterHolder annotations that I added over zealously
|
EdwardRaff_JSAT
|
train
|
java
|
4ec19d3fcb58e4ada7a780d6d53fcb5114eeb2ce
|
diff --git a/app/bootstrap.php b/app/bootstrap.php
index <HASH>..<HASH> 100644
--- a/app/bootstrap.php
+++ b/app/bootstrap.php
@@ -117,7 +117,7 @@ return call_user_func(function () {
// Create the 'Bolt application'
$appClass = Application::class;
- if ($config['application'] !== null && is_a($config['application'], Silex\Application::class)) {
+ if ($config['application'] !== null && is_a($config['application'], Silex\Application::class, true)) {
$appClass = $config['application'];
}
$app = new $appClass(['resources' => $resources]);
|
.bolt files should be allowed to specify application as string. This fixes the check to ensure the string is a class name that extends Silex\Application.
|
bolt_bolt
|
train
|
php
|
ffd1a6dc7c04e18dd3fcab52edb05788b33ea7dc
|
diff --git a/flask_ask/core.py b/flask_ask/core.py
index <HASH>..<HASH> 100644
--- a/flask_ask/core.py
+++ b/flask_ask/core.py
@@ -505,15 +505,25 @@ class Ask(object):
@property
def current_stream(self):
#return getattr(_app_ctx_stack.top, '_ask_current_stream', models._Field())
- stream = top_stream(self.context['System']['user'])
- if stream:
- return stream
+ user = self._get_user()
+ if user:
+ stream = top_stream(user)
+ if stream:
+ return stream
return models._Field()
@current_stream.setter
def current_stream(self, value):
#_app_ctx_stack.top._ask_current_stream = value
- push_stream(self.context['System']['user'], value)
+ user = self._get_user()
+ if user:
+ push_stream(user, value)
+
+ def _get_user(self):
+ if self.context:
+ return self.context.get('System', {}).get('user', None)
+ return None
+
def _alexa_request(self, verify=True):
raw_body = flask_request.data
|
wrapping lookup of user in a method call ensuring a valid context exists.
|
johnwheeler_flask-ask
|
train
|
py
|
74555a973a5cf790f22638af4d1bf189efd36c17
|
diff --git a/src/org/opencms/ui/apps/user/CmsUserEditDialog.java b/src/org/opencms/ui/apps/user/CmsUserEditDialog.java
index <HASH>..<HASH> 100644
--- a/src/org/opencms/ui/apps/user/CmsUserEditDialog.java
+++ b/src/org/opencms/ui/apps/user/CmsUserEditDialog.java
@@ -960,7 +960,7 @@ public class CmsUserEditDialog extends CmsBasicDialog implements I_CmsPasswordFe
if (CmsStringUtil.isEmptyOrWhitespaceOnly(site.getSiteRoot())) {
if (hasRole(CmsRole.VFS_MANAGER)
| ((m_user == null)
- & Arrays.asList(
+ && Arrays.asList(
CmsRole.ACCOUNT_MANAGER.forOrgUnit(m_ou.getValue()),
CmsRole.ADMINISTRATOR.forOrgUnit(m_ou.getValue()),
CmsRole.WORKPLACE_MANAGER.forOrgUnit(m_ou.getValue()),
|
Fix null pointer exception in user edit dialog
|
alkacon_opencms-core
|
train
|
java
|
3023c2b9bc17c556348a8602b7e82c52da1ee36d
|
diff --git a/oauthlib/oauth2/rfc6749/request_validator.py b/oauthlib/oauth2/rfc6749/request_validator.py
index <HASH>..<HASH> 100644
--- a/oauthlib/oauth2/rfc6749/request_validator.py
+++ b/oauthlib/oauth2/rfc6749/request_validator.py
@@ -89,7 +89,7 @@ class RequestValidator(object):
raise NotImplementedError('Subclasses must implement this method.')
def confirm_redirect_uri(self, client_id, code, redirect_uri, client,
- request, *args, **kwargs):
+ *args, **kwargs):
"""Ensure client is authorized to redirect to the redirect_uri requested.
If the client specifies a redirect_uri when obtaining code then
|
Correct interface of RequestValidator.confirm_redirect_uri() to make it consistent with the call in AuthorizationCodeGrant.validate_token_request().
|
oauthlib_oauthlib
|
train
|
py
|
594e4108c10d89f8aaf93eebbfc33fe68c49f6ad
|
diff --git a/test/test_task.py b/test/test_task.py
index <HASH>..<HASH> 100644
--- a/test/test_task.py
+++ b/test/test_task.py
@@ -522,9 +522,9 @@ rng = random.randint(1, 1000)
self.assertTrue(isinstance(env.sos_dict['step_rng'], list))
self.assertEqual(env.sos_dict['step_rng'][-1], var)
# run it again, should get from signature
- Base_Executor(wf).run()
- self.assertEqual(var, env.sos_dict['rng'])
#
+ #Base_Executor(wf).run()
+ #self.assertEqual(var, env.sos_dict['rng'])
|
Temporarily disable part of a signature test
|
vatlab_SoS
|
train
|
py
|
17a1a32b127acf3865b0967ef34eff9c6c133c96
|
diff --git a/testsuite/run_cim_operations.py b/testsuite/run_cim_operations.py
index <HASH>..<HASH> 100755
--- a/testsuite/run_cim_operations.py
+++ b/testsuite/run_cim_operations.py
@@ -12,6 +12,7 @@ from __future__ import absolute_import
# pylint: disable=missing-docstring,superfluous-parens,no-self-use
import sys
+import os.path
import threading
from datetime import timedelta
import unittest
@@ -3863,6 +3864,15 @@ if __name__ == '__main__':
if args['long_running'] is True:
SKIP_LONGRUNNING_TEST = False
+ # if yamlfile exists rename it to yamlfile.bak
+ if args['yamlfile']:
+ yamlfile_name = args['yamlfile']
+ if os.path.isfile(yamlfile_name):
+ backupfile_name = '%s.bak' % yamlfile_name
+ if os.path.isfile(backupfile_name):
+ os.remove(backupfile_name)
+ os.rename(yamlfile_name, backupfile_name)
+
# Note: unittest options are defined in separate args after
# the url argument.
|
Modify run-cimOperations to rename yaml file before each test
Previously we just appended to an existing file making the tests messy.
|
pywbem_pywbem
|
train
|
py
|
591858d408621cb1950f608eea227d9c972e834b
|
diff --git a/test/json_client_test.rb b/test/json_client_test.rb
index <HASH>..<HASH> 100644
--- a/test/json_client_test.rb
+++ b/test/json_client_test.rb
@@ -35,7 +35,8 @@ class JsonClientTest < MiniTest::Spec
def test_long_connections_timeout
url = "http://www.example.com/timeout.json"
- stub_request(:get, url).to_raise(Net::OpenTimeout)
+ exception = defined?(Net::OpenTimeout) ? Net::OpenTimeout : TimeoutError
+ stub_request(:get, url).to_raise(exception)
assert_raises GdsApi::TimedOutException do
@client.get_json(url)
end
|
Ruby <I> test compatibility
The actual code compatibility is handled within RestClient
|
alphagov_gds-api-adapters
|
train
|
rb
|
2c93c0ce1449666ef3ea4a9a816744a2151ea29d
|
diff --git a/lib/juici/controllers/builds.rb b/lib/juici/controllers/builds.rb
index <HASH>..<HASH> 100644
--- a/lib/juici/controllers/builds.rb
+++ b/lib/juici/controllers/builds.rb
@@ -19,6 +19,7 @@ module Juici::Controllers
project = ::Juici::Project.where(name: params[:project]).first
builds = ::Juici::Build.where(parent: project.name).
+ asc(:_id).
limit(::Juici::Config.builds_per_page).
skip(params[:page].to_i * ::Juici::Config.builds_per_page)
|
Make sure that we get builds in increasing order
(by doc id)
|
richo_juici
|
train
|
rb
|
c69378b0790c35bcc8c69e2081b73c527f9058a2
|
diff --git a/lib/ruby_scribe/version.rb b/lib/ruby_scribe/version.rb
index <HASH>..<HASH> 100644
--- a/lib/ruby_scribe/version.rb
+++ b/lib/ruby_scribe/version.rb
@@ -1,3 +1,3 @@
module RubyScribe
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
\ No newline at end of file
|
Bumped version to <I>.
|
rubiety_ruby_scribe
|
train
|
rb
|
92e005fceb14d64bc4ab94c3bf14820cef3da924
|
diff --git a/js/client/api.js b/js/client/api.js
index <HASH>..<HASH> 100644
--- a/js/client/api.js
+++ b/js/client/api.js
@@ -153,12 +153,12 @@ fin = Singleton(function(){
}))
}
- this.appendToList = function(itemId, propName /*, val1, val2, ... */) {
+ this.append = function(itemId, propName /*, val1, val2, ... */) {
var values = Array.prototype.slice.call(arguments, 2)
this._listOp(itemId, propName, 'listAppend', values)
}
- this.prependToList = function(itemId, propName /*, val1, val2, ... */) {
+ this.prepend = function(itemId, propName /*, val1, val2, ... */) {
var values = Array.prototype.slice.call(arguments, 2)
this._listOp(itemId, propName, 'listPrepend', values)
}
|
Rename appendToList and prependToList to append and prepend
|
marcuswestin_fin
|
train
|
js
|
50499ecda0f073ae6935be13d54ae4924ff7439c
|
diff --git a/common/src/main/java/tachyon/replay/ReplayCache.java b/common/src/main/java/tachyon/replay/ReplayCache.java
index <HASH>..<HASH> 100644
--- a/common/src/main/java/tachyon/replay/ReplayCache.java
+++ b/common/src/main/java/tachyon/replay/ReplayCache.java
@@ -111,7 +111,7 @@ public final class ReplayCache<V> {
/**
* Same with {@link ReplayCallable} except that this handler method throws {@link IOException} and
- * is to be executed in {@link #run(String, ReplayCallableThrowsIOException}.
+ * is to be executed in {@link #run(String, ReplayCallableThrowsIOException)}.
*
* @param <V> the return type of {@link #call()}
*/
|
[SMALLFIX] Added missing bracket in Javadoc in 'ReplayCache'
|
Alluxio_alluxio
|
train
|
java
|
c147e61291738dd0e78f9c4cdd517b7b5e9547f0
|
diff --git a/js/coincheck.js b/js/coincheck.js
index <HASH>..<HASH> 100644
--- a/js/coincheck.js
+++ b/js/coincheck.js
@@ -4,6 +4,7 @@
const Exchange = require ('./base/Exchange');
const { BadSymbol, ExchangeError, AuthenticationError } = require ('./base/errors');
+const { TICK_SIZE } = require ('./base/functions/number');
// ---------------------------------------------------------------------------
@@ -145,6 +146,7 @@ module.exports = class coincheck extends Exchange {
'taker': this.parseNumber ('0'),
},
},
+ 'precisionMode': TICK_SIZE,
'exceptions': {
'exact': {
'disabled API Key': AuthenticationError, // {"success":false,"error":"disabled API Key"}'
|
TICK_SIZE re-set
|
ccxt_ccxt
|
train
|
js
|
ca613f22860089e1f1e92f31d8dd5ecbf8c341a1
|
diff --git a/test/OIPIndex.test.js b/test/OIPIndex.test.js
index <HASH>..<HASH> 100644
--- a/test/OIPIndex.test.js
+++ b/test/OIPIndex.test.js
@@ -61,5 +61,15 @@ describe('OIPIndex API', () => {
expect(mp instanceof MPSingle).toBeTruthy()
}
})
+ it('GET Multiparts via Reference w/ Limit', async () => {
+ let ref = '8c204c5f39'
+ let limit = 3
+ let response = await index.getMultipartsByRef(ref, limit)
+ expect(response.success).toBeTruthy()
+ expect(response.multiparts.length).toEqual(response.limit)
+ for (let mp of response.multiparts) {
+ expect(mp instanceof MPSingle).toBeTruthy()
+ }
+ })
})
})
|
test: get mps via ref with limit
|
oipwg_oip-index
|
train
|
js
|
cf0fbb837d121fea75fbd65df7e9b16ee57d7eb6
|
diff --git a/flask_exceptions/__init__.py b/flask_exceptions/__init__.py
index <HASH>..<HASH> 100644
--- a/flask_exceptions/__init__.py
+++ b/flask_exceptions/__init__.py
@@ -2,5 +2,6 @@
Import items here that are necessary to make imports cleaner when using app.
"""
+# pylint: disable=wildcard-import
from . import extension # noqa
-from .extension import AddExceptions, APIException # noqa
+from .extension import * # noqa
|
:house: Modified package imports
To allow easy access to Exception classes.
|
bbelyeu_flask-exceptions
|
train
|
py
|
5329a8c9e293e38e7a376ce11ce87f4068a7dc6d
|
diff --git a/plugins/CorePluginsAdmin/angularjs/field/field.directive.js b/plugins/CorePluginsAdmin/angularjs/field/field.directive.js
index <HASH>..<HASH> 100644
--- a/plugins/CorePluginsAdmin/angularjs/field/field.directive.js
+++ b/plugins/CorePluginsAdmin/angularjs/field/field.directive.js
@@ -134,6 +134,14 @@
}
});
+ if ('undefined' !== typeof $scope.placeholder && $scope.placeholder !== null) {
+ $scope.$watch('placeholder', function (val, oldVal) {
+ if (val !== oldVal) {
+ $scope.field.uiControlAttributes.placeholder = val;
+ }
+ });
+ }
+
$scope.$watch('disabled', function (val, oldVal) {
if (val !== oldVal) {
$scope.field.uiControlAttributes.disabled = val;
|
when placeholder is changed, show the updated text
|
matomo-org_matomo
|
train
|
js
|
58ef4115b6484f402e1defea401a97e68bbb9f32
|
diff --git a/src/Builder/BuilderAbstract.php b/src/Builder/BuilderAbstract.php
index <HASH>..<HASH> 100644
--- a/src/Builder/BuilderAbstract.php
+++ b/src/Builder/BuilderAbstract.php
@@ -6,13 +6,18 @@ abstract class BuilderAbstract implements BuilderInterface
{
/**
- * Description.
+ * Build the command string to be executed.
*
- * @return
+ * @return string
*/
abstract public function build($args);
+ /**
+ * Wraps a string in double quotes.
+ *
+ * @return string
+ */
public function quotify($text)
{
return '"' . $text . '"';
diff --git a/src/Builder/BuilderInterface.php b/src/Builder/BuilderInterface.php
index <HASH>..<HASH> 100644
--- a/src/Builder/BuilderInterface.php
+++ b/src/Builder/BuilderInterface.php
@@ -5,9 +5,9 @@ namespace BryanCrowe\Growl\Builder;
interface BuilderInterface
{
/**
- * Description.
+ * Build the command string to be executed.
*
- * @return
+ * @return string
*/
public function build($args);
}
|
Add docblocks to BuilderAbstract and BuilderInterface
|
bcrowe_growl
|
train
|
php,php
|
2f4544c3c090c81c04ec04adcaf0768b5ee78c4e
|
diff --git a/src/Youtube.php b/src/Youtube.php
index <HASH>..<HASH> 100644
--- a/src/Youtube.php
+++ b/src/Youtube.php
@@ -4,6 +4,7 @@ namespace Mrofi\VideoInfo;
use DateInterval;
use GuzzleHttp\Client;
+use GuzzleHttp\Exception\TransferException;
use Mrofi\VideoInfo\VideoInfoInterface as VideoContract;
class Youtube extends AbstractInfo implements VideoContract
@@ -30,7 +31,7 @@ class Youtube extends AbstractInfo implements VideoContract
$this->attributes = $obj->items[0]->contentDetails;
$this->attributes->id = $id;
}
- } catch (GuzzleHttp\Exception\TransferException $e) {
+ } catch (TransferException $e) {
//
}
}
|
typo (again) :-(
|
mrofi_video-info
|
train
|
php
|
96e4b0b01c4a0ea5dba76048731786555ef0ced2
|
diff --git a/tocncx.py b/tocncx.py
index <HASH>..<HASH> 100644
--- a/tocncx.py
+++ b/tocncx.py
@@ -77,6 +77,6 @@ def generateTOC(fm):
navlist = doc.createElement('navList')
root.appendChild(navlist)
- outdoc = open('{0}/toc.ncx'.format(utils.OUT_DIR),'w')
+ outdoc = open('{0}/OPS/toc.ncx'.format(utils.OUT_DIR),'w')
outdoc.write(doc.toprettyxml(encoding = 'UTF-8'))
outdoc.close()
\ No newline at end of file
|
Quick fix to place toc.ncx in the right location
|
SavinaRoja_OpenAccess_EPUB
|
train
|
py
|
945d22f9bc8c78e2a89799e27428859056ce8c9a
|
diff --git a/resources/lang/th-TH/forms.php b/resources/lang/th-TH/forms.php
index <HASH>..<HASH> 100644
--- a/resources/lang/th-TH/forms.php
+++ b/resources/lang/th-TH/forms.php
@@ -153,15 +153,15 @@ return [
'display-graphs' => 'แสดงกราฟในหน้าสถานะหรือไม่',
'about-this-page' => 'เกี่ยวกับหน้านี้',
'days-of-incidents' => 'แสดงวันที่มีเหตุการณ์เกิดขึ้นกี่วัน?',
- 'time_before_refresh' => 'Status page refresh rate (in seconds).',
+ 'time_before_refresh' => 'Status page refresh rate (in seconds)',
'banner' => 'ภาพแบนเนอร์',
- 'banner-help' => 'ขอแนะนำให้อัปโหลดไฟล์ที่ความกว้างไม่เกิน 930px',
+ 'banner-help' => "It's recommended that you upload files no bigger than 930px wide",
'subscribers' => 'เปิดให้ทุกคนสามารถลงทะเบียนรับอีเมลแจ้งเตือน?',
'suppress_notifications_in_maintenance' => 'Suppress notifications when incident occurs during maintenance period?',
'skip_subscriber_verification' => 'ข้ามการยืนยันตันตนผู้ใช้ (ระวัง! คุณอาจถูกสแปม)',
'automatic_localization' => 'เปลี่ยนภาษาของหน้าสถานะตามภาษาของผู้เข้าชมอัตโนมัติ',
'enable_external_dependencies' => 'เปิดใช้งาน Third Party (Google Fonts, Trackers, ฯลฯ...)',
- 'show_timezone' => 'แสดงเขตเวลาที่หน้าสถานะกำลังใช้',
+ 'show_timezone' => 'Show the timezone the status page is running in',
'only_disrupted_days' => 'แสดงเฉพาะวันที่มีเหตุการณ์บนไทม์ไลน์?',
],
'analytics' => [
|
New translations forms.php (Thai)
|
CachetHQ_Cachet
|
train
|
php
|
3f96698bbff5b33ee96ef39732fbdc02030e3b53
|
diff --git a/src/Normalizer/Normalizer.php b/src/Normalizer/Normalizer.php
index <HASH>..<HASH> 100644
--- a/src/Normalizer/Normalizer.php
+++ b/src/Normalizer/Normalizer.php
@@ -131,11 +131,11 @@ final class Normalizer implements NormalizerInterface
): array {
$data = [];
foreach ($normalizationFieldMappings as $normalizationFieldMapping) {
- if (!$this->isCompliant($context, $normalizationFieldMapping, $object)) {
+ if (true !== $this->isCompliant($context, $normalizationFieldMapping, $object)) {
continue;
}
- if (!$this->isWithinGroup($context, $normalizationFieldMapping)) {
+ if (true !== $this->isWithinGroup($context, $normalizationFieldMapping)) {
continue;
}
@@ -169,11 +169,11 @@ final class Normalizer implements NormalizerInterface
): array {
$links = [];
foreach ($normalizationLinkMappings as $normalizationLinkMapping) {
- if (!$this->isCompliant($context, $normalizationLinkMapping, $object)) {
+ if (true !== $this->isCompliant($context, $normalizationLinkMapping, $object)) {
continue;
}
- if (!$this->isWithinGroup($context, $normalizationLinkMapping)) {
+ if (true !== $this->isWithinGroup($context, $normalizationLinkMapping)) {
continue;
}
|
chore: make some bool comparisons more explicit
|
chubbyphp_chubbyphp-serialization
|
train
|
php
|
4834d388da0eea312b5787aec83676180cd85631
|
diff --git a/course/tests/courselib_test.php b/course/tests/courselib_test.php
index <HASH>..<HASH> 100644
--- a/course/tests/courselib_test.php
+++ b/course/tests/courselib_test.php
@@ -863,7 +863,7 @@ class core_course_courselib_testcase extends advanced_testcase {
// Test move the marked section down..
move_section_to($course, 2, 4);
- // Verify that the coruse marker has been moved along with the section..
+ // Verify that the course marker has been moved along with the section..
$course = $DB->get_record('course', array('id' => $course->id));
$this->assertEquals(4, $course->marker);
|
MDL-<I> course: fix typo on courselib test
|
moodle_moodle
|
train
|
php
|
83c936ee710ace35a28411594ad89da08d34dc82
|
diff --git a/tests/unit/io/test_libevreactor.py b/tests/unit/io/test_libevreactor.py
index <HASH>..<HASH> 100644
--- a/tests/unit/io/test_libevreactor.py
+++ b/tests/unit/io/test_libevreactor.py
@@ -20,7 +20,7 @@ except ImportError, exc:
raise unittest.SkipTest('libev does not appear to be installed correctly: %s' % (exc,))
@patch('socket.socket')
-@patch('cassandra.io.libevwrapper.Io')
+@patch('cassandra.io.libevwrapper.IO')
@patch('cassandra.io.libevreactor._start_loop')
class LibevConnectionTest(unittest.TestCase):
|
Fix libevreactor unit test mock patching
|
datastax_python-driver
|
train
|
py
|
64f8054b72cae954e9123ba4807334b929db2e4b
|
diff --git a/pyam_analysis/core.py b/pyam_analysis/core.py
index <HASH>..<HASH> 100644
--- a/pyam_analysis/core.py
+++ b/pyam_analysis/core.py
@@ -192,10 +192,6 @@ class IamDataFrame(object):
df = df.append(self.check(var, check,
filters, ret_true=False))
if len(df):
- if exclude:
- idx = return_index(df, ['model', 'scenario'])
- self.cat.loc[idx, 'category'] = 'exclude'
-
n = str(len(df))
print(n + " scenarios do not satisfy the criteria")
if display == 'heatmap':
|
excluding 'exclude' scenarios from validation is included by default in 'select()'
|
IAMconsortium_pyam
|
train
|
py
|
e31cafafd7f6e0c215c063899ab772ceb3fff79d
|
diff --git a/test/helpers/cilium.go b/test/helpers/cilium.go
index <HASH>..<HASH> 100644
--- a/test/helpers/cilium.go
+++ b/test/helpers/cilium.go
@@ -800,13 +800,13 @@ func (s *SSHMeta) RestartCilium() error {
// AddIPToLoopbackDevice adds the specified IP (assumed to be in form <ip>/<mask>)
// to the loopback device on s.
func (s *SSHMeta) AddIPToLoopbackDevice(ip string) *CmdRes {
- return s.Exec(fmt.Sprintf("sudo ip addr add dev lo %s", ip))
+ return s.ExecWithSudo(fmt.Sprintf("ip addr add dev lo %s", ip))
}
// RemoveIPFromLoopbackDevice removes the specified IP (assumed to be in form <ip>/<mask>)
// from the loopback device on s.
func (s *SSHMeta) RemoveIPFromLoopbackDevice(ip string) *CmdRes {
- return s.Exec(fmt.Sprintf("sudo ip addr del dev lo %s", ip))
+ return s.ExecWithSudo(fmt.Sprintf("ip addr del dev lo %s", ip))
}
// FlushGlobalConntrackTable flushes the global connection tracking table.
|
test/helpers: change `ip addr` commands to use `ExecWithSudo`
|
cilium_cilium
|
train
|
go
|
fb971a82c2e894cab826fe42f08e5324a7bb0844
|
diff --git a/firefox/src/java/com/googlecode/webdriver/firefox/FirefoxProfile.java b/firefox/src/java/com/googlecode/webdriver/firefox/FirefoxProfile.java
index <HASH>..<HASH> 100644
--- a/firefox/src/java/com/googlecode/webdriver/firefox/FirefoxProfile.java
+++ b/firefox/src/java/com/googlecode/webdriver/firefox/FirefoxProfile.java
@@ -130,6 +130,10 @@ public class FirefoxProfile {
return extensionsDir;
}
+ public void addAdditionalPreference(String key, String value) {
+ this.additionalPrefs.put(key, value);
+ }
+
public void addAdditionalPreferences(Map<String, String> additionalPrefs) {
this.additionalPrefs.putAll(additionalPrefs);
}
|
SimonStewart: It's now possible to add a single additional preference to the firefox driver
r<I>
|
SeleniumHQ_selenium
|
train
|
java
|
54eaa8b1b19e8e2778ab1fd16261e9d5429dfb19
|
diff --git a/prepublish.js b/prepublish.js
index <HASH>..<HASH> 100644
--- a/prepublish.js
+++ b/prepublish.js
@@ -44,7 +44,11 @@ ast.body.forEach(function (node) {
}
});
-fs.writeFileSync(__dirname + '/lib/dependencies.js', 'module.exports = ' + JSON.stringify(dependencies));
+Object.keys(dependencies).forEach(function (fn) {
+ dependencies[fn] = dependencies[fn].sort();
+});
+
+fs.writeFileSync(__dirname + '/lib/dependencies.js', 'module.exports = ' + JSON.stringify(dependencies, null, 2) + '\n');
var pkg = JSON.parse(fs.readFileSync(__dirname + '/package.json', 'utf8'));
pkg.files = files.sort();
-fs.writeFileSync(__dirname + '/package.json', JSON.stringify(pkg, null, ' '));
+fs.writeFileSync(__dirname + '/package.json', JSON.stringify(pkg, null, 2) + '\n');
|
prepublish: Pretty print generated JSON files
|
pugjs_pug-runtime
|
train
|
js
|
ead4a0a170b735e167a9b1e1eb94a3198f4d8b2f
|
diff --git a/bolt/onboarding.go b/bolt/onboarding.go
index <HASH>..<HASH> 100644
--- a/bolt/onboarding.go
+++ b/bolt/onboarding.go
@@ -117,11 +117,15 @@ func (c *Client) Generate(ctx context.Context, req *platform.OnboardingRequest)
if err = c.CreateBucket(ctx, bucket); err != nil {
return nil, err
}
+
+ perms := platform.OperPermissions()
+ perms = append(perms, platform.OrgAdminPermissions(o.ID)...)
+
auth := &platform.Authorization{
UserID: u.ID,
Description: fmt.Sprintf("%s's Token", u.Name),
OrgID: o.ID,
- Permissions: platform.OperPermissions(),
+ Permissions: perms,
}
if err = c.CreateAuthorization(ctx, auth); err != nil {
return nil, err
|
fix(bolt): grand first user org admin privileges during onboarding
|
influxdata_influxdb
|
train
|
go
|
e572f7c315a072c36ee75f500d61a56b06a80b2d
|
diff --git a/src/main/java/org/jdbdt/QueryBuilder.java b/src/main/java/org/jdbdt/QueryBuilder.java
index <HASH>..<HASH> 100644
--- a/src/main/java/org/jdbdt/QueryBuilder.java
+++ b/src/main/java/org/jdbdt/QueryBuilder.java
@@ -14,7 +14,7 @@ public final class QueryBuilder {
/**
* Clauses/parameters that may be set for a builder.
*/
- enum Param {
+ private enum Param {
/** Columns (mandatory). */
COLUMNS {
@Override
|
QueryBuilder: Param enum can be private
|
JDBDT_jdbdt
|
train
|
java
|
afd666f2d9df6f8cf1e447e088576646380abfc2
|
diff --git a/src/Illuminate/Console/Scheduling/Event.php b/src/Illuminate/Console/Scheduling/Event.php
index <HASH>..<HASH> 100644
--- a/src/Illuminate/Console/Scheduling/Event.php
+++ b/src/Illuminate/Console/Scheduling/Event.php
@@ -354,8 +354,8 @@ class Event
/**
* Schedule the event to run twice daily.
*
- * @param string|null $first
- * @param string|null $second
+ * @param string $first
+ * @param string $second
* @return $this
*/
public function twiceDaily($first = '1:00', $second = '13:00')
|
Updated the PHPDoc block
Updated the PHPDoc block
|
laravel_framework
|
train
|
php
|
3babc0d967ac2e2acdfaca8051b2ddd517685ee7
|
diff --git a/src/TwoFactorAuth/TwoFactorAuthHelper.php b/src/TwoFactorAuth/TwoFactorAuthHelper.php
index <HASH>..<HASH> 100644
--- a/src/TwoFactorAuth/TwoFactorAuthHelper.php
+++ b/src/TwoFactorAuth/TwoFactorAuthHelper.php
@@ -408,11 +408,6 @@ class TwoFactorAuthHelper
*/
public function setCookie($response) {
- if (!config('auth.auth_2fa_cookie_enable')) {
- return false;
- }
-
-
if (!Cookie::has('successful_login')) {
// what is the cookie's lifetime, in minutes
|
Tweak TwoFactorAuthHelper.php. #<I>
|
lasallecms_lasallecms-l5-helpers-pkg
|
train
|
php
|
6a79a238b3b11cdd2f779ef12f655f779cca0c9f
|
diff --git a/python_modules/dagster-graphql/dagster_graphql/implementation/execution.py b/python_modules/dagster-graphql/dagster_graphql/implementation/execution.py
index <HASH>..<HASH> 100644
--- a/python_modules/dagster-graphql/dagster_graphql/implementation/execution.py
+++ b/python_modules/dagster-graphql/dagster_graphql/implementation/execution.py
@@ -265,11 +265,11 @@ def get_pipeline_run_observable(graphene_info, run_id, after=None):
return Observable.create(_get_error_observable) # pylint: disable=E1101
- pipeline_def = get_pipeline_def_from_selector(graphene_info, run.selector)
pipeline_ref = get_dauphin_pipeline_reference_from_selector(graphene_info, run.selector)
execution_plan = None
if isinstance(pipeline_ref, DauphinPipeline):
+ pipeline_def = get_pipeline_def_from_selector(graphene_info, run.selector)
execution_plan = create_execution_plan(
pipeline_def, run.environment_dict, RunConfig(mode=run.mode)
)
|
fix viewing logs for a "live" UnknownPipeline
Test Plan: load a run not in a terminal state for a pipeline not in scopea
Reviewers: prha, nate, max
Reviewed By: nate
Differential Revision: <URL>
|
dagster-io_dagster
|
train
|
py
|
47d26dc3468ac8f07ee9800e44338a58628e7333
|
diff --git a/lib/core_tabs.js b/lib/core_tabs.js
index <HASH>..<HASH> 100644
--- a/lib/core_tabs.js
+++ b/lib/core_tabs.js
@@ -688,6 +688,7 @@ var core_tabs = function(spec, my) {
var tabs = [];
Object.keys(my.tabs).forEach(function(id) {
tabs.push({
+ id: id,
state: my.tabs[id].state,
loading: my.tabs[id].loading
});
|
Add tab ID to 'tabs_get' method response
As discussed in issue #<I> this fix will add the tab ID to the response object when not specifying a tab.
|
breach_breach_core
|
train
|
js
|
6d902bdd842dc8edb5d4bae581dffe322c45ad6f
|
diff --git a/book.js b/book.js
index <HASH>..<HASH> 100644
--- a/book.js
+++ b/book.js
@@ -3,7 +3,7 @@ var pkg = require('./package.json')
module.exports = {
root: "./docs",
title: "Botpress Official Documentation",
- plugins: ["noembed", "sitemap", "expandable-chapters", "hints", "anchors"],
+ plugins: ["noembed", "sitemap", "expandable-chapters", "hints", "anchors", "robotstxt"],
gitbook: ">= 3.0.0",
variables: {
version: pkg.version,
|
Added robots.txt
|
botpress_botpress
|
train
|
js
|
0934ff4a41e21a45612656decedb96cbd60909e3
|
diff --git a/manage.py b/manage.py
index <HASH>..<HASH> 100644
--- a/manage.py
+++ b/manage.py
@@ -197,7 +197,7 @@ def start_daemon():
# Get the waiting jobs (STATUS_WAITING) ordered by the age-in-minutes/priority DESC
# Jobs with a priority of `1` will sort above equally-old jobs with a higher priority value
# A job that is priority `2` will sort equal with a job half it's age
- jobs_to_run = Job.query.filter(Job.status == STATUS_WAITING).order_by(Job.created_at.desc())
+ jobs_to_run = Job.query.filter(Job.status == STATUS_WAITING).order_by(Job.created_at)
for job in jobs_to_run[:MAX_RUNNING_JOBS]:
|
Queue running was in reverse order
|
wooey_Wooey
|
train
|
py
|
946880cf9455b9bcb0eb3dc099bdef5d6c5615b1
|
diff --git a/lib/analytical.rb b/lib/analytical.rb
index <HASH>..<HASH> 100644
--- a/lib/analytical.rb
+++ b/lib/analytical.rb
@@ -35,7 +35,8 @@ module Analytical
def analytical
@analytical ||= begin
options = self.class.analytical_options.merge({
- :ssl => request.ssl?
+ :ssl => request.ssl?,
+ :controller => self,
})
if options[:disable_if].call(self)
options[:modules] = options[:development_modules]
|
Adding :controller to options, so modules can access the current controller if they need to
|
jkrall_analytical
|
train
|
rb
|
d310677ac96b8d8d484e73f85d7cbc5d8d9c5e23
|
diff --git a/client/state/ui/editor/test/edit-save-flow.js b/client/state/ui/editor/test/edit-save-flow.js
index <HASH>..<HASH> 100644
--- a/client/state/ui/editor/test/edit-save-flow.js
+++ b/client/state/ui/editor/test/edit-save-flow.js
@@ -15,6 +15,8 @@ import nock from 'nock';
*/
import posts from 'state/posts/reducer';
import preferences from 'state/preferences/reducer';
+import sites from 'state/sites/reducer';
+import siteSettings from 'state/site-settings/reducer';
import { selectedSiteId } from 'state/ui/reducer';
import editor from 'state/ui/editor/reducer';
import { setSelectedSiteId } from 'state/ui/actions';
@@ -30,6 +32,8 @@ const GLOBAL_ID = '123-456';
const reducer = combineReducers( {
posts,
preferences,
+ sites,
+ siteSettings,
ui: combineReducers( {
selectedSiteId,
editor,
|
Fix Post Editor unit tests (#<I>)
Caused by changes introduced by #<I> (dependency on `getPodcastingCategoryId` selector).
The tests in #<I> were authored before that PR was merged and it introduces new Redux
dependencies: the test store needs also `sites` and `siteSettings` reducers now.
|
Automattic_wp-calypso
|
train
|
js
|
6b094e923a6a38d5e178e0be7b5bbc3d6642e85e
|
diff --git a/hydpy/core/parametertools.py b/hydpy/core/parametertools.py
index <HASH>..<HASH> 100644
--- a/hydpy/core/parametertools.py
+++ b/hydpy/core/parametertools.py
@@ -360,15 +360,16 @@ class Parameter(objecttools.ValueMath):
lines = []
if pub.options.reprcomments:
if self.__doc__ is not None:
- lines.append('# %s].' % self.__doc__.split(']')[0])
+ comment = '%s].' % self.__doc__.split(']')[0]
+ lines.extend('# '+line.strip() for line in comment.split('\n'))
else:
lines.append('# Instance of parameter class `%s` defined in '
'module `%s`.'
% (objecttools.classname(self), self.__module__))
if self.TIME is not None:
lines.append('# The actual value representation depends on '
- 'the actual parameter step size, which is `%s`.'
- % self.parameterstep)
+ 'the actual parameter step size,')
+ lines.append('# which is `%s`.' % self.parameterstep)
return lines
def __str__(self):
|
Fix multi line comments of string representations of class "Parameter".
Multiline class docstrings like
class Test(Parameter):
"""line 1 and
line2 [-].
"""
resulted in class representations like
# line 1 and
line 2 [-].
test(?)
which are not valid Python code.
This has been corrected to
# line 1 and
# line 2 [-].
test(?)
|
hydpy-dev_hydpy
|
train
|
py
|
34a2b2e91c2439fec7f08bfc628d7f470ef2fdfe
|
diff --git a/semantic_release/__init__.py b/semantic_release/__init__.py
index <HASH>..<HASH> 100644
--- a/semantic_release/__init__.py
+++ b/semantic_release/__init__.py
@@ -1,6 +1,6 @@
"""Semantic Release
"""
-__version__ = "7.2.0"
+__version__ = "7.2.1"
from .errors import UnknownCommitMessageStyleError # noqa; noqa
|
<I>
Automatically generated by python-semantic-release
|
relekang_python-semantic-release
|
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.