patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -68,7 +68,8 @@ public class EmptyStreamAssertionTest implements Serializable {
.apply(Window.<String>into(FixedWindows.of(windowDuration)));
try {
- PAssertStreaming.runAndAssertContents(pipeline, output, new String[0]);
+ PAssertStreaming.runAndAssertContents(pipeline, output, new Stri... | [EmptyStreamAssertionTest->[testAssertion->[assertTrue,create,getMessage,of,getBatchIntervalMillis,equals,RuntimeException,apply,runAndAssertContents,Duration,into,withTmpCheckpointDir,fail],TemporaryFolder,SparkTestPipelineOptionsForStreaming]] | Test if the pipeline has a sequence of strings. | 4 spaces indentation for new line. |
@@ -192,7 +192,10 @@ public:
ticket->SaveToDB(trans);
sTicketMgr->UpdateLastChange();
- std::string msg = ticket->FormatMessageString(*handler, nullptr, ticket->GetAssignedToName().c_str(), nullptr, nullptr);
+ std::string msg = [&] {
+ std::string const assignedName = ticke... | [ticket_commandscript->[bool->[GetTicket,uint32,SetResolvedBy,SendSysMessage,FormatMessageString,SetComment,atoi,SendResponse,IsCompleted,SendTicket,SetViewed,SetUnassigned,GetPlayerAccountIdByGUID,SendGlobalGMSysMessage,ShowList,SetAssignedTo,strtok,RemoveTicket,IsAssignedTo,AppendResponse,GetSession,c_str,ShowEscalat... | Handle GMT ticket comment command. | There's no reason to use a lambda here. |
@@ -519,7 +519,7 @@ class TestStridedSliceAPI(unittest.TestCase):
np.random.randn(2, 10), place=paddle.CUDAPinnedPlace())
self.assertTrue(x.place.is_cuda_pinned_place())
y = x[:, ::2]
- self.assertFalse(x.place.is_cuda_pinned_place())
+ self.assertTrue(x.... | [TestStridedSliceOp_ends_ListTensor->[config->[strided_slice_native_forward],setUp->[config]],TestStrideSliceOp->[setUp->[strided_slice_native_forward]],TestStridedSliceOp_strides_Tensor->[config->[strided_slice_native_forward],setUp->[config]],TestStridedSliceOp_listTensor_Tensor->[config->[strided_slice_native_forwar... | Test that the tensor is in a CUDA pinned place. | Why x.place changed? |
@@ -83,7 +83,7 @@ class Node(object):
# on this node. It includes regular (not private and not build requires) dependencies
self._transitive_closure = OrderedDict()
self.inverse_closure = set() # set of nodes that have this one in their public
- self.ancestors = None # set{ref.name}
... | [DepsGraph->[_inverse_closure->[inverse_neighbors,add],nodes_to_build->[ordered_iterate],build_order->[_inverse_closure,collapse_graph],_order_levels->[neighbors,sort,inverse_neighbors],new_build_order->[add],add_node->[add],add_edge->[Edge,add_edge],collapse_graph->[DepsGraph,add_node,partial_copy,add_edge]],Node->[__... | Initialize a new object with the given parameters. | I am not convinced this will not create an infinite loop of dependencies. |
@@ -407,6 +407,17 @@ namespace System.Globalization
return;
}
+ if (GlobalizationMode.Invariant)
+ {
+ if (value.ID == CalendarId.GREGORIAN)
+ {
+ calendar = value;
+ ... | [DateTimeFormatInfo->[GetAbbreviatedEraName->[GetEraName],InternalGetMonthName->[InternalGetMonthNames,InternalGetAbbreviatedMonthNames],GetAbbreviatedDayName->[InternalGetAbbreviatedDayOfWeekNames],GetDayName->[InternalGetDayOfWeekNames],InsertHash->[InsertAtCurrentHashNode],Clone->[Clone],SetAllDateTimePatterns->[OnY... | Replies the calendar set of the given calendar object. The default values for the n - th item in the system data. These values are not. | >; [](start = 40, length = 1) I think we still need to clear the DTFI settable properties which is affected by the calendar like dateSeparator for instance. otherwise the calendar setting could not reflect on such properties. |
@@ -34,15 +34,14 @@ class Endrun extends OS implements OSDiscovery
public function discoverOS(Device $device): void
{
if (Str::contains($device->sysDescr, 'Sonoma')) {
- $info = snmp_get_multi($this->getDeviceArray(), ['gntpVersion.0', 'snmpSetSerialNo.0'], '-OQUs', 'SONOMA-MIB:SNMPv2-MIB'... | [Endrun->[discoverOS->[getDeviceArray]]] | Discovers the OS and version of a device. | If both contain gntpVersion or snmpSetSerialNo, it will only resolve the oid from the first listed. It will not try one than the other. So likely your change here is not doing anything and can be reverted. |
@@ -1560,6 +1560,16 @@ class BaseEpochs(ProjMixin, ContainsMixin, UpdateChannelsMixin, ShiftTimeMixin,
self._set_times(self.times[tmask])
self._raw_times = self._raw_times[tmask]
self._data = self._data[:, :, tmask]
+
+ # Adjust rejection period
+ if self.reject_tmin is not None... | [BaseEpochs->[equalize_event_counts->[drop,drop_bad],plot_drop_log->[plot_drop_log],_get_data->[_get_epoch_from_raw,_detrend_offset_decim,_is_good_epoch,_project_epoch],drop_bad->[_reject_setup],get_data->[_get_data],crop->[_set_times],to_data_frame->[copy,get_data],reset_drop_log_selection->[_check_consistency],__init... | Crop a time interval from the epochs. | Do we actually need to warn for this? I think `logger.info` is probably more appropriate when cropping. |
@@ -236,6 +236,7 @@ Rails.application.routes.draw do
resources :podcasts, only: %i[new create]
resources :article_approvals, only: %i[create]
resources :video_chats, only: %i[show]
+ resources :email_signups, only: %i[create]
namespace :followings, defaults: { format: :json } do
get :users
get :t... | [new,authenticate,authenticated,redirect,devise_scope,mount,draw,freeze,has_role?,resources,member,root,use,scope,post,set,controllers,require,secrets,class_eval,use_doorkeeper,resource,patch,devise_for,each,production?,delete,namespace,collection,get,session_options,tech_admin?,app] | Resources for all of the variants. This is a list of all the listings that are in the feed. | I will likely exclude this route and maybe more from the service worker in a later PR once we sort out exactly how we're going to do the author's view. |
@@ -34,6 +34,18 @@ angular
return note;
});
+ if ($scope.notes.length === 0) {
+ $scope.isResult = false;
+ } else {
+ $scope.isResult = true;
+ }
+
+ var routeChangeEvent = $rootScope.$on('$routeChangeStart', function (event, next, current) {
+ if (next.originalPath !== '/searc... | [No CFG could be retrieved] | The main controller for the n - th n - th n - th n - th n A cite mensagem. | I wonder, why do you recursively call `routeChangeEvent` here? |
@@ -104,3 +104,18 @@ def get_taxed_shipping_price(shipping_price, taxes):
if not charge_taxes_on_shipping():
taxes = None
return apply_tax_to_price(taxes, DEFAULT_TAX_RATE_NAME, shipping_price)
+
+
+def price(base: Union[TaxedMoney, TaxedMoneyRange], display_gross=None) -> Money:
+ """Return price... | [apply_tax_to_price->[apply_tax_to_price],get_taxed_shipping_price->[apply_tax_to_price,charge_taxes_on_shipping],get_taxes_for_address->[get_taxes_for_country]] | Calculate shipping price based on settings and taxes. | As it is not a type itself but a convertion, wouldn't that be better to add at least a verb? > get_display_price Or something like this? |
@@ -47,7 +47,8 @@ public class RegisteredLookupExtractionFn implements ExtractionFn
@JsonProperty("retainMissingValue") final boolean retainMissingValue,
@Nullable @JsonProperty("replaceMissingValueWith") final String replaceMissingValueWith,
@JsonProperty("injective") final boolean injective,
- ... | [RegisteredLookupExtractionFn->[getCacheKey->[getCacheKey,getLookup],ensureDelegate->[getReplaceMissingValueWith,isInjective,isRetainMissingValue,isOptimize],equals->[isRetainMissingValue,equals,isOptimize,isInjective,getLookup,getReplaceMissingValueWith],preservesOrdering->[preservesOrdering],hashCode->[isRetainMissin... | Package for retrieving and extraction of a single missing value. Check if a node id is a unique identifier. | This should be numKeys, I think |
@@ -275,7 +275,7 @@ export default class ScanLndInvoice extends React.Component {
ScanLndInvoice.propTypes = {
navigation: PropTypes.shape({
- goBack: PropTypes.function,
+ dismiss: PropTypes.function,
navigate: PropTypes.function,
getParam: PropTypes.function,
state: PropTypes.shape({
| [No CFG could be retrieved] | Required by the component that is able to find the object. | I always wondered. What is this thing in the end of every screen? how does it help..? |
@@ -60,6 +60,17 @@ type PlanSummary interface {
Sames() map[resource.URN]bool
}
+// PlanPendingOperationsError is an error returned from `NewPlan` if there exist pending operations in the
+// snapshot that we are preparing to operate upon. The engine does not allow any operations to be pending
+// when operating o... | [GetProvider->[GetProvider],IsRefresh->[IsRefresh],generateURN->[Target],SignalCancellation->[SignalCancellation]] | is an interface that can be used to hook interesting engine and planning events. A simple helper to create a new instance of the class. | Nit: can we standardize on `InFlight` or `Pending`? My preference is for the latter, but all I really care about is that we pick one term in strings that might end up being displayed to a user. |
@@ -465,8 +465,10 @@ def _prepare_for_forward(src, mri_head_t, info, bem, mindist, n_jobs,
raise RuntimeError('No MEG or EEG channels found.')
# pick out final info
+ comps, info['comps'] = info['comps'], [] # avoid picking errors
info = pick_info(info, pick_types(info, meg=meg, eeg=eeg, ref_me... | [_prep_meg_channels->[_read_coil_defs,_create_meg_coils],_create_meg_coils->[_read_coil_defs,_create_meg_coil],_create_eeg_els->[_create_eeg_el],make_forward_solution->[_prepare_for_forward],make_forward_dipole->[make_forward_solution],_prep_eeg_channels->[_create_eeg_els],_prepare_for_forward->[_prep_meg_channels,_pre... | Prepare for forward computation. Get the n - th MEG or N - th EEG channel and the information Missing - returns a list of all MegCoils compcoils bemco. | I'm torn here. I like backward compatibility and comps have been retained in `fwd.info` till now. However, this code will create an `info` object that will not pass `info._check_consistency()` in comp matrices are present causing potential issues on reading/writing or other serializations. |
@@ -1,4 +1,4 @@
-import imp
+from importlib import invalidate_caches, util
import inspect
import os
import sys
| [parse_conanfile->[_parse_module],ConanFileLoader->[load_named->[load_basic_module],load_consumer->[load_named],load_conanfile->[load_basic_module],load_export->[load_named]]] | Creates a object from a conan file. Load and populate the required fields from the conanfile. | `util` import is a generic name, please, rename it as `imp_util` or another more specific one |
@@ -60,14 +60,11 @@ abstract class WidgetController extends Controller
public function __invoke(Request $request)
{
$this->show_settings = (bool) $request->get('settings');
+ $settings = $this->getSettings();
if ($this->show_settings) {
$view = $this->getSettingsView($r... | [WidgetController->[__invoke->[getSettingsView,getView]]] | Invoke the action. | I think the intention here was to avoid fetching settings when they are not needed. However, it doesn't look like the code succeeds at that, perhaps it was changed after the fact. |
@@ -45,8 +45,8 @@ class Notification < ApplicationRecord
handle_asynchronously :send_to_followers
def send_new_comment_notifications(notifiable)
- user_ids = notifiable.ancestors.map(&:user_id).to_set
- user_ids.add(notifiable.commentable.user.id) if user_ids.empty?
+ user_ids = notifiable.an... | [Notification->[article_data->[path,updated_at,cached_tag_list_array,title,id],update_notifications->[json_data,id,send,downcase,where,blank?,update_all,name],send_push_notifications->[publish,strip!,size,unescapeHTML],send_tag_adjustment_notification->[article,path,status,reason_for_adjustment,create,update_column,cur... | Send new comment notifications for all users who have not posted the comment. | This might be an overkill "faster" query. |
@@ -98,6 +98,16 @@ export class GwdAnimation extends AMP.BaseElement {
}
}
+ /**
+ * Returns the GWD pagedeck element if one exists in the document.
+ * @return {?Element}
+ * @private
+ */
+ getGwdPageDeck_() {
+ return this.getAmpDoc().getRootNode().querySelector(
+ `amp-carousel#${escap... | [No CFG could be retrieved] | Creates a registrable AMP action function which invokes the corresponding action method with the given arguments Handles the runtime service. | 1. If the selector is ID based, is there a reason we need to specify `amp-carousel`? 2. If so, please use `scopedQuerySelector` from `src/dom.js`. |
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class AddCreatedViaToIncomingEmail < ActiveRecord::Migration[6.0]
+ def change
+ add_column :incoming_emails, :created_via, :integer, null: true, index: true
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | Normally I like indices but I wonder if this is necessary? There don't seem to be any queries on `created_via` and it seems mostly used for debugging? I don't think we should index it unless we plan on querying it in the future. |
@@ -2563,7 +2563,7 @@ re_fetch:
again1:
opm = ioc.ioc_coc->sc_pool->spc_metrics[DAOS_OBJ_MODULE];
- d_tm_inc_counter(opm->opm_update_resent, 1);
+ d_tm_inc_counter(opm->opm_resent, 1);
e = 0;
rc = dtx_handle_resend(ioc.ioc_vos_coh, &orw->orw_dti,
&e, &version);
| [No CFG could be retrieved] | synchronously gets the object from the distributed object pool and handles the resend. find out if the object is not found in the cache. | What we want to know from this counter? The count of resent RPCs from client? or the count of resent RPCs from leader to non-leaders? They are some different. Because the subsequent logic in the leader IO handler may "goto again1", it is not client resent. So if it is the former case, the counter should be moved upward... |
@@ -161,7 +161,16 @@ class WikiTablesSemanticParser(Model):
world: List[WikiTablesWorld],
actions: List[List[ProductionRuleArray]],
example_lisp_string: List[str] = None,
- ... | [WikiTablesSemanticParser->[_get_neighbor_indices->[append,len,pad_sequence_to_length,Variable,enumerate],_get_linking_probabilities->[softmax,new,size,append,linking_scores,cat,len,stack,Variable,enumerate,range,unsqueeze],_action_history_match->[new,max,size,min,len,eq],_get_type_vector->[new,append,startswith,pad_se... | Returns the initial state of the embedding and the scores of the entity. Compute entity type embedding and question word cosine similarity. The maximum linking score over the entity s words and the question token s neighbors. | This could also just be a `ChecklistState` object, I think. |
@@ -9,6 +9,14 @@ from ..account.models import User
from .i18n import AddressMetaForm, get_address_form_class
+class FormWithReCaptcha(forms.BaseForm):
+ def __new__(cls, *args, **kwargs):
+ if settings.ENABLE_RECAPTCHA:
+ cls.base_fields['_captcha'] = ReCaptchaField(
+ label=pge... | [logout_on_password_change->[update_session_auth_hash],LoginForm->[__init__->[super,get],pgettext,EmailField],PasswordResetForm->[get_users->[filter],send_mail->[delay]],ChangePasswordForm->[__init__->[super]],get_address_form->[AddressMetaForm,dict,address_form_class,get_address_form_class,country_code_for_region,form... | Get the address form for a missing or missing node. | I'm not a fan of this label, as usually `Recaptcha` is self explanatory |
@@ -19,7 +19,7 @@ from ..._version import VERSION
if TYPE_CHECKING:
# pylint:disable=unused-import,ungrouped-imports
from typing import Any, Union
- from .._credential import SearchApiKeyCredential
+ from ... import SearchApiKeyCredential
class SearchIndexClient(object):
| [SearchIndexClient->[__aexit__->[__aexit__],close->[close],__aenter__->[__aenter__]]] | Creates a new instance of the Azure Search IndexClient class that will interact with an existing Azure Sets the _endpoint _index_name and _index_name attributes of the ethernet. | from \<ellipsis\> import \<something\> ? Is this GitHub being odd with what has changed? Or is this actually a python quirk that makes `...` the same as `..` in this context? |
@@ -658,6 +658,11 @@ namespace DotNetNuke.Framework
{
var originalurl = Context.Items["UrlRewrite:OriginalUrl"].ToString();
CanonicalLinkUrl = originalurl.Replace(PortalSettings.PortalAlias.HTTPAlias, primaryHttpAlias);
+
+ if (UrlUtils.IsSec... | [DefaultPage->[OnInit->[InitializePage,SetSkinDoctype,OnInit,RenderDefaultsWarning,ManageFavicon],Render->[Render],OnLoad->[OnLoad],OnPreRender->[OnPreRender]]] | Override the OnInit method to register common JS and JS files. function to handle the case where the user has not requested a default alias Register all the client - side resources with the appropriate methods. | Is this the only location where `CanonicalLinkUrl` is being set? Why only when `primaryHttpAlias != null`? |
@@ -19,4 +19,8 @@ class ServiceProviderRequest < ApplicationRecord
def ial=(val)
self.loa = val
end
+
+ def ==(other)
+ to_json == other.to_json
+ end
end
| [ServiceProviderRequest->[from_uuid->[ial,new,instance_of?,loa,find_by],loa]] | set ial val. | Personally I would do like a `.to_h` comparison instead of `to_json`? But it's probably fine as-is? |
@@ -17,12 +17,9 @@ public class SmallRyeReactiveMessagingLifecycle {
MediatorManager mediatorManager;
void onApplicationStart(@Observes StartupEvent event) {
- CompletableFuture<Void> future = mediatorManager.initializeAndRun();
try {
- future.get();
- } catch (ExecutionExc... | [SmallRyeReactiveMessagingLifecycle->[onApplicationStart->[getCause,initializeAndRun,RuntimeException,get]]] | Called when the application starts. | Hm, I don't understand why this change? StreamRegistars are initialized asynchronously so we should block and wait until the registration is finished. Otherwise our app might start before everything is ready... or? |
@@ -74,6 +74,7 @@ namespace NServiceBus
using (var stream = new StreamReader(CreateReadStream(filePath), Encoding.UTF8))
{
var result = await stream.ReadToEndAsync().ConfigureAwait(false);
+
return result;
}
}
| [AsyncFile->[Task->[Move,Create,WriteBytes,CreateWriteStream,GetTempFileName,Delete,ConfigureAwait,Open,GetBytes],FileStream->[Write,None,Open,Read],ReadText->[UTF8,CreateReadStream,ConfigureAwait],ReadBytes->[CreateReadStream,Length,ConfigureAwait]]] | Reads text from a file. | I would go with a direct return here |
@@ -124,7 +124,8 @@ public final class EnvironmentUp
return;
}
- sleepUntilInterrupted();
+ Collection<DockerContainer> containers = environment.getContainers();
+ waitUntil(() -> containers.stream().noneMatch(ContainerState::isRunning));
log... | [EnvironmentUp->[Execution->[killContainersReaperContainer->[killContainersReaperContainer]]]] | This method runs the environment and kills the containers if the environment is not running. | When `noneMatch(ContainerState::isRunning)` you should exit with a non-zero exit code. Also, you can skip the next log line (`log.info("Exiting, the containers will exit too");`) |
@@ -998,7 +998,7 @@ class RaidenService(Runnable):
token_address=token_address,
)
- for channel in channels:
+ for channel in [c for c in channels if c.fee_schedule is None]:
# get the flat fee for this network if set, otherwise the default
... | [RaidenService->[_callback_new_block->[handle_and_track_state_changes],handle_and_track_state_changes->[add_pending_greenlet],on_message->[on_message],stop->[stop],_start_alarm_task->[start],_start_transport->[start],_initialize_payment_statuses->[PaymentStatus],mediate_mediated_transfer->[mediator_init,handle_and_trac... | Initializes the fees of all open channels to the latest set values. | Simplify here. Maybe add the comprehension to a variable before this line. |
@@ -919,7 +919,9 @@ def is_valid_shipping_method(checkout, discounts):
return True
-def get_shipping_price_estimate(checkout: Checkout, discounts, country_code):
+def get_shipping_price_estimate(
+ checkout: Checkout, discounts: "DiscountsListType", country_code: str
+):
"""Return the estimated price r... | [clean_checkout->[is_valid_shipping_method,is_fully_paid],update_shipping_address_in_checkout->[get_shipping_address_forms],get_shipping_price_estimate->[get_valid_shipping_methods_for_checkout],get_or_create_checkout_from_request->[get_or_create_anonymous_checkout_from_token,get_user_checkout],update_billing_address_i... | Return the estimated price range for shipping for given order. | It returns `Money | TaxedMoney` I think? We could hint it |
@@ -47,7 +47,10 @@ setup(name="pip",
author_email='python-virtualenv@groups.google.com',
url='http://www.pip-installer.org',
license='MIT',
+ install_requires=['backports.ssl_match_hostname'],
packages=['pip', 'pip.commands', 'pip.vcs'],
+ package_data={'pip': ['*.pem']},
+ pa... | [read->[open],find_version->[group,read,search,RuntimeError],abspath,dict,dirname,read,join,find_version,setup] | Programming Language Python 3. 1 and 3. 2. | Should be conditional on version. |
@@ -68,8 +68,8 @@ void LoginDatabaseConnection::DoPrepareStatements()
PrepareStatement(LOGIN_GET_USERNAME_BY_ID, "SELECT username FROM account WHERE id = ?", CONNECTION_SYNCH);
PrepareStatement(LOGIN_SEL_CHECK_PASSWORD, "SELECT 1 FROM account WHERE id = ? AND sha_pass_hash = ?", CONNECTION_SYNCH);
Prepar... | [DoPrepareStatements->[resize,PrepareStatement]] | This method is called by the login database connection after all the statements have been prepared. Prepares statements for logging in. Update all the records in the database that are not already in the database. | And this :D |
@@ -3238,7 +3238,10 @@ static const tls12_hash_info tls12_md_info[] = {
{NID_sha224, 112, EVP_sha224},
{NID_sha256, 128, EVP_sha256},
{NID_sha384, 192, EVP_sha384},
- {NID_sha512, 256, EVP_sha512}
+ {NID_sha512, 256, EVP_sha512},
+ {NID_id_GostR3411_94, 128, md_gost94},
+ {NID_id_GostR3... | [No CFG could be retrieved] | The function returns the NID associated with the given EVP_PKEY and EVP Returns the TLS12 hash information for the given hash algorithm. | This is a problem. The function tls12_get_hash_info matches the values TLSEXT_hash_\* to rows in this table. TLSEXT_hash_md5 has a value 1 and corresponds to row 0, TLSEXT_hash_sha1 has a value 2 and corresponds to row 1, etc. This is fine but the GOST hashes skip a load of numbers so TLSEXT_hash_gostr3411 has a value ... |
@@ -59,9 +59,12 @@ class OrderQueryset(models.QuerySet):
fulfilled).
"""
statuses = {OrderStatus.UNFULFILLED, OrderStatus.PARTIALLY_FULFILLED}
- qs = self.filter(status__in=statuses, payments__is_active=True)
+ payments = Payment.objects.filter(is_active=True).values("id")
+ ... | [OrderLine->[is_digital->[is_digital]],Order->[can_refund->[can_refund,get_last_payment],can_capture->[can_capture,get_last_payment],can_void->[can_void,get_last_payment],get_subtotal->[get_subtotal]]] | Return all orders that can be fulfilled or unfulfilled. | You should be able to use the expression directly in the filter without assigning it to a new field with `annotate`, like so: `.filter(Exists(...))`. This makes it even faster as the database does not need to create that temporary result column. |
@@ -445,7 +445,9 @@ class StubgenUtilSuite(unittest.TestCase):
assert_equal(remove_misplaced_type_comments(original), dest)
- def test_common_dir_prefix(self) -> None:
+ @pytest.mark.skipif(sys.platform == 'win32',
+ reason='Tests building the paths common ancestor on *nix')
+ ... | [StubgenHelpersSuite->[test_is_non_library_module->[is_non_library_module],test_is_blacklisted_path->[is_blacklisted_path]],IsValidTypeSuite->[test_is_valid_type->[is_valid_type]],module_to_path->[exists,replace,format,join],StubgenPythonSuite->[parse_flags->[group,search,parse_options],run_case_inner->[,write,append,p... | Test remove misplaced type comments bytes. | We use `@unittest.skipIf` elsewhere and it would be better to use it here for consistency. |
@@ -193,11 +193,14 @@ public class Projection
return false;
}
- // Check if a cast is necessary.
- final ExprType toExprType = Expressions.exprTypeForValueType(
- aggregateRowSignature.getColumnType(expression.getDirectColumn())
- );
+ // We don't really have a way to cast complex type.... | [Projection->[postAggregation->[Projection],preAggregation->[Projection],equals->[equals]]] | Checks if a post - aggregation direct column is ok. | `expression.isDirectColumnAccess()` is already known true due to the check above, so isn't needed here. |
@@ -246,6 +246,7 @@ public final class EmbeddedSingleNodeKafkaCluster extends ExternalResource {
*
* @return base set of producer properties.
*/
+ @SuppressWarnings("deprecation")
public Map<String, Object> producerConfig() {
final Map<String, Object> config = new HashMap<>(getClientProperties());
... | [EmbeddedSingleNodeKafkaCluster->[getClientProperties->[bootstrapServers],Builder->[build->[EmbeddedSingleNodeKafkaCluster]],producerConfig->[getClientProperties],deleteAllTopics->[deleteTopics,deleteAllTopics],stop->[stop],createTopic->[createTopic],waitForTopicsToBeAbsent->[waitForTopicsToBeAbsent],before->[start],ad... | producer config. | Why are you reducing `retries` from `MAX_VALUE` to `10`? Are you trying to bound the test time in case of failure? Instead of reducing `retries` you should set `delivery.timeout.ms` for this case. |
@@ -16,8 +16,14 @@
*/
package org.apache.nifi.rules.handlers;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.nifi.annotation.lifecycle.OnEnabled;
+import org.apache.nifi.components.PropertyDescriptor;
import org.apache.nifi.context.PropertyContext;
import org.apache.nifi.controller.AbstractCont... | [AbstractActionHandlerService->[execute->[execute]]] | Creates an abstract action handler service. | Could this support a list of action types? |
@@ -18,13 +18,13 @@ function notify_init(&$a) {
$guid = basename($urldata["path"]);
$itemdata = get_item_id($guid, local_user());
if ($itemdata["id"] != 0)
- $note['link'] = $a->get_baseurl().'/display/'.$itemdata["nick"].'/'.$itemdata["id"];
+ $note['link'] = App::get_baseurl().'/display/'.$item... | [notify_content->[getAll,get_baseurl],notify_init->[get_baseurl,is_friendica_app,setSeen,setAllSeen,getByID]] | Notify init function. | Standards: Can you please add brackets to this conditional statement? |
@@ -261,6 +261,11 @@ class Register extends BaseModule
$a->internalRedirect('register/');
}
+ // Is there text in the tar pid?
+ if (!empty($_POST('registeertarpid'))) {
+ \notice(L10n::t('You have entered too much information.'));
+ $a->internalRedirect('register/');
+ }
Model\Register::cr... | [Register->[content->[getHostName],post->[getMessage,get,internalRedirect]]] | POST a user Get a user Register a user if the registration policy is APPROVE. This function is used to send a notification to the user that the user is not pending approval. | tar pit, please |
@@ -90,10 +90,10 @@ describe ApplicationHelper do
it 'looks in the theme file path' do
expected_path = theme_view_path.gsub('/lib/views', '/app/assets')
- allow(File).to receive(:exists?).and_call_original
+ allow(File).to receive(:exist?).and_call_original
theme_asset_exists?('images/l... | [create,let,describe,subject,show_pro_upsell?,it,last_event,to,double,with,public_body,require,public_body_link_absolute,include,dirname,gsub,match,request_user_link_absolute,with_feature_disabled,context,can_ask_the_eu?,eq,and_call_original,theme_asset_exists?,raise_error,and_return,expand_path] | describe the layout of a theme returns true if the file exists and has the expected path. | Should be squashed in to 4d43472ff1a0d58b817d4a807d99c50ed2f569d0 |
@@ -364,9 +364,9 @@ func resourceAwsLambdaEventSourceMappingUpdate(d *schema.ResourceData, meta inte
return fmt.Errorf("Error updating event source mapping: %s", err)
}
- if eventSourceArn.Service != "sqs" {
- params.MaximumBatchingWindowInSeconds = aws.Int64(int64(d.Get("maximum_batching_window_in_seconds").(i... | [DeleteEventSourceMapping,StringInSlice,Set,Code,NonRetryableError,GetOkExists,Format,GetOk,Errorf,SetParallelizationFactor,SetId,RetryableError,Bool,Time,UpdateEventSourceMapping,Id,TimeValue,SetMaximumRetryAttempts,Int64,Get,Printf,StringValue,CreateEventSourceMapping,SetBisectBatchOnFunctionError,SetDestinationConfi... | UpdateEventSourceMappingUpdate updates an existing lambda event source mapping. destination_config - expand destination_config in lambda event source mapping. | Nit: since this param will always be set in the `params` obj we can move it even further up in the `params` instantiation e.g. ```go params := &lambda.UpdateEventSourceMappingInput{ UUID: aws.String(d.Id()), BatchSize: aws.Int64(int64(d.Get("batch_size").(int))), FunctionName: aws.String(d.Get("function_name").(string)... |
@@ -1068,6 +1068,16 @@ public class BigQueryIO {
"No more than one of jsonSchema, schemaFromView, or dynamicDestinations may "
+ "be set");
+ if (getTriggeringFrequency() != null) {
+ checkArgument(getMethod() == Method.FILE_LOADS);
+ checkArgument(getNumFileShards() > 0,
... | [BigQueryIO->[getExtractFilePaths->[build],write->[build],Write->[expandTyped->[setMaxFileSize,getBigQueryServices,getWriteDisposition,getMaxFileSize,getFailedInsertRetryPolicy,getMaxFilesPerBundle,getJsonTableRef,apply,getCreateDisposition,withTestServices],withTableDescription->[build],expand->[getJsonSchema,getTable... | Expands a single partition into a single partition. This method expands the input schema to a sequence of schema that can be found in the. | Optionally enforce that collection is unbounded |
@@ -199,6 +199,7 @@ void keyboard_init(void) {
#if defined(NKRO_ENABLE) && defined(FORCE_NKRO)
keymap_config.nkro = 1;
#endif
+ keyboard_post_init_kb(); /* Always keep this last */
}
/** \brief Keyboard task: Do keyboard routine jobs
| [No CFG could be retrieved] | Check if a key is pressed on the row. Initialize a keyboard master. | Nit: inconsistent spacing. |
@@ -27,6 +27,7 @@ public final class SqlTypes {
public static final SqlPrimitiveType BIGINT = SqlPrimitiveType.of(SqlBaseType.BIGINT);
public static final SqlPrimitiveType DOUBLE = SqlPrimitiveType.of(SqlBaseType.DOUBLE);
public static final SqlPrimitiveType STRING = SqlPrimitiveType.of(SqlBaseType.STRING);
+ ... | [SqlTypes->[map->[of],decimal->[of],struct->[builder],array->[of],of]] | Returns a decimal object with the specified precision and scale. | This should be removed. Instead use the 'decimal' builder method in the line below to build decimals. |
@@ -15,7 +15,7 @@ func (eng *Engine) DeleteConfig(envName string, key string) error {
if config != nil {
delete(config, tokens.Token(key))
- if !eng.saveEnv(info.Target, info.Snapshot, "", true) {
+ if err = eng.Environment.SaveEnvironment(info.Target, info.Snapshot); err != nil {
return errors.Errorf("cou... | [DeleteConfig->[Token,initEnvCmdName,saveEnv,QName,Errorf]] | DeleteConfig deletes a config value from the environment. | It would be good to preserve context using `errors.Wrap`. |
@@ -32,10 +32,10 @@ import { <%=jhiPrefixCapitalized%>TrackerService } from '../tracker/tracker.serv
@Injectable({providedIn: 'root'})
export class AccountService {
- private userIdentity: any;
+ private userIdentity: Account;
private authenticated = false;
private authenticationState = new Subject... | [No CFG could be retrieved] | Creates an object that represents an user identity in a system. API endpoint for UAA. | I think we can remove `userIdentity`, `authenticated` and `accountCache$` variables and provide getter methods to derive the state from `authenticationState` subject. |
@@ -74,7 +74,10 @@ import org.eclipse.jetty.util.thread.QueuedThreadPool;
@Tags({"ingest", "http", "https", "rest", "listen"})
@CapabilityDescription("Starts an HTTP Server and listens on a given base path to transform incoming requests into FlowFiles. "
+ "The default URI of the Service will be http://{host... | [ListenHTTP->[shutdownHttpServer->[shutdownHttpServer],createHttpServerFromService->[shutdownHttpServer],onTrigger->[findOldFlowFileIds,createHttpServerFromService],onPrimaryNodeChange->[shutdownHttpServer]]] | Imports the service and listens on a given base path to transform incoming requests into FlowFiles This is a hack to ensure that the URI validator is registered. | The "empty response body" is not correct any more. |
@@ -32,7 +32,11 @@ const {
const {getStdout} = require('../exec');
const {gitCommitHash, gitTravisMasterBaseline} = require('../git');
-const runtimeFile = './dist/v0.js';
+const CORE_RUNTIME_FILE = './dist/v0.js';
+
+const INABOX_RUNTIME_FILE = './dist/amp4ads-v0.js';
+const INABOX_RUNTIME_GOLDEN_SIZE = 70; // In ... | [No CFG could be retrieved] | Get the gzipped bundle size of the current build. Get the n - ary bundle size from the output of the n - ary - bundle -. | This was exactly the thing we were trying to avoid when we added the bundle-size bot a while back. You _think_ this doesn't grow often, but it does, and it blocks unrelated PRs because of rebasing issues... I wouldn't recommend going with this approach, but let's loop in @jridgewell and @rsimha for discussion :) |
@@ -126,6 +126,7 @@ const files = {
'entities/_entity.module.ts',
// home module
'home/_index.ts',
+ { file: 'home/_home.module.ts', method: 'copyJs' },
{ file: 'home/_home.route.ts', method: 'copyJs' },
{ file: 'home/_h... | [No CFG could be retrieved] | Private functions for all of the modules that are defined in the Tesla compiler. Missing layout for navbar. | no need for copyJs as its required only if we have any i18n regex to strip. may be I should rename the method names to be more meaningful |
@@ -2017,6 +2017,12 @@ var ngModelDirective = function() {
});
});
}
+
+ element.on('blur', function(ev) {
+ scope.$apply(function() {
+ modelCtrl.$setTouched();
+ });
+ });
}
}
};
| [No CFG could be retrieved] | Updates the view value of the . Sets the view value of the . | I don't like that we get one extra-digest here. May be it's better to move it inside upper $apply block and check event object for blur event? |
@@ -244,7 +244,13 @@ func (s *InMemoryState) ContainerInUse(ctr *Container) ([]string, error) {
func (s *InMemoryState) AllContainers() ([]*Container, error) {
ctrs := make([]*Container, 0, len(s.containers))
for _, ctr := range s.containers {
- ctrs = append(ctrs, ctr)
+ if s.namespace != "" {
+ if ctr.config... | [AddContainer->[Release,ID,Reserve,Wrapf,Name,addCtrToDependsMap,Dependencies,Add],Pod->[Wrapf],SaveContainer->[ID,Wrapf],AddPod->[Release,ID,Reserve,Wrapf,Name,Add],RemovePod->[Release,ID,Wrapf,Name,Delete],PodContainersByID->[ID,Wrapf],PodHasContainer->[ID,Wrapf],Container->[Wrapf],AddContainerToPod->[Release,ID,Rese... | AllContainers returns all the containers in the state. | (`if s.namespace == "" || ctr.config.Namespace == s.namespace` would allow having a single `if` instead of `if`/`if`//`else`. Same in `AllPods`.) |
@@ -62,7 +62,8 @@ public class WindowedWordCount {
static class FormatAsStringFn extends DoFn<KV<String, Long>, String> {
@Override
public void processElement(ProcessContext c) {
- String row = c.element().getKey() + " - " + c.element().getValue() + " @ " + c.timestamp().toString();
+ String row ... | [WindowedWordCount->[main->[setSlide,getSlide,getWindowSize,setWindowSize]]] | Process the element in the sequence. | I'd like to see `c.timestamp().toString()` in one line. |
@@ -86,7 +86,7 @@ class IntelParallelStudio(IntelInstaller):
# TODO: TBB threading: ['libmkl_tbb_thread', 'libtbb', 'libstdc++']
mkl_libs = find_libraries(
mkl_integer + ['libmkl_core'] + mkl_threading,
- root=join_path(self.prefix.lib, 'intel64'),
+ root=join_path(s... | [IntelParallelStudio->[install->[install,check_variants]]] | Returns a list of BLAS libraries that are found in the library spec. | that looked like a bug, it's probably better have it in a separate commit. |
@@ -781,6 +781,14 @@ func (repo *Repository) updateSize(e Engine) error {
return fmt.Errorf("updateSize: %v", err)
}
+ objs, err := repo.GetLFSMetaObjects(-1, 0)
+ if err != nil {
+ return fmt.Errorf("updateSize: GetLFSMetaObjects: %v", err)
+ }
+ for _, obj := range objs {
+ size += obj.Size
+ }
+
repo.Size... | [updateSize->[RepoPath],UpdateSize->[updateSize],Link->[FullName],getTemplateRepo->[IsGenerated],DescriptionHTML->[Error,ComposeMetas,HTMLURL],mustOwner->[getOwner,Error],APIURL->[FullName],GetReviewers->[getReviewers],UploadAvatar->[CustomAvatarPath],generateRandomAvatar->[CustomAvatarPath],getReviewers->[getReviewers... | updateSize updates size of repository. | A select sum sql is better than this change. |
@@ -122,8 +122,8 @@ export class AmpBysideContent extends AMP.BaseElement {
* @override
*/
preconnectCallback(onLayout) {
- if (this.iframeSrc_) {
- this.preconnect.url(this.iframeSrc_, onLayout);
+ if (this.iframeSrc_ || this.origin_) {
+ this.preconnect.url(this.iframeSrc_ || this.origin_, ... | [No CFG could be retrieved] | The main method for creating the object. Create AMP placeholder and iframe. | Should be able to compose the origin here, but it'll require updating `#composeOrigin_` a bit to grab the subdomain. |
@@ -93,7 +93,8 @@ class Aioseo_Posts_Importing_Action_Test extends TestCase {
$this->indexable_to_postmeta = Mockery::mock( Indexable_To_Postmeta_Helper::class, [ $this->meta ] );
$this->options = Mockery::mock( Options_Helper::class );
$this->wpdb_helper = Mockery::mock( Wpdb_Helper::c... | [Aioseo_Posts_Importing_Action_Test->[test_donot_index_if_no_importables->[andReturn,once,index,with],set_up->[shouldAllowMockingProtectedMethods],test_map_with_empty_yoast_indexable->[assertEquals,map],test_map_with_missing_aioseo_data->[assertNull,map],test_get_total_unindexed->[andReturn,once,assertEquals,get_limite... | Sets up the object. | that's a lot of initialization for testing just _this_ class. do we need the importing action double here? |
@@ -38,12 +38,11 @@ public abstract class AbstractPrefixConfiguration extends AbstractConfiguration
@Override
public Object getProperty(String key, Object defaultValue) {
Object value = null;
- if (StringUtils.isNotEmpty(prefix) && StringUtils.isNotEmpty(id)) {
- value = getInternal... | [AbstractPrefixConfiguration->[getProperty->[getProperty]]] | Override to add prefix if needed. | I think caculatePrefix cannot be used here because the previous snippet will possibly try 2 times in the case when both neither and id are not empty. But with the new logic applies, it will only try once with the prefix returned in caculatePrefix. |
@@ -87,6 +87,12 @@ public abstract class AmqpHeaders {
public static final String RETURN_ROUTING_KEY = PREFIX + "returnRoutingKey";
+ public static final String CLASSID = "javaTypeId";
+
+ public static final String CONTENT_CLASSID = "javaContentTypeId";
+
+ public static final String KEY_CLASSID = "javaKeyTypeId... | [No CFG could be retrieved] | Gets the name of the header that defines the message. | These (and those in `JsonObjectMapper`) should be in a common class - e.g. `JsonHeaders` in `core...s.f.i.json` |
@@ -50,10 +50,7 @@ public class KeyValueStoreUIDSequencer extends AbstractUIDSequencer {
@Override
public void init() {
- storeName = Framework.getService(ConfigurationService.class).getProperty(STORE_NAME_PROPERTY);
- if (isBlank(storeName)) {
- storeName = DEFAULT_STORE_NAME;
- ... | [KeyValueStoreUIDSequencer->[getNextLong->[getKey],initSequence->[getKey],getNextBlock->[getKey]]] | Initialize the object. | This doesn't take into account blank values though (without any ERROR log), does it? It's important to keep this behavior. |
@@ -15,7 +15,7 @@ func NewRateLimiter(cfg *Config) grpc.UnaryClientInterceptor {
}
limiter := rate.NewLimiter(rate.Limit(cfg.RateLimit), burst)
return func(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
- limiter.Wait(c... | [Limit,NewLimiter,Wait] | returns a unary call that blocks until the next non - zero id is found. | I think we'd want to abort on error here: it could mean the context deadline was exceeded. |
@@ -239,7 +239,8 @@ class StubgencSuite(Suite):
def test_generate_c_type_stub_no_crash_for_object(self) -> None:
output = [] # type: List[str]
mod = ModuleType('module', '') # any module is fine
- generate_c_type_stub(mod, 'alias', object, output)
+ imports = [] # type: List[str]... | [test_stubgen->[parse_flags],StubgenUtilSuite->[infer_prop_type_from_docstring->[infer_prop_type_from_docstring]]] | This test is for the case where the stubgen unit test does not crash for object. | Shouldn't you check the contents of `imports` after the call returns? |
@@ -59,6 +59,7 @@ namespace System.Runtime.Serialization
return id;
}
+ [Obsolete(Obsoletions.InsecureSerializationMessage, DiagnosticId = Obsoletions.InsecureSerializationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public abstract void Serialize(Stream serializationStream,... | [Formatter->[WriteMember->[WriteInt32,WriteInt64,WriteDouble,WriteByte,WriteBoolean,WriteDateTime,WriteChar,WriteInt16,WriteObjectRef,WriteDecimal,WriteArray]]] | Schedule an object for serialization. | Interesting, it's not just BinaryFormatter but all Formatters. I hadn't comprehended that. Not that it matters much probably, since it's rare to see others these days. And it makes sense they'd all fundamentally have the same issues. |
@@ -3,7 +3,9 @@ class ListingCategory < ApplicationRecord
# We standardized on the latter, but keeping the table name was easier.
self.table_name = "classified_listing_categories"
- has_many :listings, inverse_of: :listing_category
+ has_many :listings, inverse_of: :listing_category,
+ fo... | [ListingCategory->[normalize_social_preview_color->[social_preview_color,downcase],validates,table_name,has_many,before_validation]] | Creates a new instance of ListingCategory. | Thanks @rhymes! That we didn't notice this until now seems to indicate that we don't use this direction of the association. Or very infrequently. |
@@ -14,6 +14,9 @@ const (
mainnetVdfDifficulty = 50000 // This takes about 100s to finish the vdf
mainnetConsensusRatio = float64(0.66)
+
+ // TODO: remove it after randomness feature turned on mainnet
+ mainnetRandomnessStartingEpoch = 10
)
// MainnetSchedule is the mainnet sharding configuration schedule.
| [CalcEpochNumber->[BlocksPerEpoch],IsLastBlock->[BlocksPerEpoch]] | Package shardingconfig import imports a shardingconfig into the mainnet schedule. VdfDifficulty - > VdfDifficulty - > VdfDifficulty - >. | for mainnet, let's put a huge number initially here. |
@@ -3761,7 +3761,8 @@ namespace Js
DynamicProfileInfo * dynamicProfileInfo = functionBody->GetDynamicProfileInfo();
FunctionInfo* functionInfo = function->GetTypeId() == TypeIds_Function?
JavascriptFunction::FromVar(function)->GetFunctionInfo() : nullptr;
- dynamicProfileInfo->Reco... | [No CFG could be retrieved] | template <class T > if function return an object that can be found in the stack. | Is this flag passed correctly in full jit? |
@@ -21,8 +21,10 @@ public class CircularInjectionNotSupportedTest {
public void evaluate() throws Throwable {
try {
base.evaluate();
+ fail("Expected an IllegalStateException to be thrown, but it wasn't");
} catch... | [CircularInjectionNotSupportedTest->[ArcTestContainer,around]] | Creates a new Statement that evaluates the base statement and throws an exception if the base statement is. | I'd avoid assertion on an error string, just catching the ISE should be enough. |
@@ -70,8 +70,8 @@ class WP_Test_Jetpack_Sync_Integration extends WP_Test_Jetpack_Sync_Base {
$this->assertEquals( Actions::DEFAULT_SYNC_CRON_INTERVAL_NAME, wp_get_schedule( 'jetpack_sync_full_cron' ) );
}
- function test_starts_full_sync_on_user_authorized() {
- do_action( 'jetpack_user_authorized', 'abcd1234' ... | [WP_Test_Jetpack_Sync_Integration->[test_filtered_schedule_incremental_sync_cron_bad_schedule_sanitized->[assertEquals],test_default_schedule_full_sync_cron->[assertEquals],test_default_schedule_incremental_sync_cron->[assertEquals],test_disable_sending_incremental_sync->[assertTrue,reset,create_many,reset_data,do_sync... | This test is used to test if a full sync cron is sanitized. | lets rename this to test_starts_initial_sync_on_site_registered. As it is a special type of Full Sync. |
@@ -596,9 +596,14 @@ public class HL7v2IO {
lastClaimedMilliSecond = cursor.getMillis();
}
- outputReceiver.output(msg);
+ switch (timestampMethod) {
+ case SEND_TIME:
+ outputReceiver.outputWithTimestamp(msg, Instant.parse(msg.getSendTime()));
+ break;... | [HL7v2IO->[ListHL7v2Messages->[expand->[of]],Write->[Result->[in->[Result],of->[],getPipeline->[],expand->[of]],expand->[getWriteMethod,of,getHL7v2Store]],ListHL7v2MessagesFn->[split->[split],of],Read->[Result->[in->[],of->[Result],getPipeline->[getPipeline],expand->[of],of],FetchHL7v2Message->[expand->[Result,of],HL7v... | List all messages for the given element in the HL7v2 store. | You should use output(msg) and not outputWithTimestamp since output() by default does this. This also allows you to not have to take a ProcessContext parameter. |
@@ -522,11 +522,8 @@ public class IndexMerger
long startTime = System.currentTimeMillis();
File indexFile = new File(v8OutDir, "index.drd");
- FileOutputStream fileOutputStream = null;
- FileChannel channel = null;
- try {
- fileOutputStream = new FileOutputStream(indexFile);
- channel = ... | [IndexMerger->[merge->[merge],append->[append],makeIndexFiles->[merge,apply,convert],mergeQueryableIndex->[mergeQueryableIndex],ConvertingIndexedInts->[size->[size],get->[get],iterator->[apply->[get],iterator]],convert->[convert],persist->[persist],AggFactoryStringIndexed->[iterator->[apply->[],iterator]],MMappedIndexR... | Creates the index files. This method is called when the index. drd is called. It writes the indexSpec This method is called to find the best guess for the dimension and convert it to the correct Walk through data sets and merge them. | I did not know you could do that |
@@ -185,9 +185,10 @@ class VisionTransformer(nn.Module):
self._init_weights()
def _init_weights(self):
- fan_in = self.conv_proj.in_channels * self.conv_proj.kernel_size[0] * self.conv_proj.kernel_size[1]
- nn.init.trunc_normal_(self.conv_proj.weight, std=math.sqrt(1 / fan_in))
- nn... | [vit_h_14->[_vision_transformer],vit_b_16->[_vision_transformer],vit_l_16->[_vision_transformer],vit_l_32->[_vision_transformer],Encoder->[__init__->[EncoderBlock]],_vision_transformer->[VisionTransformer],EncoderBlock->[__init__->[MLPBlock]],vit_b_32->[_vision_transformer],VisionTransformer->[forward->[_process_input]... | Initializes the weights of the network. | To avoid needing to store this, you can check that `isinstance(self.conv_proj, nn.Conv2d)`. |
@@ -70,10 +70,11 @@ func (ns NamespacedServiceAccount) String() string {
// ClusterName is a type for a service name
type ClusterName string
-//WeightedService is a struct of a service name and its weight
+//WeightedService is a struct of a service name, its weight and domain
type WeightedService struct {
Servic... | [String->[Sprintf]] | type returns a type for a given service name and its weight The service account record is a record of the service account number and the service account number. | Should we rename this struct now that it has the domain too ? |
@@ -376,9 +376,11 @@ class Qt(Package):
if self.spec.variants['freetype'].value == 'spack':
config_args.extend([
- '-system-freetype',
- '-I{0}/freetype2'.format(self.spec['freetype'].prefix.include)
+ '-system-freetype'
])
+ c... | [Qt->[common_config_args->[get_mkspec],configure->[configure],patch->[get_mkspec,conf]]] | Returns a list of common config arguments based on the current configuration. Add flags and flags to the config if necessary. Return a list of config arguments that can be passed to dbus - link. | You can combine these into a single `extend` if you use `*` to unpack the second list, right? |
@@ -94,8 +94,12 @@ export class IntersectionObserverApi {
this.startSendingIntersection_();
});
- this.intersectionObserver_ = new IntersectionObserverPolyfill(change => {
- this.subscriptionApi_.send('intersection', {changes: [change]});
+ this.intersectionObserver_ = new IntersectionO... | [No CFG could be retrieved] | A class to help help amp - iframe and amp - ad nested iframe listen to intersection events Register a callback to listen to viewport events. | I always see `delete` as a codsmell, especially when it's on an object the code doesn't own. |
@@ -1,3 +1 @@
package internalversion
-
-type DeploymentConfigExpansion interface{}
| [No CFG could be retrieved] | This is a hack to avoid the creation of the DeploymentConfigExpansion class. | Delete this file? |
@@ -689,10 +689,15 @@ func setFromIPPerm(d *schema.ResourceData, sg *ec2.SecurityGroup, rule *ec2.IpPe
if len(rule.UserIdGroupPairs) > 0 {
s := rule.UserIdGroupPairs[0]
+ accountPrefix := aws.StringValue(s.UserId)
+ if accountPrefix != "" {
+ accountPrefix += "/"
+ }
+
if isVPC {
- d.Set("source_securi... | [Error->[Sprintf],Unlock,Message,StringInSlice,Set,NonRetryableError,Code,Strings,GetOk,HasChange,Lock,Errorf,SetId,RetryableError,Wrapf,RevokeSecurityGroupEgress,Sort,UpdateSecurityGroupRuleDescriptionsIngress,Id,Int64,AuthorizeSecurityGroupEgress,Get,Split,Printf,AuthorizeSecurityGroupIngress,RevokeSecurityGroupIngre... | getFromIPPerm - get From IP perm from security group and rule probe for the first non - empty result in a list of rules. | Now that we are setting local state from the remotely fetched rule, we should populate the local state with the full data `1234567/sg-12345`. What I realize though is with the `DiffSuppressFunc` this code becomes inert really.... regardless of what is stored we will only diff the sg-ids... to me it feels more correct t... |
@@ -96,11 +96,14 @@ final class PrestoSystemRequirements
}
JavaVersion version = JavaVersion.parse(javaVersion);
- if (version.getMajor() == 8 && version.getUpdate().isPresent() && version.getUpdate().getAsInt() >= 161) {
+
+ if (version.getMajor() >= 11) {
return;
... | [PrestoSystemRequirements->[verify64BitJvm->[failRequirement,getProperty,equals],getMaxFileDescriptorCount->[getAttribute,longValue,of,getInstance,empty,getPlatformMBeanServer],verifySlice->[failRequirement,setByte,getInt,wrappedBuffer],failRequirement->[println,format,exit],warnRequirement->[println,format],verifyFile... | Verify that the Java version is supported by presto. | That seems risky given that only 11 is LTS and next LTS is 17 .. and there will be all sorts of changes until then. It might be worth throwing warning that the default supported release is 11 and your mileage may vary with newer releases .. |
@@ -367,3 +367,12 @@ func buildReceiverIntegrations(nc *config.Receiver, tmpl *template.Template, log
}
return integrations, nil
}
+
+func md5HashAsMetricValue(data []byte) float64 {
+ sum := md5.Sum(data)
+ // We only want 48 bits as a float64 only has a 53 bit mantissa.
+ smallSum := sum[0:6]
+ var bytes = make(... | [Pause->[Stop,Unlock,Warn,Expire,Lock,Log,Query],IsActive->[Lock,Unlock],Stop->[Close,Wait,Stop],ApplyConfig->[Join,Stop,Unlock,NewInhibitor,NewDispatcher,New,NewSilencer,Lock,NewRoute,Run,With,FromGlobs,Update],NewDispatcherMetrics,Duration,NewIntegration,With,Done,Add,WithRetention,NewAlerts,WithPrefix,New,WithLogger... | Returns an array of integrations that are not yet in the chain. | This is super ugly. As Marco pointed out above, I'd suggest to expose hash as a label (with algorithm in the label name). |
@@ -1,5 +1,6 @@
using Autodesk.DesignScript.Interfaces;
+using Dynamo.Core.Threading;
using Dynamo.Models;
using Dynamo.Nodes;
using ProtoCore.AST.AssociativeAST;
| [EngineController->[ImportLibrary->[ImportLibrary],UpdateGraph->[UpdateGraph],ShowRuntimeWarnings->[GetRuntimeWarnings],ShowBuildWarnings->[GetBuildWarnings],GetRuntimeWarnings->[GetRuntimeWarnings],LibraryLoaded->[GetFunctionGroups],ConvertNodesToCode->[ConvertNodesToCode],GetBuildWarnings->[GetBuildWarnings],Dispose-... | A controller to handle the built - in nodes of a Dynamo model. Dispose of the runner services. | In other files, namespace `Dynamo.Core.Threading` is in compilation flag `ENABLE_DYNAMO_SCHEDULER`, so is there a problem when using this namespace directly here? |
@@ -348,6 +348,7 @@ def read_montage(kind, ch_names=None, path=None, unit='m', transform=False):
selection = selection[sel]
else:
ch_names_ = list(ch_names_)
+ ch_names_ = [str(ch) for ch in ch_names_] # convert names to str
kind = op.split(kind)[-1]
return Montage(pos=pos, ch_names... | [read_dig_montage->[_check_frame,compute_dev_head_t,transform_to_head,DigMontage],DigMontage->[save->[_get_dig]],_set_montage->[_get_dig],read_montage->[Montage]] | Read a generic montage. Bio - Sequencing for a specific in the Bio - Sequencing GA - HydroCel Geodesic Sensor Net and Cz Parse a. sfp file and return a sequence of the n - ary chains. load a single from a file. | I think it would be cleaner to set ``tolist()`` in places we are using ``np.str``. |
@@ -128,8 +128,6 @@ func init() {
// NewRespositoryCache will create a new repoCache or rehydrate
// an existing repoCache from the portlayer k/v store
func NewRepositoryCache(client *client.PortLayer) error {
- defer trace.End(trace.Begin(""))
-
rCache.client = client
val, err := kv.Get(client, repoKey)
| [Digests->[Begin,RLock,End,String,RUnlock],Save->[Error,Begin,Marshal,End,Errorf,Put],Less->[String],Tags->[Begin,RLock,End,String,RUnlock],Remove->[ParseNamed,Begin,End,Delete,String],ReferencesByName->[ParseNamed,Begin,Name,RLock,End,Sort,RUnlock],Delete->[Unlock,Save,Begin,Name,WithDefaultTag,End,Lock,String],Get->[... | NewRepositoryCache returns a new repositoryCache or a new one Unhandled returns nil if there is no unhandled object in the cache. | I like you removed this relatively annoying debug traces! |
@@ -936,7 +936,9 @@ def _compute_covariance_auto(data, method, info, method_params, cv,
def _logdet(A):
"""Compute the log det of a symmetric matrix."""
vals = linalg.eigh(A)[0]
- vals = np.abs(vals) # avoid negative values (numerical errors)
+ # avoid negative (numerical errors) or zero (semi-definit... | [make_ad_hoc_cov->[Covariance],_get_covariance_classes->[_ShrunkCovariance->[fit->[fit]],_RegCovariance->[fit->[fit,Covariance]]],_undo_scaling_array->[_apply_scaling_array],write_cov->[save],Covariance->[as_diag->[copy],__iadd__->[_check_covs_algebra],__add__->[_check_covs_algebra]],_estimate_rank_meeg_signals->[_appl... | Compute the log - detector of a symmetric matrix. | We were getting some values that actually equalled zero, which threw a warning. This prevents that from happening hopefully by setting a hopefully reasonable minimum, but please double-check my logic @agramfort |
@@ -87,12 +87,13 @@ public class MultiHopFlowCompiler extends BaseFlowToJobSpecCompiler {
public MultiHopFlowCompiler(Config config, Optional<Logger> log, boolean instrumentationEnabled) {
super(config, log, instrumentationEnabled);
- this.flowGraph = new BaseFlowGraph();
- Optional<FSFlowTemplateCatalo... | [MultiHopFlowCompiler->[setActive->[setActive],addShutdownHook->[addShutdownHook]]] | The MultiHopFlowCompiler class. Monitor if the service manager is healthy. | Using the RW lock of the FlowGraph works, but may not be desirable. The semantics of the RW lock of the BaseFlowGraph is to control read-write access to the FlowGraph. It seems that it might be better to have a different RW lock for controlling access to the FlowEdgeTemplateCatalog. The compiler can acquire this lock a... |
@@ -3656,6 +3656,8 @@ def test_query_customer_members_with_filter_search(
staff_user,
):
+ # print("Address is: " + str(address)
+ print("test ==== ")
User.objects.bulk_create(
[
User(
| [test_password_change_incorrect_old_password->[check_password,post_graphql,get_graphql_content,refresh_from_db],test_user_with_cancelled_fulfillments->[upper,len,post_graphql,to_global_id,get_graphql_content,add],test_me_query_checkout->[str,save,post_graphql,get_graphql_content],test_customer_delete->[assert_called_on... | This function test query customer members with a specific filter. | This should be removed. |
@@ -379,8 +379,11 @@ func (ctx *Context) ReadResource(
// Merge providers.
providers := mergeProviders(t, options.Parent, options.Provider, options.Providers)
+ // Get the provider for the resource.
+ provider := getProvider(t, options.Provider, providers)
+
// Create resolvers for the resource's outputs.
- res... | [ReadResource->[ReadResource,DryRun],RegisterComponentResource->[RegisterResource],collapseAliases->[Project,Stack],registerResource->[RegisterResource,DryRun,getResource],Invoke->[Invoke,DryRun],resolve->[resolve],RegisterRemoteComponentResource->[registerResource],prepareResourceInputs->[DryRun],RegisterResourceOutpu... | ReadResource reads a custom resource ReadResource reads a resource. nul l I m not sure what this is. | This seems like a bugfix for provider not being pulled out of providers map when options.Provider is nil? |
@@ -202,9 +202,8 @@ class ConfigReader:
eval_mode = get_mode(config)
config_checker_func = config_checkers.get(eval_mode)
if config_checker_func is None:
- raise ConfigError('Accuracy Checker {} mode is not supported. Please select between {}'. format(
- eval_mode, '... | [filter_pipelines->[filtered],ConfigReader->[_prepare_global_configs->[merge],_merge_paths_with_prefixes->[process_models->[process_config],process_modules->[process_config],process_pipelines->[process_config]],check_local_config->[_check_pipelines_config->[_is_requirements_missed,_count_entry],_check_models_config->[_... | Check that the local config contains all necessary values. Check if a specific node is missing and return it. | Substituting constant strings doesn't make sense - just embed them in the format string. |
@@ -50,17 +50,6 @@ func NewPulumiCmd() *cobra.Command {
cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) {
defaultHelp(cmd, args)
fmt.Println("See documentation at https://docs.pulumi.com")
-
- url, err := workspace.GetCurrentCloudURL()
- if err == nil && url != "" && !local.IsLocalBackendURL(url) {
- ... | [StringVar,Getenv,SetHelpFunc,ExitError,IsTruthy,Flush,Error,ColorizeText,StringVarP,InitLogging,GetCurrentCloudURL,Chdir,AddCommand,TrimSpace,ReadString,HelpFunc,CloseTracing,IsLocalBackendURL,Printf,Println,NewReader,Sprintf,IntVarP,Print,InitTracing,BoolVarP,PersistentFlags,EmojiOr,BoolVar] | PersistentPreRun is a command that is executed before the command is run. Flags for the command line interface. | Why not keep the message as `Currently logged into <URL>`? |
@@ -15,8 +15,9 @@ export class AnchorAdStrategy {
* @param {!JsonObject<string, string>} baseAttributes Any attributes that
* should be added to any inserted ads.
* @param {!JsonObject} configObj
+ * @param {!JsonObject} customAnalytics
*/
- constructor(ampdoc, baseAttributes, configObj) {
+ con... | [No CFG could be retrieved] | A strategy that creates an element with the given name and attributes. Adds a sticky ad extension to the AMPD. | can be null here |
@@ -131,7 +131,7 @@ class InteractiveRunner(runners.PipelineRunner):
if exit is not None:
self._in_session = False
_LOGGER.info('Ending session.')
- exit(None, None, None)
+ sys.exit(None, None, None)
def cleanup(self):
self._cache_manager.cleanup()
| [InteractiveRunner->[cleanup->[cleanup],apply->[apply],run_pipeline->[TestStreamVisitor]],PipelineResult->[cancel->[cancel],read->[read],wait_until_finish->[wait_until_finish]]] | End the session that keeps backend managers and workers alive. | Can you also revert this change? We're looking for the exit in line 131 provided by the underlying runner. I think that's causing the precommit test errors. |
@@ -86,10 +86,14 @@ public class DictionaryEncodedColumnPartSerde implements ColumnPartSerde
@JsonCreator
public DictionaryEncodedColumnPartSerde(
- @JsonProperty("isSingleValued") boolean isSingleValued
+ @JsonProperty("isSingleValued") boolean isSingleValued,
+ @JsonProperty("bitmapSerdeFactory... | [DictionaryEncodedColumnPartSerde->[write->[write,isSingleValued],read->[DictionaryEncodedColumnPartSerde,read]]] | private final VSizeIndexedInts singleValuedColumn ; private final GenericIndexed<ImmutableConcise Writes the header of the header table to the specified channel. | Is this different than the global config option? |
@@ -224,4 +224,18 @@ describe GroupUser do
expect(group.group_users.find_by(user_id: user_2.id).first_unread_pm_at).to eq_time(10.minutes.ago)
end
end
+
+ describe '#destroy!' do
+ it 'removes `primary_group_id`, `flair_group_id` and `title` for user' do
+ group = Fabricate(:group, title: 'Group... | [levels->[notification_levels],all,let,to_not,describe,freeze_time,muted_tags,create!,eq_time,ago,remove,tracking_tags,it,name,watching_first_post_tags,to,contain_exactly,default_notification_level,updated_at,muted_category_ids,save!,watching_tags,allowed_groups,create_post,watching_category_ids,require,regular_categor... | expects first unread pm at. | I'm not sure if this is correct because the `GroupUser` callbacks will only remove `primary_group_id` for the user. I think the relevant assertions should live in the test files of the model where the callbacks are present. |
@@ -24,6 +24,8 @@ import (
log "github.com/Sirupsen/logrus"
+ "github.com/vmware/vic/lib/apiservers/engine/proxy"
+
"golang.org/x/net/context"
"github.com/docker/distribution/digest"
| [SearchRegistryForImages->[Errorf],ImagesPrune->[Errorf],ImportImage->[Errorf],ExportImage->[Errorf],Images->[IncludeImage,Begin,Sprintf,Include,End,GetImages,ImageCache,ValidateImageFilters],ImageHistory->[Errorf],TagImage->[WithTag,WithName,String,ImageCache,Log,Get,AddReference,RepositoryCache],ImageDelete->[LayerCa... | Package containing all of the functions related to a given object. - name of the container that matches the tag. | keep all imports vmware/vic related in one block. |
@@ -145,8 +145,9 @@ def dummy_stage(tmp_dir, dvc):
def make(path="dvc.yaml", name="dummy_stage", **kwargs):
from dvc.stage import PipelineStage, create_stage
+ cmd = kwargs.get("cmd", "command")
stage = create_stage(
- PipelineStage, dvc, path, name=name, cmd="", **kwargs
+ ... | [pytest_addoption->[_get_opt],pytest_configure->[_get_opt,DVCTestConfig],pytest_runtest_setup->[apply_marker],DVCTestConfig->[apply_marker->[requires]]] | Create a dummy stage for the pipeline. | I'll look into this on later iterations. It should never be empty. |
@@ -847,7 +847,7 @@ ik_btr_drain(void **state)
ik_btr_query(NULL);
while (1) {
int creds = drain_creds;
- bool empty = false;
+ bool empty = true;
int rc;
rc = dbtree_drain(ik_toh, &creds, NULL, &empty);
| [No CFG could be retrieved] | Drains all records from the btree. Drained KVs D_PRINT - Drained of KVs D_PRINT. | What's the point of all above btree drain changes? Is it for fixing defect? It looks to me the original code is easier for reading. |
@@ -48,7 +48,7 @@
<label class="form-control-label" for="newPassword" jhiTranslate="global.form.newpassword.label">New password</label>
<input type="password" class="form-control" id="newPassword" name="newPassword"
placeholder="{{ 'globa... | [No CFG could be retrieved] | region > Generate a list of all the possible password contexts. A UI element for the n - grams of the n - grams of the n. | Why not use the same name? I've noticed the same name is used as data-cy value in another file, that's why I ask |
@@ -25,6 +25,7 @@ from pants.backend.python.macros.python_artifact import PythonArtifact
from pants.backend.python.macros.python_requirements_caof import PythonRequirementsCAOF
from pants.backend.python.subsystems import ipython, pytest, python_native_code, setuptools
from pants.backend.python.target_types import (
... | [rules->[rules],build_file_aliases->[BuildFileAliases]] | Creates a new object from a given object. All rules in the hierarchy of the given object. | If you agree with renaming the symbol, this class should be renamed too. |
@@ -20,7 +20,7 @@ print(__doc__)
import numpy as np
import mne
from mne.datasets import sample
-from mne.fiff import Raw, pick_types
+from mne.io import Raw, pick_types
from mne.minimum_norm import apply_inverse_epochs, read_inverse_operator
from mne.connectivity import spectral_connectivity
from mne.viz import c... | [read_events,read_inverse_operator,circular_layout,apply_inverse_epochs,enumerate,savefig,figure,read_annot,plot_connectivity_circle,show,dict,extend,list,append,print,mean,data_path,extract_label_time_course,endswith,sorted,len,zip,index,spectral_connectivity,Raw,Epochs,pick_types] | This example computes all - to - all connectivity between 68 regions in the source space based on Find the epochs for a left auditory condition. | I'm also wondering whether picking functionality is well placed in io. My tendency over the last years is to have this in the global name space ... |
@@ -976,7 +976,11 @@ foreach ($listofreferent as $key => $value)
$date = ($element->date_commande ? $element->date_commande : $element->date_valid);
}
elseif ($tablename == 'supplier_proposal') $date = $element->date_validation; // There is no other date for this
- elseif ($tablena... | [sortElementsByClientName->[fetch,fetch_thirdparty],fetch,getSommePaiement,getDocumentsLink,getNomUrl,showCategories,getAmount,initHooks,fetchComments,get_element_list,load,restrictedProjectArea,executeHooks,loadLangs,update_element,remove_element,close,getSumOfAmount,getProjectsAuthorizedForUser,textwithpicto,selectDa... | Print a single element in a group of possible categories. prints a single dayhour element. | What is the dateo of an intervention ? This field seems to not be used. An intervention has a date of creation and validation. The other dates are on the line level |
@@ -8,8 +8,8 @@
*/
/* Macros to build Self test data */
-#define ITM(x) x, sizeof(x)
-#define ITM_STR(x) x, (sizeof(x) - 1)
+#define ITM(x) ((void *)&x), sizeof(x)
+#define ITM_STR(x) ((void *)&x), (sizeof(x) - 1)
#define ST_KAT_PARAM_END() { "", 0, NULL, 0 }
#define ST_KAT_PARAM_BIGNUM(name, data) ... | [No CFG could be retrieved] | Creates a non - standard structure from a non - standard structure. private int ST_KAT_DIGEST = 0 ;. | This is weird change, because ST_KAT_PARAM_UTF8STRING is used with C string literals elsewhere in the file. So better just not use it for the sshkdf_type case. |
@@ -310,7 +310,7 @@ func (r *Rotator) purgeOldBackups() error {
}
func (r *Rotator) purgeOldIntervalBackups() error {
- files, err := filepath.Glob(r.filename + "*")
+ files, err := filepath.Glob(r.filename + "-*")
if err != nil {
return errors.Wrap(err, "failed to list existing logs during rotation")
}
| [Sync->[Sync],openFile->[dirMode,dir],closeFile->[Close],rotate->[closeFile,purgeOldBackups],Write->[Write],rotateByInterval->[Rotate],purgeOldSizedBackups->[backupName],openNew->[dirMode,dir],rotateBySize->[backupName]] | purgeOldIntervalBackups deletes all logs that were created during the rotation. | what happens to the other files? like `filebeat.3`? are they ignored? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.