patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -81,11 +81,13 @@ public class GroupsAction implements PermissionsWsAction {
"<li>'Administer' rights on the specified project</li>" +
"</ul>")
.addPagingParams(DEFAULT_PAGE_SIZE, RESULTS_MAX_SIZE)
- .addSearchQuery("sonar", "names").setDescription("Limit search to group names that conta... | [GroupsAction->[findGroups->[immutableSortedCopy,setOrganizationUuid,getUuid,selectGroupNamesByQuery,contains,add,selectByNames],findGroupPermissions->[size,selectByGroupIds,toList,isPresent,getUuid,emptyList,collect,isEmpty,getId],buildResponse->[create,getName,build,getRole,getDescription,setTotal,setNullable,newBuil... | This service defines a group action which lists all groups with the specified permissions. | You should not remove `addSearchQuery` but replace it by `createSearchQuery` in order to use `.setMinimumLength(SEARCH_QUERY_MIN_LENGTH)` on it |
@@ -52,7 +52,11 @@ import lombok.EqualsAndHashCode;
@Alpha
@Data
@EqualsAndHashCode(exclude={"compilationErrors"})
+@SuppressFBWarnings(value="SE_BAD_FIELD",
+ justification = "FindBugs complains about Config not being serializable, but the implementation of Config is serializable")
public class FlowSpec impleme... | [FlowSpec->[toString->[toShortString],Builder->[getURI->[getDefaultURI],getDescription->[getDefaultDescription],getDefaultURI->[getFlowCatalogURI],getFlowCatalogURI->[getDefaultFlowCatalogURI],getConfig->[getDefaultConfig],build->[FlowSpec],getDefaultDescription->[getURI]]]] | Creates a FlowSpec using a typesafe config object. Create a new FlowSpec or JobSpec hierarchy from a single child FlowSpec or JobSpec. | Can we add a justification why we want to suppress the warnings? |
@@ -81,7 +81,13 @@ function $InterpolateProvider() {
this.$get = ['$parse', '$exceptionHandler', '$sce', function($parse, $exceptionHandler, $sce) {
var startSymbolLength = startSymbol.length,
- endSymbolLength = endSymbol.length;
+ endSymbolLength = endSymbol.length,
+ escapedStartRegexp... | [No CFG could be retrieved] | Provides a method to denote the start of expression in the interpolated string. This function checks if the passed - in variable is an * true or not. | You end up with really ugly looking escape markers this way, which is fine for computers, but it's not very pleasant to look at. The search/replace style escaping can't have custom escape markers for aesthetic niceness, because they would be potentially exploitable. |
@@ -96,6 +96,14 @@ class HelpInfoExtracterTest(unittest.TestCase):
self.assertEqual('do not use this', ohi.removal_hint)
self.assertIsNotNone(ohi.deprecated_message)
+ def test_enum(self):
+ class LogLevel(Enum):
+ INFO = 'info'
+ DEBUG = 'debug'
+ kwargs = {'choices': LogLevel}
+ ohi = ... | [HelpInfoExtracterTest->[test_non_global_scope->[do_test],test_grouping->[do_test->[exp_to_len],do_test],test_global_scope->[do_test],test_default->[do_test]]] | Test deprecated options. | Instead of `{'choices': LogLevel}`, we want `{'type': LogLevel, 'default': LogLevel.INFO}`. That's how we register enums. This is going to require tweaking the implementation to get this test working. |
@@ -38,7 +38,7 @@ class TestReviewNotesSerializerOutput(TestCase, LogMixin):
result = self.serialize()
assert result['id'] == self.entry.pk
- assert result['date'] == self.now.isoformat()
+ assert result['date'] == self.now.isoformat() + 'Z'
assert result['action'] == 'rejecte... | [TestReviewNotesSerializerOutput->[test_should_not_highlight->[serialize,log],test_basic->[serialize],setUp->[log],test_sanitized_activity_detail_not_exposed_to_developer->[serialize,log],test_should_highlight->[serialize]],LogMixin->[log->[log]]] | Test basic data. | oh we'll need moooooore tests, assuming we're exposing it here and there but maybe that's the only place? |
@@ -354,6 +354,11 @@ class CheckoutLinesAdd(BaseMutation):
raise ValidationError(
f"Insufficient product stock: {exc.item}", code=exc.code
)
+ except ProductNotPublished as exc:
+ raise ValidationError(
+ ... | [CheckoutBillingAddressUpdate->[perform_mutation->[CheckoutBillingAddressUpdate,save]],CheckoutCreate->[process_checkout_lines->[check_lines_quantity],clean_input->[retrieve_billing_address,retrieve_shipping_address,process_checkout_lines],Arguments->[CheckoutCreateInput],perform_mutation->[save,CheckoutCreate,clean_in... | Perform a single mutation of a node s checkout. | This isn't `checkout_create` mutation. :police_officer: |
@@ -597,11 +597,11 @@ public final class FileConfigurationParser extends XMLConfigurationUtil {
config.setJournalSyncNonTransactional(getBoolean(e, "journal-sync-non-transactional", config.isJournalSyncNonTransactional()));
- config.setJournalFileSize(getTextBytesAsIntBytes(e, "journal-file-size", confi... | [FileConfigurationParser->[parseMainConfig->[parseMainConfig],createColocatedHaPolicy->[createReplicaHaPolicy,createSharedStoreMasterHaPolicy,createReplicatedHaPolicy,createSharedStoreSlaveHaPolicy],parseAddressSettings->[parseAddressSettings],parseMetricsPlugin->[getMapOfChildPropertyElements],parseAddressConfiguratio... | Parse the main configuration. Adds validation options to the JmxManagementConfig object. This method is called when the configuration values are not set on the XML. It is called parse the element tree and set the missing properties if there is no such element. | change was not needed here, int range should all be validated by xsd type. |
@@ -0,0 +1,13 @@
+class CreateBackupCodeConfigurations < ActiveRecord::Migration[5.1]
+ def change
+ create_table :backup_code_configurations do |t|
+ t.integer :user_id, null: false
+ t.string :code_fingerprint, default:'', null: false
+ t.string :encrypted_code, default:'', null: false
+ t.tim... | [No CFG could be retrieved] | No Summary Found. | Not a blocker for this PR (I think), but something we'll need to do in the future: make sure we don't generate a code that has the same fingerprint as a code already used, unless we add a `where` clause to the index to scope it to those codes for which `used_at` is `NULL`. |
@@ -542,7 +542,7 @@ static SRP_Result fill_buff()
if (!fp) return SRP_ERR;
- if (fread(g_rand_buff, sizeof(g_rand_buff), 1, fp) != 1) return SRP_ERR;
+ if (fread(g_rand_buff, sizeof(g_rand_buff), 1, fp) != 1) { fclose(fp); return SRP_ERR; }
if (fclose(fp)) return SRP_ERR;
#endif
return SRP_OK;
| [srp_create_salted_verification_key->[init_random,mpz_powm,memcpy,mpz_clear,mpz_init,srp_alloc,fill_buff,mpz_to_bin,new_ng,delete_ng,mpz_num_bytes,calculate_x,srp_dbg_num],int->[hash_length,SHA1_Final,SHA256_Update,hash_final,SHA256_Init,SHA1_Init,strlen,hash_init,SHA256_Final,hash_update,H_ns,SHA1_Update,srp_dbg_data]... | fill_buff - Fill buffer with random bytes. | Reminder to myself: backport this to csrp-gmp. |
@@ -97,6 +97,9 @@ class FunctionBasedTaskGenerator(TaskGenerator):
def generate_config_list(self, target_sparsity: List[Dict], iteration: int, compact2origin_sparsity: List[Dict]) -> List[Dict]:
raise NotImplementedError()
+ def allocate_sparsity(self, new_config_list: List[Dict], model: Module, mask... | [SimulatedAnnealingTaskGenerator->[generate_tasks->[_init_temp_config_list,_recover_real_sparsity,_update_with_perturbations],init_pending_tasks->[generate_tasks],_update_with_perturbations->[_sparsity_to_config_list,_rescale_sparsity]]] | Generate a list of dicts with the sparsity of each key in the target_sparsity. | why we need this function? directly return an input argument? |
@@ -0,0 +1,12 @@
+package main
+
+import (
+ "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
+)
+
+func main() {
+ pulumi.Run(func(ctx *pulumi.Context) error {
+ ctx.Export("exp_static", pulumi.String("foo"))
+ return nil
+ })
+}
| [No CFG could be retrieved] | No Summary Found. | Should it have a sleep or something to guarantee the clash? |
@@ -55,8 +55,12 @@ class PreviewKernel extends Kernel
return $this->generateContainerClass(\get_parent_class());
}
- public function getRootDir()
+ public function getRootDir(/* $triggerDeprecation = true */)
{
+ if (0 === \func_num_args() || \func_get_arg(0)) {
+ @\trigger_... | [PreviewKernel->[getContainerClass->[generateContainerClass],registerContainerConfiguration->[load,hasExtension],getLogDir->[getContext,setContext],getProjectDir->[getFileName],getCacheDir->[getContext,setContext],getRootDir->[getFileName]]] | get the class of the generated container class. | Would you really build something like that in? Shouldn't we let that deprecation just happen? |
@@ -754,6 +754,11 @@ def apply_inverse(evoked, inverse_operator, lambda2=1. / 9.,
-------
stc : SourceEstimate | VolSourceEstimate
The source estimates
+
+ See Also
+ --------
+ apply_inverse_raw : Apply inverse operator to raw object
+ apply_inverse_epochs : Apply inverse operator to epo... | [prepare_inverse_operator->[combine_xyz,InverseOperator],estimate_snr->[_check_ch_names,prepare_inverse_operator,_check_reference,_pick_channels_inverse_operator],read_inverse_operator->[InverseOperator],apply_inverse->[prepare_inverse_operator,_check_reference,_assemble_kernel,_subject_from_inverse,_check_ch_names,_ch... | Apply an inverse operator to the data. Compute the kernel kernel of a single residue. | it's mostly for cross refs in the doc. Just check it renders fine. |
@@ -551,7 +551,7 @@ void VtkOutput::WriteVectorSolutionStepVariable(
const TVarType& rVariable,
std::ofstream& rFileStream) const
{
- KRATOS_DEBUG_ERROR_IF(rContainer.size() == 0) << "Empty container!" << std::endl;
+ KRATOS_WARNING_IF("VtkOutput" , rContainer.size() == 0) << "Empty container!" << std:... | [PrintOutput->[mOutputSettings,SubModelParts,WriteModelPartToFile],WriteVectorContainerVariable->[,size,WriteVectorDataToFile,KRATOS_DEBUG_ERROR_IF,Name,GetValue],WriteVectorSolutionStepVariable->[,size,WriteVectorDataToFile,KRATOS_DEBUG_ERROR_IF,Name,FastGetSolutionStepValue],WriteModelPartToFile->[WriteHeaderToFile,W... | Write vector solution step variable. | If you make it a warning it will crash here |
@@ -522,7 +522,7 @@ func (bra BlockRequestAction) Combine(
// If the actions don't agree on stop-if-full, we should remove it
// from the combined result.
if bra.StopIfFull() != other.StopIfFull() {
- combined = combined &^ blockRequestStopIfFull
+ combined &^= blockRequestStopIfFull
}
return combined
}
| [AddRefBlock->[AddRefBlock],AddUnrefBlock->[AddUnrefBlock],PrefetchTracked->[prefetch],ChildAction->[Sync,DeepPrefetch],Prefetch->[prefetch],MarshalJSON->[String],getFolderBranch->[getRootNode],CacheType->[Sync],AddUpdate->[AddUpdate],AddSync->[prefetch],DeepPrefetch->[DeepSync]] | Combine returns a new action that combines two blocks. | I had no idea this operator existed :O |
@@ -1200,3 +1200,15 @@ func (d *Dispatcher) CheckServiceReady(ctx context.Context, conf *config.Virtual
}
return nil
}
+
+// vchFolder returns the namespaced folder for the vch or an error.
+func vchFolder(op trace.Operation, sess *session.Session, conf *config.VirtualContainerHostConfigSpec) (*object.Folder, erro... | [createAppliance->[createApplianceSpec,setDockerPort],CheckServiceReady->[CheckDockerAPI,ensureApplianceInitializes],createApplianceSpec->[addIDEController,addNetworkDevices,addParaVirtualSCSIController],ensureApplianceInitializes->[waitForKey,applianceConfiguration],deleteVM->[getName],reconfigureApplianceSpec->[encod... | CheckServiceReady checks if a vSphere service is ready to use. | Let's export this so we can use it in the ops-user permissions issue that I'm working on. |
@@ -1855,8 +1855,8 @@ Either specify options.terrainProvider instead or set options.baseLayerPicker to
};
function updateZoomTarget(viewer) {
- var entities = viewer._zoomTarget;
- if (!defined(entities) || viewer.scene.mode === SceneMode.MORPHING) {
+ var target = viewer._zoomTarget;
+... | [No CFG could be retrieved] | Displays a single type of entity in the reference frame. Checks if zoomTarget is defined. | For clarity, move this to after the check for an ImageryLayer, when we know the target is a list of entities. |
@@ -122,6 +122,16 @@ export class AmpSidebar extends AMP.BaseElement {
this.registerAction('toggle', this.toggle_.bind(this));
this.registerAction('open', this.open_.bind(this));
this.registerAction('close', this.close_.bind(this));
+
+ this.element.addEventListener('click', e => {
+ const target... | [No CFG could be retrieved] | Creates a sidebar. Constructor for the sidebar. | This wouldn't happen with the `assertElement` above. |
@@ -30,6 +30,12 @@ def get_tmp_dir(src=None, **kwargs):
shutil.rmtree(tmp_dir)
+def set_rng_seed(seed):
+ torch.manual_seed(seed)
+ random.seed(seed)
+ np.random.seed(seed)
+
+
ACCEPT = os.getenv('EXPECTTEST_ACCEPT')
TEST_WITH_SLOW = os.getenv('PYTORCH_TEST_WITH_SLOW', '0') == '1'
# TEST_WITH_S... | [map_nested_tensor_object->[MapNestedTensorObjectImpl],TestCase->[assertExportImportModule->[assertEqual,getExportImportCopy],assertEqual->[assertEqual,assertTensorsEqual,is_iterable],assertExpected->[accept_output,remove_prefix_suffix],checkModule->[assertEqual]]] | Yields a temporary directory and creates a MapNestedTensorObject. Returns an iterator that yields the object s if it is a tuple. | This change was originally done on an intermediate commit where I was producing a random image and had to fix the seed. Though I switched to non-random to reduce the size, I think it's a good idea to move this method from `test_models.py` to `commont_utils.py`, so I kept the change in this PR. |
@@ -98,7 +98,8 @@ class WeightField(forms.FloatField):
raise Exception("%r is not a valid weight." % (weight,))
if weight.unit != unit:
raise forms.ValidationError(
- "Invalid unit: %r (expected %r)." % (weight.unit, unit)
+ "Invalid u... | [WeightInput->[render->[get_default_weight_unit],format_value->[convert_weight,get_default_weight_unit]],WeightField->[clean->[validate,to_python],validate->[get_default_weight_unit],to_python->[get_default_weight_unit]]] | Validate a weight object. | Shouldn't we use `ErrorCode` class here? |
@@ -28,7 +28,9 @@ import com.google.common.collect.Ordering;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
+//CHECKSTYLE.OFF: Regexp
import com.metamx.common.logger.Logger;
+//CHECKSTYLE.ON: Regexp
i... | [LoadRuleTest->[testDrop->[getNumReplicants->[get],create,addDataSegment,atLeastOnce,DruidServer,getTieredStat,LoadRule,of,createBalancerStrategy,replay,toImmutableDruidServer,asList,getIdentifier,DruidCluster,newFixedThreadPool,assertEquals,dropSegment,ServerHolder,build,listeningDecorator,anyTimes,anyObject,run,shutd... | Imports a single version of a n - th node in the system. Imports all the components of the NIO package. | Why needs to use old logger? |
@@ -226,11 +226,7 @@ func makeEventLogOutput(cfg Config) (zapcore.Core, error) {
}
func makeFileOutput(cfg Config) (zapcore.Core, error) {
- name := cfg.Beat
- if cfg.Files.Name != "" {
- name = cfg.Files.Name
- }
- filename := paths.Resolve(paths.Logs, filepath.Join(cfg.Files.Path, name))
+ filename := paths.Reso... | [Check->[Check],Sync->[Sync],Enabled->[Enabled],Write->[Write],With->[With]] | makeDevOutput returns a zap. Core that writes to stdout and writes to stderr. newCore creates a new instance of a zapcore. Core that wraps a core with a. | By moving this logic to `libbeat/logp/configure`, using logp directly (without calling `configure.Logging`) will result in having no default filename |
@@ -494,7 +494,8 @@ def install(args, config, plugins):
# XXX: Update for renewer/RenewableCert
try:
- installer, _ = choose_configurator_plugins(args, config, plugins, "certonly")
+ installer, _ = choose_configurator_plugins(args, config,
+ pl... | [_plugins_parsing->[add,add_group,add_plugin_args],_auth_from_domains->[_report_new_cert,_treat_as_renewal],revoke->[revoke,_determine_account],_create_subparsers->[add,add_group,flag_default],setup_logging->[setup_log_file_handler],_treat_as_renewal->[_find_duplicative_certs],SilentParser->[add_argument->[add_argument... | Install a previously obtained cert in a server. | This looks like this bug has been here for a while. I wonder if we should in fact be calling `pick_installer` here? |
@@ -988,8 +988,8 @@ public class TripleAMenu extends BasicGameMenuBar<TripleAFrame> {
}
text.append("\n");
clone.getHistory().gotoNode(clone.getHistory().getLastNode());
- @SuppressWarnings("rawtypes")
- final Enumeration nodes = ((DefaultMutableTreeNode) clone.getHistory().getRoot()).pre... | [No CFG could be retrieved] | private int totalNumberOfEntries = 0 ; missing player id. | So we are trading one warning for another? Is that making it much better? |
@@ -28,10 +28,11 @@ class UpdateCommand extends Command
->setName('update')
->setDescription('Updates your dependencies to the latest version, and updates the composer.lock file.')
->setDefinition(array(
+ new InputArgument('packages', InputArgument::IS_ARRAY | Inpu... | [UpdateCommand->[execute->[getIO,getComposer,run,setUpdate],configure->[setHelp]]] | Configures the command that will update the current version of a . | I think this should be named just "package", no? `composer update --packages foo --packages bar` vs. `composer update --package foo --package bar` |
@@ -49,14 +49,10 @@ define([
if (viewer.hasOwnProperty('trackedObject')) {
throw new DeveloperError('trackedObject is already defined by another mixin.');
}
- if (viewer.hasOwnProperty('objectTracked')) {
- throw new DeveloperError('objectTracked is already defined by an... | [No CFG could be retrieved] | Adds support for working with dynamic objects to the viewer. clearTrackedObject - Clear the tracked object. | Is there some reason we aren't using the ES5 syntax? |
@@ -701,7 +701,16 @@ namespace Dynamo.Models
var result = BuildOutputAst(inputAstNodes);
if (OutPortData.Count == 1)
- return result;
+ {
+ return
+ result.Concat(
+ new[]
+ {
+ ... | [NodeModel->[BuildAst->[BuildOutputAst],Save->[SaveNode],ClearError->[ClearTooltipText],AddToLabelMap->[AddToLabelMap],Warning->[Warning],p_PortDisconnected->[DisconnectOutput,DisconnectInput,ValidateConnections],Load->[LoadNode],GetPortVerticalOffset->[GetPortIndexAndType],Deselect->[ValidateConnections],RegisterAllPo... | This method builds the output and preview AST. | please turn this into a string assignment followed by returning the string to make it more explicit what is being returned. The nesting here is a little excessive |
@@ -32,6 +32,7 @@
data-controller="snackbar"
data-action="snackbar:add@document->snackbar#addItem">
<header class="crayons-header">
+ <span id="route-change-target" tabindex="-1"></span>
<a href="#main-content" class="skip-content-link">Skip to content</a>
<div class="crayons-header__container">
... | [No CFG could be retrieved] | A list of all the components of a sequence. Renders a single . | i18n (potentially blocking): Since this was changed in the top bar template, change it here as well to use `<%= t("views.main.header.skip") %>`. The only question I have about this is should the admin skip link have it's own `<%= t("views.admin.header.skip") %>`. If the latter is the case, we can table this and add it ... |
@@ -45,3 +45,8 @@ const (
AllProjectsExternalID = "*"
UnassignedProjectID = "(unassigned)"
)
+
+// Busniess logic constants
+const (
+ MaxProjects = 6
+)
| [No CFG could be retrieved] | AllProjectsExternalID = all projects except the last one. | teeny nit: `Busniess -> Business` |
@@ -34,8 +34,6 @@ module Devise
def handle_valid_delivery_method(method)
send_user_otp(method)
- resent_message = t("notices.send_code.#{method}")
- flash[:success] = resent_message if session[:code_sent].present?
session[:code_sent] = 'true'
redirect_to login_two_factor_path(deliv... | [TwoFactorAuthenticationController->[reauthn_param->[permit,dig],show->[redirect_to,masked_two_factor_phone_number,new,totp_enabled?],send_user_otp->[to_s,perform_later,create_direct_otp,constantize,direct_otp],phone_to_deliver_to->[phone],handle_valid_delivery_method->[redirect_to,login_two_factor_path,send_user_otp,r... | handles a valid delivery method. | so are we not showing this message anymore? If not, do we still want to set the session var below? |
@@ -123,7 +123,7 @@ void AddKernelToPython(pybind11::module& m)
.def("InitializeApplication", [](Kernel& self, KratosApplication& App){ self.Initialize();
/*RegisterInPythonApplicationVariables(App);*/ }) //&Kernel::InitializeApplication)
//.def(""A,&Kernel::Initialize)
- .def("IsImpo... | [RegisterInPythonKernelVariables->[begin,c_str,attr,end],AddKernelToPython->[Pointer>],RegisterInPythonApplicationVariables->[,hasattr,attr,Name,c_str,end,KRATOS_INFO,begin],PrintVariablesName->[PrintData],GetVariableNames->[str,PrintData]] | Add kernel to Python module. This is a hack to allow the GetArrayVariable methods to be used in the C ++ This is a workaround for the fact that the default variable names are not unique. This is a hack to allow for a bunch of functions to return a sequence of names for Missing static properties. | Soooo, this was the reason of the fail. I see |
@@ -1734,6 +1734,8 @@ public class AccountManagerImpl extends ManagerBase implements AccountManager, M
UserVO newUser = new UserVO(user);
user.setExternalEntity(user.getUuid());
user.setUuid(UUID.randomUUID().toString());
+ user.setApiKey(null);
+ ... | [AccountManagerImpl->[enableUser->[doInTransaction->[enableAccount,doSetUserStatus],updateLoginAttempts,checkAccess],authenticateUser->[getAccount],getUserByApiKey->[getUserByApiKey],listAclGroupsByAccount->[listAclGroupsByAccount],createUser->[createUser,checkAccess],deleteUserAccount->[deleteAccount,checkAccess],enab... | move a user to a new account if it has a . | Why creating a new user entry? I mean, isn't this a matter of simply updating the accountId of the user? Then, you would not change the UUID of the "old" user entry, and you would also not need to update the keys and then mark the user as removed. |
@@ -128,11 +128,11 @@ GUIFormSpecMenu::~GUIFormSpecMenu()
}
void GUIFormSpecMenu::create(GUIFormSpecMenu *&cur_formspec, Client *client,
- JoystickController *joystick, IFormSource *fs_src, TextDest *txt_dest)
+ JoystickController *joystick, IFormSource *fs_src, TextDest *txt_dest, std::string formspecPrepend)
{
... | [No CFG could be retrieved] | Create a menu object from a menu object. region Menu Menu Functions. | Line too long and `const std::string &formspec_prepend` (reference + variable naming fix) |
@@ -124,6 +124,10 @@ def psd_array_welch(x, sfreq, fmin=0, fmax=np.inf, n_fft=256, n_overlap=0,
-----
.. versionadded:: 0.14.0
"""
+ if average is not None and average not in ["mean", "median"]:
+ raise ValueError('average must be one of `mean`, `median`, or None, '
+ 'g... | [psd_array_welch->[_check_nfft],psd_welch->[_check_psd_data,psd_array_welch],psd_multitaper->[_check_psd_data]] | Compute the power spectral density of a sequence of segments using Welch s method. Compute the PSD of the nanoseconds in x. Returns the psds and freqs for a sequence of frequency intervals. | `_check_option('average', average, (None, 'mean', 'median'))` |
@@ -58,11 +58,11 @@ public class FinalizeResultsQueryRunner<T> implements QueryRunner<T>
if (shouldFinalize) {
queryToRun = query.withOverriddenContext(ImmutableMap.<String, Object>of("finalize", false));
- metricManipulationFn = new FinalizeMetricManipulationFn();
+ metricManipulationFn = Metri... | [FinalizeResultsQueryRunner->[run->[apply->[getValue,getResults,getTimestamp,BySegmentResultValueClass,getInterval,getSegmentId,transform],of,getContextBySegment,withOverriddenContext,IdentityMetricManipulationFn,getContextFinalize,makePostComputeManipulatorFn,run,FinalizeMetricManipulationFn,map]]] | Runs the query and returns a sequence of the results. | can we spell out Functions, instead of Fns? |
@@ -20,7 +20,6 @@ from numba import mviewbuf
from numba.core import utils, config
from .error import HsaSupportError, HsaDriverError, HsaApiError
from numba.roc.hsadrv import enums, enums_ext, drvapi
-from numba.core.utils import longint as long
import numpy as np
| [Queue->[insert_barrier->[_get_packet],dispatch->[HsaKernelTimedOut,create_signal,_get_packet],release->[release_queue]],Driver->[__new__->[__new__],_initialize_agents->[_initialize_api],is_available->[_initialize_api],_initialize_api->[shutdown->[drain]],__getattr__->[_initialize_api,driver_wrapper],__init__->[Recycle... | Provides a non - standard way to find the HSA driver and device type. Load the NUMBA_HSA_DRIVER from the given path. | Perhaps remove `longint` from `numba.core.utils` too? A number of core devs discussed removal of Py2 things from `utils` the other day, consensus was should be fine to remove. |
@@ -59,6 +59,15 @@ func (h *confHandler) GetDefault(w http.ResponseWriter, r *http.Request) {
h.rd.JSON(w, http.StatusOK, config)
}
+// FIXME: details of input json body params
+// @Tags config
+// @Summary Update a config item.
+// @Accept json
+// @Param body body object false "json params"
+// @Produce json
+//... | [mergeConfig->[Get],GetClusterVersion->[GetClusterVersion],SetClusterVersion->[SetClusterVersion],GetLabelProperty->[GetLabelProperty],SetLabelProperty->[SetLabelProperty]] | GetDefault returns the default configuration Update PDServerConfig. | also need 503? |
@@ -185,7 +185,7 @@ function auth () {
$rootScope.ticket = angular.fromJson(response.data).body
$rootScope.ticket.screenUsername = $rootScope.ticket.principal
- if ($rootScope.ticket.principal.startsWith('#Pac4j')) {
+ if ($rootScope.ticket.principal.toString().indexOf('#Pac4j') === 0) {
... | [No CFG could be retrieved] | The main function of the application. Bootstraps the application if it s not already loaded. | Do we need `toString`? except for LGTM. |
@@ -24,6 +24,7 @@ import io.confluent.ksql.query.QueryError.Type;
import io.confluent.ksql.query.QueryRegistryImpl.QueryExecutorFactory;
import io.confluent.ksql.schema.ksql.LogicalSchema;
import io.confluent.ksql.services.ServiceContext;
+import io.confluent.ksql.util.KsqlConstants;
import io.confluent.ksql.util.P... | [QueryRegistryImplTest->[shouldCallListenerOnCreate->[onCreate,givenCreate],shouldGetQueryThatCreatedSource->[of,givenCreate,get,is,assertThat,getCreateAsQuery],shouldCallSandboxOnClose->[any,onClose,get,createSandbox,givenCreateGetListener],shouldGetQueriesInsertingIntoOrReadingFromSource->[getInsertQueries,of,givenCr... | package for testing This test creates a QueryRegistryImpl object that can be used to test for proper access to. | Can we test the query gets removed from only the correct list here? It seems that would cover the case that was causing the the problem |
@@ -19,4 +19,8 @@ def run():
if __name__ == "__main__":
+ # First, let Pytorch's multiprocessing module know how to create child processes.
+ # Refer https://docs.python.org/3.7/library/multiprocessing.html#multiprocessing.set_start_method
+ torch.multiprocessing.set_start_method("spawn")
+
run()
| [run->[main],abspath,insert,dirname,get,basicConfig,join,run] | This is the main function of the interpreter. | Can you add a note to the Trainer that setting this is required if you aren't using allennlp as the entry point? |
@@ -238,12 +238,17 @@ class PCollectionVisualization(object):
display(HTML(html))
def _display_overview(self, data, update=None):
+ if (not data.empty and self._include_window_info and
+ all(column in data.columns
+ for column in ('event_time', 'windows', 'pane_info'))):
+ data = d... | [PCollectionVisualization->[_to_dataframe->[_to_element_list]],visualize->[dynamic_plotting]] | Displays the overview of the missing data. | What is happening in here in the next few lines? |
@@ -968,7 +968,7 @@ test_gurt_hash_empty(void **state)
/* Traverse the empty hash table and look for entries */
expected_count = 0;
rc = d_hash_table_traverse(thtab, test_gurt_hash_traverse_count_cb,
- &expected_count);
+ &expected_count);
assert_int_equal(rc, 0);
/* Get the first element in t... | [No CFG could be retrieved] | private static void test_gurt_hash_alloc_items ( int num_ Get the first non - null element in the table and look for the random entries. | (style) line over 80 characters |
@@ -271,8 +271,9 @@ class LocalPantsRunner(ExceptionSink.AccessGlobalExiterMixin):
spec_parser = CmdLineSpecParser(get_buildroot())
address_specs = [
- spec_parser.parse_address_spec(spec).to_spec_string()
+ spec_parser.parse_spec(spec).to_spec_string()
for spec in self._options.specs
+ ... | [LocalExiter->[exit->[exit]],LocalPantsRunner->[_run->[exit,_compute_final_exit_code,_maybe_run_v1,_maybe_handle_help,_maybe_run_v2],run->[wrap_global_exiter],create->[_maybe_init_graph_session,parse_options,_maybe_init_target_roots],_finish_run->[_update_stats]]] | Sets the start time of the last run of the pants build. | Does this need to be filtered? It's not clear that it does. The local variable is "address_specs", but I think that's only because everything was renamed to address_specs recently. |
@@ -91,6 +91,18 @@ public final class DefaultMetadataScopeAdapter implements MetadataScopeAdapter {
initializeFromClass(extensionElement, source, sourceDeclaration);
}
+ private Map<String, Supplier<? extends InputTypeResolver>> getInputResolvers(ParameterizedDeclaration<? extends BaseDeclaration> declaratio... | [DefaultMetadataScopeAdapter->[getCategoryName->[getCategoryName]]] | Initialize from annotation. | put this method below the new constructor |
@@ -80,7 +80,8 @@ define(['../Core/createGuid',
this._propertyNames = ['parent', 'position', 'orientation', 'billboard', //
'cone', 'ellipsoid', 'ellipse', 'label', 'path', 'point', 'polygon', //
- 'polyline', 'pyramid', 'vertexPositions', 'vector... | [No CFG could be retrieved] | Constructor for the object that is raised when a new property is assigned to an object. The ID of the object. | Nitpicky, but we should keep this array of property names in the same order as the actual properties. |
@@ -529,7 +529,7 @@ func confirmAction(c *clipkg.Context) bool {
prompt := NewTerminalPrompter()
var answer string
for {
- answer = prompt.Prompt("Are you sure? This action is irreversible! (yes/no)")
+ answer = prompt.Prompt("Are you sure? This action is irreversible! (yes/no) ")
if answer == "yes" {
re... | [Patch->[doRequest],Cookie->[Retrieve],Build->[PasswordPrompt,Prompt],Save->[cookiePath,String,WriteFile],Authenticate->[FindSessionCookie,ErrorIfCalling,Save,NewRequest,Do,NewEncoder,New,ClientNodeURL,Cookies,Encode,Set],Post->[doRequest],Initialize->[Println,SaveUser,NewUser,FindUser,PasswordPrompt,IsTerminal,Prompt]... | yes - > true. | Why add a space? |
@@ -2,11 +2,15 @@ package configdb
import (
"context"
-
- "github.com/cortexproject/cortex/pkg/configs/userconfig"
+ "errors"
"github.com/cortexproject/cortex/pkg/alertmanager/alerts"
"github.com/cortexproject/cortex/pkg/configs/client"
+ "github.com/cortexproject/cortex/pkg/configs/userconfig"
+)
+
+var (
+... | [ListAlertConfigs->[GetLatestConfigID,IsDeleted,GetAlerts]] | NewStore returns a concrete implementation of the interface. | I guess "local" should be "configdb". |
@@ -35,17 +35,6 @@
#include "ringct/rctOps.h"
#include "lmdb/db_lmdb.h"
-#ifdef BERKELEY_DB
-#include "berkeleydb/db_bdb.h"
-#endif
-
-static const char *db_types[] = {
- "lmdb",
-#ifdef BERKELEY_DB
- "berkeley",
-#endif
- NULL
-};
#undef MONERO_DEFAULT_LOG_CATEGORY
#define MONERO_DEFAULT_LOG_CATEGORY "block... | [No CFG could be retrieved] | This function returns a list of all possible versions of a single object. MONERO_DEFAULT_LOG_CATEGORY = MONERO_DEFAULT_LOG_CATEGORY ;. | I'd rather the selection mechanism stays. I've said that for quite a while, but since it seems nothing else is being added, maybe that could go. Anyone has an opinion here ? |
@@ -448,7 +448,7 @@ class StudentTest < ActiveSupport::TestCase
end
should 'create the group' do
- assert Group.first(:conditions => {:group_name => @student.user_name}), 'the group has not been created'
+ assert Group.where(:group_name => @student.user_name).first, 'the gr... | [StudentTest->[display_for_note,create,memberships_for,new,size,find,give_grace_credits,mock,pending_memberships_for,create_autogenerated_name_group,unhide_students,update_section,accepted_grouping_for,remaining_grace_credits,has_pending_groupings_for?,first_name,have_many,join,through,first,raises,assert_raise,name,as... | Checks that the user is in the group of the given assignment. Initializes the group assignment membership and group memberships. | Use the new Ruby 1.9 hash syntax. |
@@ -3278,7 +3278,7 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
((15.0 / 13.0) * (0.85 + mydata.invsize.Y));
}
-#ifdef __ANDROID__
+#ifdef HAVE_TOUCHSCREENGUI
// In Android, the preferred imgsize should be larger to accommodate the
// smaller screensize.
double prefer_imgsize = padd... | [parseLabel->[getElementBasePos,getRealCoordinateBasePos],parseList->[getElementBasePos,getRealCoordinateBasePos],parseScrollBar->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseItemImageButton->[getElementBasePos,getRealCoordinateGeometry,getRealCoordinateBasePos],parseScrollContainer->[get... | Regenerate GUI with data from the current form. - - - - - - - - - - - - - - - - - - formspec tooltip element This method is used to parse the formspec_string into the elements of the form. The coordinates are defined in the format of the image. | also an android/small screen thing |
@@ -345,7 +345,14 @@ class Jetpack_Sync_Module_Posts extends Jetpack_Sync_Module {
$just_published = true;
}
- call_user_func( $this->action_handler, $post_ID, $post, $update, $is_auto_save, $just_published );
+ if ( ! in_array( $post_ID, $this->just_trashed ) ) {
+ $just_trashed = false;
+ } else {
+ $... | [Jetpack_Sync_Module_Posts->[filter_post_content_and_add_links->[add_embed,remove_embed]]] | This function is used to insert a post into the database. This method is used to filter the post flags and actions that get synced when a post type. | `$just_trashed = ! in_array( $post_ID, $this->just_trashed )` |
@@ -1138,6 +1138,8 @@ namespace ProtoScript.Runners
void ReInitializeLiveRunner();
IDictionary<Guid, List<ProtoCore.Runtime.WarningEntry>> GetRuntimeWarnings();
IDictionary<Guid, List<ProtoCore.BuildData.WarningEntry>> GetBuildWarnings();
+ List<Guid> GetExecutedAstGuids(Guid sessionID... | [LiveRunner->[CompileAndExecute->[Compile,Execute],ApplyUpdate->[Execute,ApplyUpdate,ForceGC],Execute->[ReInitializeLiveRunner,SetupRuntimeCoreForExecution],CompileAndExecuteForDeltaExecution->[ResetForDeltaExecution,CompileAndExecute,PostExecution],SynchronizeInternal->[CompileAndExecuteForDeltaExecution,UpdateCachedA... | Get all the warnings that are present in the runtime and build data. | It seems like there's an opportunity for a read-only `IEnumerable<Guid>` here, unless I'm mistaken. |
@@ -129,6 +129,8 @@ type Config struct {
logger *zap.Logger
logProps *log.ZapProperties
+
+ EnableConfigManager bool
}
// NewConfig creates a new config.
| [MigrateDeprecatedFlags->[migrateConfigurationMap],Parse->[Parse],IsDefined->[IsDefined],Adjust->[CheckUndecoded,Parse,IsDefined,Validate,Child],parseDeprecatedFlag->[IsDefined],adjustLog->[IsDefined],adjust->[Validate,IsDefined],Parse] | NewConfig creates a new configuration object that can be used to create a new instance of the Required variables for the cluster configuration. | I think we can enable it by default. No need the config. If no client use it, the feature has no side effect. |
@@ -2862,7 +2862,7 @@ def _validate_type(item, types=None, item_name=None, type_name=None):
else types)
type_name = ', '.join(cls.__name__ for cls in iter_types)
if not isinstance(item, types):
- raise TypeError(item_name, ' must be an instance of ', type_name,
+ raise... | [set_config->[get_config_path,warn,_load_config],get_config->[get_config_path,_load_config],object_diff->[_sort_keys,object_diff],_load_config->[warn],object_size->[object_size],open_docs->[get_config],_get_stim_channel->[get_config],_fetch_file->[_get_http,warn],array_split_idx->[_ensure_int],deprecated->[_decorate_cl... | Validate that a given object is an instance of a specific type. Returns a string representation of a object. | why this change? and either way once we release we would be able to start using fstrings. |
@@ -419,7 +419,8 @@ class MemoryXmlReporter(AbstractReporter):
# XML doesn't like control characters, but they are sometimes
# legal in source code (e.g. comments, string literals).
# Tabs (#x09) are allowed in XML content.
- control_fixer = str.maketrans(''.join(chr(i) for i in range(32) if i != 9), ... | [MemoryXmlReporter->[on_file->[FileInfo],on_finish->[total,attrib]],CoberturaXmlReporter->[on_file->[FileInfo,CoberturaPackage,get_line_rate],on_finish->[add_packages,get_line_rate],__init__->[CoberturaPackage]],AnyExpressionsReporter->[_report_types_of_anys->[_write_out_report],_report_any_exprs->[_write_out_report]],... | Process a single node in a Mypy file. | How does this silence the warning in mypyc? Does `Final` make it compute the value at compile time? |
@@ -26,6 +26,7 @@ class RangeStabilityFilter(IPairList):
self._days = pairlistconfig.get('lookback_days', 10)
self._min_rate_of_change = pairlistconfig.get('min_rate_of_change', 0.01)
+ self._max_rate_of_change = pairlistconfig.get('max_rate_of_change', 0.99)
self._refresh_period = p... | [RangeStabilityFilter->[filter_pairlist->[deepcopy,refresh_latest_ohlcv,remove,_validate_pair_loc,utcnow],short_desc->[plural],__init__->[TTLCache,get,super,ohlcv_candle_limit,OperationalException],_validate_pair_loc->[daily_candles,get,plural,log_once]],getLogger] | Initialize the object. | i think the default for this should be None (obviously will need checking below before using this value). `max_rate_of_change` is new - and 0.99 is pretty tight considering how crypto-markets work... n the top 10 USDT volume pairs on binance, i get AXS/USDT with 2.7, ALICE/USDT with 3.0 and C98/USDT with a value of 38 ... |
@@ -243,7 +243,11 @@ func (u *userTSDB) PostCreation(metric labels.Labels) {
// PostDeletion implements SeriesLifecycleCallback interface.
func (u *userTSDB) PostDeletion(metrics ...labels.Labels) {
+ u.instanceSeriesCount.Sub(int64(len(metrics)))
+
for _, metric := range metrics {
+ fmt.Println("Deleted", metri... | [v2LabelValues->[Close,Querier],Head->[Head],v2QueryStreamChunks->[ChunkQuerier,Close],Blocks->[Blocks],Close->[Close],getMemorySeriesMetric->[Head],createTSDB->[Compact,Head,updateCachedShippedBlocks,setLastUpdate],PreCreation->[Head],v2LifecyclerFlush->[shipBlocks,compactBlocks],closeAllTSDB->[Close],v2QueryStreamSam... | PostDeletion is called after a series has been deleted from the database. | Ops... this should be removed. |
@@ -1362,7 +1362,10 @@ class UsersController < ApplicationController
user = fetch_user_from_params
topic = Topic.find(params[:topic_id].to_i)
- raise Discourse::InvalidAccess.new unless topic && guardian.can_feature_topic?(user, topic)
+ if !topic || !guardian.can_feature_topic?(user, topic)
+ re... | [UsersController->[destroy->[destroy],feature_topic->[update],admin_login->[create],notification_level->[update],update->[update],clear_featured_topic->[update],username->[username],read_faq->[read_faq],my_redirect->[username],check_username->[changing_case_of_own_username,check_username],create->[username],show_card->... | This action checks if a user has a feature topic and if so clears it. | Very minor suggestion - the guardian could check if `topic.nil?` so you are only checking one condition here, and if in the future someone else uses the guardian method it'll return false for this case too. |
@@ -70,6 +70,12 @@ public final class SmallRyeOpenApiConfig {
@ConfigItem(defaultValue = "true")
public boolean autoAddTags;
+ /**
+ * This will automatically add security based on the security extension included (if any).
+ */
+ @ConfigItem(defaultValue = "true")
+ public boolean autoAddSe... | [No CFG could be retrieved] | ConfigItem for all of the items in the security scheme. Optional of the OAuth2 implicit authorization url. | I don't see where it is referred to in the PR |
@@ -247,6 +247,8 @@ var config = {
// maintenance at 01:00 AM GMT,
// noticeMessage: '',
+ // Enables speech to text transcription subtitles panel.
+ disableTranscriptionSubtitles: false,
// Stats
//
| [No CFG could be retrieved] | Configures the given user - specified object as a user - specified object. Integration of a single object. | Sounds like this config value "disables" the subtitles. |
@@ -105,6 +105,12 @@
void Log(string message, LogLevel messageSeverity)
{
var context = ScenarioContext.Current;
+ if (context == null)
+ {
+ // avoid NRE in case something logs outside of a test scenario
+ Console.WriteLine(message);
+ ... | [ContextAppender->[InfoFormat->[Info],WarnFormat->[Warn],Fatal->[Fatal],ErrorFormat->[Error],FatalFormat->[Fatal],Info->[Info],Error->[Error],DebugFormat->[Debug],Warn->[Warn],Debug->[Debug]]] | Log a message with a specific severity. | An alternative would be to write to TestContext given that we already reference NUnit (as an alternative) |
@@ -116,10 +116,10 @@ public abstract class AbstractAggregator extends AbstractInterceptingMessageProc
return new Factory()
{
@Override
- public Object create()
+ public synchronized Object create()
{
ObjectStoreManager objectStoreManage... | [AbstractAggregator->[process->[process],setProcessedGroupsObjectStore->[internalProcessedGroupsObjectStoreFactory],disposeIfDisposable->[dispose],stop->[stop],start->[start],dispose->[dispose],setEventGroupsObjectStore->[internalEventsGroupsObjectStoreFactory]]] | This method creates a factory which creates a ProvidedPartitionableObjectStoreWrapper which opens the. | use an `AtomicInteger` for `currentId` instead synchronizing the whole method |
@@ -115,15 +115,12 @@ public class StatefulDoFnRunner<InputT, OutputT, W extends BoundedWindow>
@Override
public void onTimer(
String timerId, BoundedWindow window, Instant timestamp, TimeDomain timeDomain) {
- boolean isEventTimer = timeDomain.equals(TimeDomain.EVENT_TIME);
- Instant gcTime = window... | [StatefulDoFnRunner->[processElement->[processElement],startBundle->[startBundle],finishBundle->[finishBundle],onTimer->[dropLateData,onTimer],TimeInternalsCleanupTimer->[currentInputWatermarkTime->[currentInputWatermarkTime]]]] | onTimer - Called by TimerManager when a timer is received. | A event timer can never be late, but a process timer may be late. We need drop the late processTimer here. What do you think? @aljoscha |
@@ -614,11 +614,11 @@ public class TerritoryAttachment extends DefaultAttachment {
* Returns the collection of territories that make up the convoy route containing the specified
* territory or {@code null} if the specified territory is not part of a convoy route.
*/
- public static Set<Territory> getWhatTe... | [TerritoryAttachment->[getUnitProduction->[getUnitProduction,get],setChangeUnitOwners->[add],getWhatTerritoriesThisIsUsedInConvoysFor->[getConvoyRoute,get,add],setWhenCapturedByGoesTo->[add],setCaptureUnitOnEnteringBy->[add],getProduction->[getProduction,get],setConvoyAttached->[add],toStringForInfo->[getOriginalOwner,... | Get what territories this is used in convoys for a given territory. | Hmm, defining Set as return type usually implies that there are no duplicates, so I'd actually like to keep the interface defined as Set |
@@ -1510,6 +1510,7 @@ func ViewIssue(ctx *context.Context) {
canDelete = true
ctx.Data["DeleteBranchLink"] = issue.Link() + "/cleanup"
}
+ ctx.Data["CanWriteToHeadRepo"] = true
}
}
| [TeamReviewRequest,Status,LoadTime,GetIssueByIndex,QueryEscape,CanUserPush,Warn,IsPoster,Int64sToMap,CreateCommentReaction,ChangeProjectAssign,CanUseTimetracker,GetRefEndNamesAndURLs,CanEnablePulls,AddParam,IsErrDependenciesLeft,Redirect,Info,GetOwner,GetTreeEntryByPath,IsErrIssueNotExist,ChangeIssueRef,IsValidTeamRevi... | Invite a single issue to the user. GetUserRepoPermission - Get user repo permission and if it s allowed to merge or can. | This LOC looks a bit off to me. |
@@ -67,8 +67,8 @@ func trafficTargetValidator(req *admissionv1.AdmissionRequest) (*admissionv1.Adm
}
if trafficTarget.Spec.Destination.Namespace != trafficTarget.Namespace {
- return nil, errors.Errorf("The traffic target namespace (%s) must match spec.Destination.Namespace (%s)",
- trafficTarget.Namespace, tr... | [NewBuffer,ParseIP,Decode,New,ParseUint,ToLower,Errorf,ParseCIDR,NewDecoder,Split,TrimSpace] | FakeValidator returns an object that can be used to validate the object. Protocol - returns the protocol of the resource. | The previous change was perfectly fine. Adding error codes for validation errors isn't as important as control plane errors, because the user gets instant feedback when a resource fails the validation. |
@@ -181,7 +181,10 @@ def _plot_evoked(evoked, picks, exclude, unit, show,
' for interactive SSP selection.')
if isinstance(gfp, string_types) and gfp != 'only':
raise ValueError('gfp must be boolean or "only". Got %s' % gfp)
-
+ if cmap == 'interactive':
+ cmap = ('Rd... | [plot_evoked_joint->[plot_evoked_joint,_connection_line,_plot_evoked],plot_evoked_image->[_plot_evoked],_plot_evoked_white->[whitened_gfp],plot_evoked->[_plot_evoked],_plot_evoked->[_plot_legend,_rgb]] | Plot a single - channel . Returns a list of index strings for a . Plots a single on a given axes. Plots the missing - block block chains. Plots a single missing block in the plot. Plots the missing key object on the axes. | shouldn't it be (None, True) to guess the good default? |
@@ -755,7 +755,16 @@ namespace System.Collections.Concurrent
}
}
}
+
+ if (waitForSemaphoreWasSuccessful)
+ {
+ Debug.Assert(item != null);
+ }
+
+#pragma warning disable CS8762
+ // Compiler can't automaticall... | [No CFG could be retrieved] | Adds the specified item to any of the specified collections. Maximum size of . | __Open question:__ I'm not sure if this assertion is actually correct. Is it possible to have - say - `BlockingCollection<string?>`? If that's legal, we should remove this assert. |
@@ -89,7 +89,7 @@ public class BigQueryInterpreter extends Interpreter {
static final String PROJECT_ID = "zeppelin.bigquery.project_id";
static final String WAIT_TIME = "zeppelin.bigquery.wait_time";
static final String MAX_ROWS = "zeppelin.bigquery.max_no_of_rows";
- static final String LEGACY_SQL = "zeppel... | [BigQueryInterpreter->[getPages->[PageIterator->[remove->[next]],PageIterator],run->[getPages],executeSql->[printRows,next,hasNext],cancel->[cancel],interpret->[executeSql]]] | This class is used to interpret a single in the BigQuery database. This class is used to interrogate the BigQuery interpreter interface. | removing a config would break existing users- how about adding the new sql_dialect but also keep the use_legacy_sql one? |
@@ -381,6 +381,12 @@ public class KsqlConfig extends AbstractConfig implements Cloneable {
DEFAULT_EXT_DIR,
ConfigDef.Importance.LOW,
"The path to look for and load extensions such as UDFs from."
+ ).define(
+ KSQL_INTERNAL_TOPIC_REPLICAS_PROPERTY,
+ T... | [KsqlConfig->[buildConfigDef->[defineLegacy,defineCurrent],ConfigValue->[isResolved->[isResolved]],buildStreamingConfig->[applyStreamsConfig],getAllConfigPropsWithSecretsObfuscated->[getKsqlConfigPropsWithSecretsObfuscated],overrideBreakingConfigsWithOriginalValues->[KsqlConfig],cloneWithPropertyOverwrite->[KsqlConfig,... | Builds the config definition for the given generation. Determines whether or not custom UDFs should be loaded. | I know this would be a change of behavior, but I feel like we should increase the default replication to 2 or 3, or have some guidelines (linked here) for configuring production deployments of KSQL. We don't want a user losing their query data if they worked hard to get them up and running. |
@@ -38,6 +38,17 @@ namespace System.Windows.Forms.Tests
Assert.Throws<ArgumentNullException>("ownerItem", () => new ToolStripItem.ToolStripItemAccessibleObject(null));
}
+ [WinFormsFact]
+ public void ToolStripItemAccessibleObject_IsPatternSupported_LegacyIAccessible_ReturnsTrue()
... | [ToolStripItemAccessibleObjectTests->[ToolStripItemAccessibleObject_Ctor_NullOwnerItem_ThrowsArgumentNullException->[Assert],ToolStripItemAccessibleObject_Ctor_ToolStripItem->[Bounds,Role,Equal,DefaultAction,Help,KeyboardShortcut,MenuBar,Empty,Description,Name,Null,Parent,Focusable,State]]] | Checks that a ToolStripItem. ToolStripItemAccessibleObject is not null. | Please check if there is a test for GetPropertyValue-Name |
@@ -93,7 +93,8 @@ class ProductionPanel extends JPanel {
final GameData data,
final boolean bid,
final IntegerMap<ProductionRule> initialPurchase) {
- dialog = new JDialog(parent, "Produce", true);
+ final private String title = bid ? "Produce (bid)" : "Produce";
+ dialog = new JDialog(par... | [ProductionPanel->[show->[getProduction],Rule->[changedValue->[calculateLimits],setMax->[setMax]],calculateLimits->[setLeft],getResources->[getResources]]] | Display a generation dialog. | the 'private' modifier is a syntax error, this variable is scoped to the constructor. You could simply omit the 'private' modifier, or (my preference) just inline the ternary expression and avoid the intermediate variable. |
@@ -371,6 +371,7 @@ func (p *pod) containerPodEvents(flag string, pod *kubernetes.Pod, c *containerI
// Information that can be used in discovering a workload
kubemetaMap, _ := meta.GetValue("kubernetes")
+
kubemeta, _ := kubemetaMap.(common.MapStr)
kubemeta = kubemeta.Clone()
kubemeta["annotations"] = anno... | [publishAll->[publishAll],GenerateHints->[GenerateHints],Stop->[Stop],Start->[Start]] | containerPodEvents returns a list of events for a container in the pod Network information is only available if the container is running. | If not intentional please revert it. |
@@ -51,7 +51,7 @@ class PluginClassLoader
Iterable<String> spiResources)
{
// plugins should not have access to the system (application) class loader
- super(urls.toArray(new URL[0]), getSystemClassLoader().getParent());
+ super(urls.toArray(new URL[0]), getPlatformClassLoader()... | [PluginClassLoader->[duplicate->[PluginClassLoader],getResources->[getResources],loadClass->[loadClass],withUrl->[PluginClassLoader],resolveClass->[resolveClass],getResource->[getResource]]] | Creates a class loader that can load a class from a list of URLs. Load a class locally. | Can you add an explanation to the commit message? This is lacking context. |
@@ -42,8 +42,16 @@ public class RestoreOptions {
@SuppressWarnings("unused") // Accessed via reflection
@Option(
- name = {"--yes", "-y"},
- description = "Automatic \"yes\" as answer to prompt and run non-interactively.")
+ name = {"--skip-incompatible-commands", "-s"},
+ description = "Thi... | [RestoreOptions->[getBackupFile->[File],getConfigFile->[File],parse->[parse]]] | Creates a new instance of RestoreOptions that can be used to restore a KSQL metadata. | Doesn't this need the `@SuppressWarnings("unused") // Accessed via reflection` too? |
@@ -40,5 +40,7 @@ func NewRegistry() *registry {
providers: make(map[string]ProviderBuilder, 0),
builders: make(map[string]BuilderConstructor, 0),
appenders: make(map[string]AppenderBuilder, 0),
+
+ logger: logp.NewLogger("autodiscover"),
}
}
| [No CFG could be retrieved] | Returns a new instance of the class. | Nit: Seems like this newline is intentional? |
@@ -157,12 +157,11 @@ public class RatisPipelineProvider implements PipelineProvider {
new CreatePipelineCommand(pipeline.getId(), pipeline.getType(),
factor, dns);
- dns.stream().forEach(node -> {
- final CommandForDatanode datanodeCommand =
- new CommandForDatanode<>(node.getU... | [RatisPipelineProvider->[shutdown->[awaitTermination,shutdownNow,error],close->[ClosePipelineCommand,fireEvent,info,getUuid,getDatanodeId,getId,forEach],create->[fireEvent,getNodes,size,InsufficientDatanodesException,toList,build,info,getUuid,getType,getDatanodeId,getNumber,format,collect,addAll,forEach,CreatePipelineC... | Create a new pipeline with a random node. | Since we explicitly call group.add this log message seems out of date, maybe it should say: "Adding datanode {} to pipeline {}" |
@@ -418,7 +418,7 @@ class AccountViewSet(RetrieveModelMixin, UpdateModelMixin, DestroyModelMixin,
def self_view(self):
return (
self.request.user.is_authenticated() and
- self.get_object() == self.request.user)
+ self.kwargs.get('pk') == self.request.user.pk)
@pro... | [login_user->[update_user],LoginStartBaseView->[get->[get_fxa_config,get]],render_error->[fxa_error_message],AccountSuperCreate->[post->[get]],ProfileView->[get->[AccountViewSet]],FxAConfigMixin->[get_fxa_config->[get_allowed_configs,get_config_name]],with_user->[outer->[inner->[find_user,render_error,parse_next_path]]... | Checks if the user is allowed to view the object. | you can't do this. `get_object()` does permission checks and `self.kwargs.get('pk')` might not be the `id` - it might be a username instead. |
@@ -7,6 +7,8 @@ package operation
import (
"context"
+ "github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/core/plugin/state"
+
"github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/errors"
"github.com/elastic/beats/v7/x-pack/elastic-agent/pkg/agent/operation/config"
"github.com/elastic/beats/v7/x-pa... | [Run->[OnFailing,M,Name,New,Configure],New] | Construct a new instance of operationConfig. region MetaKeyConfig API. | mage fmt should keep things together |
@@ -1,4 +1,9 @@
module LeftMenuBarHelper
+
+ def dashboard_are_selected?
+ controller_name == 'dashboards'
+ end
+
def projects_are_selected?
controller_name.in? %w(projects experiments my_modules)
end
| [settings_are_selected?->[in?],projects_are_selected?->[in?]] | Checks if a node is selected by the user. | Layout/EmptyLinesAroundModuleBody: Extra empty line detected at module body beginning. |
@@ -144,10 +144,11 @@ class UserAdmin(admin.ModelAdmin):
ActivityLog.create(amo.LOG.ADMIN_USER_PICTURE_DELETED, obj)
obj.delete_picture()
+ kw = {'user': force_text(obj)}
self.message_user(
request, ugettext(
'The picture belonging to user "%(user)s" has... | [UserAdmin->[activity->[related_content_link],collections_created->[related_content_link],ratings_created->[related_content_link],addons_created->[related_content_link],get_urls->[wrap],abuse_reports_for_this_user->[related_content_link],abuse_reports_by_this_user->[related_content_link]]] | Delete a specific user s picture. | If it's the extraction recognising `'user'` as a string, could do `dict(user=force_text(obj))` instead of moving `kw` out - that wouldn't require line number changes in the .po files either. |
@@ -15,12 +15,10 @@ def create_account(email: 'joe.smith@email.com', password: 'salty pickles', mfa_
user = User.create!(email: email)
user.skip_confirmation!
user.reset_password(password, password)
- user.phone = mfa_phone || phone
- user.phone_confirmed_at = Time.zone.now
user.save!
user.create_phone... | [create_accounts_from_csv->[exists?,downcase,parse,present?,create_account,read,warn,each,require,puts,push],create_account->[create,phone,new,create!,warn,encrypt_pii,phone_confirmed_at,save!,otp_delivery_preference,fingerprint,verified_at,reset_password,activate,rjust,now,id,skip_confirmation!,find_by,new_from_hash,d... | create a new user account. | Did you mean `Time.zone.now` without `user.` before it? |
@@ -1,4 +1,6 @@
class EmailMessage < Ahoy::Message
+ belongs_to :feedback_message, optional: true
+
# So far this is mostly used to be compatible with administrate gem,
# which doesn't seem to play nicely with namespaces. But there could be other
# reasons to define behavior here, similar to how we use the T... | [EmailMessage->[find_for_reports->[where],body_html_content->[index]]] | Returns the next Nokogiri body HTML content or nil if there is no body. | If I understood the code correctly an email message can optionally only belong to a feedback message |
@@ -37,7 +37,11 @@ class JitsiLocalStorage extends DummyLocalStorage {
let storage;
try {
- storage = window.localStorage;
+ if (this.isIFrame()) {
+ storage = top.localStorage;
+ } else {
+ storage = window.localStorage;
+ }
... | [No CFG could be retrieved] | A wrapper class for the local storage object. Returns the number of times the user has requested to enter the current state. | Why would you want to do this? Basically this will attempt to use the localStorage of the parent page isn't it? I think the try catch would gracefully handle the error. Isn't it am I missing something? |
@@ -198,7 +198,7 @@ class Serve(Subcommand):
server_kwargs = { key: getattr(args, key) for key in ['port',
'address',
- 'keep_alive']
+ ... | [Serve->[invoke->[show_callback->[show,keys],add_callback,upper,keys,getattr,start,basicConfig,len,sorted,Server,info,Application,build_single_handler_applications],dict,nice_join],getLogger,format,nice_join] | Invoke the server with a single application. | I'll be honest I'm not fond of these kwargs dict constructions they seem quite fraglie. |
@@ -211,10 +211,10 @@ describe ServiceProvider do
describe '#block_encryption' do
context 'when no value is specified in YAML' do
- it 'returns "none"' do
+ it 'returns "aes256-cbc"' do
service_provider = ServiceProvider.new('http://test.host')
- expect(service_provider.block_encry... | [it_behaves_like,to,include,context,new,root,describe,before,shared_examples,eq,read,it,require,and_return] | returns a description of the object It returns a hex digest and returns a hardcoded value. | should we maybe just change this to `returns ServiceProvider::DEFAULT_ENCRYPTION` to make it more evergreen? |
@@ -110,6 +110,17 @@ func (p *Provider) addWatcher(pool *safe.Pool, directory string, configurationCh
case <-ctx.Done():
return
case evt := <-watcher.Events:
+ if evt.Op == fsnotify.Remove {
+ err = watcher.Remove(evt.Name)
+ if err != nil {
+ log.WithoutContext().WithField(log.ProviderName... | [watcherCallback->[BuildConfiguration],loadFileConfigFromDirectory->[loadFileConfigFromDirectory,loadFileConfig]] | addWatcher creates a file watcher and adds it to the pool. | Do we want to add the directory name to the error message ("Could not re-add watcher for %s: %s"), or does it already show up within err itself? |
@@ -380,7 +380,8 @@ class IDisplay(zope.interface.Interface):
"""Generic display."""
# see https://github.com/certbot/certbot/issues/3915
- def notification(message, pause, wrap=True, force_interactive=False):
+ def notification(message, pause, wrap=True, force_interactive=False,
+ ... | [IConfig->[Attribute],AccountStorage->[save->[NotImplementedError],load->[NotImplementedError],find_all->[NotImplementedError]],IPluginFactory->[Attribute],IReporter->[Attribute],add_metaclass] | Displays a message to display a sequence number that is not yet registered. | Agh. If we add the option to the *interface*, I think that means we'll have to go 2.0 (because then implementers will either have to add an `unused_kwargs` argument like we do in non-interactive file display, or specifically add `decorate` to the method signature). Which we could. Or we could just not add it to the int... |
@@ -566,17 +566,7 @@ namespace System.Tests
time1utc = new DateTime(2006, 12, 31, 15, 59, 59, DateTimeKind.Utc);
time1 = new DateTime(2006, 12, 31, 15, 59, 59);
- if (s_isWindows)
- {
- // ambiguous time between rules
- // this is not ideal... | [TimeZoneInfoTests->[ConvertTimeFromUtc->[ConvertTimeFromUtc],ConvertTime_DateTime_LocalToSystem->[ConvertTime],VerifyConvertToUtcException->[ConvertTimeToUtc],ConvertTimeFromToUtc_UnixOnly->[ConvertTimeToUtc,ConvertTimeFromUtc,Kind],GetSystemTimeZones->[GetSystemTimeZones],ConvertTimeBySystemTimeZoneIdTests->[ConvertT... | ConvertTime_DateTime_PerthRules - Convert time rules in time_str_per region Private API Functions region Private Methods. | This fix is also fixing an existing bug for Perth, right? |
@@ -74,7 +74,10 @@ class ModelPartController:
if self.model_settings["damping"]["apply_damping"].GetBool():
self.__IdentifyDampingRegions()
- self.damping_utility = KSO.DampingUtilities(self.design_surface, self.damping_regions, self.model_settings["damping"])
+ if not self... | [ModelPartController->[__ImportOptimizationModelPart->[SetMinimalBufferSize],Initialize->[Initialize],UpdateMeshAccordingInputVariable->[UpdateMeshAccordingInputVariable]]] | Initialize the object. | As said below, I would initiate it anyway? |
@@ -0,0 +1,14 @@
+import torch
+from nni.nas.pytorch.mutator import Mutator
+from nni.nas.pytorch.mutables import LayerChoice
+
+
+class NASBench201Mutator(Mutator):
+ def reset(self, matrix):
+ result = dict()
+ for mutable in self.mutables:
+ if isinstance(mutable, LayerChoice):
+ ... | [No CFG could be retrieved] | No Summary Found. | We don't need a mutator here. |
@@ -11,9 +11,11 @@
# have received a copy of GPLv2 along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
-import mock
import unittest
+import mock
+from pymongo.errors import DuplicateKeyError
+
from pulp.plugins.conduits import mixins
from pulp.plugins.model import Unit... | [RepoScratchpadReadMixinTests->[test_get_repo_scratchpad->[assertEqual,get_repo_scratchpad],setUp->[RepoScratchpadReadMixin,initialize],patch],RepoScratchPadMixinTests->[test_set_repo_scratchpad_server_error->[assertRaises,Exception],test_get_repo_scratchpad_server_error->[assertRaises,Exception],setUp->[RepoScratchPad... | Tests that a repository s scratchpad is available on the server. Set repo scratchpad and update scratchpad. | The 'pulp.server.plugins.conduits.mixins.DuplicateKeyError' could be mocked so that the test runner doesn't require this third party dependency. This is something I've learned with the Celery work because asksolem believes that unit test environments should not require third party dependencies. |
@@ -440,11 +440,11 @@ namespace System.Net.WebSockets.Tests
int frameSize = 2 << windowBits;
byte[] message = new byte[frameSize * 10];
- Random random = new(0);
+ new Random(0).NextBytes(message);
for (int i = 0; i < message.Length; ++i)
{
-... | [WebSocketDeflateTests->[ValueTask->[AsMemory,DisableCompression,SendAsync,GetBytes,EndOfMessage,Text],Task->[AsMemory,Message,Count,CreateFromStream,Span,AsTask,False,SendAsync,Close,InRange,Slice,CloseStatus,Binary,ProtocolError,DisableCompression,AsSpan,Min,Empty,SequenceEqual,Assert,SetLength,GetBytes,EndOfMessage,... | The payload should have similar size when split into segments. | What about also using a less eager cancelation token since you suspect it's hanging. As a rule of thumb, I never have a test time out sooner than 30 seconds. I have seen tests that normally take a few 100ms end up taking 10 seconds on some hardware / with other tests running. 5 seconds is aggressive. |
@@ -537,7 +537,7 @@ export class AmpSelector extends AMP.BaseElement {
selectionKeyDownHandler_(event) {
const {key} = event;
if (key == Keys.SPACE || key == Keys.ENTER) {
- if (this.elements_.includes(event.target)) {
+ if (this.elements_.includes(dev().assertElement(event.target))) {
e... | [No CFG could be retrieved] | Handles keyboard selection events. Private methods for the class that implements the logic for the selected options. | I am not convinced `event.target` can't be null here in legit cases. `includes` don't accept `null`-able`? seems |
@@ -122,7 +122,15 @@ public class DownloadAndImportReplicator implements ContainerReplicator {
containerID, bytes);
task.setTransferredBytes(bytes);
- importContainer(containerID, path);
+ if (bytes <= 0) {
+ task.setStatus(Status.FAILED);
+ LOG.warn("Containe... | [DownloadAndImportReplicator->[importContainer->[importContainer],replicate->[importContainer]]] | This method is called when a task is replicated. It checks if the task has a . | This would overwrite previous `FAILED` status. |
@@ -472,6 +472,7 @@ class MultiStepCombine<
ctxt.createBundle(
(PCollection<KV<K, OutputT>>)
Iterables.getOnlyElement(application.getOutputs().values()));
+ combineFn.setup();
}
@Override
| [MultiStepCombine->[MergeAccumulatorsAndExtractOutputEvaluator->[processElement->[getKey,of],getCombineFn],expand->[of],CombineInputs->[outputAccumulators->[of],processElement->[create]],WindowedStructuralKey->[getKey->[getKey],create->[of],equals->[equals]]]] | Process an element in the window. | I would prefer to not do real work in a constructor. Can this be done with lazy init in processElement? Have you taken a look at how DoFn setup and teardown are managed with a loading cache in the directrunner? |
@@ -93,9 +93,7 @@ public class DiskFileUpload extends AbstractDiskHttpData implements FileUpload {
@Override
public void setContentType(String contentType) {
- if (contentType == null) {
- throw new NullPointerException("contentType");
- }
+ ObjectUtil.checkNotNull(contentTyp... | [DiskFileUpload->[copy->[copy],duplicate->[duplicate],equals->[equals],compareTo->[getHttpDataType,compareTo],hashCode->[hashCode],retain->[retain],touch->[touch],retainedDuplicate->[retainedDuplicate],replace->[getFilename,getContentType,getContentTransferEncoding,DiskFileUpload]]] | Sets the content type of the response. | consider merging both lines |
@@ -27,6 +27,15 @@ class AttributeValueDescriptions:
SLUG = "Internal representation of a value (unique per attribute)."
TYPE = "Type of value (used only when `value` field is set)."
FILE = "Represents file URL and content type (if attribute value is a file)."
+ VALUE = (
+ "Represent value of ... | [No CFG could be retrieved] | The most important fields are used in the attribute value. | `VALUE` is already defined here. |
@@ -688,3 +688,17 @@ def validate_variants_in_checkout_lines(lines: Iterable["CheckoutLineInfo"]):
)
}
)
+
+
+def set_app_shipping_id(checkout: Checkout, app_shipping_id: str):
+ checkout.store_value_in_private_metadata(
+ {PRIVATE_META_APP_SHIPPING_ID: app_shipping_id}
... | [change_shipping_address_in_checkout->[_check_new_checkout_address],add_voucher_to_checkout->[get_voucher_discount_for_checkout],get_prices_of_discounted_specific_product->[get_discounted_lines],add_variant_to_checkout->[check_variant_in_stock],get_voucher_discount_for_checkout->[_get_products_voucher_discount,_get_shi... | Validate that there are no unavailable variants in the line. | In most places we call it "external shipping", here we call it "app shipping". Shouldn't we call it everywhere "external shipping"? There should be one name for this entire concept. |
@@ -74,8 +74,8 @@ export class IframeMessagingClient {
* @param {Object=} opt_payload The payload of message to send.
*/
sendMessage(type, opt_payload) {
- this.hostWindow_.postMessage/*OK*/(
- serializeMessage(type, this.sentinel_, opt_payload), '*');
+ this.hostWindow_.postMessage/*OK*/(seria... | [No CFG could be retrieved] | This function is called when a message with type responseType is received. Checks if a message is not a window or a message is not a window. | I get that rtvVersion_ is required sometimes to keep loading files of same version. But is it always required. Should we make it optional? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.