patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -30,6 +30,7 @@ public interface Plumber
*/
public void startJob();
+ public int add(InputRow row);
public Sink getSink(long timestamp);
public <T> QueryRunner<T> getQueryRunner(Query<T> query);
| [No CFG could be retrieved] | start job - start job. | can you remove getSink? |
@@ -31,10 +31,13 @@ def render_file(relative_src_path: str, src_file: str, to_file: str, modifier="+
else:
namespace = f"allennlp.{relative_src_namespace}.{src_base}{modifier}"
- args = ["mathy_pydoc", namespace]
- call_result = check_output(args, env=os.environ).decode("utf-8")
+ sys.argv = ["mathy_pydoc", namespace]
+ output = io.StringIO()
+ with redirect_stdout(output):
+ main()
+
with open(to_file, "w") as f:
- f.write(call_result)
+ f.write(output.getvalue())
print(f"Built docs for {src_file}: {to_file}")
| [build_docs_for_file->[render_file],build_docs->[build_docs_for_file,build_docs],build_docs] | Shells out to pydocmd which creates a. md file from the docstrings of. | If it just gets written to a file, why not do `with redirect_stdout(f):`? |
@@ -78,7 +78,7 @@ type DB struct {
stateObjects map[common.Address]*Object
stateObjectsPending map[common.Address]struct{} // State objects finalized but not yet written to the trie
stateObjectsDirty map[common.Address]struct{}
- stateValidators map[common.Address]*stk.ValidatorWrapper
+ stateValidators *lru.Cache
// DB error.
// State objects are used by the consensus core and VM which are
| [Commit->[Commit,IntermediateRoot],SetNonce->[SetNonce],SetBalance->[SetBalance],createObject->[getDeletedStateObject,setStateObject],SetCode->[SetCode],GetValidatorFirstElectionEpoch->[getStateObject,GetState],UnsetValidatorFlag->[SetState],AddReward->[ValidatorWrapper],AddBalance->[AddBalance],SetState->[SetState],updateStateObject->[setError],SetValidatorFlag->[SetState],SetValidatorFirstElectionEpoch->[SetState],GetState->[GetState],UpdateValidatorWrapper->[SetCode],deleteStateObject->[setError],IntermediateRoot->[Finalise,updateStateObject,deleteStateObject],SubBalance->[SubBalance],GetCodeSize->[setError],IsValidator->[IsValidator,getStateObject],ForEachStorage->[getStateObject],GetCommittedState->[GetCommittedState],getDeletedStateObject->[setError,Error],ValidatorWrapperCopy->[GetCode],GetOrNewStateObject->[getStateObject],CreateAccount->[createObject]] | Put - stores a single non - empty object in the merkle trie. This function returns a list of revisions for a given n - th node. | This stateValidators is like a staged representation of the validatorWrappers in memory for easy modification without having to serialize/deserialize from the account.code field everything it's modified. This map keeps track of all the modifications which will needs to be committed to stateDB eventually. Changing it to cache with a limit could potentially lose modificaiton data for the validatorWrappers. |
@@ -164,6 +164,17 @@ class RaidenAPI:
token_network_identifier,
)
+ has_enough_balance, estimated_required_balance = has_enough_gas_escrow(
+ self.raiden,
+ channels_to_open=initial_channel_target,
+ )
+
+ if not has_enough_balance:
+ raise InsufficientGasEscrow((
+ 'Account balance below the estimated amount necessary to finish all channel'
+ f'lifecycles. Balance of at least {estimated_required_balance} wei needed.'
+ ))
+
connection_manager.connect(
funds,
initial_channel_target=initial_channel_target,
| [RaidenAPI->[get_channel_events->[get_channel_list],get_token_network_events->[get_token_network_events],start_health_check_for->[start_health_check_for]]] | Connects a given token network to a given token address. | missing space character at at the end this string |
@@ -34,9 +34,15 @@ namespace NServiceBus
public Task Stop()
{
+ if (tokenSource == null)
+ {
+ return TaskEx.CompletedTask;
+ }
+
tokenSource.Cancel();
tokenSource.Dispose();
- return task;
+
+ return task ?? TaskEx.CompletedTask;
}
Task task;
| [AsyncTimer->[Task->[Cancel,Dispose],Start->[Token,IsCancellationRequested,None,ConfigureAwait,errorCallback,Run]]] | Stop the task if it is not already stopped. | did you ran into a scenario where the tokenSource was null? I think we don't stop FST which didn't run. Also, wouldn't it make more sense to check for `task`? |
@@ -5,6 +5,8 @@ class StoreSpMetadataInSession
end
def call
+ return unless sp_request
+
session[:sp] = {
issuer: sp_request.issuer,
loa3: loa3_requested?,
| [StoreSpMetadataInSession->[call->[requested_attributes,issuer,uuid,url,loa3_requested?],loa3_requested?->[loa],sp_request->[find_by],attr_reader]] | Stores the nack in the session for later retrieval. | This PR gives me a little heartburn. If this is a genuine problem, we should at least *log* something about it so we know when it happens (and how often), and possibly enough information that we can identify what user is in this state. Returning this error to the user with a 500 might be reasonable until we figure out what's causing it. If the user is providing a broken/invalid request ID, maybe the right thing is just to generate another error with a 200 or 4xx response code. The only thing I'd prefer we avoid is an uncaught exception that then pages us through New Relic. |
@@ -51,6 +51,13 @@ $ltmPoolEntry = snmpwalk_array_num($device, '1.3.6.1.4.1.3375.2.2.5.1.2.1', 0);
$ltmPoolMemberEntry = snmpwalk_array_num($device, '1.3.6.1.4.1.3375.2.2.5.3.2.1', 0);
$ltmPoolMbrStatusEntry = snmpwalk_array_num($device, '1.3.6.1.4.1.3375.2.2.5.6.2.1', 0);
+//Check if GTM modeul is running and run object discovery.
+if ((snmp_get($device, 'sysModuleAllocationProvisionLevel.3.103.116.109', '-Ovqs', 'F5-BIGIP-SYSTEM-MIB')) !=none) {
+ $gtmWideIPEntry = snmpwalk_array_num($device, '1.3.6.1.4.1.3375.2.3.12.1.2.1', 0);
+ $gtmWideStatusEntry = snmpwalk_array_num($device, '1.3.6.1.4.1.3375.2.3.12.3.2.1', 0);
+ $gtmPoolEntry = snmpwalk_array_num($device, '1.3.6.1.4.1.3375.2.3.6.2.3.1.1', 0);
+}
+
/*
* False == no object found - this is not an error, OID doesn't exist.
* null == timeout or something else that caused an error, OID may exist but we couldn't get it.
| [deleteComponent,setComponentPrefs,getComponents,createComponent] | This function extracts all the components for a device and extracts the LTM ones. This function is called from the LTMStatus. php file. | Is this supposed to be here? |
@@ -511,14 +511,16 @@ func (b *Block) WithSeal(header *block.Header) *Block {
}
// WithBody returns a new block with the given transaction and uncle contents.
-func (b *Block) WithBody(transactions []*Transaction, uncles []*block.Header, incomingReceipts CXReceiptsProofs) *Block {
+func (b *Block) WithBody(transactions []*Transaction, stakingTxns []*staking.StakingTransaction, uncles []*block.Header, incomingReceipts CXReceiptsProofs) *Block {
block := &Block{
header: CopyHeader(b.header),
transactions: make([]*Transaction, len(transactions)),
+ stakingTransactions: make([]*staking.StakingTransaction, len(stakingTxns)),
uncles: make([]*block.Header, len(uncles)),
incomingReceipts: make([]*CXReceiptsProof, len(incomingReceipts)),
}
copy(block.transactions, transactions)
+ copy(block.stakingTransactions, stakingTxns)
copy(block.incomingReceipts, incomingReceipts)
for i := range uncles {
block.uncles[i] = CopyHeader(uncles[i])
| [ReceiptHash->[ReceiptHash],Uint64->[Uint64],Epoch->[Epoch],Sort->[Sort],NumberU64->[Uint64,Number],Vdf->[Vdf],Extra->[Extra],Body->[Transactions,StakingTransactions,IncomingReceipts,With,Uncles,Body],Coinbase->[Coinbase],GasLimit->[GasLimit],GasUsed->[GasUsed],Root->[Root],OutgoingReceiptHash->[OutgoingReceiptHash],ShardID->[ShardID],AddShardState->[Hash],MarshalText->[MarshalText],MixDigest->[MixDigest],Number->[Number],Time->[Time],Bloom->[Bloom],Hash->[Hash],ParentHash->[ParentHash],Vrf->[Vrf],Logger->[Logger],TxHash->[TxHash],Number] | WithBody returns a copy of the block with the given transaction uncles and incoming receipts. | This function is supposed to initialize all block fields by design but failed to do so, and we didn't detect that when we added `stakingTransactions` because member initializations were tagged; can you remove tags so that similar future mistakes result in compile error right here? (Thanks Ethereum for the hint.) |
@@ -16,15 +16,14 @@
*/
package org.apache.hadoop.ozone.container.common.statemachine;
-import org.apache.hadoop.hdds.conf.Config;
-import org.apache.hadoop.hdds.conf.ConfigGroup;
-import org.apache.hadoop.hdds.conf.ConfigType;
-import org.apache.hadoop.hdds.conf.PostConstruct;
+import org.apache.hadoop.hdds.conf.*;
import static org.apache.hadoop.hdds.conf.ConfigTag.DATANODE;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.time.Duration;
+
/**
* Configuration class used for high level datanode configuration parameters.
*/
| [DatanodeConfiguration->[validate->[warn],getLogger]] | Creates a new configuration object for a single high level datanode. Maximum number of replication commands a single datanode can execute simultaneously. | Please avoid star imports. |
@@ -283,7 +283,7 @@ public class BndMavenPlugin extends AbstractMojo {
Jar bndJar = builder.build();
// Expand Jar into target/classes
- expandJar(bndJar, outputDirectory);
+ expandJar(bndJar, outputDir);
} else {
logger.debug("No build");
}
| [BndMavenPlugin->[loadParentProjectProperties->[loadParentProjectProperties],loadProjectProperties->[loadProperties]]] | This method is responsible for generating the required project. This method is used to build a dependency jar. This method is called by the build process to populate the configuration of the builder. This method is called to build the bnd jar if necessary. | There are now 3 output dir variables: classedDir, ouputDir and the local outputDirectory. This is confusing. Why are there so many. Can we collapse outputDirectory and outputDir together? |
@@ -6,6 +6,12 @@ using System.Text.RegularExpressions;
namespace System.ComponentModel.Design
{
+ internal static partial class DesignerVerbRegex
+ {
+ [RegexGenerator(@"\(\&.\)")]
+ internal static partial Regex GetParameterReplacementRegex();
+ }
+
/// <summary>
/// Represents a verb that can be executed by a component's designer.
/// </summary>
| [DesignerVerb->[ToString->[ToString],Replace,VerbFirst,Empty]] | Creates a menu item that can be executed on the menu item. Magic number. | We shouldn't need to introduce a new type for this. GetParameterReplacementRegex can just be a private partial static on DesignerVerb, which can also be marked partial; the partial has no affect on the compiled metadata. |
@@ -22,6 +22,8 @@ import org.apache.beam.sdk.transforms.PTransform;
/**
* The interface for values that can be input to and output from {@link PTransform PTransforms}.
+ *
+ * <p>It is recommended to extend {@link PValueBase}
*/
public interface PValue extends POutput, PInput {
| [No CFG could be retrieved] | PUBLIC METHODS For a given base - type PTupleTag this method returns the name of Finish specifying the input of the . | Ideally `PCollectionView` will not be a `PValue` by the stable release, and this interface can also disappear. |
@@ -48,6 +48,7 @@ from pip._internal.vcs import vcs
try:
import ssl # noqa
+
HAS_TLS = True
except ImportError:
HAS_TLS = False
| [PipSession->[__init__->[MultiDomainBasicAuth,SafeFileCache,InsecureHTTPAdapter,LocalFSAdapter,user_agent]],_download_url->[resp_read,written_chunks],PipXmlrpcTransport->[__init__->[__init__]],_download_http_url->[_download_url,get],is_vcs_url->[_get_used_vcs_backend],unpack_http_url->[_copy_file],unpack_file_url->[is_dir_url,_copy_file,url_to_path],is_dir_url->[url_to_path],get_file_content->[get],unpack_url->[is_vcs_url,unpack_vcs_link,unpack_http_url,is_file_url,unpack_file_url,PipSession]] | Get a single object from the network. Return a string representing the user agent. | These newline changes seem unrelated... Could you remove them or is there some reason I'm not seeing? |
@@ -94,7 +94,16 @@ define([
trackedObject = value;
dynamicObjectView = typeof value !== 'undefined' ? new DynamicObjectView(value, viewer.scene, viewer.centralBody.getEllipsoid()) : undefined;
}
- viewer.scene.getScreenSpaceCameraController().enableTilt = typeof value === 'undefined';
+ var sceneMode = viewer.scene.getFrameState().mode;
+
+ if( sceneMode === SceneMode.COLUMBUS_VIEW || sceneMode === SceneMode.SCENE2D) {
+ viewer.scene.getScreenSpaceCameraController().enableTranslate = typeof value === 'undefined';
+ }
+
+ if (sceneMode === SceneMode.COLUMBUS_VIEW || sceneMode === SceneMode.SCENE3D){
+ viewer.scene.getScreenSpaceCameraController().enableTilt = typeof value === 'undefined';
+ }
+
}
}
});
| [No CFG could be retrieved] | Provides access to the dynamic object currently being tracked by the camera. | Knitpicking, I know, but can you remove this blank like and run the formatter on the new block of code. |
@@ -1,6 +1,7 @@
/*
Minetest
Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
+(C) 2018 crazyBaboon, nuno360@gmail.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
| [checkMovementCheat->[getName,setBasePosition],onAttach->[getType],getDescription->[getName],clearParentAttachment->[setAttachment],clearChildAttachments->[setAttachment],step->[getPropertyPacket,step,setHP],setYawAndSend->[setYaw],setWieldedItem->[getWieldList,getInventory],getInventoryLocation->[getName],getWieldedItem->[getWieldList,getInventory],getWieldedItemOrHand->[getWieldList,getInventory],setPitchAndSend->[setPitch],punch->[getDescription,clearParentAttachment,clearChildAttachments,getHP,getName,getType,setHP],setPos->[setBasePosition],getClientInitializationData->[getPropertyPacket,getName,getClientInitializationData,getHP], UnitSAO->[getType],onDetach->[getType],moveTo->[setBasePosition]] | Create a new server - active object from a list of server - active objects. Creates a new server - active object. | You literally changed like 3 lines in this file (static cache, if start, if end). There are 38 other contributors to this file who have done more |
@@ -2115,7 +2115,7 @@ p {
if ( ! $old_version ) { // For new sites
// Setting up jetpack manage
- Jetpack_Options::update_options( 'json_api_full_management', true );
+ Jetpack_Options::update_option( 'json_api_full_management', true );
}
}
| [Jetpack->[admin_notices->[opt_in_jetpack_manage_notice,can_display_jetpack_manage_notice],admin_page_load->[disconnect,activate_new_modules,unlink_user,can_display_jetpack_manage_notice],dashboard_widget_connect_to_wpcom->[build_connect_url],check_identity_crisis->[get_cloud_site_options],register->[generate_secrets,get_remote_query_timeout_limit,validate_remote_register_response],sync_reindex_trigger->[current_user_is_connection_owner],authenticate_jetpack->[verify_xml_rpc_signature],admin_page->[current_user_is_connection_owner,build_connect_url,get_option],sync_reindex_status->[current_user_is_connection_owner],build_connect_url->[sign_role,translate_current_user_to_role],opt_in_jetpack_manage_notice->[opt_in_jetpack_manage_url],display_activate_module_link->[opt_in_jetpack_manage_url],check_news_subscription->[current_user_is_connection_owner],verify_json_api_authorization_request->[add_nonce],jetpack_getOptions->[get_connected_user_data],toggle_module_on_wpcom->[register],is_single_user_site_invalidate->[is_single_user_site],subscribe_to_news->[current_user_is_connection_owner],alert_identity_crisis->[build_reconnect_url]]] | This method is called when the version of the jetpack is changed. | Shouldn't we use `activate_module( 'manage' )` here? |
@@ -11,8 +11,14 @@ class Chapel(AutotoolsPackage):
portable, scalable and open-source."""
homepage = "https://chapel-lang.org/"
- url = "https://github.com/chapel-lang/chapel/releases/download/1.20.0/chapel-1.20.0.tar.gz"
+ url = "https://github.com/chapel-lang/chapel/archive/refs/tags/1.24.1.tar.gz"
- version('1.20.0', sha256='08bc86df13e4ad56d0447f52628b0f8e36b0476db4e19a90eeb2bd5f260baece')
- version('1.19.0', sha256='c2b68a20d87cc382c2f73dd1ecc6a4f42fb2f590b0b10fbc577382dd35c9e9bd')
- version('1.18.0', sha256='68471e1f398b074edcc28cae0be26a481078adc3edea4df663f01c6bd3b6ae0d')
+ version('1.24.1', sha256='9250824b8efa038941bc08314bbdddf6368e0b86a66a0e8c86169a0eb425e536')
+ version('1.24.0', sha256='c54882b21f2c79e47156e1bd512b2460a2934e38d5edd081c93cf410a266e536')
+ version('1.23.0', sha256='9350261afd9421254c516bcdd899ca5a431c011b79893029625c8d70fa157452')
+ version('1.22.1', sha256='dc3afeb2a873059ac6cdc25e2167d9d677f96ce247bf66ec589c577db05fba5b')
+ version('1.22.0', sha256='b0a4d25ee38483d172678bec9a28d267d5da04a2fcaa2e8d9d399f88cc8bf170')
+ version('1.21.0', sha256='38914b0765836fda0f2ad4dbd0c1ec95ea4cb4bac7238a3f82640239c3c196fa')
+ version('1.20.0', sha256='723283f3d6cecb8f7a1c53ec688864c24f299cf960f3ab6b5d7d580c64e662d4')
+ version('1.19.0', sha256='702390a9b6b8a5c03ddaad94b92273a153e9bd7801fd735e3e63252ee3527e38')
+ version('1.18.0', sha256='5640b9e8206781a06aa71e77d216c6673ad41ef8b5d225100800457f534e4cf4')
| [Chapel->[version]] | This function returns a list of all the portable scalable and open - source version. | The previous `url` is more robust to change, since it's an artifact put there by developers (while the new one is generated automatically by Github and its sha may change over time). Can you revert to the previous url? |
@@ -1358,7 +1358,6 @@ module Engine
bundles.select { |bundle| @round.active_step.can_sell?(player, bundle) }
end
- # rubocop:disable Lint/UnusedMethodArgument
def sell_shares_and_change_price(bundle, allow_president_change: true, swap: nil)
corporation = bundle.corporation
price = corporation.share_price.price
| [Game->[use_pool_diesel->[create_pool_diesel],buy_reorg_machines->[replicate_machines,buy_reorg_train],terminus?->[mine_open?],concession_complete!->[concession_incomplete?],check_diesel_nodes->[diesel?,allocate_pool_diesel],revenue_for->[diesel?,find_mine_in_hex,mine_open?],public_mine_slots->[public_mine?],free_tile_reservation!->[concession_tile],stop_on_other_route?->[train_type],get_slot->[public_mine?],reserve_tile!->[concession_tile],calculate_mine_revenue->[connected_mine?],machine->[train_is_machine?],buy_reorg_train->[buy_train],pres_change_ok?->[concession_pending?],add_train_to_slot->[public_mine_mines,scrap_train,switcher,train_is_switcher?,train_is_machine?,machine],diesel_revenue->[stop_on_other_route?],minor_maintenance_costs->[train_maintenance,machine_size],concession_route_done?->[concession_incomplete?],add_tile_reservation!->[concession_tile],check_hex_reentry->[diesel?],swap_switchers->[switcher,public_mine_mines],insolvent!->[convert!,scrap_train],corporate_card_minors->[public_mine_mines],concession_unpend!->[concession_pending?],check_other->[train_type,diesel?],check_intersection->[train_name],corporation_view->[public_mine?],status_str->[maintenance_costs,mine_open?],close_mine!->[scrap_train],add_subtrains!->[use_pool_diesel,train_is_train?,allocate_pool_diesel],update_mine_revenue->[mine_revenue,maintenance_costs],entity_has_diesel?->[railway?,diesel?],connect_mine!->[connected_mine?],mhe_buy_train->[buy_train],public_mine_mines->[public_mine?],mine_revenue->[mine_revenue,public_mine?,switcher_size,machine_size,calculate_mine_revenue],advance_concession_phase!->[concession_pending?],must_buy_train?->[concession_pending?],can_sell_train?->[train_is_train?],any_slot_available?->[public_mine?],concession_routes->[railway?],visit_route->[visit_route],check_mine_connected?->[connected_mine?],switcher->[train_is_switcher?],maintenance_costs->[train_maintenance,public_mine?,railway?,minor_maintenance_costs],reorg_costs->[train_is_train?]]] | Find all bundles that can be sellable by the player and the specified Corporation. | Why was this removed? |
@@ -0,0 +1,13 @@
+'use strict'
+
+module.exports = {
+ up: (queryInterface, Sequelize) => {
+ return queryInterface.addColumn('Message', 'contentHash', {
+ type: Sequelize.STRING(66)
+ })
+ },
+
+ down: (queryInterface) => {
+ return queryInterface.removeColumn('Message', 'contentHash')
+ }
+}
| [No CFG could be retrieved] | No Summary Found. | I'd recommend using String rather String(66) in case we change hash function in future. From DB perspective, there is no storage saving by using String)66). |
@@ -182,7 +182,11 @@ def main():
demos_to_test = DEMOS
with temp_dir_as_path() as global_temp_dir:
- dl_dir = prepare_models(auto_tools_dir, args.downloader_cache_dir, args.mo, global_temp_dir, demos_to_test, args.precisions)
+ if args.models_dir:
+ print("\nRunning on pre-converted IRs...\n")
+ dl_dir = args.models_dir
+ else:
+ dl_dir = prepare_models(auto_tools_dir, args.downloader_cache_dir, args.mo, global_temp_dir, demos_to_test, args.precisions)
num_failures = 0
| [main->[option_to_args->[resolve_arg],collect_result,option_to_args,temp_dir_as_path,prepare_models,parse_suppressed_device_list,get_models,parse_args],parse_args->[parse_args],main] | Main function for the test. A file containing the n - nan nanomorphs. Get a single test case by model name. | is it debug message and should be removed? If no, I think it may be useful also print path to the directory in message |
@@ -2031,6 +2031,15 @@ public class Combine {
throws CannotProvideCoderException {
return accumCoder;
}
+ @Override
+ public void populateDisplayData(DisplayData.Builder builder) {
+ super.populateDisplayData(builder);
+ builder.add(DisplayData.item("fanoutFn", hotKeyFanout.getClass())
+ .withLabel("Fanout Function"));
+ if (hotKeyFanout instanceof HasDisplayData) {
+ ((HasDisplayData) hotKeyFanout).populateDisplayData(builder);
+ }
+ }
};
postCombine =
new KeyedCombineFnWithContext<K, InputOrAccum<InputT, AccumT>, AccumT, OutputT>() {
| [Combine->[BinaryCombineLongFn->[addInput->[apply],mergeAccumulators->[apply,createAccumulator],FromLongCodingFunction->[hashCode->[hashCode],apply->[wrap]],createAccumulator->[identity,wrap],ToLongCodingFunction->[hashCode->[hashCode]]],AccumulatingCombineFn->[addInput->[addInput],extractOutput->[extractOutput],mergeAccumulators->[createAccumulator,mergeAccumulator]],BinaryCombineFn->[addInput->[apply],extractOutput->[identity],mergeAccumulators->[apply,createAccumulator]],GroupedValues->[populateDisplayData->[populateDisplayData],getDefaultOutputCoder->[of,getDefaultOutputCoder,getKvCoder],apply->[getDefaultOutputCoder,apply,withSideInputs],getKvCoder->[of],of],groupedValues->[groupedValues,displayDataForFn],BinaryCombineDoubleFn->[addInput->[apply],ToDoubleCodingFunction->[hashCode->[hashCode]],FromDoubleCodingFunction->[hashCode->[hashCode],apply->[wrap]],mergeAccumulators->[apply,createAccumulator],createAccumulator->[identity,wrap]],Globally->[insertDefaultValueIfEmpty->[defaultValue,apply],populateDisplayData->[populateDisplayData],apply->[fewKeys,asKeyedFn,apply,withSideInputs]],IterableCombineFn->[populateDisplayData->[populateDisplayData],of->[of],mergeToSingleton->[apply],extractOutput->[apply]],KeyedCombineFn->[forKey->[addInput->[addInput],getDefaultOutputCoder->[getDefaultOutputCoder],extractOutput->[extractOutput],mergeAccumulators->[mergeAccumulators],getAccumulatorCoder->[getAccumulatorCoder],createAccumulator->[createAccumulator],compact->[compact]],apply->[addInput,extractOutput,createAccumulator]],CombineFn->[defaultValue->[extractOutput,createAccumulator],asKeyedFn->[addInput->[addInput],getDefaultOutputCoder->[getDefaultOutputCoder],extractOutput->[extractOutput],mergeAccumulators->[mergeAccumulators],getAccumulatorCoder->[getAccumulatorCoder],createAccumulator->[createAccumulator],compact->[compact]],apply->[addInput,extractOutput,createAccumulator]],GloballyAsSingletonView->[populateDisplayData->[populateGlobalDisplayData,populateDisplayData],apply->[defaultValue,apply,withFanout]],globally->[globally],HolderCoder->[decode->[decode],verifyDeterministic->[verifyDeterministic],encode->[encode]],perKey->[perKey,displayDataForFn],PerKey->[populateDisplayData->[populateDisplayData],apply->[apply,withSideInputs],of],BinaryCombineIntegerFn->[addInput->[apply],ToIntegerCodingFunction->[hashCode->[hashCode]],mergeAccumulators->[apply,createAccumulator],createAccumulator->[identity],FromIntegerCodingFunction->[hashCode->[hashCode],apply->[wrap]]],PerKeyWithHotKeyFanout->[populateDisplayData->[populateDisplayData],InputOrAccum->[InputOrAccumCoder->[encode->[encode],of->[InputOrAccumCoder],getCoderArguments->[of],verifyDeterministic->[verifyDeterministic],decode->[input,accum,decode]]],applyHelper->[addInput->[addInput,of,mergeAccumulators],getDefaultOutputCoder->[getDefaultOutputCoder],extractOutput->[extractOutput],mergeAccumulators->[mergeAccumulators],createAccumulator->[createAccumulator],compact->[compact],getAccumulatorCoder,of,apply,perKey]]]] | Applies the helper to the given input. This method is used to combine input accumulators into a single accumulator. Override to provide a higher order accumulator. Returns the accumulator for the given key. | I would remove this. We take in `SerializableFunction` which doesn't itself implement `HasDisplayData`. I don't see any use-case for adding display data to the hotkey fun. If there is a use-case, then we should keep it. |
@@ -14,6 +14,7 @@ def primary_email_change_event(email, uid, timestamp):
"""Process the primaryEmailChangedEvent."""
try:
profile = UserProfile.objects.get(fxa_id=uid)
+ timestamp = dateutil_parser(timestamp)
if (not profile.email_changed or
profile.email_changed < timestamp):
profile.update(email=email, email_changed=timestamp)
| [primary_email_change_event->[error,get,update,info,warning],getLogger] | Process the primaryEmailChangedEvent. | We could just change `process_fxa_event` to not do `datetime.fromtimestamp` first and pass along the raw int value to the task, then convert it from a unix-style timestamp in the task instead. Seems superfluous to do int>datetime>string>datetime |
@@ -98,7 +98,7 @@ public class CardBrowserTest extends RobolectricTest {
public void selectNoneIsVisibleWhenSelectingOne() {
CardBrowser browser = getBrowserWithMultipleNotes();
advanceRobolectricLooperWithSleep();
- selectOneOfManyCards(browser);
+ selectOneOfManyCards(browser, 0);
advanceRobolectricLooperWithSleep();
assertThat(browser.isShowingSelectNone(), is(true));
}
| [CardBrowserTest->[assertUndoDoesNotContain->[shadowOf,assertThat,getDefault,getString,containsString,toString,toLowerCase,findItem,not],tagWithBracketsDisplaysProperly->[getBrowserWithNoNewCards,addTag,getCardCount,filterByTag,flush,addNoteUsingBasicModel,advanceRobolectricLooperWithSleep,is,assertThat],browserIsNotInitiallyInMultiSelectModeWithNoCards->[getBrowserWithNoNewCards,isInMultiSelectMode,is,assertThat],getCheckedCard->[get,getCheckedCardIds,hasSize,assertThat,getPropertiesForCardId],deleteCardAtPosition->[getCardIds,clearCardData,removeCardFromCollection],selectDefaultDeck->[select],selectAllIsVisibleWhenSelectingOne->[getBrowserWithMultipleNotes,selectOneOfManyCards,is,isShowingSelectAll,assertThat],rescheduleDataTest->[singletonList,getCheckedCard,rescheduleWithoutValidation,advanceRobolectricLooperWithSleep,is,getColumnHeaderText,assertThat,checkCardsAtPositions,getBrowserWithNotes,getId],removeCardFromCollection->[remCards,singletonList],filterByFlagDisplaysProperly->[getBrowserWithNoNewCards,getCardCount,addNoteUsingBasicModel,advanceRobolectricLooperWithSleep,flagCardForNote,is,filterByFlag,assertThat],dataUpdatesAfterUndoReposition->[singletonList,getCheckedCard,repositionCardsNoValidation,advanceRobolectricLooperWithSleep,is,getColumnHeaderText,assertThat,onUndo,checkCardsAtPositions,getBrowserWithNotes,getId],addCardDeckISetIfDeckIsSelected->[getBrowserWithNoNewCards,selectDeckId,hasExtra,getLastDeckId,addDeck,is,getAddNoteIntent,assertThat,not],selectAllIsNotVisibleOnceCalled->[selectMenuItem,getBrowserWithMultipleNotes,advanceRobolectricLooperWithSleep,is,isShowingSelectAll,assertThat],repositionDataTest->[singletonList,getCheckedCard,repositionCardsNoValidation,advanceRobolectricLooperWithSleep,is,getColumnHeaderText,assertThat,checkCardsAtPositions,getBrowserWithNotes,getId],browserIsInMultiSelectModeWhenSelectingAll->[selectMenuItem,getBrowserWithMultipleNotes,is,assertThat,isInMultiSelectMode],browserIsNotInMultiSelectModeWhenSelectingNone->[selectMenuItem,getBrowserWithMultipleNotes,is,assertThat,isInMultiSelectMode],toLongArray->[get,size],selectAllIsNotVisibleWhenNoCardsInDeck->[is,getBrowserWithNoNewCards,isShowingSelectAll,assertThat],selectOneOfManyCards->[onItemLongClick,shadowOf,getOnItemLongClickListener,findViewById,IllegalStateException,getItemIdAtPosition,getChildAt,d],addCardDeckIsNotSetIfAllDecksSelectedAfterLoad->[getBrowserWithNoNewCards,assertThat,doesNotHaveExtra,selectAllDecks,is,addDeck,hasSelectedAllDecks,getAddNoteIntent],resetDataTest->[singletonList,getBrowserWithNoNewCards,getCheckedCard,firstCard,flush,setType,setQueue,setDue,advanceRobolectricLooperWithSleep,is,getColumnHeaderText,assertThat,checkCardsAtPositions,resetProgressNoConfirm,getId],browserIsNotInitiallyInMultiSelectModeWithCards->[getBrowserWithMultipleNotes,isInMultiSelectMode,is,assertThat],changeDeckViaTaskIsHandledCorrectly->[executeChangeCollectionTask,selectDefaultDeck,getDid,addDynamicDeck,getCheckedCardIds,assertThat,not,checkCardsAtPositions,getBrowserWithNotes],moveToNonDynamicDeckWorks->[getChangeDeckPositionFromId,assertDoesNotThrow,moveSelectedCardsToDeck,selectDefaultDeck,getDid,addDynamicDeck,advanceRobolectricLooperWithSleep,getCheckedCardIds,addDeck,is,assertThat,not,checkCardsAtPositions,getBrowserWithNotes],cannotChangeDeckToDynamicDeck->[getValidDecksForChangeDeck,equals,addDynamicDeck,getBrowserWithNotes,fail],browserDoesNotFailWhenSelectingANonExistingCard->[assertDoesNotThrow,deleteCardAtPosition,cardCount,equalTo,advanceRobolectricLooperWithSleep,assertThat,getBrowserWithNotes],selectionsAreCorrectWhenNonExistingCardIsRemoved->[deleteCardAtPosition,cardCount,checkedCardCount,equalTo,hasCheckedCardAtPosition,rerenderAllCards,is,assertThat,checkCardsAtPositions,getBrowserWithNotes],startupFromCardBrowserActionItemShouldEndActivityIfNoPermissions->[getResultCode,create,shadowOf,denyPermissions,isFinishing,saveControllerForCleanup,getNextStartedActivity,getComponent,get,requireNonNull,notNullValue,Intent,is,assertThat,getClassName,getApplicationContext],checkSearchString->[setDid,getSelectedDeckNameForUi,getBrowserWithNoNewCards,getCardCount,firstCard,flush,searchCards,addNoteUsingBasicModel,advanceRobolectricLooperWithSleep,addDeck,is,select,assertThat],browserIsInMultiSelectModeWhenSelectingOne->[getBrowserWithMultipleNotes,selectOneOfManyCards,is,assertThat,isInMultiSelectMode],selectAllIsVisibleWhenCardsInDeck->[assertThat,getBrowserWithMultipleNotes,is,isShowingSelectAll,greaterThan,cardCount],previewWorksAfterSort->[getBrowserWithNoNewCards,getIntExtra,getPosition,is,getLongArrayExtra,getId,replaceSelectionWith,assertThat,getPreviewIntent,checkCardsAtPositions,changeCardOrder],getBrowserWithNotes->[ensureCollectionLoadIsSynchronous,saveControllerForCleanup,start,visible,get,addNoteUsingBasicModel,advanceRobolectricLooperWithSleep,toString],selectMenuItem->[shadowOf,clickMenuItem,d],getBrowserWithNoNewCards->[ensureCollectionLoadIsSynchronous,saveControllerForCleanup,start,visible,get,advanceRobolectricLooperWithSleep],changeDeckIntegrationTestDynamicAndNon->[getValidDecksForChangeDeck,size,addDynamicDeck,getString,addDeck,is,add,assertThat,hasItem,getBrowserWithNotes],selectNoneIsVisibleOnceSelectAllCalled->[selectMenuItem,getBrowserWithMultipleNotes,isShowingSelectNone,advanceRobolectricLooperWithSleep,is,assertThat],getBrowserWithMultipleNotes->[getBrowserWithNotes],selectNoneIsVisibleWhenSelectingOne->[getBrowserWithMultipleNotes,selectOneOfManyCards,isShowingSelectNone,advanceRobolectricLooperWithSleep,is,assertThat],rescheduleUndoTest->[assertUndoDoesNotContain,singletonList,rescheduleWithoutValidation,assertUndoContains,advanceRobolectricLooperWithSleep,getId,checkCardsAtPositions,getBrowserWithNotes],assertUndoContains->[shadowOf,assertThat,getDefault,getString,containsString,toString,toLowerCase,findItem],flagCardForNote->[flush,setUserFlag,firstCard],flagValueIsShownOnCard->[getBrowserWithNoNewCards,get,userFlag,addNoteUsingBasicModel,flagCardForNote,is,assertThat,getPropertiesForCardId],addCardDeckISetIfDeckIsSelectedOnOpen->[getBrowserWithNoNewCards,hasExtra,getLastDeckId,addDeck,is,select,assertThat,getAddNoteIntent],canChangeDeckToRegularDeck->[getValidDecksForChangeDeck,equals,addDeck,getBrowserWithNotes,fail]]] | Select all cards in the browser when the user is displaying it. | Design: Could we add a method with a single parameter which defaults to 0 |
@@ -161,8 +161,16 @@ func Build(cfg *config.Config, masterSubnetID string, agentSubnetIDs []string, i
prop.ServicePrincipalProfile.ObjectID = config.ClientObjectID
}
- if prop.OrchestratorProfile.KubernetesConfig == nil {
- prop.OrchestratorProfile.KubernetesConfig = &vlabs.KubernetesConfig{}
+ var version string
+ if prop.OrchestratorProfile.OrchestratorRelease != "" {
+ version = prop.OrchestratorProfile.OrchestratorRelease + ".0"
+ } else if prop.OrchestratorProfile.OrchestratorVersion != "" {
+ version = prop.OrchestratorProfile.OrchestratorVersion
+ }
+ if common.IsKubernetesVersionGe(version, "1.12.0") {
+ if prop.OrchestratorProfile.KubernetesConfig == nil {
+ prop.OrchestratorProfile.KubernetesConfig = &vlabs.KubernetesConfig{}
+ }
prop.OrchestratorProfile.KubernetesConfig.ControllerManagerConfig = map[string]string{
"--horizontal-pod-autoscaler-downscale-stabilization": "30s",
"--horizontal-pod-autoscaler-cpu-initialization-period": "30s",
| [GetWindowsTestImages->[GetWindowsSku,HasWindowsAgents,New,Contains],HasNetworkPolicy->[Contains],HasAddon->[Bool],Write->[Printf,JSONMarshal,WriteFile],LoadTranslations,Printf,LoadContainerServiceFromFile,Join,Error,IsKubernetes,Println,ReadFile,Sprintf,IsAzureStackCloud,Unmarshal,Errorf,Process] | NodeCount returns the number of nodes that should be provisioned for a given environment. AnyAgentIsLinux returns true if there is at least 1 linux agent pool. | why do we only want to set a previously nil `KubernetesConfig` when k8s version >= 1.12.0? |
@@ -692,7 +692,7 @@ class AttentionLayer(nn.Module):
# calculate activation scores, apply mask if needed
if attn_mask is not None:
# remove activation from NULL symbols
- attn_w_premask.masked_fill_((~attn_mask), -NEAR_INF)
+ attn_w_premask.masked_fill_((~attn_mask), neginf(enc_out.dtype))
attn_weights = F.softmax(attn_w_premask, dim=1)
# apply the attention weights to the encoder states
| [RNNDecoder->[forward->[_transpose_hidden_state]],OutputLayer->[__init__->[Identity]],Seq2seq->[reorder_encoder_states->[_transpose_hidden_state],reorder_decoder_incremental_state->[reorder_decoder_incremental_state]],RNNEncoder->[forward->[_transpose_hidden_state],__init__->[UnknownDropout]]] | Compute attention over attention_params given input and hidden states. Computes the hidden state and the attention weights for a linear layer and tanh activation. | nit; would it be slightly safer to use `neginf(attn_w_premask.dtype)`? Or is it necessarily the case that we want `enc_out` and `attn_w_premask` to have the same dtype? |
@@ -12,6 +12,7 @@ namespace System.Net.Mail.Tests
private const string DisplayNameWithUnicode = "DisplayNameWith\u00C9\u00C0\u0106\u0100\u0109\u0105\u00E4Unicode";
private const string DisplayNameWithNoUnicode = "testDisplayName";
+
[Fact]
public void MailAddress_WithUnicodeDisplayAndMailAddress_ToStringShouldReturnDisplayNameInQuotesAndAddressInAngleBrackets()
{
| [MailAddressDisplayNameTest->[MailAddress_WithUnicodeDisplayAndMailAddress_ToStringShouldReturnDisplayNameInQuotesAndAddressInAngleBrackets->[ToString,DisplayName,Equal,Format],MailAddress_WithNonQuotedUnicodeDisplayAndMailAddress_ConstructorShouldReturnDisplayNameInQuotesAndAddressInAngleBrackets->[Equal,Format,DisplayName,Address,ToString],MailAddress_WithUnicodeDisplayAndMailAddress_ConstructorShouldReturnDisplayNameInQuotesAndAddressInAngleBrackets->[Equal,Format,DisplayName,Address,ToString],MailAddress_WithNoUnicodeDisplayAndMailAddress_ConstructorShouldReturnDisplayNameInQuotesAndAddressInAngleBrackets->[Equal,Format,DisplayName,Address,ToString],MailAddress_WithNoDisplayName_AndOnlyAddress_ToStringShouldOutputAddressOnlyWithNoAngleBrackets->[ToString,Equal],MailAddress_WithNoUnicodeDisplayAndMailAddress_ToStringShouldReturnDisplayNameInQuotesAndAddressInAngleBrackets->[Equal,Format,DisplayName,Address,ToString]]] | MailAddress_WithUnicodeDisplayAndMailAddress_ToStringShouldReturnDisplayNameInQuotesAndAddress. | NIT: extra empty line |
@@ -1012,7 +1012,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
/**
* Called by {@link Executor} to kill excessive executors from this computer.
*/
- /*package*/ void removeExecutor(final Executor e) {
+ protected void removeExecutor(final Executor e) {
final Runnable task = new Runnable() {
@Override
public void run() {
| [Computer->[getActions->[getActions],getACL->[getACL],isOnline->[isOffline],relocateOldLogs->[getName,relocateOldLogs],getMonitorData->[getName],setNode->[getNumExecutors],_doScript->[getChannel,getACL,_doScript],updateByXml->[replaceBy,checkPermission],remove->[remove],waitUntilOnline->[isOnline],waitUntilOffline->[isOffline],getHeapDump->[getChannel],getHostName->[getChannel],rss->[getUrl,getDisplayName],doDumpExportTable->[getChannel,call,checkPermission],cliConnect->[checkPermission],cliDisconnect->[checkPermission],getLog->[getLogFile],getNode->[getNode],doRssAll->[getBuilds],getEnvironment->[getChannel],isOffline->[getChannel],removeExecutor->[run->[addNewExecutorIfNecessary]],getSearchUrl->[getUrl],getThreadDump->[getChannel,getThreadDump],getIconAltText->[isOffline],getIcon->[isOffline],doConfigDotXml->[getNode,checkPermission],getIdleStartMilliseconds->[getIdleStartMilliseconds],ListPossibleNames->[call->[getDisplayName],getName],disconnect->[recordTermination,disconnect],resolveForCLI->[getName],doDoDelete->[getNode,checkPermission],setTemporarilyOffline->[getNode,setTemporarilyOffline],getSystemProperties->[getChannel,getSystemProperties],getTiedJobs->[getNode,getTiedJobs],doChangeOfflineCause->[setTemporarilyOffline,checkPermission],hasPermission->[hasPermission],isAcceptingTasks->[getNode,isAcceptingTasks],checkPermission->[checkPermission],getLogText->[getLogFile],DisplayExecutor->[hashCode->[hashCode],toString->[toString],equals->[equals]],isIdle->[isIdle],doConfigSubmit->[getNode,checkPermission],cliOnline->[checkPermission],getIconClassName->[isOffline],isManualLaunchAllowed->[isManualLaunchAllowed],doToggleOffline->[setTemporarilyOffline,checkPermission],getUrl->[getName],getBuilds->[getNode],replaceBy->[call->[getNode]],cliOffline->[checkPermission],countBusy->[countIdle],buildEnvironment->[getNode],isPartiallyIdle->[isIdle],getName]] | Remove an executor from the list of executors. | This is really unrelated to the stated purpose of the PR, right? |
@@ -31,6 +31,14 @@ type diskOutbox struct {
Records []chat1.OutboxRecord `codec:"O"`
}
+func NewOutboxID() (chat1.OutboxID, error) {
+ rbs, err := libkb.RandBytes(8)
+ if err != nil {
+ return nil, err
+ }
+ return chat1.OutboxID(rbs), nil
+}
+
func NewOutbox(g *globals.Context, uid gregor1.UID) *Outbox {
return &Outbox{
Contextified: globals.NewContextified(g),
| [RetryMessage->[dbKey,readDiskOutbox],clear->[dbKey],readDiskOutbox->[dbKey],MarkAsError->[dbKey,readDiskOutbox],RecordFailedAttempt->[dbKey,readDiskOutbox],insertMessage->[getMsgOrdinal],SprinkleIntoThread->[dbKey,readDiskOutbox,insertMessage],PullAllConversations->[dbKey,readDiskOutbox],PushMessage->[dbKey,newOutboxID,readDiskOutbox],RemoveMessage->[dbKey,readDiskOutbox]] | storage import imports a package containing the contents of a . clear clears outbox from disk and returns outboxID. | So frontend making RPC call just to make 8 random bytes? |
@@ -116,6 +116,17 @@ func (s *SharedDHKeyring) Sync(ctx context.Context) (err error) {
return nil
}
+func (s *SharedDHKeyring) getUPAK(ctx context.Context, lctx LoginContext, me *User) (*keybase1.UserPlusAllKeys, error) {
+ if me != nil {
+ tmp := me.ExportToUserPlusAllKeys(keybase1.Time(0))
+ return &tmp, nil
+ }
+ upakArg := NewLoadUserByUIDArg(ctx, s.G(), s.uid)
+ upakArg.LoginContext = lctx
+ upak, _, err := s.G().GetUPAKLoader().Load(upakArg)
+ return upak, err
+}
+
func (s *SharedDHKeyring) mergeLocked(m SharedDHKeyMap) (err error) {
for k, v := range m {
s.generations[k] = v.Clone()
| [fetchBoxesLocked->[currentGenerationLocked],importLocked->[currentGenerationLocked],Update->[Clone],mergeLocked->[Clone]] | Sync copies all keys from the shared DH key ring into the current key ring. | can you pass through the `UserPlusAllKeys` rather then the `*User`? |
@@ -123,6 +123,12 @@ var debugf = logp.MakeDebug("beat")
func init() {
initRand()
+
+ // By default, the APM tracer is active. We switch behaviour to not require users to have
+ // an APM Server running, making it opt-in
+ if os.Getenv("ELASTIC_APM_ACTIVE") == "" {
+ os.Setenv("ELASTIC_APM_ACTIVE", "false")
+ }
// we need to close the default tracer to prevent the beat sending events to localhost:8200
apm.DefaultTracer.Close()
}
| [launch->[InitWithSettings,createBeater],TestConfig->[InitWithSettings,createBeater],Setup->[InitWithSettings,Setup,createBeater],indexSetupCallback->[Setup],createBeater->[BeatConfig],configure->[BeatConfig],Init->[InitWithSettings]] | Config for the Beat Run is the main entry point for the beat package. | Nit: now that there are a couple of APM-related initialization statements here in the `init()` function, maybe move them into their own function like `initRand()`? |
@@ -971,7 +971,7 @@ public class AMQPMessage extends RefCountMessage {
@Override
public Object getDuplicateProperty() {
- return null;
+ return getObjectProperty(org.apache.activemq.artemis.api.core.Message.HDR_DUPLICATE_DETECTION_ID);
}
@Override
| [AMQPMessage->[setRoutingType->[setMessageAnnotation,removeMessageAnnotation],getDoubleProperty->[getDoubleProperty],getGroupID->[ensureMessageDataScanned],cachedAddressSimpleString->[cachedAddressSimpleString],getObjectProperty->[getAMQPUserID,getGroupID,getObjectProperty,getGroupSequence,getConnectionID],getPropertyKeysPool->[getPropertyKeysPool],putCharProperty->[putCharProperty],getShortProperty->[getShortProperty],reloadPersistence->[scanMessageData],getEncodeSize->[getDeliveryAnnotationsForSendBufferSize],getLongProperty->[getLongProperty],putFloatProperty->[putFloatProperty],putShortProperty->[putShortProperty],setLastValueProperty->[putStringProperty],setReplyTo->[setReplyTo],toString->[isDurable,getAddress,getExtraProperties,getEncodeSize,getMessageID],putDoubleProperty->[putDoubleProperty],copy->[AMQPMessage],getAddressSimpleString->[getExtraProperties],putStringProperty->[putStringProperty],getFloatProperty->[getFloatProperty],getIntProperty->[getIntProperty],setPriority->[setPriority],setAddress->[setAddress],getLastValueProperty->[getSimpleStringProperty],putByteProperty->[putByteProperty],removeProperty->[removeProperty],reencode->[ensureMessageDataScanned,scanMessageData],getScheduledDeliveryTime->[getMessageAnnotation],getBooleanProperty->[getBooleanProperty],getReplyTo->[getReplyTo],removeAnnotation->[removeMessageAnnotation],getPriority->[getPriority],containsProperty->[containsProperty],putLongProperty->[putLongProperty],putObjectProperty->[putObjectProperty],getGroupSequence->[ensureMessageDataScanned,getGroupSequence],getRoutingType->[getMessageAnnotation],getBytesProperty->[getBytesProperty],getAnnotation->[getMessageAnnotation],getSimpleStringProperty->[getSimpleStringProperty],setAnnotation->[setMessageAnnotation],getByteProperty->[getByteProperty],getStringProperty->[getStringProperty,getConnectionID],setMessageAnnotation->[setMessageAnnotation],putIntProperty->[putIntProperty],lazyDecodeApplicationProperties->[scanForMessageSection],getApplicationPropertiesMap->[lazyDecodeApplicationProperties],toCore->[getBody,toCore,getFooter,lazyDecodeApplicationProperties],setScheduledDeliveryTime->[setMessageAnnotation,removeMessageAnnotation],getMessageAnnotation->[getMessageAnnotation],getPersistentSize->[getEncodeSize],getPropertyValuesPool->[getPropertyValuesPool],setDurable->[setDurable],putBytesProperty->[putBytesProperty]]] | Returns the duplicate property. | Surely this should not be Artemis specific but some amqp value. I know in azure service bus there is dupliacte detection and they do amqp took, i dont know what key they use or how it works there. |
@@ -61,7 +61,7 @@ public class DDLCommandExec {
return ddlCommand.run(metaStore);
} catch (Exception e) {
String stackTrace = ExceptionUtil.stackTraceToString(e);
- LOGGER.error(stackTrace);
+ LOGGER.error("executeOnMetaStore:" + ddlCommand + " failed", e);
return new DDLCommandResult(false, stackTrace);
}
}
| [DDLCommandExec->[executeOnMetaStore->[stackTraceToString,DDLCommandResult,error,run],tryExecute->[executeOnMetaStore,KsqlException],execute->[executeOnMetaStore],getLogger]] | Execute DDLCommand on metaStore. | should this be warn? I see error as something that is going to blow everything up, but this continues. |
@@ -296,7 +296,7 @@ namespace MonoGame.Tests.Graphics {
[Test]
public void DrawWithCustomEffectAndTwoTextures()
{
- var customSpriteEffect = AssetTestUtility.CompileEffect(gd, "CustomSpriteBatchEffect.fx");
+ var customSpriteEffect = content.Load<Effect>(Paths.Effect("CustomSpriteBatchEffect"));
var texture2 = new Texture2D(gd, 1, 1, false, SurfaceFormat.Color);
customSpriteEffect.Parameters["SourceTexture"].SetValue(texture2);
| [SpriteBatchTest->[Draw_rotated->[White,Height,Begin,Draw,None,PrepareFrameCapture,End,CheckFrames,Width],Draw_with_filter_color->[ToColor,Begin,Draw,PrepareFrameCapture,End,CheckFrames],Draw_with_additive_blend->[White,Begin,Additive,Draw,PrepareFrameCapture,End,Deferred,CheckFrames],DrawWithCustomEffectAndTwoTextures->[White,Color,Textures,SetValue,SameAs,Begin,Draw,That,Dispose,End,CompileEffect,Opaque,Immediate],DrawWithLayerDepth->[White,Begin,Draw,None,Blue,PrepareFrameCapture,Red,End,Default,Green,Deferred,Zero,CheckFrames,BackToFront],Draw_with_alpha_blending->[White,B,ToColor,Begin,FromNonPremultiplied,Draw,G,PrepareFrameCapture,End,R,CheckFrames],Draw_with_SpriteSortMode->[White,Texture,Begin,Draw,None,PrepareFrameCapture,Zero,End,AlphaBlend,Deferred,FrontToBack,Immediate,CheckFrames,BackToFront],Draw_with_source_and_dest_rect->[White,Begin,Draw,PrepareFrameCapture,End,CheckFrames],Draw_with_matrix->[White,Begin,Draw,PrepareFrameCapture,End,AlphaBlend,CheckFrames,Immediate],Draw_stretched->[White,Height,Begin,Draw,PrepareFrameCapture,End,CheckFrames,Width],Draw_with_viewport_changing->[White,Viewport,X,Height,Begin,Identity,Draw,CreateOrthographicOffCenter,PrepareFrameCapture,End,CheckFrames,Y,AlphaBlend,CreateTranslation,Deferred,Projection,Immediate,Width],Draw_without_blend->[White,Begin,Draw,PrepareFrameCapture,End,Opaque,Deferred,CheckFrames],SetUp->[Texture,Effect,Identity,SetUp,content,Combine],Draw_with_source_rect->[White,Begin,Draw,PrepareFrameCapture,End,CheckFrames],DrawRequiresTexture->[White,Begin,Draw,End,Assert,Opaque,Immediate],DrawWithTexture->[White,SameAs,Immediate,Begin,Draw,That,End,Null,Opaque,Textures],Draw_with_SpriteEffects->[White,FlipVertically,Begin,Draw,PrepareFrameCapture,End,FlipHorizontally,CheckFrames,Zero],Draw_many->[White,Begin,Draw,PrepareFrameCapture,End,CheckFrames],Draw_normal->[White,Begin,Draw,PrepareFrameCapture,End,CheckFrames],TearDown->[Dispose],CreateTranslation,CreateRotationZ,Identity,CreateScale]] | DrawWithCustomEffectAndTwoTextures this test draws the specified textures with two different. | @KonajuGames - How do you feel about this change? I would say the alternative here is to only pre-compile the shaders for OpenGL and let the tests still compile the shaders at test time for platforms where we can. This give us a little more test coverage. That said we do need a good way to support platforms where the effects (and other content) have to be compiled offline. This is required if we ever want to run some of these tests on mobile devices or consoles. So there are clearly parts of this we want to keep. |
@@ -1315,11 +1315,9 @@ int main(int argc, char *argv[])
app_verify_arg.app_verify = 1;
} else if (strcmp(*argv, "-proxy") == 0) {
app_verify_arg.allow_proxy_certs = 1;
- } else if (strcmp(*argv, "-test_cipherlist") == 0) {
- test_cipherlist = 1;
}
#ifndef OPENSSL_NO_NEXTPROTONEG
- else if (strcmp(*argv, "-npn_client") == 0) {
+ else if (strcmp(*argv, "-npn_client") == 0) {
npn_client = 1;
} else if (strcmp(*argv, "-npn_server") == 0) {
npn_server = 1;
| [No CFG could be retrieved] | Reads the command line arguments and checks for any missing values. check if command line options are valid. | I see what you're going there. If it was me, I would remove the closing brace before the `#ifdef` and place it before the `else` here... |
@@ -733,7 +733,7 @@ module.exports = class bitmart extends Exchange {
}
average = this.safeNumber (ticker, 'avg_price', average);
const price = this.safeValue (ticker, 'depth_price', ticker);
- return {
+ return this.safeTicker ({
'symbol': symbol,
'timestamp': timestamp,
'datetime': this.iso8601 (timestamp),
| [No CFG could be retrieved] | Get a list of all currencies that have a specific . Get a list of bids and asks for a given symbol. | If the `average` is undefined, we will need to clean up lines 730-733, the calculation of `average` is now done in safeTicker, if `average` is missing. |
@@ -344,6 +344,8 @@ class AppleSystemBlock(Block):
def context(self):
os_ = self._conanfile.settings.get_safe("os")
host_architecture = self._get_architecture()
+ if host_architecture is None:
+ return
# We could be cross building from Macos x64 to Macos armv8 (m1)
build_architecture = self._get_architecture(host_context=False)
if os_ not in ('iOS', "watchOS", "tvOS") and \
| [CMakeToolchain->[content->[_context],_context->[quote_preprocessor_strings,process_blocks],__init__->[Variables,ToolchainBlocks]],AppleSystemBlock->[context->[_apple_sdk_name,_get_architecture]],GenericSystemBlock->[context->[_get_toolset,_get_generator_platform]],ToolchainBlocks->[process_blocks->[get_block]]] | Return context information for a node. | Shouldn't at least the CMAKE_SYSTEM_NAME, CMAKE_SYSTEM_VERSION for iOS, tvOS, watchOS be defined? Is it possible to have those target systems without arch? |
@@ -893,8 +893,9 @@ class Archiver:
helptext = collections.OrderedDict()
helptext['patterns'] = textwrap.dedent('''
- Exclusion patterns support four separate styles, fnmatch, shell, regular
- expressions and path prefixes. By default, fnmatch is used. If followed
+ File patterns support four separate styles, fnmatch, shell, regular
+ expressions and path prefixes. By default, fnmatch is used for
+ `--exclude` patterns and shell-style is used for `--pattern`. If followed
by a colon (':') the first two characters of a pattern are used as a
style selector. Explicit style selection is necessary when a
non-default style is desired or when the desired pattern starts with
| [main->[get_args,run,Archiver],with_repository->[decorator->[wrapper->[argument]]],Archiver->[do_key_import->[print_error],do_key_export->[print_error],do_prune->[print_error],do_mount->[print_error],do_extract->[build_filter,print_warning],_process->[print_file_status,_process,print_warning],parse_args->[parse_args,build_parser,preprocess_args],do_create->[create_inner->[print_file_status,print_warning],create_inner],with_repository],main] | Break the given object lock. A shell - style selector that matches any path that ends in a path separator. | four separate styles: fnmatch, shell, regular expressions and path prefixes. |
@@ -56,7 +56,7 @@ import games.strategy.util.Version;
public class GameParser {
private static final Class<?>[] SETTER_ARGS = {String.class};
- private GameData data;
+ private final GameData data = new GameData();
private final Collection<SAXParseException> errorsSAX = new ArrayList<>();
public static final String DTD_FILE_NAME = "game.dtd";
private final String mapName;
| [GameParser->[getProductionFrontier->[getValidatedObject],getDocument->[parse],parseRepairRules->[getChildren],findAttachment->[getRelationshipType,getUnitType,getTerritoryEffect,getTerritory,getTechnology,getPlayerId,getResource],parseHeldUnits->[getPlayerId,getUnitType],parseResults->[getUnitType,getResource],getPlayerId->[getValidatedObject],parseGameLoader->[getInstance],setValues->[capitalizeFirstLetter],parsePlayerRepair->[getRepairFrontier,getPlayerId],parsePlayerList->[getChildren],getSingleChild->[getSingleChild],parseAttachments->[getChildren],getRelationshipType->[getValidatedObject],getUnitType->[getValidatedObject],parseResourceInitialization->[getPlayerId,getResource],getRepairRule->[getValidatedObject],parseMap->[getChildren],parseProductionFrontiers->[getChildren],getTerritoryEffect->[getValidatedObject],getTerritory->[getValidatedObject],parseProductionRules->[getChildren],getTechnology->[getValidatedObject],parseGamePlay->[getSingleChild,getChildren],parseTechnology->[getChildren,getSingleChild],parseInitialization->[getChildren,getSingleChild,parseRelationInitialize],parseRelationInitialize->[getRelationshipType,getPlayerId],getDelegate->[getValidatedObject],parseSteps->[getPlayerId,getChildren,getDelegate],parsePlayerProduction->[getProductionFrontier,getPlayerId],getResource->[getValidatedObject],parseAlliances->[getSingleChild,getPlayerId,getChildren],parseFrontierRules->[getProductionRule],parseEditableProperty->[getNonTextNodes],parseTechnologies->[getChildren],parseSequence->[getChildren],getProductionRule->[getValidatedObject],parseGrids->[getChildren],parseRepairFrontierRules->[getRepairRule],parseProperties->[getNonTextNodesIgnoring,getChildren],parseRepairCosts->[getResource],parsePlayerTech->[getPlayerId,getChildren],validateAttachments->[validate],parseConnections->[getTerritory],getRepairFrontier->[getValidatedObject],parseProduction->[getChildren],parseOwner->[getTerritory,getPlayerId],parseRepairFrontiers->[getChildren],parseUnitPlacement->[getTerritory,getUnitType,getPlayerId],parseCosts->[getResource],parseRepairResults->[getUnitType,getResource],parseCategories->[getChildren]]] | Imports a game data object from a file. Reads the last N - Document from the given stream. | Although this slightly changes functionality, it's safe to change it, because all callers create fresh instance of GameParser |
@@ -1420,6 +1420,12 @@ namespace Dynamo.ViewModels
return DynamoSelection.Instance.Selection.Count > 0;
}
+ public IEnumerable<NodeModel> GetInputNodes()
+ {
+ return DynamoSelection.Instance.Selection.OfType<NodeModel>()
+ .Where(x => x.IsInputNode).ToList();
+ }
+
public void ShowSaveDialogIfNeededAndSaveResult(object parameter)
{
var vm = this;
| [DynamoViewModel->[CanZoomOut->[CanZoomOut],SaveAs->[SaveAs],ExportToSTL->[ExportToSTL],ShowOpenDialogAndOpenResult->[Open,CanOpen],ShowSaveDialogIfNeededAndSave->[SaveAs,Save],ImportLibrary->[ImportLibrary],ReportABug->[ReportABug],ClearLog->[ClearLog],Escape->[CancelActiveState],ShowSaveDialogIfNeededAndSaveResult->[CanSave,Save],FitView->[FitView],Undo->[Undo],SelectNeighbors->[SelectNeighbors],CanSelectAll->[CanSelectAll],CanRedo->[CanRedo],ZoomIn->[ZoomIn],ZoomOut->[ZoomOut],CleanUp->[UnsubscribeAllEvents],ShowSaveImageDialogAndSaveResult->[CanSaveImage,SaveImage],GoToWorkspace->[FocusCustomNodeWorkspace],OpenRecent->[Open],ShowElement->[FocusCustomNodeWorkspace],CanUndo->[CanUndo],SelectAll->[SelectAll],ShowSaveDialogAndSaveResult->[SaveAs],Redo->[Redo],CancelActiveState->[CancelActiveState],CanZoomIn->[CanZoomIn]]] | ShowSaveDialogIfNeededAndSaveResult - if the dialog is shown and save the object. | If you're making the type `IEnumerable`, don't return a `List`. This causes issues as above where you copy the list twice. |
@@ -41,7 +41,8 @@
* In the following example a new block of HTML containing a `ng-controller`
* directive is added to the end of the document body by JQuery. We then compile and link
* it into the current AngularJS scope.
- *
+ * Note: The below code works only when debug info is enabled. (see {@link api/ng/function/angular.injector debugInfoEnabled}).
+ * The scope() function is available only when debug info is enabled.
* ```js
* var $div = $('<div ng-controller="MyCtrl">{{content.label}}</div>');
* $(document.body).append($div);
| [No CFG could be retrieved] | Component which is automatically injected into the controller. region Function Definitions. | Could you please refactor this to `<div class="alert alert-info">**Note:** The below ...</div>`? |
@@ -124,6 +124,9 @@ func (c *Container) Commit(ctx context.Context, sess *session.Session, h *Handle
res, err = tasks.WaitForResult(ctx, func(ctx context.Context) (tasks.ResultWaiter, error) {
return parent.CreateVM(ctx, *h.Spec.Spec(), VCHConfig.ResourcePool, nil)
})
+
+ // set the status to created
+ c.State = StateCreated
}
if err != nil {
| [Commit->[WaitForResult,Unlock,NewVirtualMachine,Begin,start,stop,IsVC,Folders,End,Lock,Errorf,Spec,CreateVM,Reconfigure,CreateChildVM_Task,Put],start->[WaitForResult,Error,Begin,WithTimeout,Sprintf,WaitForKeyInExtraConfig,New,End,PowerOn,Errorf],stop->[WaitForResult,Begin,PowerOff,End,Errorf],Update->[Reference,Unlock,Begin,Decode,End,Lock,Errorf,OptionValueSource,Retrieve],Remove->[NewFileManager,WaitForResult,Unlock,Begin,Sprintf,DeleteDatastoreFile,Remove,End,Lock,Errorf,DeleteExceptDisks,DSPath,Debugf],cacheExecConfig->[Lock,Unlock],Reference,NewVirtualMachine,Error,Decode,Name,FindChild,String,Container,Errorf,Properties,OptionValueSource,newHandle,NewSearchIndex,Retrieve,Debugf] | Commit commits a container check if the container is running and if it is start it. | Not updating c.Status as well? |
@@ -101,9 +101,8 @@ const (
)
// IsRetryErrors will return true for vSphere errors, which can be fixed by retry.
-// Currently the error includes TaskInProgress, NetworkDisruptedAndConfigRolledBack and InvalidArgument
+// Currently the error includes TaskInProgress, NetworkDisruptedAndConfigRolledBack, FailToLockFaultToleranceVMs, HostCommunication
// Retry on NetworkDisruptedAndConfigRolledBack is to workaround vSphere issue
-// Retry on InvalidArgument(invlid path) is to workaround vSAN bug: https://bugzilla.eng.vmware.com/show_bug.cgi?id=1770798. TODO: Should remove it after vSAN fixed the bug
func IsRetryError(op trace.Operation, err error) bool {
if soap.IsSoapFault(err) {
switch f := soap.ToSoapFault(err).VimFault().(type) {
| [FromContext,ToSoapFault,WaitForResult,Int63n,VimFault,Fault,Warnf,Duration,ToVimFault,IsSoapFault,IsVimFault,Temporary,Errorf,After,Err,Done,Debugf] | IsRetryError returns true if the operation is a retry error. check if the sequence number of expected faults is in the sequence number of expected faults. | Is there code that needs to be updated in order to remove this? I'm not sure how to test whether this removal breaks anything. |
@@ -123,6 +123,7 @@ namespace Internal.Runtime.InteropServices
return 0;
}
+ [RequiresUnreferencedCode("The trimmer might remove methods")]
private static IsolatedComponentLoadContext GetIsolatedComponentLoadContext(string assemblyPath)
{
IsolatedComponentLoadContext? alc;
| [ComponentActivator->[LoadAssemblyAndGetFunctionPointer->[MarshalToString],GetFunctionPointer->[MarshalToString],IntPtr->[MarshalToString,GetFunctionPointer]]] | This method is called from the JSR - 4682. | So I definitely haven't dealt with the linker enough to be able to read these attributes and understand how it will all behave - why do we need the `RequiresUnreferencedCode`: - on the `IsolatedComponentLoadContext` constructor - on `ComponentActivator.GetIsolatedComponentLoadContext` (here), which uses the `IsolatedComponentLoadContext` constructor - on `ComActivator.GetALC`, which uses the `IsolatedComponentLoadContext` constructor - but **not** on `InMemoryAssemblyLoader.LoadInMemoryAssembly`, which uses the `IsolatedComponentLoadContext` constructor |
@@ -507,8 +507,11 @@ then
[],
[if test "x$with_libacl" != xcheck; then AC_MSG_ERROR(Cannot find libacl library); fi])
AC_CHECK_HEADERS([acl.h sys/acl.h acl/libacl.h],
- [libacl_header_found=yes],
- [if test "x$with_libacl" != xcheck; then AC_MSG_ERROR(Cannot find libacl header files); fi])
+ [libacl_header_found=yes])
+ if test "x$libacl_header_found" != "xyes" && test "x$with_libacl" != xcheck;
+ then
+ AC_MSG_ERROR(Cannot find libacl library headers);
+ fi
])
fi
| [No CFG could be retrieved] | CF version of the function below. cURL - specific tests. | You move the check outside the AC_CHECK_HEADERS macro, which means that the check will likely ignore the two first headers, only checking the last one, because `libacl_header_found` is set 3 times, once for each header file. Can you explain what the issue is exactly so that we figure a better way to fix it? What error are you seeing? Which header files are present on your system? |
@@ -267,7 +267,15 @@ func Checkpoint(w http.ResponseWriter, r *http.Request) {
utils.WriteResponse(w, http.StatusOK, f)
return
}
- utils.WriteResponse(w, http.StatusOK, entities.CheckpointReport{Id: ctr.ID()})
+ utils.WriteResponse(
+ w,
+ http.StatusOK,
+ entities.CheckpointReport{
+ Id: ctr.ID(),
+ RuntimeDuration: runtimeCheckpointDuration,
+ CRIUStatistics: criuStatistics,
+ },
+ )
}
func Restore(w http.ResponseWriter, r *http.Request) {
| [Context,Value,StatusText,InternalServerError,TempFile,ContainerExists,Close,ContainerNotFound,ShouldRestart,Info,SaveFromBody,Error,PodID,Init,Cause,GetName,ID,Wrapf,Mount,GetAllContainers,PrepareFilters,Name,Remove,Query,Restore,Mounted,Checkpoint,Decode,ContainerList,LookupContainer,String,Unmount,Open,WaitContainerLibpod,Inspect,WriteResponse] | Checkpoint returns the last known checkpoint. check if the container has a specific key and if so save it. | I think we need updates to the Swagger schema to reflect this - the docs live in `pkg/api/server/register_containers.go` |
@@ -1252,8 +1252,12 @@ class Archiver:
if not keep_security_info:
SecurityManager.destroy(repository)
else:
- logger.info("Would delete repository.")
- logger.info("Would %s security info." % ("keep" if keep_security_info else "delete"))
+ if self.output_list:
+ logging.getLogger('borg.output.list').info("Would delete repository.")
+ logging.getLogger('borg.output.list').info("Would %s security info." % ("keep" if keep_security_info else "delete"))
+ else:
+ logger.info("Would delete repository.")
+ logger.info("Would %s security info." % ("keep" if keep_security_info else "delete"))
if not dry_run:
Cache.destroy(repository)
logger.info("Cache deleted.")
| [main->[get_args,run,Archiver],with_repository->[decorator->[wrapper->[argument]]],Archiver->[do_debug_search_repo_objs->[print_error,print_finding],_export_tar->[item_to_tarinfo->[print_warning,item_content_stream],build_filter,print_warning,build_matcher,item_to_tarinfo],do_prune->[print_error],do_mount->[print_error],do_check->[print_error],do_extract->[build_filter,print_warning,build_matcher],_list_archive->[_list_inner,build_matcher],do_delete->[print_error],run->[_setup_topic_debugging,prerun_checks,get_func,_setup_implied_logging],do_debug_dump_archive->[output->[do_indent],output],do_recreate->[print_error,build_matcher],do_key_export->[print_error],do_benchmark_crud->[measurement_run,test_files],_info_archives->[format_cmdline],_process->[print_file_status,_process,print_warning],do_config->[print_error,list_config],build_parser->[define_archive_filters_group->[add_argument],define_exclusion_group->[define_exclude_and_patterns],define_borg_mount->[define_archive_filters_group,add_argument,define_exclusion_group],add_common_group,define_archive_filters_group,CommonOptions,define_borg_mount,add_argument,process_epilog,define_exclusion_group],do_key_import->[print_error],CommonOptions->[add_common_group->[add_argument->[add_argument]]],do_diff->[build_matcher,print_output,print_warning],do_debug_dump_repo_objs->[decrypt_dump],parse_args->[get_func,resolve,preprocess_args,parse_args,build_parser],do_list->[print_error],do_create->[create_inner->[print_file_status,print_error,print_warning],create_inner],with_repository],main] | Delete a repository. | guess this is a bit questionable regarding whether this counts as "list". as borg always operates on 1 repo, generic hints about this repo and the related cache are not "listing" anything. only when it outputs all archives in that repo, that would be "listing". |
@@ -41,10 +41,12 @@ func (client *Client) Close() {
}
// GetBlockHashes gets block hashes from all the peers by calling grpc request.
-func (client *Client) GetBlockHashes(startHash []byte, size uint32) *pb.DownloaderResponse {
+func (client *Client) GetBlockHashes(startHash []byte, size uint32, ip, port string) *pb.DownloaderResponse {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
request := &pb.DownloaderRequest{Type: pb.DownloaderRequest_HEADER, BlockHash: startHash, Size: size}
+ request.Ip = ip
+ request.Port = port
response, err := client.dlClient.Query(ctx, request)
if err != nil {
utils.Logger().Error().Err(err).Msg("[SYNC] GetBlockHashes query failed")
| [PushNewBlock->[Msg,Error,WithTimeout,Background,Err,Logger,Query],Close->[Close,Info,Msg,Logger],GetBlockChainHeight->[Msg,Error,WithTimeout,Background,Err,Logger,Query],GetBlocks->[Msg,Error,WithTimeout,Background,Err,Logger,Query],Register->[Msg,Error,WithTimeout,Background,Interface,Err,Logger,Query],GetBlockHashes->[Msg,Error,WithTimeout,Background,Err,Logger,Query],Str,Msg,Error,Dial,Sprintf,NewDownloaderClient,WithInsecure,Info,Err,Logger] | GetBlockHashes returns a response with block hash information. | why use ip and port in the function here? It is weird. You'd wrap it up in the 'request' or other object. |
@@ -751,8 +751,13 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
for (JobProperty<? super P> p : Util.fixNull(properties))
ta.addAll(p.getJobActions((P)this));
- for (TransientProjectActionFactory tpaf : TransientProjectActionFactory.all())
- ta.addAll(Util.fixNull(tpaf.createFor(this))); // be defensive against null
+ for (TransientProjectActionFactory tpaf : TransientProjectActionFactory.all()) {
+ try {
+ ta.addAll(Util.fixNull(tpaf.createFor(this))); // be defensive against null
+ } catch (Exception e) {
+ LOGGER.log(Level.SEVERE, "Error loading transient project action factory.");
+ }
+ }
return ta;
}
| [AbstractProject->[setAssignedLabel->[save],onLoad->[onLoad,createBuildMixIn],getFirstBuild->[getFirstBuild],removeFromList->[save,updateTransientActions],workspaceOffline->[getWorkspace,getAssignedLabel,isAllSuitableNodesOffline],getRelevantLabels->[getAssignedLabel],doWs->[getSomeWorkspace],removeRun->[removeRun],getLastBuiltOn->[getLastBuild],schedulePolling->[isDisabled],getEnvironment->[getEnvironment],getBuildTriggerUpstreamProjects->[getUpstreamProjects],getJDK->[getJDK],getSubTasks->[getSubTasks],findNearest->[findNearest],setCustomWorkspace->[save],getDefaultAuthentication->[getDefaultAuthentication],createHistoryWidget->[createHistoryWidget],getNearestOldBuild->[getNearestOldBuild],isParameterized->[isParameterized],getRootProject->[getRootProject],doConfigSubmit->[doConfigSubmit,updateTransientActions],buildDependencyGraph->[buildDependencyGraph],setQuietPeriod->[save],getDelay->[getQuietPeriod],setScmCheckoutStrategy->[save],getLastBuild->[getLastBuild],getCauseOfBlockage->[blockBuildWhenUpstreamBuilding,blockBuildWhenDownstreamBuilding,BecauseOfUpstreamBuildInProgress,getLastBuild,BecauseOfBuildInProgress,isConcurrentBuild,BecauseOfDownstreamBuildInProgress],addToList->[save,updateTransientActions],_poll->[calcPollingBaseline,getSomeBuildWithExistingWorkspace,poll,getLastBuild,getAssignedLabel,isInQueue,getWorkspace],getScmCheckoutRetryCount->[getScmCheckoutRetryCount],setBlockBuildWhenUpstreamBuilding->[save],addProperty->[updateTransientActions,addProperty],pollWithWorkspace->[calcPollingBaseline,poll,getEnvironment],doDisable->[makeDisabled],getBuild->[getBuild],addTrigger->[triggers],newBuild->[newBuild],makeDisabled->[save],doCancelQueue->[doCancelQueue],getResourceList->[getResourceList],getBuildNowText->[getBuildNowText],onCreatedFromScratch->[onCreatedFromScratch],getBuildByNumber->[getBuildByNumber],getIconColor->[getIconColor,isDisabled],hasParticipant->[hasParticipant,getLastBuild],doEnable->[makeDisabled],getQuietPeriod->[getQuietPeriod],performDelete->[performDelete],setBlockBuildWhenDownstreamBuilding->[save],scheduleBuild->[scheduleBuild],enable->[makeDisabled],removeTrigger->[triggers],setJDK->[save],getSomeBuildWithExistingWorkspace->[getWorkspace],save->[save],getSomeBuildWithWorkspace->[getWorkspace],getNearestBuild->[getNearestBuild],getModuleRoots->[getModuleRoots,getBuildForDeprecatedMethods],createExecutable->[isDisabled,newBuild],checkout->[getWorkspace,checkout],makeSearchIndex->[makeSearchIndex],poll->[isInQueue,getLastBuild,isBuildable],doPolling->[schedulePolling],scheduleBuild2->[scheduleBuild2],setConcurrentBuild->[save],getActions->[getActions],disable->[makeDisabled],getModuleRoot->[getModuleRoot,getBuildForDeprecatedMethods],doBuildWithParameters->[doBuildWithParameters],buildDescribable->[buildDescribable],createBuildMixIn->[getBuildClass->[getBuildClass]],submit->[makeDisabled,triggers,setScm,submit],setAssignedNode->[setAssignedLabel],setScm->[save],isAllSuitableNodesOffline->[getAssignedLabel],getWorkspace->[getWorkspace],getTrigger->[triggers],_getRuns->[_getRuns],loadBuild->[loadBuild],getSomeWorkspace->[getWorkspace],doRssChangelog->[getEntryTitle->[getBuild],getEntryID->[getEntryUrl],FeedItem,getLastBuild],doDoWipeOutWorkspace->[getWorkspace,getSomeBuildWithWorkspace],doBuild->[doBuild]]] | create transient actions for this job. | Generally style guides will say to catch `RuntimeException` to make it clear that there is no checked exception you are expecting, but I do not think it really matters. |
@@ -113,7 +113,7 @@ export class Resources {
this.deferredMutates_ = [];
/** @private {number} */
- this.scrollHeight_ = 0;
+ this./*OK*/scrollHeight_ = 0;
/** @private {!Viewport} */
this.viewport_ = viewportFor(this.win);
| [No CFG could be retrieved] | Initializes the object variables. Monitor input for a single . | Maybe change regex to allow with trailing _ |
@@ -145,6 +145,7 @@ public class Shell implements ConsoleInputHandler,
null,
null,
(DocDisplay) view_.getInputEditorDisplay(),
+ RStudioGinjector.INSTANCE.getHelpStrategy(),
false);
addKeyDownPreviewHandler(completionManager) ;
addKeyPressPreviewHandler(completionManager) ;
| [Shell->[onUnhandledError->[getValue],onBeforeSelected->[onBeforeSelected],onExecutePendingInput->[processCommandEntry,execute],onSelected->[onSelected],getHistoryEntry->[isBrowsePrompt,getHistoryEntry],setHistory->[setHistory],onSendToConsole->[execute->[processCommandEntry],execute],consolePrompt->[consolePrompt],InputKeyDownHandler->[onKeyDown->[processCommandEntry,onConsoleClear]],addToHistory->[isBrowsePrompt,addToHistory],processCommandEntry->[processCommandEntry],navigateHistory->[navigateHistory,isBrowsePrompt],onBeforeUnselected->[onBeforeUnselected]]] | This method adds a key down handler to the ACE. Value of the . | The right way to do this is have the RCompletionManager take the HelpStrategy as a parameter to it's initialize method (we don't pass global objects rather we get them injected into the constructor or the initialize method) |
@@ -207,6 +207,11 @@ class KubernetesJobEnvironment(Environment):
if not yaml_obj.get("metadata"):
yaml_obj["metadata"] = {}
+ if self.unique_job_name:
+ yaml_obj["metadata"][
+ "name"
+ ] = f"{yaml_obj['metadata']['name']}-{flow_run_id[:8]}"
+
if not yaml_obj["metadata"].get("labels"):
yaml_obj["metadata"]["labels"] = {}
| [KubernetesJobEnvironment->[run_flow->[on_exit,context,exception,get,get_default_executor_class,get_default_flow_runner_class,runner_cls,format,on_start,run,open,load],_populate_job_spec_yaml->[container,yaml_obj,get],_load_spec_from_file->[dict,open,safe_load],__setstate__->[update],create_flow_run_job->[error,BatchV1Api,EnvironmentError,critical,_populate_job_spec_yaml,get,format,create_namespaced_job,load_incluster_config],__getstate__->[copy],identifier_label->[str,uuid4,hasattr],__init__->[dict,abspath,super,_load_spec_from_file],execute->[TypeError,create_flow_run_job,isinstance]]] | Populate the yaml object with the values of the specific missing configuration values. YAML configuration for a specific environment. Get the yaml object for the missing args. | Does this introduce any complications in the event that the agent submits the same flow run id (e.g., for a retry) into the same cluster? Something like "Job with name "BLAH" already exists"? |
@@ -442,8 +442,8 @@ RSpec.describe "Api::V0::Articles", type: :request do
end
describe "POST /api/articles" do
- let_it_be(:api_secret) { create(:api_secret) }
- let_it_be(:user) { api_secret.user }
+ let(:api_secret) { create(:api_secret) }
+ let(:user) { api_secret.user }
context "when unauthorized" do
it "fails with no api key" do
| [post_article->[post,merge,to_json,secret],put_article->[put,secret,to_json],create,new,let,be,find,describe,match_array,put_article,slug,secret,ago,instance_double,me_api_articles_path,join,first,it,name,put,travel,map,to,update_columns,to_set,api_article_path,and_raise,let_it_be,post,let!,iso8601,require,username,change,to_s,include,to_i,from_now,dig,have_http_status,user,parsed_body,image,to_json,update,body_markdown,receive,read,let_it_be_readonly,api_articles_path,each,title,be_a_kind_of,id,update!,context,token,post_article,once,cached_tag_list_array,let_it_be_changeable,get,not_to,by,eq,find_by,create_list,add_role,update_column,and_return] | orders unpublished articles by reverse order when asking for unpublished articles expect response to receive unauthorized status. | These specs popped up as flaky when I started running KnapsackPro builds bc of data issues so I changed to using non-persistent objects. I think we should get in the habit of this so eventually we can remove our dependency on order. |
@@ -383,7 +383,10 @@ func tagOutputToMap(imagesOutput []string) map[string]string {
if len(tmp) < 2 {
continue
}
- m[tmp[0]] = tmp[1]
+ if m[tmp[0]] == nil {
+ m[tmp[0]] = map[string]bool{}
+ }
+ m[tmp[0]][tmp[1]] = true
}
return m
}
| [GetContainerStatus->[PodmanBase],GrepString->[OutputToStringArray],LineInOuputStartsWith->[OutputToStringArray],PodmanBase->[PodmanAsUserBase],NumberOfPods->[PodmanBase],NumberOfContainersRunning->[PodmanBase],WaitContainerReady->[PodmanBase],PodmanAsUserBase->[MakeOptions],LineInOutputContains->[OutputToStringArray],ErrorGrepString->[ErrorToStringArray],LineInOutputContainsTag->[OutputToStringArray],WaitWithDefaultTimeout->[OutputToString],NumberOfContainers->[PodmanBase],WaitForContainer,WaitContainerReady] | GetHostDistributionInfo returns a struct with the distribution name and version of the host. IsKernelNewerThan compares the current kernel version to one provided. | This was completely broken: for a list containing `foo:a`, `foo:b`, `foo:c`, ... well, you can figure it out. |
@@ -26,13 +26,15 @@ define([
* @param {Number} [options.mass=1.0] The mass of particles in kilograms.
* @param {Cartesian3} [options.position=Cartesian3.ZERO] The initial position of the particle in world coordinates.
* @param {Cartesian3} [options.velocity=Cartesian3.ZERO] The velocity vector of the particle in world coordinates.
- * @param {Number} [options.life=Number.MAX_VALUE] The life of particles in seconds.
+ * @param {Number} [options.life=Number.MAX_VALUE] The life of the particle in seconds.
* @param {Object} [options.image] The URI, HTMLImageElement, or HTMLCanvasElement to use for the billboard.
+ * @param {Object} [options.color] Sets the start and end colors.
* @param {Color} [options.startColor=Color.WHITE] The color of a particle when it is born.
* @param {Color} [options.endColor=Color.WHITE] The color of a particle when it dies.
+ * @param {Object} [options.scale] Sets the start and end scales.
* @param {Number} [options.startScale=1.0] The scale of the particle when it is born.
* @param {Number} [options.endScale=1.0] The scale of the particle when it dies.
- * @param {Cartesian2} [options.size=new Cartesian2(1.0, 1.0)] The dimensions of particles in pixels.
+ * @param {Cartesian2} [options.imageSize=new Cartesian2(1.0, 1.0)] The dimensions of the image representing the particle in pixels. Width by Height.
*/
function Particle(options) {
options = defaultValue(options, defaultValue.EMPTY_OBJECT);
| [No CFG could be retrieved] | Constructs a new object of type Particle. - A position velocity and life of the particle in world coordinates. | I think for `particle` itself, we should just stick with `start` and `end`? |
@@ -22,8 +22,8 @@ ecg_fname = data_path + '/MEG/sample/sample_audvis_ecg_proj.fif'
ave_fname = data_path + '/MEG/sample/sample_audvis-ave.fif'
evoked = read_evokeds(ave_fname, condition='Left Auditory')
+evoked.info['bads'] = []
projs = read_proj(ecg_fname)
+evoked.add_proj(projs)
-layouts = [find_layout(evoked.info, k) for k in 'meg', 'eeg']
-
-viz.plot_projs_topomap(projs, layout=layouts)
+evoked.plot_projs_topomap()
| [find_layout,read_evokeds,print,data_path,plot_projs_topomap,read_proj] | Plot the sample audvis - Averaged Averaged Projas. | you should not have to do this to make it work ... |
@@ -13,10 +13,6 @@ def test_serialize_empty_dict():
assert FlowSchema().dump({})
-def test_deserialize_empty_dict():
- assert isinstance(FlowSchema().load({}), Flow)
-
-
def test_serialize_flow():
serialized = FlowSchema().dump(Flow(name="n"))
assert serialized["name"] == "n"
| [test_deserialize_flow_subclass_is_flow_but_not_flow_subclass->[NewFlow],test_deserialize_edges->[ArgTask]] | Deserialize empty dict with name = n. | Could you maybe update this test to test deserialization from a dict with only a `name` key? |
@@ -98,7 +98,6 @@ public class DefaultHttp2LocalFlowController implements Http2LocalFlowController
@Override
public void incrementWindowSize(ChannelHandlerContext ctx, Http2Stream stream, int delta) throws Http2Exception {
- checkNotNull(ctx, "ctx");
FlowState state = state(stream);
// Just add the delta to the stream-specific initial window size so that the next time the window
// expands it will grow to the new initial size.
| [DefaultHttp2LocalFlowController->[unconsumedBytes->[unconsumedBytes],WindowUpdateVisitor->[visit->[incrementInitialStreamWindow,state,incrementFlowControlWindows]],consumeBytes->[consumeBytes],windowUpdateRatio->[windowUpdateRatio,checkValidRatio],receiveFlowControlledFrame->[receiveFlowControlledFrame],FlowState->[consumeBytes->[returnProcessedBytes,connectionState],writeWindowUpdate->[writeWindowUpdate,incrementFlowControlWindows]]]] | Increments the initial window size of the given stream by the given delta. | Was this intentional? I looked through the call path down to the FrameWriter and I don't see a null check. Am I missing something? |
@@ -47,6 +47,8 @@ class ConfigBase:
They will be converted to snake_case automatically.
If a field is missing and don't have default value, it will be set to `dataclasses.MISSING`.
"""
+ if 'basepath' in kwargs:
+ _base_path = kwargs.pop('basepath')
kwargs = {util.case_insensitive(key): value for key, value in kwargs.items()}
if _base_path is None:
_base_path = Path()
| [ConfigBase->[validate->[_is_missing,validate,canonical],load->[load],canonical->[canonical],__init__->[_is_missing]]] | Initialize a config object and set some fields. | what is basepath used for? |
@@ -137,6 +137,11 @@ func (mlr *Multiline) readFirst() (Message, error) {
func (mlr *Multiline) readNext() (Message, error) {
for {
+ select {
+ case <-mlr.done:
+ return Message{}, ErrReaderStopped
+ default:
+ }
p, err := mlr.reader.Next()
if err != nil {
| [readNext->[reset,Next,addLine,pred,startNewLine,pushLine],Next->[state],readFirst->[startNewLine,readNext,Next],readFailed->[reset],startNewLine->[pushLine,addLine],Match,New,Errorf] | readNext reads the next message from the reader. start new line. | TODO: have reader check the error code from `mlr.reader.Next()`. Let's return error immediately instead of pushing half-finished event before pushing actual error. |
@@ -1256,11 +1256,9 @@ namespace System.Reflection.Metadata
public partial class ImageFormatLimitationException : System.Exception
{
public ImageFormatLimitationException() { }
-#if !NETSTANDARD1_1
protected ImageFormatLimitationException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
-#endif
- public ImageFormatLimitationException(string message) { }
- public ImageFormatLimitationException(string message, System.Exception innerException) { }
+ public ImageFormatLimitationException(string? message) { }
+ public ImageFormatLimitationException(string? message, System.Exception? innerException) { }
}
public readonly partial struct ImportDefinition
{
| [ManagedPEBuilder->[ILOnly],PEReaderExtensions->[Never],PEHeaderBuilder->[TerminalServerAware,NoSeh,Unknown,Dll,DynamicBase,NxCompatible,WindowsCui],MetadataReaderProvider->[FromMetadataStream->[Default],GetMetadataReader->[Default],FromPortablePdbStream->[Default]],BlobEncoder->[MethodSignature->[Default]],MethodBodyStreamEncoder->[AddMethodBody->[InitLocals]],SignatureTypeEncoder->[FunctionPointer->[Default,None]]] | This class is used to implement the standard library for importing a type - specific object. A collection of all the metadata imports that are defined in the current module. | Marking removed compile conditional |
@@ -247,7 +247,7 @@ public abstract class HttpObjectDecoder extends ByteToMessageDecoder {
// fast-path
// No content is expected.
ctx.fireChannelRead(message);
- ctx.fireChannelRead(LastHttpContent.EMPTY_LAST_CONTENT);
+ ctx.fireChannelRead(new EmptyLastHttpContent(ctx.bufferAllocator()));
resetNow();
return;
case READ_CHUNK_SIZE:
| [HttpObjectDecoder->[userEventTriggered->[userEventTriggered],LineParser->[parse->[reset,parse],process->[increaseCount,process]],readHeaders->[isContentAlwaysEmpty],resetNow->[isSwitchingToNonHttp1Protocol,reset],splitHeader->[isDecodingRequest],HeaderParser->[parse->[reset]],decodeLast->[decodeLast]]] | Decodes the next message in the given buffer. read content in chunks. This method reads the chunk of the response. read bytes from channel. | With how this works at the moment can you explain we we even need this extra `EmptyLastHttpContent ` implementation and not just use the "normal" `DefaultLastHttpContent` ? |
@@ -966,9 +966,13 @@ describe('Resources.Resource', () => {
resources = new Resources(window);
resource = new Resource(1, element, resources);
+ viewportMock = sandbox.mock(resources.viewport_);
});
afterEach(() => {
+ viewportMock.verify();
+ viewportMock.restore();
+ viewportMock = null;
resource = null;
elementMock.verify();
elementMock = null;
| [No CFG could be retrieved] | Initialization functions - AMP - AD - 1 - 1 - 1 - 1 - 1 - should not build before upgraded. | What I found out recently is that if you use `sandbox.mock` you don't need to call verify/restore - sandbox will do that. |
@@ -64,6 +64,7 @@ require_once $install_dir . '/includes/graphite.inc.php';
require_once $install_dir . '/includes/datastore.inc.php';
require_once $install_dir . '/includes/billing.php';
require_once $install_dir . '/includes/syslog.php';
+require_once $install_dir . '/includes/snmptrap.inc.php';
if (module_selected('mocksnmp', $init_modules)) {
require_once $install_dir . '/tests/mocks/mock.snmp.inc.php';
} else {
| [getMessage] | This function is responsible for installing the required packages. This function loads all the functions and alerts. | We shouldn't be including this for all scripts, it should be just included in snmptrap.php. I'm going to bump this to 1.43 release. |
@@ -24,7 +24,7 @@ export class ElementStub extends BaseElement {
constructor(element) {
super(element);
// Fetch amp-ad script if it is not present.
- insertAmpExtensionScript(this.getWin(), element, 'amp-ad');
+ insertAmpExtensionScript(this.getWin(), 'amp-ad');
stubbedElements.push(this);
}
| [No CFG could be retrieved] | END of class Element. | Can we call with this element's `#tagName` instead? It should (essentially) be a noop if it's not an `amp-ad` or `amp-embed`, and those two will only install the extension script once. |
@@ -1278,8 +1278,12 @@ def sequence_conv(input,
filter_size (int): the filter size (H and W).
filter_stride (int): stride of the filter.
padding (bool): if True, add paddings.
- bias_attr (ParamAttr|None): attributes for bias
- param_attr (ParamAttr|None): attributes for parameter
+ bias_attr (ParamAttr): The parameter attribute for the bias of this layer.
+ If it is set to False, no bias will be added to the output units.
+ If it is set to None, the bias is initialized zero. Default: None.
+ param_attr (ParamAttr): The parameter attribute for learnable parameters/weights
+ of this layer. If it is set to None, the parameter is initialized with
+ Xavier. Default: None.
act (str): the activation type
Returns:
| [ctc_greedy_decoder->[topk],image_resize->[_is_list_or_turple_],sequence_first_step->[sequence_pool],logical_xor->[_logical_op],elementwise_pow->[_elementwise_op],elementwise_min->[_elementwise_op],elementwise_max->[_elementwise_op],logical_not->[_logical_op],conv2d->[_get_default_param_initializer],logical_and->[_logical_op],sequence_last_step->[sequence_pool],elementwise_add->[_elementwise_op],elementwise_sub->[_elementwise_op],lstm_unit->[fc],elementwise_mul->[_elementwise_op],logical_or->[_logical_op],elementwise_div->[_elementwise_op],dice_loss->[reduce_sum,one_hot,reduce_mean],matmul->[__check_input],resize_bilinear->[image_resize],image_resize_short->[image_resize],conv3d->[_get_default_param_initializer]] | This function creates the op for sequence_conv which creates the op for sequence_conv which. | I prefer to add `If it is set to ParamAttr` to be complete |
@@ -1127,4 +1127,8 @@ export const adConfig = {
renderStartImplemented: true,
},
+ 'mgid': {
+ renderStartImplemented: true,
+ },
+
};
| [No CFG could be retrieved] | Render start implemented. | Same here, can we put this config (and the one above), in alphabetical order? |
@@ -3,15 +3,14 @@ package hudson.cli;
import hudson.Extension;
import hudson.model.AbstractProject;
import hudson.model.Run;
-import hudson.remoting.Callable;
import org.apache.commons.io.IOUtils;
import org.kohsuke.args4j.Argument;
-import java.io.IOException;
import java.io.Serializable;
@Extension
public class SetBuildDisplayNameCommand extends CLICommand implements Serializable {
+ private static final long serialVersionUID = 6665171784136358536L;
@Override
public String getShortDescription() {
| [SetBuildDisplayNameCommand->[run->[setDisplayName,equals,checkPermission,toString,getBuildByNumber],getShortDescription->[SetBuildDisplayNameCommand_ShortDescription]]] | Returns the short description of the command. | This is probably just a matter of taste, but since the remoting cache is keyed by MD5 checksums, there's no need to set these cryptic number. 1L is sufficient. |
@@ -218,7 +218,7 @@ class SemanticRoleLabeler(Model):
default_lstm_params = {
'type': 'alternating_lstm',
- 'input_size': 100,
+ 'input_size': 101, # Because of the verb_indicator feature.
'hidden_size': 300,
'num_layers': 8,
'recurrent_dropout_probability': 0.1,
| [SemanticRoleLabeler->[tag->[forward],from_params->[from_params]]] | Constructs a new semantic role labeler from the given model and parameters. | Did you ever put in a check in the model that these sizes matches? |
@@ -221,6 +221,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
private String _dcId;
private String _pod;
private String _clusterId;
+ private final Properties _uefiProperties = new Properties();
private long _hvVersion;
private Duration _timeout;
| [LibvirtComputingResource->[getInterfaces->[getInterfaces],isSnapshotSupported->[executeBashScript],getNetworkStats->[networkUsage],getVifDriver->[getVifDriver],cleanupVMNetworks->[getAllVifDrivers],checkNetwork->[getVifDriver],cleanupNetworkElementCommand->[vifHotUnPlug,VifHotPlug],getVPCNetworkStats->[configureVPCNetworkUsage],getVmNetworkStat->[getInterfaces,getDomain],configure->[getDefaultKvmScriptsDir,getDefaultNetworkScriptsDir,configure,getDeveloperProperties,getDefaultStorageScriptsDir,getDefaultHypervisorScriptsDir,getDefaultDomrScriptsDir],getVifDriverClass->[configure],destroyNetworkRulesForVM->[getInterfaces],applyDefaultNetworkRules->[getType],createVMFromSpec->[enlightenWindowsVm,setQuotaAndPeriod,getUuid],vifHotUnPlug->[getAllVifDrivers],post_default_network_rules->[getInterfaces],getOvsPifs->[isGuestBridge],checkBridgeNetwork->[matchPifFileInDirectory],configureTunnelNetwork->[findOrCreateTunnelNetwork],getDisks->[getDisks],defaultNetworkRules->[getInterfaces],configureHostParams->[configure],rebootVM->[getPif,startVM],destroyNetworkRulesForNic->[getInterfaces],attachOrDetachISO->[cleanupDisk],prepareNetworkElementCommand->[VifHotPlug,getBroadcastUriFromBridge],findOrCreateTunnelNetwork->[checkNetwork],getVmState->[convertToPowerState],getVersionStrings->[KeyValueInterpreter,getKeyValues],attachOrDetachDisk->[getUuid],initialize->[getVersionStrings,getUuid],executeInVR->[executeInVR],getHostVmStateReport->[convertToPowerState,getHostVmStateReport],getVmDiskStat->[getDomain,getDisks],enlightenWindowsVm->[getUuid],getDeveloperProperties->[getEndIpFromStartIp],setQuotaAndPeriod->[getUuid],getVncPort->[getVncPort],getVmStat->[getInterfaces,getDomain,VmStats,getDisks],createVbd->[getUuid],syncNetworkGroups->[getRuleLogsForVms],getBroadcastUriFromBridge->[matchPifFileInDirectory]]] | The base class for the libvirt computer resource. This class is used to create a hypervisor object. | can you drop the _ from the field name. it is an obsolete convention. |
@@ -13,6 +13,10 @@ class JetpackTracking {
return;
}
+ if ( ! defined( 'DOING_AJAX' ) && ! Jetpack::is_user_connected( $user_id = get_current_user_id() ) ) {
+ jetpack_tracks_get_identity( $user_id );
+ }
+
// For tracking stuff via js/ajax
add_action( 'admin_enqueue_scripts', array( __CLASS__, 'enqueue_tracks_scripts' ) );
| [No CFG could be retrieved] | This method is used to track the usage of Jetpack. | Can you explain why this change is necessary? |
@@ -63,9 +63,9 @@ public interface FlowTemplate extends Spec {
* @param userConfig User supplied Config
* @param inputDescriptor input {@link DatasetDescriptor}
* @param outputDescriptor output {@link DatasetDescriptor}
- * @return true if the {@link FlowTemplate} is resolvable
+ * @return any exception that occurred when resolving or null if the {@link FlowTemplate} is resolvable
*/
- boolean isResolvable(Config userConfig, DatasetDescriptor inputDescriptor, DatasetDescriptor outputDescriptor)
+ Exception isResolvable(Config userConfig, DatasetDescriptor inputDescriptor, DatasetDescriptor outputDescriptor)
throws SpecNotFoundException, JobTemplate.TemplateException;
/**
| [No CFG could be retrieved] | Returns true if the input and output DatasetDescriptor are resolvable. | Returning an Exception seems a little strange. Can't we just catch the exception and handle the exception? |
@@ -128,8 +128,13 @@ public class TimeFormatExtractionFn implements ExtractionFn
}
@Override
- public String apply(Object value)
+ @Nullable
+ public String apply(@Nullable Object value)
{
+ if (Objects.isNull(value)) {
+ return null;
+ }
+
if (asMillis && value instanceof String) {
final Long theLong = GuavaUtils.tryParseLong((String) value);
return theLong == null ? apply(new DateTime(value).getMillis()) : apply(theLong.longValue());
| [TimeFormatExtractionFn->[getCacheKey->[getCacheKey],hashCode->[hashCode],apply->[apply],equals->[equals]]] | Determines the for the given value. | Same as above, suggested simply `value == null` |
@@ -34,6 +34,13 @@ import (
func NewClient(host string, httpClient *http.Client, httpHeaders map[string]string) (*client.Client, error) {
log := logp.NewLogger("docker")
+ if host == "" {
+ host = os.Getenv("DOCKER_HOST")
+ if host == "" {
+ host = "unix:///var/run/docker.sock"
+ }
+ }
+
opts := []client.Opt{
client.WithHost(host),
client.WithHTTPClient(httpClient),
| [WithHTTPHeaders,NewLogger,WithVersion,WithHTTPClient,Debug,WithAPIVersionNegotiation,NewClientWithOpts,Getenv,WithHost,Debugf] | NewClient returns a new Docker client with the specified host httpClient and HTTP headers. | Why is this needed here? |
@@ -182,6 +182,11 @@ namespace Microsoft.Xna.Framework
return result;
}
+ /// <summary>
+ /// Creates the smallest <see cref="BoundingSphere"/> that can surround a specified <see cref="BoundingBox"/>.
+ /// </summary>
+ /// <param name="box">The box to create the sphere from.</param>
+ /// <param name="result">The new <see cref="BoundingSphere"/> as an output parameter.</param>
public static void CreateFromBoundingBox(ref BoundingBox box, out BoundingSphere result)
{
// Find the center of the box.
| [BoundingSphere->[GetHashCode->[GetHashCode],Transform->[Transform],Intersects->[Intersects],PlaneIntersectionType->[Intersects],Equals->[Equals],Contains->[Contains],ContainmentType->[Contains],ToString->[ToString],Equals]] | Create a BoundingSphere object from a bounding box. | Use `contain` and not `surround`. |
@@ -161,8 +161,8 @@ func Write(r io.ReadCloser, path string) (*Operation, error) {
if err != nil {
return nil, err
}
-
- r.Close()
+ // #nosec: Errors unhandled
+ _ = r.Close()
// it's unclear why we have to do this since we pass the mode bits in
// openfile, but setting a file to 777 yields 775 without it.
| [Close->[Close,stat],stat->[Size,Stat,Name,Errorf,Base,Mode],String->[Sprintf,Base,IsDir],Read->[CopyN,Write,String],FileMode,Printf,NewReader,ReadString,FindStringSubmatch,Name,WriteTo,Close,Chmod,Errorf,OpenFile,ParseInt,MustCompile,ParseUint,stat,NumSubexp] | Write writes a single file from a reader and returns the corresponding Operation. OpenFile opens a file and returns a pointer to it. | it is so weird that you are getting those errors from gas and I don't :) |
@@ -950,7 +950,7 @@ func (s *Server) loadConfig(configurations types.Configurations, globalConfigura
redirectHandlers[entryPointName] = handlerToUse
}
}
- if backends[entryPointName+providerName+frontend.Backend] == nil {
+ if backends[entryPointName+providerName+frontend.Hash()] == nil {
log.Debugf("Creating backend %s", frontend.Backend)
roundTripper, err := s.getRoundTripper(entryPointName, globalConfiguration, frontend.PassTLSCert, entryPoint.TLS)
| [Stop->[Wait],stopLeadership->[Stop],RoundTrip->[RoundTrip],throttleProviderConfigReload->[Close],prepareServer->[createTLSConfig],StartWithContext->[Start],Close->[Stop,Close],loadConfig->[loadHTTPSConfiguration,getRoundTripper,buildEntryPoints]] | loadConfig loads the configuration and returns a map of serverEntryPoints to the server routes. This function creates a route rule and all necessary middleware for it. Build a response handler that forwards the request to the frontend This function creates a new instance of the frontend and all of its routes. | Could this string be stored, and referenced, instead of being recalculated multiple times? |
@@ -294,7 +294,7 @@ class MessageBuilder:
arg_strings.append(
self.format_bare(
arg_type,
- verbosity = max(verbosity - 1, 0)))
+ verbosity=max(verbosity - 1, 0)))
else:
constructor = ARG_CONSTRUCTOR_NAMES[arg_kind]
if arg_kind in (ARG_STAR, ARG_STAR2) or arg_name is None:
| [for_function->[callable_name,format],format_key_list->[format],append_invariance_notes->[format],make_inferred_type_note->[format],callable_name->[format],temp_message_builder->[MessageBuilder],pretty_or->[format],MessageBuilder->[undefined_in_superclass->[format,fail],report_non_method_protocol->[note,fail],redundant_cast->[format,fail],report_protocol_problems->[format_distinctly,format,note],untyped_function_call->[format,fail],override_target->[format],overload_signature_incompatible_with_supertype->[note,format,fail],note_call->[format_bare,format,note],bad_proto_variance->[format,fail],does_not_return_value->[format,fail],missing_named_argument->[format,fail],unimported_type_becomes_any->[format,fail],deleted_as_rvalue->[format,fail],note->[report],unsupported_placeholder->[fail],typeddict_key_must_be_string_literal->[format,fail],overloaded_signatures_arg_specific->[format,fail],overloaded_signatures_overlap->[format,fail],unsupported_left_operand->[format,fail],note_multiline->[report],string_interpolation_mixing_key_and_non_keys->[fail],incompatible_self_argument->[format,fail],invalid_signature->[format,fail],dangerous_comparison->[format,fail,format_distinctly],copy->[copy,MessageBuilder],untyped_decorated_function->[format,fail],incompatible_conditional_function_def->[fail],protocol_members_cant_be_final->[fail],no_variant_matches_arguments->[format,fail],could_not_infer_type_arguments->[format,fail],typed_function_untyped_decorator->[format,fail],cant_assign_to_method->[fail],read_only_property->[format,fail],too_few_string_formatting_arguments->[fail],type_not_iterable->[format,fail],wrong_number_values_to_unpack->[fail],overloaded_signatures_ret_specific->[format,fail],warn_both_operands_are_from_unions->[note],too_many_arguments_from_typed_dict->[too_many_arguments,format,fail],overload_inconsistently_applies_decorator->[format,fail],report->[report],clean_copy->[copy,MessageBuilder],format_bare->[format_bare,format],base_class_definitions_incompatible->[format,fail],cannot_determine_type->[fail],type_arguments_not_allowed->[fail],argument_incompatible_with_supertype->[note_multiline,format_bare,format,fail],print_more->[note],cannot_instantiate_abstract_class->[fail],return_type_incompatible_with_supertype->[format,fail],final_without_value->[fail],cant_override_final->[fail],too_many_arguments->[fail],requires_int_or_char->[fail],cannot_determine_type_in_base->[fail],too_few_arguments->[format,fail],invalid_keyword_var_arg->[format,fail],no_formal_self->[format,fail],invalid_index_type->[format,fail],incompatible_type_application->[fail],overloaded_signature_will_never_match->[fail],concrete_only_assign->[format,fail],too_many_positional_arguments->[fail],pretty_callable->[format_bare,format],invalid_var_arg->[fail],operator_method_signatures_overlap->[format,fail],signatures_incompatible->[format,fail],signature_incompatible_with_supertype->[format,fail],explicit_any->[fail],incompatible_operator_assignment->[format,fail],deleted_as_lvalue->[format,fail],cant_assign_to_classvar->[fail],typeddict_key_not_found->[format,fail],duplicate_argument_value->[format,fail],alias_invalid_in_runtime_context->[format,fail],final_cant_override_writable->[format,fail],forward_operator_not_callable->[format,fail],first_argument_for_super_must_be_type->[format,fail],unexpected_keyword_argument->[note,format,fail],reveal_locals->[format,fail],disallowed_any_type->[format,fail],incorrectly_returning_any->[format,fail],warn_operand_was_from_union->[format,note],yield_from_invalid_operand_type->[format,fail],key_not_in_mapping->[fail],need_annotation_for_var->[format,fail],has_no_attr->[format,fail],concrete_only_call->[format,fail],string_interpolation_with_star_and_key->[fail],unsupported_type_type->[format,fail],reveal_type->[format,fail],not_callable->[format,fail],incompatible_argument->[format,fail,unsupported_operand_types,quote_type_string,note,format_distinctly],incompatible_typevar_value->[format,fail],cant_assign_to_final->[format,fail],cannot_use_function_with_type->[fail],typeddict_key_cannot_be_deleted->[format,fail],format->[quote_type_string],too_many_string_formatting_arguments->[fail],fail->[report],pretty_overload_matches->[format,note],is_errors->[is_errors],unsupported_operand_types->[format,fail],pretty_overload->[format,note],overloaded_signatures_typevar_specific->[format,fail],unexpected_typeddict_keys->[format,fail],invalid_signature_for_special_method->[format,fail]]] | Convert a type to a relatively short string suitable for error messages. Returns a string representation of a . Returns a string representation of the . Return a string representation of a . | this was the only thing keeping back E251 -- since this isn't a function definition I went ahead and fixed it |
@@ -955,6 +955,11 @@ class Jetpack_Core_API_Data extends Jetpack_Core_API_XMLRPC_Consumer_Endpoint {
$updated = get_option( $option ) !== $value ? update_option( $option, (bool) $value ) : true;
break;
+ case 'disable_tracking':
+ // If option value was the same, consider it done.
+ $updated = get_option( $option ) !== $value ? update_option( $option, (bool) $value ) : true;
+ break;
+
default:
// If option value was the same, consider it done.
$updated = get_option( $option ) != $value ? update_option( $option, $value ) : true;
| [Jetpack_Core_API_Module_List_Endpoint->[get_modules->[get_modules]],Jetpack_Core_API_Module_Data_Endpoint->[akismet_is_active_and_registered->[akismet_class_exists]],Jetpack_Core_API_Data->[update_data->[can_request,deactivate_module,activate_module]]] | Updates a module s options This method checks if the request is valid and if so checks if the request is valid and This function updates the module according to the user s input. This function checks if a module is active and if so updates it. | This is the same than above (and similar to the one below except for the !== ) so I think it's unnecessary to repeat all the code. |
@@ -18,6 +18,9 @@ from functools import wraps
import sys
from typing import Tuple, Union, TypeVar, Callable, Sequence, Optional, Any, cast, List
+
+from mypy.sharedparse import special_function_elide_names
+
from mypy.nodes import (
MypyFile, Node, ImportBase, Import, ImportAll, ImportFrom, FuncDef, OverloadedFuncDef,
ClassDef, Decorator, Block, Var, OperatorAssignmentStmt,
| [parse->[parse],ASTConverter->[visit_Delete->[translate_expr_list],visit_While->[as_block],visit_If->[as_block],visit_BinOp->[from_operator],visit_ClassDef->[translate_expr_list,as_block],visit_AugAssign->[from_operator],visit_Dict->[translate_expr_list],visit_BoolOp->[group->[group],group,translate_expr_list],visit_With->[as_block],visit_Assign->[translate_expr_list,parse_type_comment],stringify_name->[stringify_name],visit_Import->[translate_module_id],transform_args->[convert_arg,get_type,translate_expr_list],as_block->[translate_stmt_list],visit_Lambda->[as_block,transform_args],visit_Compare->[from_comp_operator,translate_expr_list],visit_DictComp->[translate_expr_list],visit_ExtSlice->[translate_expr_list],visit_GeneratorExp->[translate_expr_list],try_handler->[as_block,produce_name],visit_For->[as_block],visit_Set->[translate_expr_list],visit_Module->[fix_function_overloads,translate_stmt_list],visit_FunctionDef->[in_class,parse,translate_expr_list,as_block],visit_Call->[translate_expr_list],visit_ImportFrom->[translate_module_id]],parse_type_comment->[parse]] | The fast parse. py file is identical to the fastparse. py except that it works Check for missing type. | Style nit: remove empty lines around import. |
@@ -34,6 +34,8 @@ class PostMover
)
DiscourseTagging.tag_topic_by_names(new_topic, Guardian.new(user), tags)
move_posts_to new_topic
+ force_user_to_watch_new_topic
+ new_topic
end
end
| [PostMover->[to_new_topic->[move_types],to_topic->[move_types],update_statistics->[update_statistics]]] | Creates a new topic with the given title category_id and tags. | This can just be `watch_new_topic` IMO. |
@@ -32,6 +32,8 @@ type LabelRule struct {
const (
// KeyRange is the rule type that labels regions by key range.
KeyRange = "key-range"
+ // KeyRanges is the rule type that specifies a list of key ranges.
+ KeyRanges = "key-ranges"
)
// KeyRangeRule contains the start key and end key of the LabelRule.
| [No CFG could be retrieved] | LabelRule is the rule to assign labels to a region. | The name `key-ranges` is too similar to the `key-range`, what about using `key-range-list` instead? |
@@ -112,9 +112,9 @@ public class HoodieSortedMergeHandle<T extends HoodieRecordPayload, I, K, O> ext
HoodieRecord<T> hoodieRecord = keyToNewRecords.get(key);
if (!writtenRecordKeys.contains(hoodieRecord.getRecordKey())) {
if (useWriterSchema) {
- writeRecord(hoodieRecord, hoodieRecord.getData().getInsertValue(tableSchemaWithMetaFields));
+ writeRecord(hoodieRecord, hoodieRecord.getData().getInsertValue(tableSchemaWithMetaFields, config.getProps()));
} else {
- writeRecord(hoodieRecord, hoodieRecord.getData().getInsertValue(tableSchema));
+ writeRecord(hoodieRecord, hoodieRecord.getData().getInsertValue(tableSchema, config.getProps()));
}
insertRecordsWritten++;
}
| [HoodieSortedMergeHandle->[close->[close],write->[write]]] | Writes out any pending records that are not yet written. | pls double confirm this and similar changes above are compatible to all other payload class implementations. |
@@ -3,6 +3,7 @@ Rails.application.configure do
config.webpacker.check_yarn_integrity = false
config.cache_classes = true
+ config.cache_store = :redis_cache_store, { url: IdentityConfig.store.redis_url }
config.eager_load = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
| [new,check_yarn_integrity,compile,raise_delivery_errors,domain_name,consider_all_requests_local,asset_host,cache_classes,deprecation,dump_schema_after_migration,logger,fallbacks,log_to_stdout,delivery_method,disable_email_sending,eager_load,ignore_actions,default_url_options,presence,perform_caching,digest,proc,log_level,ip_spoofing_check,configure,mailer_domain_name,js_compressor] | Configures the application with the given configuration. | maybe share this with development too? |
@@ -96,12 +96,11 @@ def _apply_lcmv(data, info, tmin, forward, noise_cov, data_cov, reg,
stc : SourceEstimate | VolSourceEstimate (or list of thereof)
Source time courses.
"""
- is_free_ori, ch_names, proj, vertno, G = (
- _prepare_beamformer_input(
- info, forward, label, picks, pick_ori))
+ is_free_ori, ch_names, proj, vertno, G = \
+ _prepare_beamformer_input(info, forward, label, picks, pick_ori)
# Handle whitening + data covariance
- whitener, _ = compute_whitener(noise_cov, info, picks, rank=rank)
+ whitener = compute_whitener(noise_cov, info, picks, rank=rank)[0]
# whiten the leadfield
G = np.dot(whitener, G)
| [_lcmv_source_power->[_prepare_beamformer_input],lcmv_raw->[_setup_picks,_apply_lcmv],lcmv->[_setup_picks,_apply_lcmv],tf_lcmv->[_setup_picks,_lcmv_source_power],lcmv_epochs->[_setup_picks,_apply_lcmv]] | This function applies the LCMV beamformer to a given data. Compute the leadfield and the whitener of a node. Picks a single or free source or fixed critical block. Yields a sequence of states where the sequence is missing. | I prefer the older way. I find it less error prone as it makes the code break when the number of output args changes. |
@@ -2831,9 +2831,10 @@ fs_copy_hdlr(struct cmd_args_s *ap)
struct duns_attr_t dst_dattr = {0};
struct file_dfs src_file_dfs = {0};
struct file_dfs dst_file_dfs = {0};
- struct fs_copy_args fa = {0};
+ struct copy_args fa = {0};
int src_str_len = 0;
int dst_str_len = 0;
+ bool is_posix_copy = true;
file_set_defaults_dfs(&src_file_dfs);
file_set_defaults_dfs(&dst_file_dfs);
| [No CFG could be retrieved] | Reads the specified from the specified source and dest. parse and set the paths based on the source and destination file types. | @dsikich Minor nitpick: Since we changed `fs_copy_args` to `copy_args`, maybe we should also change `fa` to `ca` or something similar? |
@@ -25,11 +25,7 @@ import org.apache.beam.sdk.PipelineResult;
import org.apache.beam.sdk.testing.PAssert;
import org.apache.beam.sdk.testing.TestPipeline;
import org.apache.beam.sdk.transforms.Create;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
+import org.junit.*;
@SuppressWarnings({"nullness", "rawtypes", "uninitialized"})
public class DicomIOReadIT {
| [DicomIOReadIT->[deleteDicomStore->[deleteDicomStore]]] | Imports a single object and creates a DicomData object. This method creates a new DicomStore and uploads it to the DicomStore. | import * is not allowed in Beam. Please import classes individually (configure your IDE settings accordingly if you have to). |
@@ -63,6 +63,7 @@ public class DefaultSchedulerMessageSource extends AbstractComponent
private final PeriodicScheduler scheduler;
private final boolean disallowConcurrentExecution;
+ private final boolean disabled;
private Scheduler pollingExecutor;
private ScheduledFuture<?> schedulingJob;
| [DefaultSchedulerMessageSource->[disposeScheduler->[stop],SchedulerProcessContext->[getExecutionClassLoader->[getExecutionClassLoader]]]] | Creates a new instance of the default message source. Constructor for this. | make this static and read the value on initialization |
@@ -38,7 +38,7 @@ STR_CONFIG_ITEMS = ["config_dir", "logs_dir", "work_dir", "user_agent",
"standalone_supported_challenges", "renew_hook",
"pre_hook", "post_hook", "tls_sni_01_address",
"http01_address"]
-INT_CONFIG_ITEMS = ["rsa_key_size", "tls_sni_01_port", "http01_port"]
+INT_CONFIG_ITEMS = ["rsa_key_size", "http01_port"]
BOOL_CONFIG_ITEMS = ["must_staple", "allow_subset_of_names", "reuse_key",
"autorenew"]
| [_renew_describe_results->[report,notify_error],handle_renewal_request->[_renew_describe_results,should_renew,renew_cert,_reconstitute],_restore_plugin_configs->[_restore_webroot_config],renew_cert->[_avoid_invalidating_lineage]] | Creates a function which can be used to instantiate a RenewableCert object from a configuration Return the RenewableCert object if available. | I think `tls_sni_01_address` should also be removed here. |
@@ -82,6 +82,8 @@ func (p *fileProspector) Init(cleaner loginp.ProspectorCleaner) error {
return "", fm
})
+ p.ignoreInactiveSince = ignoreSince
+
return nil
}
| [Init->[UnpackCursorMeta,Name,CleanIf,UpdateIdentifiers,GetFiles,GetSource],Run->[ResetCursor,Now,Restart,With,UpdateMetadata,Stop,Error,FindCursorMeta,Supports,Go,Start,Errorf,stopHarvesterGroup,Sub,Wait,Debugf,Debug,Name,Remove,Err,ModTime,WrapAll,Event,GetSource,Run],stopHarvesterGroup->[StopGroup,Errorf]] | Init initializes the prospector This function is called when a file is created or updated. Remove state from statestore and update cursor meta data running prospector is a blocking function that returns nil if there is no prospector. | If possible we should reduce the need to modify the type on Init. Can the `Configure` function extract the new setting instead of the InputManager? In the end, this setting is a prospector setting only. For reusability (if that is the motivation), we should switch to a coding pattern that allows us to compose/embedd functionality instead of building 'common' features around. |
@@ -143,7 +143,15 @@ class DbtShellTask(ShellTask):
}
}
- profile_path = os.path.join(self.profiles_dir, "profiles.yml")
+ if not self.profiles_dir:
+ try:
+ os.mkdir(DEFAULT_PROFILES_DIR)
+ except OSError:
+ print("Creation of directory %s has failed" % DEFAULT_PROFILES_DIR)
+ profile_path = os.path.join(DEFAULT_PROFILES_DIR, "profiles.yml")
+ self.profiles_dir = DEFAULT_PROFILES_DIR
+ else:
+ profile_path = os.path.join(self.profiles_dir, "profiles.yml")
with open(profile_path, "w+") as yaml_file:
yaml.dump(profile, yaml_file, default_flow_style=False)
| [DbtShellTask->[__init__->[super],run->[dump,getenv,super,join,exists,open],defaults_from_attrs]] | Runs a command in the profiles directory and returns the output of the command. Run the command and return the result. | This print statement might be better as a warning log (`self.logger.warning()`) |
@@ -453,7 +453,7 @@ class GraphRewriter(object):
def round_nodes_recursively(self, current_node):
"""The entry point for simple rounding quantization."""
- if (current_node.name in self.already_visited) and self.already_visited[current_node.name]:
+ if current_node.name in self.already_visited:
return
self.already_visited[current_node.name] = True
for input_node_name in current_node.input:
| [print_input_nodes->[print_input_nodes],GraphRewriter->[quantize_weights->[quantize_weight_rounded,quantize_weight_eightbit],add_relu_function->[set_attr_dtype],eightbitize_mat_mul_node->[add_quantize_down_nodes,add_eightbit_prologue_nodes,add_dequantize_result_node,copy_attr,create_node,set_attr_dtype],eightbitize_nodes_recursively->[node_name_from_input,eightbitize_nodes_recursively,should_quantize_const,quantize_weight_eightbit,should_merge_with_fake_quant_node],set_input_graph->[create_nodes_map],eightbitize_conv_node->[add_quantize_down_nodes,add_eightbit_prologue_nodes,add_dequantize_result_node,copy_attr,create_node,set_attr_dtype],eightbitize_concat_node->[add_common_quantization_nodes,eightbitize_input_to_node,add_dequantize_result_node,set_attr_int,create_node,set_attr_dtype],remove_redundant_quantization->[add_output_graph_node,ensure_tensor_name_has_port,create_nodes_map,node_name_from_input],quantize_nodes_recursively->[quantize_nodes_recursively,node_name_from_input],add_pool_function->[copy_attr,set_attr_dtype],rewrite->[create_constant_node],eightbitize_placeholder_node->[create_node,set_attr_string,set_attr_dtype],quantize_node->[set_attr_string,create_constant_node,set_attr_bool,create_node,set_attr_dtype],eightbitize_bias_add_node->[add_quantize_down_nodes,add_eightbit_prologue_nodes,add_dequantize_result_node,create_node,set_attr_dtype],add_quantize_down_nodes->[create_node,should_merge_with_fake_quant_node,set_attr_dtype],add_common_quantization_nodes->[create_constant_node],eightbitize_input_to_node->[set_attr_string,unique_node_name_from_input,set_attr_bool,create_node,set_attr_dtype],eightbitize_batch_norm_node->[add_quantize_down_nodes,add_common_quantization_nodes,eightbitize_input_to_node,add_dequantize_result_node,copy_attr,create_node,set_attr_dtype],eightbitize_reshape_node->[add_common_quantization_nodes,eightbitize_input_to_node,add_dequantize_result_node,create_node,set_attr_dtype],add_dequantize_result_node->[create_node,should_merge_with_fake_quant_node,set_attr_dtype,set_attr_string],apply_final_node_renames->[ensure_tensor_name_has_port,add_output_graph_node,node_name_from_input],round_nodes_recursively->[round_nodes_recursively,node_name_from_input],eightbitize_single_input_tensor_node->[add_eightbit_prologue_nodes,create_node,add_dequantize_result_node]],main->[GraphRewriter,rewrite],create_constant_node->[create_node],quantize_weight_eightbit->[create_node,create_constant_node,set_attr_dtype,set_attr_string],quantize_weight_rounded->[quantize_array,create_constant_node]] | This method adds a node to the graph and adds all nodes that are not already in the. | This was changed recently in #9393, but it brought the column width past 80 characters. This syntax is used in the rest of the file, and since the values in `self.already_visited` are only ever set to `True`, we can stick to this more concise version. |
@@ -0,0 +1,8 @@
+class DropLanguageColumns < ActiveRecord::Migration[6.0]
+ def change
+ safety_assured do
+ remove_column :articles, :language
+ remove_column :users, :language_settings
+ end
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | While this also removes the index, it means this migration is non-reversible. I thought that generally, we're ok with that but let me know if you want to change it. |
@@ -700,7 +700,7 @@ dc_rw_cb(tse_task_t *task, void *arg)
orwo->orw_epoch, DP_RC(rc_tmp));
goto out;
}
- }
+ }
if (rc != 0) {
if (rc == -DER_INPROGRESS || rc == -DER_TX_BUSY) {
| [No CFG could be retrieved] | This function is called when the DOS_SHARD_OBJ_RW_DROP_ Reads the next object from the pool and checks if the object has the highest server in the. | (style) trailing whitespace |
@@ -32,9 +32,8 @@ class Discourse::Cors
def self.apply_headers(cors_origins, env, headers)
request_method = env['REQUEST_METHOD']
- cdn_endpoints = ["/assets", "/javascripts"]
- if cdn_endpoints.include?(env['SCRIPT_NAME']) && Discourse.is_cdn_request?(env, request_method)
+ if env['REQUEST_PATH'] =~ /\/(javascripts|assets)\// && Discourse.is_cdn_request?(env, request_method)
Discourse.apply_cdn_headers(headers)
elsif cors_origins
origin = nil
| [call->[call,split,apply_headers,present?,presence],initialize->[present?,chomp,enable_cors,map],apply_headers->[is_cdn_request?,include?,apply_cdn_headers],insert_before,enable_cors,cdn_url] | Applies the appropriate CORS headers to the given Hash. | I kind of have some reservation about this change partly because I don't know what kind of request paths we are dealing with. Maybe @SamSaffron can review this? |
@@ -352,7 +352,12 @@ class Task(CeleryTask, ReservedTaskMixin):
if retval.error:
delta['error'] = retval.error.to_dict()
if retval.spawned_tasks:
- task_list = [spawned_task['task_id'] for spawned_task in retval.spawned_tasks]
+ task_list = []
+ for spawned_task in retval.spawned_tasks:
+ if isinstance(spawned_task, AsyncResult):
+ task_list.append(spawned_task.task_id)
+ elif isinstance(spawned_task, dict):
+ task_list.append(spawned_task['task_id'])
delta['spawned_tasks'] = task_list
TaskStatusManager.update_task_status(task_id=task_id, delta=delta)
| [_queue_release_resource->[apply_async],_reserve_resource->[get_or_create_reserved_resource,increment_num_reservations,AvailableQueue,get_least_busy_available_queue,save],register_sigterm_handler->[wrap_f->[signal,f],sigterm_handler->[handler]],ReservedTaskMixin->[apply_async_with_reservation->[join,apply_async]],_delete_queue->[filter_available_queues,list,_,error,Criteria,find_by_criteria,cancel,delete],cancel->[_,update_task_status,revoke,find_by_task_id,info],Task->[on_failure->[debug,update_task_status,now_utc_timestamp,str,isinstance,PulpException,to_dict],__call__->[debug,find_by_task_id,now_utc_timestamp,super,get_collection],on_success->[debug,update_task_status,now_utc_timestamp,isinstance,to_dict],apply_async->[pop,super,get,get_collection]],babysit->[filter_available_queues,list,add_consumer,Criteria,get_or_create_available_queue,save,utcnow,apply_async,set,timedelta,items,add,inspect,match],_release_resource->[AvailableQueue,decrement_num_reservations,ReservedResource],getLogger,Control] | This method is called when the task is successfully executed. It updates the status of the task This function is called when a PulpException is raised while processing a task. It updates. | Awwww, this is a little sad. Hopefully we can get it back to a list comprehension in the future? |
@@ -478,10 +478,13 @@ def _fit_cHPI_amplitudes(raw, time_sl, hpi, fit_time, verbose=None):
data_diff = np.dot(model, X).T - this_data
- # compute amplitude correlation (For logging)
- g_sin = 1 - np.sqrt((data_diff**2).sum() / (this_data**2).sum())
- g_chan = 1 - np.sqrt((data_diff**2).sum(axis=1) /
- (this_data**2).sum(axis=1))
+ # compute amplitude correlation (for logging), protect against zero
+ norm = (this_data ** 2).sum(axis=1)
+ norm_sum = norm.sum()
+ norm_sum = np.inf if norm_sum == 0 else norm_sum
+ norm[norm == 0] = np.inf
+ g_sin = 1 - np.sqrt((data_diff**2).sum() / norm_sum)
+ g_chan = 1 - np.sqrt((data_diff**2).sum(axis=1) / norm)
logger.debug(' HPI amplitude correlation %0.3f: %0.3f '
'(%s chnls > 0.90)' % (fit_time, g_sin,
(g_chan > 0.90).sum()))
| [filter_chpi->[_setup_hpi_struct],_fit_device_hpi_positions->[_fit_cHPI_amplitudes,_fit_magnetic_dipole,_setup_hpi_struct],_calculate_chpi_coil_locs->[_get_hpi_initial_fit,_fit_cHPI_amplitudes,_fit_magnetic_dipole,_setup_hpi_struct],_fit_coil_order_dev_head_trans->[_fit_chpi_quat],_setup_hpi_struct->[_get_hpi_info],_calculate_chpi_positions->[_time_prefix,_fit_magnetic_dipole,_fit_chpi_quat,_setup_hpi_struct,_get_hpi_initial_fit,_fit_cHPI_amplitudes],_fit_cHPI_amplitudes->[_time_prefix]] | Fit amplitudes for each channel from each of the N cHPI sinusoids Compute the sinusoid phase of a window in the HPI model. | if this_data is not too small I suspect norm = np.linalg.norm(this_data, axis=1)**2 avoid the allocation of this_data ** 2 |
@@ -27,6 +27,7 @@ var (
validSortFieldsForServiceGroups = map[string]SortField{
"name": NameField,
"percent_ok": PercentOkField,
+ "health": HealthField,
"app_name": AppField,
"environment": EnvironmentField,
"": DefaultField,
| [String,Errorf,GetField,GetOrder] | GetSortParamsForServices imports the parameters for the given object. isValidSortFieldForServices returns true if the passed sorting field is a valid sort field for. | I don't think we added a sorting by health, based on the UI my understanding of the card is that it is sorting by percent_ok and then by health within like percentages. |
@@ -50,3 +50,5 @@ if (isset ($_GET['act'])&&isset ($_GET['method'])) {
}
}
}
+
+require ('includes/application_bottom.php');
| [No CFG could be retrieved] | Employs a nation of a nation of a nation of a n. | Question: Doesn't the `exit()` on line 47 negate the calling of application_bottom? So, second question: is this actually fixing the original thing you intended it to? |
@@ -579,7 +579,7 @@ const EVP_PKEY_ASN1_METHOD ed25519_asn1_meth = {
0, 0,
ecx_free,
- 0,
+ ecx_edctrl,
NULL,
NULL,
ecd_item_verify,
| [int->[X509_ALGOR_get0,ASN1_STRING_length,ED448_verify,OPENSSL_memdup,OBJ_obj2nid,X509_PUBKEY_get0_param,KEYLENID,ecx_key_print,ED448_public_from_private,memcpy,RAND_priv_bytes,X448_public_from_private,KEYLEN,validate_ecx_derive,EVP_MD_CTX_pkey_ctx,ED448_sign,OBJ_nid2obj,ASN1_STRING_get0_data,i2d_ASN1_OCTET_STRING,ED25519_public_from_private,OPENSSL_clear_free,ASN1_OCTET_STRING_free,X448,OPENSSL_zalloc,OPENSSL_secure_free,CRYPTO_memcmp,EVP_md_null,PKCS8_pkey_get0,BIO_printf,ecx_key_op,ED25519_verify,X509_PUBKEY_set0_param,ECerr,d2i_ASN1_OCTET_STRING,X509_SIG_INFO_set,OPENSSL_free,IS25519,X25519_public_from_private,EVP_DigestVerifyInit,ISX448,X509_ALGOR_set0,EVP_PKEY_assign,X25519,ED25519_sign,ASN1_buf_print,PKCS8_pkey_set0,OPENSSL_secure_malloc,OBJ_nid2ln],void->[OPENSSL_free,KEYLEN,OPENSSL_secure_clear_free]] | Set the ECD signature info. Private methods for EVP_PKEY_CTX. x key operation. | Please use ecd_crtl for consistency with other ed... specific functions |
@@ -56,7 +56,8 @@ DEFAULT_PREDICTORS = {
'bidaf': 'machine-comprehension',
'simple_tagger': 'sentence-tagger',
'crf_tagger': 'sentence-tagger',
- 'coref': 'coreference-resolution'
+ 'coref': 'coreference-resolution',
+ 'constituency_parser': 'constituency-parser'
}
| [_run->[_run_predictor],_predict->[_get_predictor,_run]] | Adds a sub - command parser to the given parser. | I'd leave a comma at the end of this line - it's valid python, and it makes maintaining it easier. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.