patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -228,7 +228,7 @@ class Snappy {
* @param out The output buffer to copy to
* @param length The length of the literal to copy
*/
- private static void encodeLiteral(ByteBuf in, ByteBuf out, int length) {
+ static void encodeLiteral(ByteBuf in, ByteBuf out, int length) {
if (length < 61) {
out.writeByte(length - 1 << 2);
} else {
| [Snappy->[encodeCopy->[encodeCopyWithOffset],validateChecksum->[validateChecksum,calculateChecksum],encodeLiteral->[bitsToEncode],calculateChecksum->[reset,calculateChecksum]]] | Encode a literal. | Removed `private` to call it in test |
@@ -20,6 +20,10 @@ class Kernel extends SuluTestKernel
{
parent::registerContainerConfiguration($loader);
- $loader->load(__DIR__ . '/config/config.yml');
+ if (SuluKernel::CONTEXT_WEBSITE === $this->getContext()) {
+ $loader->load(__DIR__ . '/config/config_website.yml');
+ } else {
+ $loader->load(__DIR__ . '/config/config.yml');
+ }
}
}
| [Kernel->[registerContainerConfiguration->[load]]] | Register container configuration. | Why was that necessary? |
@@ -322,6 +322,11 @@ class CLI_Command extends WP_CLI_Command {
* [--format=<format>]
* : Accepted values: var_export, json. Default: json.
*
+ * ## EXAMPLES
+ *
+ * $ wp cli param-dump
+ * {"path":{"runtime":"=<path>","file":"<path>","synopsis":"","default":null,"multiple":false,"desc":"Path to the WordPress files."},"url":{"runtime":"=<url>","file":"<url>","synopsis":"","default":null,"multiple":false,"desc":"Pretend request came from given URL. In multisite, this argument is how the target site is specified."},"blog":{"runtime":"=<url>","file":false,"synopsis":"","default":null,"multiple":false,"deprecated":"Use --url instead."},"config":{"runtime":"=<path>","file":false,"synopsis":"","default":null,"multiple":false,"deprecated":"Use the WP_CLI_CONFIG_PATH environment variable instead."},"user":{"runtime":"=<id|login|email>","file":"<id|login|email>","synopsis":"","default":null,"multiple":false,"desc":"Set the WordPress user."},"skip-plugins":{"runtime":"[=<plugin>]","file":"<list>","synopsis":"","default":"","multiple":false,"desc":"Skip loading all or some plugins. Note: mu-plugins are still loaded."},"skip-themes":{"runtime":"[=<theme>]","file":"<list>","synopsis":"","default":"","multiple":false,"desc":"Skip loading all or some themes."},"skip-packages":{"runtime":"","file":"<bool>","synopsis":"","default":false,"multiple":false,"desc":"Skip loading all installed packages."},"require":{"runtime":"=<path>","file":"<path>","synopsis":"","default":[],"multiple":true,"desc":"Load PHP file before running the command (may be used more than once)."},"disabled_commands":{"runtime":false,"file":"<list>","synopsis":"","default":[],"multiple":false,"desc":"(Sub)commands to disable."},"color":{"runtime":true,"file":"<bool>","synopsis":"","default":"auto","multiple":false,"desc":"Whether to colorize the output."},"debug":{"runtime":"","file":"<bool>","synopsis":"","default":false,"multiple":false,"desc":"Show all PHP errors; add verbosity to WP-CLI bootstrap."},"prompt":{"runtime":"","file":false,"synopsis":"","default":false,"multiple":false,"desc":"Prompt the user to enter values for all command arguments."},"quiet":{"runtime":"","file":"<bool>","synopsis":"","default":false,"multiple":false,"desc":"Suppress informational messages."},"apache_modules":{"runtime":false,"file":"<list>","synopsis":"","default":[],"multiple":true,"desc":"List of Apache Modules that are to be reported as loaded."},"allow-root":{"runtime":"","file":false,"synopsis":"","default":null,"multiple":false,"hidden":true}}
+ *
* @subcommand param-dump
*/
function param_dump( $_, $assoc_args ) {
| [CLI_Command->[completions->[render],update->[get_update_type_str,run,get_updates],param_dump->[get_spec,to_array],info->[get_packages_dir_path],command_to_array->[get_subcommands,get_shortdesc,get_longdesc,get_synopsis,get_name],check_update->[display_items,get_update_type_str,get_updates]]] | Dump the parameters of a command. | Can we truncate this some? I don't think it's necessary to include the full output. Also, this will need to be indented. |
@@ -116,6 +116,7 @@ public class TripleA implements IGameLoader {
} else {
SwingAction.invokeAndWait(() -> {
final TripleAFrame frame = new TripleAFrame(game, localPlayers);
+ LookAndFeelSwingFrameListener.register(frame);
display = new TripleADisplay(frame);
game.addDisplay(display);
soundChannel = new DefaultSoundChannel(localPlayers);
| [TripleA->[shutDown->[removeSoundChannel,removeDisplay,shutDown],createPlayers->[FastAi,WeakAi,equals,IllegalStateException,get,ProAi,TripleAPlayer,add,DoesNothingAi,keySet],getUnitFactory->[createUnit->[TripleAUnit],IUnitFactory],startGame->[HeadlessSoundChannel,initialize,play,HeadlessUiContext,getDelegate,addDelegateMessenger,addDisplay,LocalPlayers,HeadlessDisplay,toFront,addSoundChannel,getData,setVisible,invokeAndWait,addDelegate,DefaultSoundChannel,TripleADisplay,connectPlayers,setLocalPlayers,TripleAFrame,EditDelegate,setSize,setDefaultMapDir,setExtendedState],connectPlayers->[setFrame]]] | Start a new game with a specific set of players. | This static call is to the helper class above. It's important we update the UI of any component that is open after changing the UI manager. So any frame we create we need to register so it can be updated. We get automatic listener removal as well when the frame is closed. |
@@ -276,12 +276,12 @@ class TestParameters(KratosUnittest.TestCase):
kp = Parameters(json_string)
self.assertTrue(kp.Has("int_value"))
self.assertTrue(kp.Has("level1"))
- print(kp)
+ #print(kp)
kp.RemoveValue("int_value")
kp.RemoveValue("level1")
- print(kp)
+ #print(kp)
self.assertFalse(kp.Has("int_value"))
self.assertFalse(kp.Has("level1"))
| [TestParameters->[test_validation_fails_due_to_wrong_type->[ValidateAndAssignDefaults,assertRaises,Parameters],test_validation_succeds_error_on_first_level->[ValidateAndAssignDefaults,Parameters],test_iterators->[WriteJsonString,keys,PrettyPrintJsonString,kp,assertEqual,items,Parameters,values],test_kratos_change_parameters->[size,my_list,PrettyPrintJsonString,assertEqual,range,subparams],test_kratos_wrong_parameters->[assertRaisesRegex,kp],test_remove_value->[assertTrue,Has,print,RemoveValue,Parameters,assertFalse],test_set_value->[kp1,kp,assertEqual,Parameters],test_validation_succeeds->[PrettyPrintJsonString,kp,assertEqual,ValidateAndAssignDefaults,defaults_params,Parameters],test_validation_fails_due_to_wrong_spelling->[ValidateAndAssignDefaults,assertRaises,Parameters],setUp->[Parameters],test_add_value->[assertTrue,Has,AddEmptyValue,kp,assertEqual,Parameters],test_kratos_parameters->[assertTrue,WriteJsonString,Has,PrettyPrintJsonString,kp,assertEqual,assertFalse],test_recursive_validation_fails_error_on_first_level->[RecursivelyValidateAndAssignDefaults,assertRaises,Parameters],test_kratos_copy_parameters->[other_copy,PrettyPrintJsonString,kp,assertEqual,Clone]],main] | Test remove value of parameters. | i think you can completely remove the print |
@@ -69,13 +69,13 @@ Rails.application.routes.draw do
get 'download'
post 'upload'
get 'batch_runs'
+ post 'upload_config_files'
end
member do
get 'download_sample_starter_files'
get 'download_starter_file_mappings'
get 'download_config_files'
- post 'upload_config_files'
get 'view_summary'
post 'update_starter_file'
get 'peer_review'
| [draw,namespace,collection,resources,member,root,test?,get,post,patch,match,put,delete] | API endpoint for listing all groups. endregion region get_tag_dialog update_starter_file update_files update. | Oh nice, good catch. This makes more sense here for sure |
@@ -186,6 +186,18 @@ class TokenNetwork:
""" Return the token of this manager. """
return to_canonical_address(self.proxy.contract.functions.token().call())
+ @property
+ def channel_participant_deposit_limit(self) -> TokenAmount:
+ """ Return the token of this manager. """
+ return TokenAmount(
+ self.proxy.contract.functions.channel_participant_deposit_limit().call()
+ )
+
+ @property
+ def token_network_deposit_limit(self) -> TokenAmount:
+ """ Return the token of this manager. """
+ return TokenAmount(self.proxy.contract.functions.token_network_deposit_limit().call())
+
def _new_channel_postconditions(self, partner: Address, block: BlockSpecification):
channel_created = self._channel_exists_and_not_settled(
participant1=self.node_address, participant2=partner, block_identifier=block
| [TokenNetwork->[all_events_filter->[events_filter],_check_channel_state_before_settle->[_detail_channel],update_transfer->[_detail_participant,raise_on_call_returned_empty,_detail_channel],new_netting_channel->[raise_if_invalid_address_pair],_check_channel_state_after_settle->[_check_channel_state_before_settle],_check_for_outdated_channel->[_detail_channel],_set_total_withdraw->[_detail_channel,_detail_participant],close->[raise_on_call_returned_empty,_detail_channel],detail_participants->[ParticipantsDetails,get_channel_identifier,_detail_participant],unlock->[_detail_participant,raise_on_call_returned_empty,_detail_channel],set_total_withdraw->[_detail_participant,raise_on_call_returned_empty,_detail_channel],settle->[_settle_preconditions],_check_why_deposit_failed->[detail_participants,_detail_participant],settlement_timeout_max->[settlement_timeout_max],set_total_deposit->[token_address,_deposit_preconditions,_detail_participant],_get_channel_state->[_detail_channel],detail->[ChannelDetails,detail_participants,_detail_channel],_detail_participant->[raise_if_invalid_address_pair,ParticipantDetails],_unlock->[_detail_channel,_detail_participant],get_channel_identifier->[raise_if_invalid_address_pair],_update_transfer->[_detail_participant,_detail_channel],_detail_channel->[raise_if_invalid_address_pair,get_channel_identifier,ChannelData],can_transfer->[channel_is_opened,_detail_participant],_close->[_detail_channel,_detail_participant],settlement_timeout_min->[settlement_timeout_min],_new_netting_channel->[_new_channel_postconditions]]] | Return the token of this manager. | Please fix the docstring |
@@ -1124,6 +1124,13 @@ RtpsUdpDataLink::RtpsReader::process_data_i(const RTPS::DataSubmessage& data,
WriterInfo& info = wi->second;
SequenceNumber seq;
seq.setValue(data.writerSN.high, data.writerSN.low);
+
+ if (link->receive_strategy()->withholdDirectedWrite(data, id_)) {
+ info.recvd_.insert(seq);
+ link->deliver_held_data(id_, info, durable_);
+ return false;
+ }
+
info.frags_.erase(seq);
if (info.recvd_.contains(seq)) {
if (Transport_debug_level > 5) {
| [No CFG could be retrieved] | processing of received message if the message is not durable and seq > 1 and info is not empty and seq >. | The receive strategy is calling this function to figure out what to do with the data. This function should not then turn around and call back into the receive strategy, as that seems like a great way to cause deadlock. Move this logic up into the receive strategy before ever calling this function. |
@@ -181,6 +181,8 @@ namespace Dynamo.UI.Controls
{
RefreshExpandedDisplay(delegate { BeginViewSizeTransition(ComputeLargeContentSize()); });
}
+
+ IsDataBound = true;
}
/// <summary>
| [PreviewControl->[RefreshExpandedDisplay->[RunOnSchedulerSync],BeginFadeOutTransition->[SetCurrentStateAndNotify],BeginCondenseTransition->[UpdateAnimatorTargetSize,SetCurrentStateAndNotify,RefreshCondensedDisplay],BeginViewSizeTransition->[UpdateAnimatorTargetSize],OnPreviewControlPhasedIn->[SetCurrentStateAndNotify,BeginNextTransition],RefreshCondensedDisplay->[RunOnSchedulerSync],OnPreviewControlPhasedOut->[SetCurrentStateAndNotify,BeginNextTransition],BeginExpandTransition->[UpdateAnimatorTargetSize,SetCurrentStateAndNotify,RefreshExpandedDisplay],OnPreviewControlLoaded->[BeginNextTransition],BeginFadeInTransition->[UpdateAnimatorTargetSize,SetCurrentStateAndNotify,RefreshCondensedDisplay],OnPreviewControlExpanded->[SetCurrentStateAndNotify,BeginNextTransition],OnPreviewControlCondensed->[SetCurrentStateAndNotify,BeginNextTransition],ComputeWatchContentSize->[SetCurrentStateAndNotify,RefreshExpandedDisplay],BeginNextTransition->[BindToDataSource]]] | This method is called when the data source is bound to the preview control. | The purpose of `IsDataBound` becomes weird now after the change, I don't mind keeping it this way just to keep the change small, but we should follow this up with a subsequent task (also to consider renaming of `RunOnSchedulerSync` since it is essentially an asynchronous operation). |
@@ -445,8 +445,8 @@ void dragon_alpha_state::dgnalpha(machine_config &config)
// pia 2
pia6821_device &pia2(PIA6821(config, PIA2_TAG, 0));
pia2.writepa_handler().set(FUNC(dragon_alpha_state::pia2_pa_w));
- pia2.irqa_handler().set(FUNC(dragon_alpha_state::pia2_firq_a));
- pia2.irqb_handler().set(FUNC(dragon_alpha_state::pia2_firq_b));
+ pia2.irqa_handler().set(m_firqs, FUNC(input_merger_device::in_w<0>));
+ pia2.irqb_handler().set(m_firqs, FUNC(input_merger_device::in_w<1>));
// software lists
SOFTWARE_LIST(config, "dgnalpha_flop_list").set_original("dgnalpha_flop");
| [No CFG could be retrieved] | Configure the dragon alpha state. region dragon machine configuration. | Won't this clash with `pia1` from `dragon_base`? I would've thought this one would use `<2>` and `<3>`. Am I missing something? |
@@ -345,6 +345,9 @@ module View
end
num_ipo_shares = share_number_str(@corporation.num_ipo_shares - @corporation.num_ipo_reserved_shares)
+ if !num_ipo_shares.empty? && @corporation.capitalization != @game.class::CAPITALIZATION
+ num_ipo_shares = '* ' + num_ipo_shares
+ end
pool_rows = [
h('tr.ipo', [
h('td.left', @game.ipo_name(@corporation)),
| [Corporation->[render_shares->[share_number_str,share_price_str]]] | Renders a group of blocks that have a single missing header with a single header with a single Returns a list of nodes with the availabe items in the corp pool. Displays a table with all the missing - free items in the system. | How about `!num_ipo_shares.empty? ` to `num_ipo_shares.any?` avoiding the double negative |
@@ -294,6 +294,7 @@ Rails.application.routes.draw do
get "feedback/load_ask_more_information" => "feedback#load_ask_more_information", as: :feedback_load_ask_more_information
get "recibo" => "receipts#show", as: :receipt
get "proveedores-facturas" => "providers#index", as: :providers
+ get "indicadores" => "indicators#index", as: :indicators
namespace :api do
get "/categories" => "categories#index"
| [draw,namespace,new,resources,collection,root,member,resource,get,constraints,post,production?,put,delete] | This is a list of all the budget lines that are part of the current year. A list of all budgets per inhabitant. | Prefer single-quoted strings when you don't need string interpolation or special symbols. |
@@ -241,6 +241,7 @@ if ($status == '50') { $sql.= " AND (a.percent > 0 AND a.percent < 100)"; } // R
if ($status == '100') { $sql.= " AND a.percent = 100"; }
if ($status == 'done' || $status == '100') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }
+if ($status == 'late') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100 AND a.datep < '".$db->idate($now)."'))"; }
if ($search_title) $sql.=natural_search("a.label", $search_title);
// We must filter on assignement table
if ($filtert > 0 || $usergroup > 0)
| [fetch,liste_array,fetch_object,jdate,order,select_date,getNomUrl,initHooks,form_select_status_action,idate,load,plimit,executeHooks,LibStatut,escape,close,free,query,trans,num_rows,showFilterButtons] | Returns the action - related records in the assignement table. The following functions are used to find all the conditions that can be performed on an event. | We can't share this into the status because this will break future change where we can choose several lines in combo on the filters (we should only have "exclusive status" in a status combo). I would prefer to get ability to search on the field dateend so we can achieve the goal with filter and date + filter on status. |
@@ -39,6 +39,8 @@ class WordpieceIndexer(TokenIndexer[int]):
maximum length for its input ids. Currently any inputs longer than this
will be truncated. If this behavior is undesirable to you, you should
consider filtering them out in your dataset reader.
+ do_lowercase : ``bool``, optional (default=``False``)
+ Should we lowercase the provided tokens before getting the indices?
start_tokens : ``List[str]``, optional (default=``None``)
These are prepended to the tokens provided to ``tokens_to_indices``.
end_tokens : ``List[str]``, optional (default=``None``)
| [WordpieceIndexer->[tokens_to_indices->[_add_encoding_to_vocabulary]]] | A base class that does the actual tokenization of the BERT code. This method handles the tokenization of the . | Might be good to give a better description of _when_ you might want to do this. |
@@ -1675,12 +1675,12 @@ namespace Pulumi.Automation.Tests
}
});
- var config = new Dictionary<string, ConfigValue>()
- {
- ["ShouldFail"] = new ConfigValue("false"),
- };
try
{
+ var config = new Dictionary<string, ConfigValue>
+ {
+ ["ShouldFail"] = new ConfigValue("false"),
+ };
await stack.SetAllConfigAsync(config);
// pulumi up
| [LocalWorkspaceTests->[Task->[NormalizeConfigKey,RandomStackName,FullyQualifiedStackName,GetTestSuffix]]] | In the future this method throws an exception during up should not delete resources. check if stack has a reserved stack configuration. | I'm curious why this is better |
@@ -40,6 +40,8 @@ const (
CommentTypeLabel
// Milestone changed
CommentTypeMilestone
+ // Assignees changed
+ CommentTypeAssignees
)
// CommentTag defines comment tag type
| [IssueURL->[HTMLURL],APIFormat->[IssueURL,HTMLURL,PRURL,APIFormat],PRURL->[HTMLURL],HTMLURL->[HTMLURL],MailParticipants] | FromObject - Returns a description of a single object that represents a single object in a commit and - - - - - - - - - - - - - - - - - -. | Why plural? I would prefer singular for consistency |
@@ -328,11 +328,6 @@ public class VersionAwareMarshallerTest extends AbstractInfinispanTest {
marshaller.objectFromByteBuffer(bytes);
}
- public void test000() throws ClassNotFoundException, IOException {
- byte[] bytes = {3, 1, -2, 3, 74, 0, 0, 17, 0, 0, 0, 4, 100, 105, 115, 116, -52, 2, 3, 1, -2, 6, 73, 0, 3, 39, 4, 10, 0, 0, 0, 21, 111, 114, 103, 46, 106, 103, 114, 111, 117, 112, 115, 46, 117, 116, 105, 108, 46, 85, 85, 73, 68, 55, 34, -52, 74, 28, -68, 13, 92, 50, 16, -56, -4, -32, 96, 91, -106, -114, -128, 26, 71, -50, 106, -52, -69, -36, -109, 53, 75, 0, 0, 0, 2, 3, 2, 0, 1, 4, 9, 0, 0, 0, 36, 111, 114, 103, 46, 105, 110, 102, 105, 110, 105, 115, 112, 97, 110, 46, 100, 105, 115, 116, 114, 105, 98, 117, 116, 105, 111, 110, 46, 77, 97, 103, 105, 99, 75, 101, 121, -12, 104, -127, 32, 29, 91, -126, -98, 0, 0, 0, 3, 0, 0, 0, 7, 97, 100, 100, 114, 101, 115, 115, 20, 0, 0, 0, 0, 8, 104, 97, 115, 104, 99, 111, 100, 101, 35, 0, 0, 0, 0, 4, 110, 97, 109, 101, 20, 0, 22, 62, 11, 78, 111, 100, 101, 65, 45, 51, 50, 54, 50, 56, 122, -66, -70, -47, 62, 2, 107, 50, 3, 14, 62, 2, 118, 50, 3, 51, 0, 0, 0, 1, 3, 73, 83, 2, 95, 3, 39, 4, 59, -2, 50, 16, -56, -4, -32, 96, 91, -106, -114, -128, 26, 71, -50, 106, -52, -69, -36, -109, 53, 3, 39, 4, 59, -2, 50, 16, 73, -73, 104, 36, -62, 59, 74, 125, 126, 57, -12, 55, 10, -121, -44, -82, 53, 3, 51, 0, 0, 0, 1, 3, 73, 83, 3, 95, 3, 39, 4, 59, -2, 50, 16, -56, -4, -32, 96, 91, -106, -114, -128, 26, 71, -50, 106, -52, -69, -36, -109, 53, 3, 39, 4, 59, -2, 50, 16, 73, -73, 104, 36, -62, 59, 74, 125, 126, 57, -12, 55, 10, -121, -44, -82, 53, 3, 39, 4, 59, -2, 50, 16, 19, 93, 117, 78, -28, -19, -41, 13, 38, 93, -96, -106, -106, -6, 0, 68, 53};
- marshaller.objectFromByteBuffer(bytes);
- }
-
public void testMultiRpcCommand() throws Exception {
String cacheName = EmbeddedCacheManager.DEFAULT_CACHE_NAME;
ClusteredGetCommand c2 = new ClusteredGetCommand("key", cacheName, Collections.<Flag>emptySet());
| [VersionAwareMarshallerTest->[testErrorUnmarshalling->[PojoWhichFailsOnUnmarshalling]]] | This command test is used to perform a rehash control command. The following functions are used to make the graphical graphical structure of the graphical structure This command is used to test the case of multiple commands. | Thanks! Forgot to remove this :) |
@@ -29,6 +29,12 @@ class FormResponse
Array(message_or_messages).first
end
+ def ==(other)
+ success? == other.success? &&
+ errors == other.errors &&
+ extra == other.extra
+ end
+
private
attr_reader :success
| [FormResponse->[first_error_message->[first,blank?],to_h->[merge!],initialize->[to_hash],merge->[new,merge,extra,success?,errors],attr_reader]] | Returns the first error message or key that is present in the errors hash. | this is for comparing values in specs |
@@ -10,6 +10,7 @@ import base64
import hmac
from azure.core.pipeline.policies import SansIOHTTPPolicy
from .utils import get_current_utc_time
+from urllib.parse import urlparse
class HMACCredentialsPolicy(SansIOHTTPPolicy):
"""Implementation of HMAC authentication policy.
| [HMACCredentialsPolicy->[on_request->[_sign_request],_sign_request->[_compute_hmac]]] | Implementation of HMAC authentication policy. Generate a signature for a given . | what's the changes here for? If there is a need, please let us know, |
@@ -55,7 +55,7 @@ namespace ProtoTestConsoleRunner
ProtoTest.LiveRunner.MicroFeatureTests test = new ProtoTest.LiveRunner.MicroFeatureTests();
test.Setup();
- test.RegressMAGN750();
+ test.TestDeleteNode01();
long ms = sw.ElapsedMilliseconds;
| [Program->[Main->[DevRun,Run,Length],DevRun->[Serial,RegressMAGN750,Stop,kImperative,ExecutionMode,DumpByteCode,kAssociative,WriteLine,ElapsedMilliseconds,Start,ReadLine,Verbose,Add,Setup],Run->[Serial,Exists,kImperative,ExecutionMode,LoadAndExecute,DumpByteCode,kAssociative,WriteLine,Verbose,CSharp,Register,Add]]] | DevRun method for dev run. | In general, please don't check changes to the exec target of ProtoTestConsoleRunner in. You may want to mark it for local ignore. |
@@ -353,7 +353,7 @@ func getUpgradeCommand() string {
return "$ brew upgrade pulumi"
}
- if filepath.Dir(exe) != filepath.Join(curUser.HomeDir, ".pulumi", "bin") {
+ if filepath.Dir(exe) != filepath.Join(curUser.HomeDir, workspace.BookkeepingDir, "bin") {
return ""
}
| [StringVar,RawMessage,Dir,Colorize,Executable,Warningf,Now,Encode,HasPrefix,Add,IsTruthy,IgnoreClose,Flush,Stat,ParseTolerant,NewEncoder,New,RunFunc,Diag,StringVarP,NewClient,InitLogging,Run,After,Chdir,AddCommand,LookPath,GetCachedVersionFilePath,Bytes,TrimSpace,AssertNoError,InitProfiling,Join,Wrapf,Infof,Current,EvalSymlinks,ReadString,CloseTracing,V,GetCLIVersionInfo,NewDecoder,StdStreams,CloseProfiling,SetGlobalColorization,GT,ModTime,Flag,Command,NewReader,Sprintf,Decode,IntVarP,DefaultURL,Print,InitTracing,String,Parse,DoWithRetry,OpenFile,Getenv,BoolVarP,PersistentFlags,BoolVar] | getUpgradeMessage returns a message that will be used to upgrade from the current version to the isBrewInstall returns true if the current running executable is on macOS and has a. | Why bookkeepingdir here but homedir elsewhere? |
@@ -374,7 +374,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
close();
return runner;
} else {
- mergeAnimationOptions(element, existingAnimation.options, options);
+ mergeAnimationDetails(element, existingAnimation.options, options);
return existingAnimation.runner;
}
}
| [No CFG could be retrieved] | Creates a new child animation. Missing flags. | How come we don't need to pass the animation object, but the options (considering all other invocation changed) ? |
@@ -25,6 +25,7 @@ TODO:
*******************************************************************************/
#include "emu.h"
+#include "screen.h"
#include "includes/n64.h"
#include "video/rdpblend.h"
#include "video/rdptpipe.h"
| [No CFG could be retrieved] | Checks if a given variable of type n_nhs has a valid number of non - Function to get the alpha - CVG of a given n64 - rdp object. | Headers from libemu should come after project headers to avoid weird header dependency issues. |
@@ -282,11 +282,12 @@ func CreateLoginSource(source *LoginSource) error {
oAuth2Config := source.OAuth2()
err = oauth2.RegisterProvider(source.Name, oAuth2Config.Provider, oAuth2Config.ClientID, oAuth2Config.ClientSecret, oAuth2Config.OpenIDConnectAutoDiscoveryURL, oAuth2Config.CustomURLMapping)
err = wrapOpenIDConnectInitializeError(err, source.Name, oAuth2Config)
-
if err != nil {
- // remove the LoginSource in case of errors while registering OAuth2 providers
- x.Delete(source)
+ return err
}
+
+ // remove the LoginSource in case of errors while registering OAuth2 providers
+ _, err = x.Delete(source)
}
return err
}
| [HasTLS->[IsSMTP,IsLDAP,IsDLDAP],OAuth2,IsLDAP,IsOAuth2,LDAP] | PAM returns a pointer to the PAMConfig for this login source. UpdateSource updates a login source in DB. | The logic seems not the same as before. |
@@ -99,7 +99,7 @@ class OddsCalculatorPanel extends JPanel {
private final IntTextField retreatAfterXRounds = new IntTextField();
private final IntTextField retreatAfterXUnitsLeft = new IntTextField();
private final JPanel resultsPanel = new JPanel();
- private final JButton calculateButton = new JButton("Pls Wait, Copying Data...");
+ private final JButton calculateButton = new JButton("Calculate Odds");
private final JButton clearButton = new JButton("Clear");
private final JButton closeButton = new JButton("Close");
private final JButton swapSidesButton = new JButton("Swap Sides");
| [OddsCalculatorPanel->[PlayerRenderer->[getListCellRendererComponent->[getListCellRendererComponent]],updateAttacker->[getAttacker],shutdown->[shutdown],UnitPanel->[addChangeListener,notifyListeners],setupListeners->[mouseMoved->[freeMemoryAvailable,percentageOfFreeMemoryAvailable],getDefender,shutdown,getSwapSides,getAttacker],updateStats->[getDefender,getAttacker],setWidgetActivation->[getTerritoryEffects,isAmphibiousBattle,isLand,getDefender,getAttacker],OrderOfLossesInputPanel->[layoutComponents],PlayerUnitsPanel->[getUnitTypes->[getUnits],categorize->[getUnits,categorize],getUnits->[getUnits]],updateDefender->[getDefender]]] | Creates the UI for the user. | We may want to keep the old text. The button is disabled until the gameData is cloned. When gameData size gets very large (WorldAtWar rounds 15+), the gameData clone can take upwards of 3~8s. This is really noticeable delay, so some indicator that the window is not active is nice |
@@ -1169,10 +1169,15 @@ func (b TLFIdentifyBehavior) CanUseUntrackedFastPath() bool {
func (b TLFIdentifyBehavior) WarningInsteadOfErrorOnBrokenTracks() bool {
switch b {
- case TLFIdentifyBehavior_CHAT_GUI:
+ case TLFIdentifyBehavior_CHAT_GUI,
+ TLFIdentifyBehavior_PAGES:
// The chat GUI (in non-strict mode) is specifically exempted from broken
// track errors, because people need to be able to use it to ask each other
// about the fact that proofs are broken.
+ //
+ // Pages is exempted from broken track errors too since 1) it doesn't
+ // buy user anything, and 2) if user's proof is hosted with Pages,
+ // error here could prevent them from fixing the proof.
return true
default:
return false
| [FindDeviceKey->[Equal],IsPublic->[IsPublic],ToTeamID->[String],Compare->[Compare],Match->[IsNil,String],AsUserOrBust->[AsUser],Exists->[IsNil],TeamInviteName->[PercentForm],SecureEqual->[Equal,Bytes],GetStatus->[GetStatus],Eq->[Eq,Equal,String],ToShortIDString->[ToBytes],ToMediumID->[toBytes],UnixMicroseconds->[Time],GetUID->[GetUID],HasKID->[FindKID],UnixMilliseconds->[Time],SwapLastPart->[Parent,Append],FindKID->[Equal],Append->[String],GetKeyType->[ToBytes],AsTeamOrBust->[AsTeam],GetShard->[IsValidID],GetName->[GetName],IsValidID->[IsUser,IsTeamOrSubteam],FindDevice->[Eq],GoError->[Error],IsRootTeam->[IsSubTeam],Duration->[Duration],IsNil->[IsNil],String->[List,ToString,String,NumTotalUsers],Less->[String],IsTeamOrSubteam->[IsTeam,IsSubteam],Export->[GetUID,GetName],PercentForm->[String],IsAncestorOf->[Eq,Depth],NotEqual->[Equal],ToShortID->[toBytes],UnixSeconds->[Time],IsImplicit->[String],IsZero->[Equal],List->[String],Bytes->[String],MarshalJSON->[ToString,String],Parent->[IsRootTeam],IsIn->[Equal],ToJsonw->[IsNil],GetDeviceID->[Equal],check,IsZero,Error] | WarningInsteadOfErrorOnBrokenTracks returns true if the user is able to ask each. | "buy the user anything" "if the user's proof" |
@@ -36,6 +36,9 @@ func TestLogsPathMatcher_InvalidSource3(t *testing.T) {
func TestLogsPathMatcher_VarLibDockerContainers(t *testing.T) {
cfgLogsPath := "" // use the default matcher configuration
source := fmt.Sprintf("/var/lib/docker/containers/%s/%s-json.log", cid, cid)
+ if runtime.GOOS == "windows" {
+ source = fmt.Sprintf("/var/lib/docker/containers/\\%s/%s-json.log", cid, cid)
+ }
expectedResult := cid
executeTest(t, cfgLogsPath, source, expectedResult)
}
| [Equal,Sprintf,MetadataIndex,NewConfig,Nil,SetString] | TestLogsPathMatcher_InvalidSource1 tests if a given container ID is valid. LogDir tests if the log directory exists in the other log directory. | Are these the proper log paths for Windows? |
@@ -473,7 +473,7 @@ class Asset < ApplicationRecord
def unlock_expired
with_lock do
- if !lock_ttl.nil? && lock_ttl >= Time.now.to_i
+ if !lock_ttl.nil? && lock_ttl <= Time.now.to_i
self.lock = nil
self.lock_ttl = nil
save!
| [Asset->[extract_asset_text->[is_stored_on_s3?],url->[is_stored_on_s3?,url],editable_image?->[locked?],post_process_file->[text?],new_empty->[file_empty],presigned_url->[is_stored_on_s3?,presigned_url],open->[is_stored_on_s3?,open]]] | Unlocks a node with an expired lock. | Probably only '<' is needed here |
@@ -108,10 +108,14 @@ namespace DynamoWebServer.Messages
{
manager.RenderComplete += ModifiedNodesData;
}
- dynamoViewModel.ExecuteCommand(command);
+ command.Execute(dynamoViewModel);
}
}
+ #endregion
+
+ #region Private Methods
+
private void SelectTabByGuid(DynamoViewModel dynamoViewModel, Guid guid)
{
// If guid is Empty - switch to HomeWorkspace
| [MessageHandler->[ModifiedNodesData->[OnResultReady]]] | Execute commands. | The following has been changed (in fact, quite a bit of things have been changed in another PR), just to let you know there are big changes coming from Pavel :) |
@@ -103,11 +103,13 @@ def get_agent(**kwargs):
class TestTorchAgent(unittest.TestCase):
"""Basic tests on the util functions in TorchAgent."""
+ @unittest.skipIf(SKIP_TESTS, "Torch not installed.")
def test_mock(self):
"""Just make sure we can instantiate a mock agent."""
agent = get_agent()
self.assertTrue(isinstance(agent.dict, MockDict))
+ @unittest.skipIf(SKIP_TESTS, "Torch not installed.")
def test_share(self):
"""Make sure share works and shares dictionary."""
agent = get_agent()
| [TestTorchAgent->[test_vectorize->[get_agent],test_mock->[get_agent],test_batchify->[get_agent],test_share->[get_agent],test__check_truncate->[get_agent],test__vectorize_text->[get_agent],test_batch_act->[get_agent],test__add_person_tokens->[get_agent],test_history->[get_agent],test_observe->[get_agent],test_match_batch->[get_agent],test_last_reply->[get_agent]],get_agent->[add_cmdline_args,TorchAgent]] | Test that mock dict is a mock dictionary. | you could do a the `@unittest.skipIf` around the class instead of doing it on every `def`, and it will skip all of them. |
@@ -62,6 +62,12 @@ export class AmpState extends AMP.BaseElement {
/** @override */
mutatedAttributesCallback(mutations) {
+ const viewer = viewerForDoc(this.getAmpDoc());
+ if (!viewer.isVisible()) {
+ const TAG = this.getName_();
+ dev().error(TAG, 'Viewer must be visible before mutation.');
+ return;
+ }
const src = mutations['src'];
if (src !== undefined) {
this.fetchSrcAndUpdateState_(/* isInit */ false);
| [No CFG could be retrieved] | A state class that implements the AMP functionality. Get script tag s state. | Instead of this, can we just add a `whenVisible` promise before the fetch? |
@@ -1,13 +1,13 @@
module SessionTimeoutWarningHelper
- def frequency
+ def session_timeout_frequency
(AppConfig.env.session_check_frequency || 150).to_i
end
- def start
+ def session_timeout_start
(AppConfig.env.session_check_delay || 30).to_i
end
- def warning
+ def session_timeout_warning
(AppConfig.env.session_timeout_warning_seconds || 30).to_i
end
| [time_left_in_session->[t,distance_of_time_in_words],auto_session_expired_js->[nonced_javascript_tag,timeout_in,render],auto_session_timeout_js->[nonced_javascript_tag,render],start->[to_i],frequency->[to_i],timeout_refresh_path->[html_safe],modal->[new,user_fully_authenticated?],warning->[to_i],send] | endregion region SessionCheck. | I rename these method because they're injected into *all* our views, and `start` and `warning` are common names, so I wanted to minimize the chances they'd be shadowed or collide |
@@ -0,0 +1,15 @@
+from django.conf import settings
+
+from jingo import register
+
+
+@register.function
+def fxa_config():
+ return {camel_case(key): value
+ for key, value in settings.FXA_CONFIG.iteritems()
+ if key != 'client_secret'}
+
+
+def camel_case(snake):
+ parts = snake.split('_')
+ return parts[0] + ''.join(part.capitalize() for part in parts[1:])
| [No CFG could be retrieved] | No Summary Found. | I becoming a fan of the second line of indents being 4 spaces over rather than where the `{` starts. |
@@ -2,7 +2,6 @@
// The .NET Foundation licenses this file to you under the MIT license.
using System.Diagnostics;
-using System.Runtime.Versioning;
namespace System.Net
{
| [HttpListenerTimeoutManager->[SetTimespanTimeout]] | Creates a timeout manager which can be used to set timeouts on a HTTP listener. This method is called from the native layer to update the local state of the timeout object. | This needs to be kept since we have windows-specific annotations in this file. |
@@ -2199,7 +2199,12 @@ public final class FilePath implements Serializable {
future.get();
return future2.get();
} catch (ExecutionException e) {
- throw new IOException(e);
+ Throwable cause = e.getCause();
+ if (cause == null) cause = e;
+ throw cause instanceof IOException
+ ? (IOException) cause
+ : new IOException(cause)
+ ;
}
} else {
// remote -> local copy
| [FilePath->[getTotalDiskSpace->[act],unzipFrom->[invoke->[unzip]],unzip->[invoke->[getRemote,unzip],FilePath,unzip],equals->[equals],mkdirs->[invoke->[mkdirs],exists,act,mkdirs],AbstractInterceptorCallableWrapper->[call->[call],getClassLoader->[getClassLoader]],untarFrom->[invoke->[extract]],write->[invoke->[write,mkdirs],mkdirs,act],readFromTar->[symlinkTo,mkdirs,getName,isDirectory,_chmod],hashCode->[hashCode],getHomeDirectory->[call->[FilePath],call],deleting->[delete],child->[FilePath],zip->[zip],copyTo->[invoke->[close],copyTo,write,act],digest->[act],validateFileMask->[exists,validateAntFileMask,validateFileMask],mode->[invoke->[mode],act,isUnix],writeToTar->[close],compare->[length],reading->[understandsSymlink->[understandsSymlink],visit->[visit,read],visitSymlink->[read,visitSymlink],read],actAsync->[wrap],absolutize->[FilePath],exists->[invoke->[exists],act],renameTo->[invoke->[renameTo],act],validateAntFileMask->[invoke->[equals],hasMatch->[isCaseSensitive->[isCaseSensitive,Cancel]],validateAntFileMask,act],act->[call,invoke,act],createTempDir->[invoke->[getName,createTempFile],FilePath,act],copyToWithPermission->[chmod,setLastModifiedIfPossible,mode,copyTo,lastModified],createLauncher->[call],_chmod->[chmod],getFreeDiskSpace->[act],chmod->[act,isUnix],writing->[exists,filterNonNull,write],tar->[archive],deleteContents->[act],createTempFile->[invoke->[getName,createTempFile],FilePath,act],symlinking->[exists,filterNonNull],DirectoryFilter->[accept->[isDirectory]],length->[invoke->[length],act],isDirectory->[invoke->[isDirectory],act],mkdirsE->[exists,mkdirs],installIfNecessaryFrom->[installIfNecessaryFrom,untarFrom,unzipFrom],createTextTempFile->[invoke->[mkdirs,createTempFile],createTextTempFile,FilePath,act],delete->[act],list->[invoke->[FilePath],list,act,getClassLoader],readObject->[wrap],validateRelativeDirectory->[validateRelativeDirectory,validateRelativePath],validateRelativePath->[exists,isDirectory,child],setLastModifiedIfPossible->[act],getUsableDiskSpace->[act],glob->[isAbsolute],toURI->[invoke->[toURI],act],deleteRecursive->[invoke->[deleteRecursive],act],readFromOffset->[close->[close],invoke->[read],read->[read],actAsync],readToString->[read],listDirectories->[list],copyRecursiveTo->[invoke->[exists,extract,compress],actAsync,copyRecursiveTo,act,extract],FileCallableWrapper->[call->[invoke],checkRoles->[checkRoles],getClassLoader],moveAllChildrenTo->[invoke->[renameTo,getName,getRemote,delete],act],archive->[archive],copyFrom->[copyFrom],deleteContentsRecursive->[deleteRecursive],touch->[invoke->[exists],act],getParent->[FilePath],asCallableWith->[call->[act],checkRoles->[checkRoles]],Unpack->[invoke->[extract,unzip]],read->[actAsync],withSuffix->[FilePath],lastModified->[invoke->[lastModified],act],getName,wrap]] | Copy files recursively to target. This method is called when the remote side completes. | It loses the track of `ExecutionException`. I would add it to suppressed at least |
@@ -163,6 +163,10 @@ MiddlewareRegistry.register(store => next => action => {
case SUBMIT_FEEDBACK_SUCCESS:
APP.API.notifyFeedbackSubmitted();
break;
+
+ case DOMINANT_SPEAKER_CHANGED:
+ APP.API.notifyDominantSpeakerChanged(action.participant.id);
+ break;
}
return result;
| [No CFG could be retrieved] | Returns the absolute URL of the default avatar of a given node. | can you please sort the `case` statement alphabetically? |
@@ -1140,7 +1140,9 @@ func (d *driver) makeCommit(
if parent == nil {
return nil, errors.Errorf("parent cannot be nil")
}
-
+ if err := d.validateRepo(txnCtx.Stm, parent.Repo); err != nil {
+ return nil, err
+ }
// Check that caller is authorized
if err := d.checkIsAuthorizedInTransaction(txnCtx, parent.Repo, auth.Scope_WRITER); err != nil {
return nil, err
| [getTreeForOpenCommit->[scratchFilePrefix],finishOutputCommit->[checkIsAuthorizedInTransaction],upsertPutFileRecords->[scratchFilePrefix],deleteFile->[makeCommit,inspectCommit,checkIsAuthorized],listRepo->[getAccessLevel],scratchFilePrefix->[scratchCommitPrefix],resolveCommitProvenance->[resolveCommit],getTreeForFile->[resolveCommit,getTreeForCommit],listBranch->[inspectRepo,checkIsAuthorized],createRepo->[checkIsAuthorizedInTransaction],putFile->[Error,checkIsAuthorized],Peek->[Recv],putFiles->[makeCommit],createBranch->[resolveCommit,checkIsAuthorizedInTransaction],deleteBranch->[checkIsAuthorizedInTransaction],deleteAll->[listRepo,deleteRepo],fsck->[Error],listCommitF->[inspectCommit,inspectRepo,checkIsAuthorized],getTreeForCommit->[resolveCommit],copyFile->[makeCommit,inspectCommit,checkIsAuthorized],subscribeCommit->[inspectCommit],deleteRepo->[checkIsAuthorizedInTransaction],inspectCommit->[inspectCommit,checkIsAuthorized],del->[search],inspectFile->[getTreeForFile,inspectCommit,getTree,checkIsAuthorized],walkFile->[getTrees,getTreeForFile,inspectCommit,checkIsAuthorized],makeCommit->[checkIsAuthorizedInTransaction],flushCommit->[inspectCommit],globFile->[getTrees,inspectCommit,checkIsAuthorized,getTreeForFile,getTree],forEachPutFile->[Recv,inspectCommit],fileHistory->[inspectCommit,inspectFile],Recv->[Recv],getFile->[getTrees,inspectCommit,checkIsAuthorized,getTreeForFile,getTree],add->[search],diffFile->[getTreeForFile,inspectCommit,checkIsAuthorized],listFile->[getTrees,getTreeForFile,inspectCommit,checkIsAuthorized],has->[search],finishCommit->[checkIsAuthorizedInTransaction],deleteCommit->[resolveCommit,checkIsAuthorizedInTransaction],has,add,del,Error] | makeCommit creates a new commit object from the given parameters. create a commit in etcd and update it with the parent commit create or update branch and parent. ID This function is used to start a new commit on a branch. | Do we need handling for the `tombstone` case in some of the other PFS methods too? (E.g. `InspectRepo`-return an error, `ListRepo`-strip tombstoned repos from the output, or maybe return them in the response stream but forward the tombstone. Technically `CreateRepoRequest` has an `Update` param, which makes `CreateRepo` into an upsert, which I think we use in some cases, so I think `CreateRepo` needs to return an error too, etc). I think `(Start|Finish|Inspect|...)Commit`, `(Inspect|List|Delete)Branch` (`CreateBranch` looks handled) and `(Put|Copy|Get|...)File` might all need to return an error if called on a tombstoned repo too. Maybe we just need a helper function for all of those that fetches the RepoInfo & checks for a tombstone? I dont think there's any way to make `Fsck` happy, but I *think* it's a read-only method, so maybe it can just return whatever errors it organically hits if it overlaps with a DeleteRepo :shrug: |
@@ -30,12 +30,11 @@ module SamlAuthHelper
settings
end
- def request_authn_context
- if IdentityConfig.store.aal_authn_context_enabled
- Saml::Idp::Constants::AAL2_AUTHN_CONTEXT_CLASSREF
- else
- Saml::Idp::Constants::IAL1_AUTHN_CONTEXT_CLASSREF
- end
+ def request_authn_contexts
+ [
+ Saml::Idp::Constants::AAL2_AUTHN_CONTEXT_CLASSREF,
+ Saml::Idp::Constants::IAL1_AUTHN_CONTEXT_CLASSREF,
+ ]
end
def sp_fingerprint
| [post_saml_authn_request->[authn_request_post_params],generate_decoded_saml_response->[generate_saml_response]] | This method returns the settings for a missing missing node in the SAML 1. 0. 0 if there is no node in the chain return false. | Can you clarify: Is there expected to be a behavior change with this? If the goal is to simply remove all code paths where `aal_authn_context_enabled` could assume to ever be `false`, wouldn't this still return just the singular `Saml::Idp::Constants::AAL2_AUTHN_CONTEXT_CLASSREF`? |
@@ -76,7 +76,8 @@ namespace Dynamo.LibraryUI.Handlers
var data = new LoadedTypeData<LoadedTypeItem>();
data.loadedTypes = searchEntries
//.Where(e => !e.ElementType.HasFlag(ElementTypes.Packaged))
- .Select(e => CreateLoadedTypeItem<LoadedTypeItem>(e)).ToList();
+ //.Select(e => CreateLoadedTypeItem<LoadedTypeItem>(e)).ToList(); // Excpetion: Collection was modified; enumeration operation may not execute.
+ .ToList().Select(e => CreateLoadedTypeItem<LoadedTypeItem>(e)).ToList();
return data;
}
| [NodeItemDataProvider->[T->[GetFullyQualifiedName]]] | Create object for serialization. | @mjkkirschner When I open big files I receive this exception: "Collection was modified; enumeration operation may not execute", so I fixed it by convert that enumeration to list before calling LINQ Select function. |
@@ -105,4 +105,16 @@ public interface SpecStore {
* @throws IOException Exception in retrieving {@link Spec}s.
*/
Collection<Spec> getSpecs() throws IOException;
+
+ /**
+ * Return an iterator of Spec's URI(Spec's identifier)
+ */
+ Iterator<URI> getSpecURIs() throws IOException;
+
+ /**
+ * @return A URI to identify the SpecStore itself.
+ * e.g. For File-System based implementation of {@link SpecStore}, the URI will be associated
+ * with root-level FileSystem directory.
+ */
+ Optional<URI> getSpecStoreURI();
}
| [No CFG could be retrieved] | Get the list of all specs. | Modify Spec's URI to Spec URIs (Spec identifiers)? |
@@ -73,6 +73,12 @@ export class SubscriptionPlatform {
* @returns {number}
*/
getBaseScore() {}
+
+ /**
+ * Decorate the DomNode according to your platform
+ * @param {Element} unusedElement
+ */
+ decorateUI(unusedElement) {}
}
/**
| [No CFG could be retrieved] | Returns the base score of the score of the score score of the score score of the score. | Same here: let's call it `attachAction(element, action, opt_decorate)` or similar. Basically, it needs to mimic whatever subscriptions service calls it. |
@@ -148,9 +148,7 @@ class SimpleSeq2Seq(Model):
if timestep == 0:
# For the first timestep, when we do not have targets, we input start symbols.
# (batch_size,)
- with torch.cuda.device_of(final_encoder_output):
- input_choices = Variable(torch.LongTensor([self._start_index]).expand_as(
- final_encoder_output[:, 0]))
+ input_choices = Variable(source_mask.data.new().resize_(batch_size).fill_(self._start_index))
else:
input_choices = last_predictions
decoder_input = self._prepare_decode_step_input(input_choices, decoder_hidden,
| [SimpleSeq2Seq->[from_params->[from_params,cls,pop],forward->[all,size,max,_source_embedder,_encoder,rand,_get_loss,cat,get_text_field_mask,zeros,range,_decoder_cell,append,Variable,_output_projection_layer,softmax,device_of,LongTensor,_prepare_decode_step_input,unsqueeze],_get_loss->[sequence_cross_entropy_with_logits,contiguous],decode->[list,append,cpu,get_token_from_index,len,isinstance,index],_prepare_decode_step_input->[type,cat,_target_embedder,_decoder_attention,weighted_sum],__init__->[LSTMCell,get_token_index,get_vocab_size,get_output_dim,Linear,super,Attention,Embedding]],register] | Forward computation of the entire target sequence. This method is called when we have no targets. | Is there a way to write a test to see if this creates tensors on the same device? |
@@ -422,12 +422,15 @@ public class ECBlockReconstructedStripeInputStream extends ECBlockInputStream {
int availableLocations =
availableDataLocations() + availableParityLocations();
int paddedLocations = repConfig.getData() - expectedDataBlocks;
+ int failedLocations = failedDataIndexes.size();
- if (availableLocations + paddedLocations >= repConfig.getData()) {
+ if (availableLocations + paddedLocations - failedLocations
+ >= repConfig.getData()) {
return true;
} else {
- LOG.warn("There are insufficient locations. {} available {} padded {} " +
- "expected", availableLocations, paddedLocations, expectedDataBlocks);
+ LOG.warn("There are insufficient locations. {} available; {} padded; {}" +
+ " failed; {} expected;", availableLocations, paddedLocations,
+ failedLocations, expectedDataBlocks);
return false;
}
}
| [ECBlockReconstructedStripeInputStream->[seek->[seek],readStripe->[init,assignBuffers],decodeStripe->[flipInputs]]] | Checks if there are sufficient locations in the data. | Should this be an error instead of warn? We can't proceed right |
@@ -40,13 +40,15 @@ class NativeDemo:
def fixed_args(self, source_dir, build_dir):
return [str(build_dir / self._name)]
-class PythonDemo:
- def __init__(self, subdirectory, test_cases):
+class PythonDemo(Demo):
+ def __init__(self, subdirectory, device_keys, test_cases):
self.subdirectory = 'python_demos/' + subdirectory
self._name = subdirectory.replace('/', '_')
self.test_cases = test_cases
+
+ self.device_keys = device_keys
@property
def full_name(self):
| [combine_cases->[join_cases],NativeDemo,device_cases,single_option_cases,combine_cases,PythonDemo] | Returns a list of arguments for the class. | These assignments should probably happen in the same order that the parameters are listed. |
@@ -705,6 +705,9 @@ def display_messages(msgs, prettify=False, ignore_fields='', max_len=1000):
for field in {'labels', 'eval_labels', 'label_candidates', 'text_candidates'}:
if msg.get(field) and field not in ignore_fields:
lines.append('{}[{}: {}]'.format(space, field, _ellipse(msg[field])))
+ token_loss_line = _token_losses_line(msg, ignore_fields, space)
+ if token_loss_line:
+ lines.append(token_loss_line)
if episode_done:
lines.append('- - - - - - - - - - - - - - - - - - - - -')
| [Opt->[__reduce__->[__getstate__],__deepcopy__->[Opt]],display_messages->[_ellipse,clip_text],TimeLogger->[time->[time],log->[reset,time],__init__->[Timer]],PaddingUtils->[pad_text->[valid]],str_to_msg->[tolist->[tostr],convert->[tolist,tostr],convert],round_sigfigs->[round_sigfigs],maintain_dialog_history->[parse],Timer->[time->[time]],msg_to_str->[add_field->[filter],add_field],NoLock] | Display a set of messages. appends - - - - - - - - - - - - - - - -. | add a docstring explanation of why this exists |
@@ -1204,6 +1204,8 @@ const adConfig = jsonConfiguration({
'triplelift': {},
+ 'digiteka': {},
+
'trugaze': {
clientIdScope: '__tg_amp',
renderStartImplemented: true,
| [No CFG could be retrieved] | Provides a list of all possible urls for a single object. Provides a list of all possible dependencies for a given sequence number. | I see you have not implemented renderStart, it is up to you but should give you some performance gains. |
@@ -394,13 +394,13 @@ namespace Content.Server.Interaction
// all interactions should only happen when in range / unobstructed, so no range check is needed
var message = new InteractHandEvent(user, target);
RaiseLocalEvent(target, message);
- _adminLogSystem.Add(LogType.InteractHand, LogImpact.Low, $"{ToPrettyString(user)} interacted with {ToPrettyString(target)}");
+ _adminLogSystem.Add(LogType.InteractHand, LogImpact.Low, $"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target}");
if (message.Handled)
return;
var interactHandEventArgs = new InteractHandEventArgs(user, target);
- var interactHandComps = EntityManager.GetComponents<IInteractHand>(target).ToList();
+ var interactHandComps = AllComps<IInteractHand>(target).ToList();
foreach (var interactHandComp in interactHandComps)
{
// If an InteractHand returns a status completion we finish our interaction
| [InteractionSystem->[HandleTryPullObject->[ValidateClientInput],InteractHand->[InteractHand],DoAttack->[ValidateInteractAndFace,CanAccessViaStorage,InteractHand],Shutdown->[Shutdown],HandleActivateItemInWorld->[ValidateClientInput],UserInteraction->[CanAccessViaStorage],HandleDragDropRequestEvent->[ValidateClientInput],HandleInteractInventorySlotEvent->[ValidateClientInput],HandleWideAttack->[ValidateClientInput],HandleUseInteraction->[ValidateClientInput],HandleAltUseInteraction->[ValidateClientInput]]] | Interacts with the target entity. | Either this or #5768 might have to deal with some conflicts cause they both add format strings |
@@ -76,7 +76,12 @@ export default class AutosizeInput extends React.Component<
<React.Fragment>
<Input {...componentInputProps} ref={inputRef} {...inputProps} />
{/* a hidden helper element to calculate the size of the input */}
- <StyledInputSizer $size={this.props.$size} ref={this.sizerRef}>
+ <StyledInputSizer
+ $size={this.props.$size}
+ ref={this.sizerRef}
+ // $FlowFixMe checking for $style before use
+ $style={inputProps.$style ? inputProps.$style : null}
+ >
{sizerValue}
</StyledInputSizer>
</React.Fragment>
| [No CFG could be retrieved] | A hidden input which is a hidden input that is hidden and has a size of one. | does undefined rather than null pass flow check? |
@@ -82,7 +82,8 @@ def main():
# Test base model accuracy
print('=' * 10 + 'Test on the original model' + '=' * 10)
- model.load_state_dict(torch.load('vgg16_cifar10.pth'))
+ if os.path.isfile('vgg16_cifar10.pth'):
+ model.load_state_dict(torch.load('vgg16_cifar10.pth'))
test(model, device, test_loader)
# top1 = 93.51%
| [train->[train,step,to,cross_entropy,print,backward,len,format,item,enumerate,model,zero_grad],main->[step,Compose,parameters,test,Pad,CIFAR10,DataLoader,compress,to,DataParallel,RandomHorizontalFlip,ToTensor,state_dict,range,device_count,load,train,add_argument,print,ArgumentParser,parse_args,save,update_epoch,format,ActivationMeanRankFilterPruner,manual_seed,Normalize,export_model,device,load_state_dict,VGG,RandomCrop,SGD,CosineAnnealingLR],test->[to,nll_loss,print,len,eval,argmax,no_grad,eq,format,model],main] | Main function of VGG16. Test on the original model and test accuracy without fine tuning. Top - 1 test for the VGG model. | It seems the `load_state_dict` and the retrain part should swap order, current logic is strange. |
@@ -76,8 +76,12 @@ class Fleet(object):
self._util = None
def init(self, role_maker):
+ #if paddle.fluid.framework.in_dygraph_mode():
+ # self.dy_strategy = paddle.fluid.dygraph.parallel.prepare_context()
+ # return
self._role_maker = role_maker
self.strategy_compiler = StrategyCompiler()
+ self.dy_strategy = paddle.fluid.dygraph.parallel.prepare_context()
def is_first_worker(self):
"""
| [Fleet->[barrier_worker->[barrier_worker],worker_num->[worker_num],is_worker->[is_worker],server_index->[server_index],is_server->[is_server],minimize->[minimize],worker_index->[worker_index],is_first_worker->[is_first_worker]]] | Initialize the node. | remove this to init rolemaker in dygraph. |
@@ -26,6 +26,10 @@ func (l *GroupBasedDetector) Exists(ldapGroupUID string) (bool, error) {
return false, err
}
+ if group == nil {
+ return false, nil
+ }
+
return true, nil
}
| [Exists->[Exists,IsNoSuchObjectError,ExtractMembers,GroupEntryFor,IsEntryNotFoundError,IsQueryOutOfBoundsError]] | Exists checks if a group exists in the LdapStore. | @liggitt amazingly it is possible that when doing a specific search for a specific DN in LDAP we can get nothing back and _not_ `NoSuchObject` |
@@ -196,8 +196,8 @@ export function getBootstrapBaseUrl(parentWindow, opt_strictForUnitTest) {
* @return {string}
*/
function getDefaultBootstrapBaseUrl(parentWindow) {
- if (getMode().localDev || parentWindow.AMP_TEST) {
- const prefix = parentWindow.AMP_TEST ? '/base' : '';
+ if (getMode().localDev || getMode().test) {
+ const prefix = getMode().test ? '/base' : '';
return 'http://ads.localhost:' +
(parentWindow.location.port || parentWindow.parent.location.port) +
prefix + '/dist.3p/current' +
| [No CFG could be retrieved] | Returns the base URL for a specific bootstrap iframes. Generates a random non - negative integer. | @erwinmombay This should still be DCEable with our custom pass, right? |
@@ -41,4 +41,15 @@ function createRC(frameWindow, origin, serviceHandlersMap) {
return respondingChannel;
}
+function createPO() {
+ return new goog.messaging.PortOperator("RuntimeService");
+}
+
+function addPortConnection(portOperator, portName, portChannel) {
+ portOperator.addPort(portName, portChannel);
+}
+
+goog.exportSymbol('__AMP_createPC', createPC);
goog.exportSymbol('__AMP_createRC', createRC);
+goog.exportSymbol('__AMP_createPO', createPO);
+goog.exportSymbol('__AMP_addPortConnection', addPortConnection);
| [No CFG could be retrieved] | The AMP_createRC symbol. | nit: can you give it the full name? `createPortOperator` |
@@ -103,6 +103,9 @@ end_time = ProjectParameters["problem_data"]["end_time"].GetDouble()
time = start_time
main_model_part.ProcessInfo[STEP] = 0
+if (parallel_type == "OpenMP") or (mpi.rank == 0):
+ Logger.PrintInfo("::[KSM Simulation]:: ", "Analysis -START- ")
+
# Solving the problem (time integration)
while(time <= end_time):
| [PrintOutput,SetValue,AddDofs,ExecuteAfterOutputStep,ExecuteFinalize,PrettyPrintJsonString,CreateSolver,ExecuteBeforeSolutionLoop,Has,GiDOutputProcessMPI,ProjectParameters,GetComputingModelPart,ImportModelPart,Parameters,AddModelPart,ExecuteBeforeOutputStep,KratosProcessFactory,ModelPart,print,AddVariables,Solve,read,close,CloneTimeStep,open,ExecuteInitialize,write,ExecuteFinalizeSolutionStep,GiDOutputProcess,Initialize,IsOutputStep,ExecuteInitializeSolutionStep,SetEchoLevel,Model] | Construct a list of processes and solve them. Execute the finalization of the processes. | Just to say that, I plan to add a source to the logger so you can send the KSM Simulation by it. |
@@ -397,6 +397,10 @@ return [
// If enabled, it prints out the jobs per minute.
'worker_jpm' => false,
+ // worker_jpm_limit (String)
+ // List of minutes for the JPM calculation
+ 'worker_jpm_limit' => '1, 10, 60',
+
// worker_load_exponent (Integer)
// Default 3, which allows only 25% of the maximum worker queues when server load reaches around 37% of maximum load.
// For a linear response where 25% of worker queues are allowed at 75% of maximum load, set this to 1.
| [No CFG could be retrieved] | Configuration values for a specific configuration. Missing lock - path for jabber account synchronisation. | Please expand the acronym to "jobs per minute". |
@@ -97,7 +97,10 @@ class Gcc(Compiler):
if spack.compilers.clang.Clang.default_version(cc) != 'unknown':
return 'unknown'
- return super(Gcc, cls).default_version(cc)
+ version = super(Gcc, cls).default_version(cc)
+ if version in ['7']:
+ version = get_compiler_version(cc, '-dumpfullversion')
+ return version
@classmethod
def fc_version(cls, fc):
| [Gcc->[f77_version->[fc_version],default_version->[default_version]]] | Default version of the object. | `version == '7'`? No need for a list if you only compare a single element. |
@@ -156,4 +156,14 @@ func init() {
confTree.Set("Version", "2.0.0")
return confTree
}
+
+ migrations["2.0.0"] = func(confTree *toml.Tree) *toml.Tree {
+ // Legacy conf missing fields
+ if confTree.Get("Log.VerbosePrints") == nil {
+ confTree.Set("Log.VerbosePrints", defaultConfig.Log.VerbosePrints)
+ }
+
+ confTree.Set("Version", "2.1.0")
+ return confTree
+ }
}
| [Error,New,Unmarshal,LessThan,Errorf,NewVersion,LoadBytes,Get,Set] | Get confTree if version 2. 0. 0. | Have you tested running config of version v1.0.4 or earlier? Is there a upgrade logic from v1.0.4 -> v2.0.0 -> v2.1.0? |
@@ -0,0 +1,18 @@
+# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack import *
+
+
+class Graphite2(CMakePackage):
+ """Graphite is a system that can be used to create “smart fonts” capable of
+ displaying writing systems with various complex behaviors. A smart font
+ contains not only letter shapes but also additional instructions indicating
+ how to combine and position the letters in complex ways."""
+
+ homepage = "https://scripts.sil.org/cms/scripts/page.php?site_id=projects&item_id=graphite_home"
+ url = "https://github.com/silnrsi/graphite/releases/download/1.3.13/graphite2-1.3.13.tgz"
+
+ version('1.3.13', sha256='dd63e169b0d3cf954b397c122551ab9343e0696fb2045e1b326db0202d875f06')
| [No CFG could be retrieved] | No Summary Found. | These smart quotes are causing the unit tests to fail |
@@ -2703,7 +2703,8 @@ p {
$min = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';
wp_enqueue_style( 'jetpack', plugins_url( "css/jetpack-banners{$min}.css", JETPACK__PLUGIN_FILE ), false, JETPACK__VERSION . '-20121016' );
- $wp_styles->add_data( 'jetpack', 'rtl', true );
+ wp_style_add_data( 'jetpack', 'rtl', 'replace' );
+ wp_style_add_data( 'jetpack', 'suffix', $min );
}
function admin_scripts() {
| [Jetpack->[admin_notices->[opt_in_jetpack_manage_notice,can_display_jetpack_manage_notice],admin_page_load->[disconnect,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],jumpstart_has_updated_module_option->[do_stats,stat],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]]] | Enqueue Jetpack banner styles and scripts. | Since we're removing `$wp_styles` from the scope of this function, let's also remove the `global $wp_styles` declaration. |
@@ -73,6 +73,11 @@ export class ConsentUI {
/** @private {?Element} */
this.ui_ = null;
+ /** @private {boolean} */
+ this.overlayEnabled_ = isExperimentOn(baseInstance.win, 'amp-consent-v2') &&
+ config['uiConfig'] &&
+ !!config['uiConfig']['overlay'];
+
/** @private {boolean} */
this.scrollEnabled_ = true;
| [No CFG could be retrieved] | A sequence of AMPUI objects that can be used to display a sequence of AMP The viewport implementation. | nit: can we do `config['uiConfig']['overlay'] === true`, this is to prevent `'overlay': 'false'` case. |
@@ -287,9 +287,7 @@ class CiHelper
? explode(PHP_EOL, rtrim(shell_exec("find . -name '*.sh' -not -path './node_modules/*' -not -path './vendor/*'")))
: $this->changed['bash'];
- $bash_cmd = implode(' && ', array_map(function ($file) {
- return "bash -n $file";
- }, $files));
+ $bash_cmd = array_merge(['scripts/bash_lint.sh'], $files);
$return += $this->execute('Bash lint', $bash_cmd);
}
| [CiHelper->[setOS->[enableDb,enableSnmpsim],execute->[run],parseChangedFiles->[getFlag,setFlags,getFlags],setModules->[enableDb,enableSnmpsim]]] | Check if a node has been changed. | you forgot to commit this script |
@@ -326,10 +326,6 @@ public abstract class FileBasedSource<T> extends OffsetBasedSource<T> {
public final BoundedReader<T> createReader(PipelineOptions options) throws IOException {
// Validate the current source prior to creating a reader for it.
this.validate();
- checkState(
- fileOrPatternSpec.isAccessible(),
- "Cannot create a file reader without access to the file or pattern specification: {}.",
- fileOrPatternSpec);
String fileOrPattern = fileOrPatternSpec.get();
if (mode == Mode.FILEPATTERN) {
| [FileBasedSource->[createSourceForSubrange->[getMode],split->[getMode,split,createForSubrangeOfFile],createReader->[createSingleFileReader],populateDisplayData->[populateDisplayData],validate->[validate],FileBasedReader->[getCurrentSource->[getCurrentSource],close->[close],allowsDynamicSplitting->[isSplittable],startImpl->[getCurrentSource],getMode],FilePatternReader->[getCurrentTimestamp->[getCurrentTimestamp],getFractionConsumed->[getFractionConsumed],getCurrent->[getCurrent],close->[close],advance->[advance],startNextNonemptyReader->[start,close]],toString->[toString],getMaxEndOffset->[getSingleFileMetadata]]] | Creates a new reader for the specified file pattern or file pattern. | Do you not think that this error message is still useful? |
@@ -705,7 +705,7 @@ def _freesurfer_read_talxfm(subject, subjects_dir, verbose=None):
xfm.append(digs)
if ii == 2:
break
- # xfm.append([0., 0., 0., 1.]) # Don't bother appending this
+ xfm.append([0., 0., 0., 1.])
xfm = np.array(xfm, dtype=float)
else:
raise ValueError('failed to find \'Linear_Transform\' string in '
| [write_source_spaces->[write_source_spaces_to_fid],read_source_spaces->[read_source_spaces_from_tree],read_source_spaces_from_tree->[SourceSpaces],_read_one_source_space->[_add_patch_info]] | Read MNI transform from FreeSurfer talairach. xfm file Freesurfer mri_info output. | maybe we should rename this function to `_read_talxfm` as it can use FS or NiBabel |
@@ -91,3 +91,13 @@ class PubSubSink(dataflow_io.NativeSink):
def writer(self):
raise NotImplementedError(
'PubSubSink is not supported in local execution.')
+
+
+def _decodeUtf8String(encoded_value):
+ """Decodes a string in utf-8 format from bytes"""
+ return encoded_value.decode('utf-8')
+
+
+def _encodeUtf8String(value):
+ """Encodes a string in utf-8 format to bytes"""
+ return value.encode('utf-8')
| [PubSubSource->[display_data->[DisplayDataItem],__init__->[StrUtf8Coder],reader->[NotImplementedError]],PubSubSink->[display_data->[DisplayDataItem],writer->[NotImplementedError],__init__->[StrUtf8Coder]]] | Returns the writer of the current node. | These can be removed with coders passed into `ReadFromPubSub` and `WriteToPubSub`. |
@@ -96,7 +96,7 @@ func defaultConfig() kafkaConfig {
BrokerTimeout: 10 * time.Second,
Compression: "gzip",
CompressionLevel: 4,
- Version: "1.0.0",
+ Version: kafka.Version{String: "1.0.0"},
MaxRetries: 3,
ClientID: "beats",
ChanBufferSize: 256,
| [Validate->[ToLower,New,Errorf],BuildModuleConfig,LoadTLSConfig,Validate,ToLower,GetGoMetrics,NewConfig,Errorf,RequiredAcks,Err,Rename] | Codec creates a new codec. Config for a single . newConfig creates a new kafka config object. | +1 to have the default previous behavior, I was looking into that. |
@@ -17,6 +17,18 @@ namespace System.IO.Tests
Assert.Throws<FileNotFoundException>(() => GetAttributes(GetTestFilePath() + trailingChar));
}
+#if TargetsWindows
+ [Theory, MemberData(nameof(TrailingCharacters))]
+ [PlatformSpecific(TestPlatforms.Windows)]
+ public void GetAttributes_MissingFile_SafeFileHandle(char trailingChar)
+ {
+ Assert.Throws<FileNotFoundException>(() =>
+ {
+ using var fileHandle = File.OpenHandle(GetTestFilePath() + trailingChar);
+ GetAttributes(fileHandle);
+ });
+ }
+#endif
// Getting only throws for File, not FileInfo
[Theory,
InlineData(":bar"),
| [File_GetSetAttributes->[SetAttributes->[SetAttributes]]] | Get Attributes of a file or directory that do not exist. | You already have `[PlatformSpecific(TestPlatforms.Windows)]` .. you should not need any `#if` unless the API does not exist on Unix, which is not the case. (It should never be the case, unless perhaps a whole assembly is platform specific) |
@@ -69,12 +69,12 @@ describe EpisodeGeneratorService, type: :service do
end
context "has irregular episodes" do
- let(:program_detail) { create(:program_detail, channel: channel, work: work, started_at: Time.parse("2019-01-04 0:00:00")) }
+ let(:program) { create(:program, channel: channel, work: work, started_at: Time.parse("2019-01-04 0:00:00")) }
let(:episode1) { create(:episode, work: work, raw_number: 1.0,) }
let(:episode2) { create(:episode, work: work, raw_number: 1.5, title: "2話目から総集編!") }
- let!(:program1) { create(:program, program_detail: program_detail, channel: channel, work: work, episode: episode1, number: 1, started_at: Time.parse("2019-01-04 0:00:00")) }
- let!(:program2) { create(:program, program_detail: program_detail, channel: channel, work: work, episode: episode2, number: 2, started_at: Time.parse("2019-01-11 0:00:00"), irregular: true) }
- let!(:program3) { create(:program, program_detail: program_detail, channel: channel, work: work, episode: nil, number: 3, started_at: Time.parse("2019-01-18 0:00:00")) }
+ let!(:slot1) { create(:slot, program: program, channel: channel, work: work, episode: episode1, number: 1, started_at: Time.parse("2019-01-04 0:00:00")) }
+ let!(:slot2) { create(:slot, program: program, channel: channel, work: work, episode: episode2, number: 2, started_at: Time.parse("2019-01-11 0:00:00"), irregular: true) }
+ let!(:slot3) { create(:slot, program: program, channel: channel, work: work, episode: nil, number: 3, started_at: Time.parse("2019-01-18 0:00:00")) }
context "when run on 2019-01-08" do
before do
| [create,context,to,let,id,parse,describe,execute!,before,eq,let!,it,order] | it does not create episodes it creates 1 episode it creates 2 episodes it creates 3 when run on 2019 - 01 - 18 it creates 1 episode. | Metrics/LineLength: Line is too long. [155/120] |
@@ -6815,12 +6815,17 @@ public class SystemHandler extends BaseHandler {
* @param dryRun set to true to perform a dry run
* @param earliest earliest occurrence of the migration
* @return action id, exception thrown otherwise
+ * @deprecated being replaced by scheduleProductMigration(User loggedInUser, Integer sid,
+ * String baseChannelLabel, List(String) optionalChildChannels, boolean dryRun, Date earliest)
*
- * @xmlrpc.doc Schedule a Service Pack migration for a system. This call is the
+ * @xmlrpc.doc Schedule a Product migration for a system. This call is the
* recommended and supported way of migrating a system to the next Service Pack. It will
* automatically find all mandatory product channels below a given target base channel
* and subscribe the system accordingly. Any additional optional channels can be
* subscribed by providing their labels.
+ *
+ * Note: This method is deprecated and will be removed in a future API version. Please use
+ * scheduleProductMigration instead.
* @xmlrpc.param #param("string", "sessionKey")
* @xmlrpc.param #param("int", "serverId")
* @xmlrpc.param #param("string", "baseChannelLabel")
| [SystemHandler->[getRelevantErrataByType->[lookupServer,getId],bootstrapWithPrivateSshKey->[bootstrap],deleteNotes->[deleteNotes],scheduleReboot->[getId],getName->[lookupServer,getId,getName],deleteTagFromSnapshot->[lookupServer,getId],getInstalledProducts->[lookupServer],obtainReactivationKey->[getReactivationKey],listVirtualHosts->[listVirtualHosts],scheduleGuestAction->[getName,scheduleGuestAction],lookupServer->[lookupServer],listAdministrators->[lookupServer],getDevices->[lookupServer,getDevices],setGuestCpus->[getName],listDuplicatesByIp->[transformDuplicate],createPackageProfile->[getId],listPackageProfiles->[getId],getRegistrationDate->[lookupServer],setDetails->[validateProfileName],bootstrap->[bootstrap],getScriptActionDetails->[getId,getScriptActionDetails],tagLatestSnapshot->[lookupServer],listFqdns->[listFqdns],getConnectionPath->[lookupServer,getConnectionPath,getId],getUnscheduledErrata->[lookupServer,getId],getUuid->[lookupServer,getUuid],getCpu->[lookupServer,getCpu],scheduleScriptRun->[scheduleScriptRun],deleteSystems->[deleteSystems],listDuplicatesByHostname->[listDuplicatesByHostname,transformDuplicate],getOsaPing->[lookupServer,getName],getRelevantErrata->[lookupServer,getId],listExtraPackages->[listExtraPackages,getName],getEventHistory->[lookupServer],scheduleSyncPackagesWithSystem->[getId],createSystemRecord->[lookupKsData,getName],packageIdsToMaps->[getId],scheduleCertificateUpdate->[lookupServer,scheduleCertificateUpdate],packageNevrasToMaps->[getId],listSubscribedChildChannels->[lookupServer],whoRegistered->[lookupServer],schedulePackageRefresh->[schedulePackageRefresh],lookupKsData->[lookupKsData],listActivationKeys->[lookupServer],getRunningKernel->[getRunningKernel],schedulePackageInstall->[schedulePackagesAction,packageIdsToMaps,schedulePackageInstall],listPackagesFromChannel->[getId],getDmi->[lookupServer,getDmi],setPrimaryInterface->[lookupServer],schedulePackageRemoveByNevra->[schedulePackagesAction,packageNevrasToMaps],setupStaticNetwork->[getSystemRecordFromClientCert],transitionDataForSystem->[getName],scheduleApplyErrata->[scheduleApplyErrata],comparePackages->[getId],listSystemEvents->[listSystemEvents],schedulePackagesAction->[getId],addNote->[addNote],listActiveSystemsDetails->[convertLocalToUtc],schedulePackageRemove->[schedulePackagesAction,packageIdsToMaps],scheduleSPMigration->[getId,scheduleSPMigration],getMemory->[lookupServer],deleteNote->[deleteNote],setPrimaryFqdn->[lookupServer],scheduleApplyHighstate->[getId,scheduleApplyHighstate],comparePackageProfile->[getId],getSubscribedBaseChannel->[lookupServer],listDuplicatesByMac->[listDuplicatesByMac,transformDuplicate],scheduleDistUpgrade->[scheduleDistUpgrade],sendOsaPing->[lookupServer],scheduleApplyStates->[getId,scheduleApplyStates],addEntitlements->[getName],listMigrationTargets->[lookupServer],schedulePackageInstallByNevra->[schedulePackagesAction,schedulePackageInstallByNevra,packageNevrasToMaps],getMinionIdMap->[getId,getMinionIdMap],listSystemsWithPackage->[listSystemsWithPackage],updatePackageState->[updatePackageState],deleteSystem->[deleteSystem],scheduleHardwareRefresh->[getId],searchByName->[getName],isNvreInstalled->[isNvreInstalled],setGuestMemory->[getName],provisionVirtualGuest->[provisionVirtualGuest],getSystemCurrencyScores->[getId]]] | Schedule a Service Pack migration for a system. This method is the recommended and supported way of This method is called when the next message is received. | For all deprecated methods, could you also include this in the `@xmlrpc.doc` tag, so the information gets rendered in the xmlrpc docs (it would be really useful there)? |
@@ -5,7 +5,8 @@ import logging
import torch
from .compressor import Pruner
-__all__ = ['LevelPruner', 'AGP_Pruner', 'FPGMPruner', 'L1FilterPruner', 'SlimPruner']
+__all__ = ['LevelPruner', 'AGP_Pruner', 'SlimPruner', 'RankFilterPruner', 'L1FilterPruner', 'L2FilterPruner',
+ 'FPGMPruner']
logger = logging.getLogger('torch pruner')
| [L1FilterPruner->[__init__->[super,set],calc_mask->[int,topk,get,update,ones,add,abs,view,gt]],LevelPruner->[__init__->[super],calc_mask->[int,numel,topk,get,update,ones,abs,gt]],FPGMPruner->[_get_distance_sum->[,debug,size,sqrt,len,sum,w,view],calc_mask->[int,size,get,update,ones,_get_min_gm_kernel_idx,add],update_epoch->[set],_get_min_gm_kernel_idx->[size,append,_get_distance_sum,len,sorted,range],__init__->[super,set]],AGP_Pruner->[compute_target_sparsity->[warning,get],__init__->[super],update_epoch->[keys],calc_mask->[int,numel,topk,get,update,ones,abs,compute_target_sparsity,gt]],SlimPruner->[__init__->[detect_modules_to_compress,int,append,topk,cat,len,super,set,warning,abs],calc_mask->[get,update,ones,add,abs,gt]],getLogger] | Creates a class that can be used to prunes the smallest magnitude of the given To prune or not to prune for model compression. | do we still need `RankFilterPruner`? |
@@ -79,7 +79,8 @@ public class ContainerBalancer {
ContainerManagerV2 containerManager,
ReplicationManager replicationManager,
OzoneConfiguration ozoneConfiguration,
- final SCMContext scmContext) {
+ final SCMContext scmContext,
+ PlacementPolicy placementPolicy) {
this.nodeManager = nodeManager;
this.containerManager = containerManager;
this.replicationManager = replicationManager;
| [ContainerBalancer->[balance->[initializeIteration,clear],calculateUtilization->[getScmNodeStat,doubleValue],start->[getThreshold,balance,getMaxDatanodesToBalance,error,compareAndSet,OzoneConfiguration,getMaxSizeToMove,info],initializeIteration->[getMostOrLeastUsedDatanodes,error,size,ratioToBytes,calculateUtilization,stop,add,get,isInSafeMode,containsNode,incrementDatanodesNumBalanced,calculateAvgUtilization,isEmpty,addAll,info,reverse],containsNode->[size,equals,compare,get,getMostUsedByRemainingRatio,reversed,binarySearch],stop->[info,set],calculateAvgUtilization->[getScmNodeStat,size,get,warn,add,SCMNodeStat],toString->[format,toString],isBalancerRunning->[get],ContainerBalancerConfiguration,getLogger,ContainerBalancerMetrics,AtomicBoolean]] | Creates a new instance of the ContainerBalancer class. | remove `clusterRemaining ` in current code , seems not used |
@@ -193,6 +193,8 @@ class RetiariiExperiment(Experiment):
)
_logger.info('Start strategy...')
+ search_space = BaseStrategy.get_model_space(base_model_ir, self.applied_mutators)
+ self.update_search_space(search_space)
self.strategy.run(base_model_ir, self.applied_mutators)
_logger.info('Strategy exit')
# TODO: find out a proper way to show no more trial message on WebUI
| [RetiariiExperiment->[start->[start,_start_strategy],_start_strategy->[preprocess_model],run->[start]],debug_mutated_model->[preprocess_model]] | Start the strategy. | Should call `dry_run_for_formated_search_space` here. Not sure whether every search space can be successfully formatted though. |
@@ -32,7 +32,6 @@ public class DomainContextBuilder
{
List<ConfigurationBuilder> builders = new ArrayList<ConfigurationBuilder>(3);
ConfigurationBuilder cfgBuilder = getDomainBuilder(domainConfig);
- builders.add(new DefaultsConfigurationBuilder());
builders.add(cfgBuilder);
DefaultMuleContextFactory muleContextFactory = new DefaultMuleContextFactory();
MuleContext domainContext = muleContextFactory.createMuleContext(builders, new DefaultMuleContextBuilder());
| [DomainContextBuilder->[build->[start,createMuleContext,DefaultMuleContextFactory,DefaultsConfigurationBuilder,add,getDomainBuilder,DefaultMuleContextBuilder],getDomainBuilder->[SpringXmlDomainConfigurationBuilder]]] | Build the domain context. | Why is this builder removed? |
@@ -400,8 +400,10 @@ crt_hg_unpack_header(hg_handle_t handle, struct crt_rpc_priv *rpc_priv,
clock_offset,
rpc_priv->crp_req_hdr.cch_src_rank);
/* Fail all but SWIM requests. */
- if (!crt_opc_is_swim(rpc_priv->crp_req_hdr.cch_opc))
+ if (!crt_opc_is_swim(rpc_priv->crp_req_hdr.cch_opc)) {
+ crt_trigger_hlc_error_cb();
rpc_priv->crp_fail_hlc = 1;
+ }
rc = 0;
}
| [No CFG could be retrieved] | This function is called from the HG_Get_input_buf method. Copy the RPC header from one descriptor to another. | This call needs the rate limiting offered by REPORT_HLC_SYNC_ERR (whose rate limiting period can be changed if you consider it too long), otherwise there may be a flood of this call if the current process's clock is behind all others too much and if the current process communicates a lot. Also, this call needs to be made for SWIM requests too. |
@@ -202,8 +202,9 @@ def convert_time_stamp_to_date(content):
def check_rest(args):
'''check if restful server is running'''
- nni_config = Config(get_config_filename(args))
- rest_port = nni_config.get_config('restServerPort')
+ experiment_config = Experiments()
+ experiment_dict = experiment_config.get_all_experiments()
+ rest_port = experiment_dict.get(get_config_filename(args), None).get('port', None)
running, _ = check_rest_server_quick(rest_port)
if running:
print_normal('Restful server is running...')
| [check_rest->[get_config_filename],get_config->[get_config_filename],parse_ids->[update_experiment],set_monitor->[update_experiment,get_experiment_status,show_experiment_info],webui_url->[get_config_filename,get_config],update_experiment->[update_experiment],check_experiment_id->[update_experiment],experiment_list->[update_experiment],stop_experiment->[parse_ids],trial_kill->[get_config_filename],experiment_status->[get_config_filename],save_experiment->[get_config],log_stderr->[log_internal],log_trial->[get_config_filename,log_trial_adl_helper],platform_clean->[hdfs_clean,update_experiment,remote_clean,get_platform_dir],get_experiment_port->[check_experiment_id],monitor_experiment->[set_monitor],trial_ls->[convert_time_stamp_to_date,get_config_filename],export_trials_data->[groupby_trial_id,get_config_filename,get_config],load_experiment->[get_config],log_internal->[get_config_filename],trial_codegen->[get_config_filename,check_experiment_id],show_experiment_info->[get_time_interval,convert_time_stamp_to_date,update_experiment],get_config_filename->[check_experiment_id],list_experiment->[convert_time_stamp_to_date,get_config_filename],experiment_clean->[hdfs_clean,get_config,local_clean,remote_clean],log_stdout->[log_internal]] | check if restful server is running. | you put `None` here means `None` may be returned, but None does not have attribute `get` |
@@ -1021,7 +1021,7 @@ WasmBinaryReader::ReadInlineName(uint32& length, uint32& nameLength)
m_pc += nameLength;
length += nameLength;
- return CvtUtf8Str(rawName, nameLength);
+ return CvtUtf8Str(rawName, nameLength, &nameLength);
}
const char16*
| [CheckBytesLeft->[ThrowDecodingError],ReadMemorySection->[ThrowDecodingError],ReadSectionHeader->[ThrowDecodingError],ReadCustomSection->[ThrowDecodingError],ReadFunctionHeaders->[ThrowDecodingError],SeekToFunctionBody->[ThrowDecodingError],ReadStartFunction->[ThrowDecodingError],ReadInitExpr->[ReadExpr,ThrowDecodingError],ReadTableSection->[ThrowDecodingError],ReadImportEntries->[ReadTableSection,ThrowDecodingError,ReadMemorySection],ReadGlobalsSection->[ThrowDecodingError],ReadExportTable->[ThrowDecodingError],ReadNamesSection->[ThrowDecodingError],ReadMutableValue->[ThrowDecodingError],ReadDataSegments->[ThrowDecodingError],CallIndirectNode->[ThrowDecodingError],ValidateModuleHeader->[ThrowDecodingError],ReadNextSection->[ThrowDecodingError],ReadFunctionsSignatures->[ThrowDecodingError],CallNode->[ThrowDecodingError],LEB128->[ThrowDecodingError],ReadElementSection->[ThrowDecodingError],ReadExpr->[ThrowDecodingError],ReadSignatures->[ThrowDecodingError]] | read inline name of any type. | This was causing decoded utf8 strings to have invalid length and thus we would allocate invalid buffer size |
@@ -3327,10 +3327,11 @@ dfs_release(dfs_obj_t *obj)
rc = -DER_IO_INVAL;
}
- if (rc)
+ if (rc) {
D_ERROR("Failed to close DFS object, "DF_RC"\n", DP_RC(rc));
- else
+ } else {
D_FREE(obj);
+ }
return daos_der2errno(rc);
}
| [dfs_mount_root_cont->[dfs_cont_create,dfs_mount],dfs_umount_root_cont->[dfs_umount],dfs_move->[dfs_move_internal],dfs_cont_create1->[dfs_cont_create],dfs_obj_local2global->[dfs_get_chunk_size],dfs_chmod->[dfs_release],dfs_access->[dfs_release]] | Release an object that was allocated by the dfs_obj_t. | Why add brackets? I think the preferred style is to not add them if not needed |
@@ -2344,10 +2344,17 @@ func getJobOptions(kubeClient *kube.Client, jobInfo *persist.JobInfo, jobShimIma
volumes: volumes,
volumeMounts: volumeMounts,
imagePullSecrets: imagePullSecrets,
+ cpuFootprint: jobInfo.Resources.GetCpu(),
+ memFootprint: jobInfo.Resources.GetMemory(),
}, nil
}
func podSpec(options *jobOptions, jobID string, restartPolicy api.RestartPolicy) api.PodSpec {
+ mem, err := resource.ParseQuantity(options.memFootprint)
+ if err != nil {
+ mem = resource.MustParse(defaultMem)
+ }
+ cpu := resource.MustParse(fmt.Sprintf("%f", options.cpuFootprint))
return api.PodSpec{
InitContainers: []api.Container{
{
| [RerunPipeline->[StopPipeline,StartPipeline],AddShard->[newPipelineCtx,newJobCtx,cancelPipeline,cancelJob],jobManager->[InspectJob],deleteJob->[jobPods,getPersistClient],InspectJob->[InspectJob],StartPod->[InspectJob],runPipeline->[CreateJob],parentJob->[ListJob],DeleteAll->[DeleteAll],deletePipeline->[deleteJob,getPersistClient],GetLogs->[GetLogs],DeleteJob->[InspectJob]] | podSpec returns a podSpec for a single . service returns a service that pulls a job from the cluster. | It seems like we are handling errors / defaults differently here for mem/cpu - is there a reason for that? |
@@ -278,4 +278,10 @@ class SwimmingDEMSolver(PythonSolver):
pass
def GetComputingModelPart(self):
- return self.dem_solver.spheres_model_part
\ No newline at end of file
+ return self.dem_solver.spheres_model_part
+
+ def GetTimeIntegrationMoveMeshFlag(self):
+ if self.fluid_solver.settings.Has('time_integration_settings') and self.fluid_solver.settings["time_integration_settings"]["move_mesh_flag"].GetBool():
+ return True
+ else:
+ return False
\ No newline at end of file
| [SwimmingDEMSolver->[AssessStationarity->[Say],_GetProjectionModule->[_ConstructProjectionModule],Predict->[CannotIgnoreFluidNow,Predict],__init__->[_ValidateSettings],SolveFluidSolutionStep->[SolveSolutionStep],SolveDEMSolutionStep->[SolveSolutionStep],SolveDEM->[SolveDEMSolutionStep,ApplyForwardCoupling,ApplyForwardCouplingOfVelocityToAuxVelocityOnly],AdvanceInTime->[AdvanceInTime],SolveSolutionStep->[AssessStationarity,Say,CannotIgnoreFluidNow,UpdateALEMeshMovement]]] | Returns the computer model part of the Solver. | please, as soon as you construct the the solver class, store the option in a variable self.move_mesh_flag = ..., to make this cleaner and faster (although I know it is not critical here) |
@@ -287,8 +287,13 @@ func (i *Image) createNamesToPull() ([]*pullStruct, error) {
}
}
+ // Here we construct the destination reference
for _, pStruct := range pullNames {
- destRef, err := is.Transport.ParseStoreReference(i.imageruntime.store, pStruct.image)
+ dstName := pStruct.image
+ if pStruct.shaPullName != "" {
+ dstName = pStruct.shaPullName
+ }
+ destRef, err := is.Transport.ParseStoreReference(i.imageruntime.store, dstName)
if err != nil {
return nil, errors.Wrapf(err, "error parsing dest reference name")
}
| [getPullListFromRef->[getPullStruct],pullImage->[getPullListFromRef]] | createNamesToPull creates a list of names to pull from the input image. This is a helper function that returns the pullNames and nil . | This will cause the `containers-storage:` destination to not be marked with the digest. Why is that desirable? |
@@ -187,7 +187,10 @@ def probe_sni(name, host, port=443, timeout=300, # pylint: disable=too-many-argu
return client_ssl.get_peer_certificate()
-def make_csr(private_key_pem, domains=None, must_staple=False, ipaddrs=None):
+def make_csr(private_key_pem: bytes, domains: Optional[Union[Set[str], List[str]]] = None,
+ must_staple: bool = False,
+ ipaddrs: Optional[List[Union[ipaddress.IPv4Address, ipaddress.IPv6Address]]] = None
+ ) -> bytes:
"""Generate a CSR containing domains or IPs as subjectAltNames.
:param buffer private_key_pem: Private key, in PEM PKCS#8 format.
| [dump_pyopenssl_chain->[_dump_cert],probe_sni->[shutdown],SSLSocket->[FakeConnection->[shutdown->[shutdown]],accept->[FakeConnection,accept],__init__->[_DefaultCertSelection]]] | Generate a CSR containing domains or IPs as subjectAltNames. Dump certificate request if any. | Could `domains` be `Optional[Iterable[str]]` or something? |
@@ -180,7 +180,8 @@ agg_del_entry(daos_handle_t ih, struct umem_instance *umm,
rc = umem_tx_commit(umm);
if (rc) {
- D_ERROR("Failed to delete entry: "DF_RC"\n", DP_RC(rc));
+ D_CDEBUG(rc == -DER_TX_BUSY, DB_TRACE, DLOG_ERR,
+ "Failed to delete entry: "DF_RC"\n", DP_RC(rc));
return rc;
}
| [No CFG could be retrieved] | This function is called by VOSIterator when a record is deleted from the DAOS vos_agg_obj - function to set the values of the in the. | I think current aggregation can ensure not deleting prepared entries, no? |
@@ -476,11 +476,9 @@ func (e *Etcd) WatchPredicate(ctx api.Context, m generic.Matcher, resourceVersio
}
if name, ok := m.MatchesSingle(); ok {
- key, err := e.KeyFunc(ctx, name)
- if err != nil {
- return nil, err
+ if key, err := e.KeyFunc(ctx, name); err == nil {
+ return e.Storage.Watch(key, version, filterFunc)
}
- return e.Storage.Watch(key, version, filterFunc)
}
return e.Storage.WatchList(e.KeyRootFunc(ctx), version, filterFunc)
| [Create->[Create],Get->[Get],Delete->[Delete,Get],WatchPredicate->[Watch],ListPredicate->[List]] | WatchPredicate returns a watch. Interface that watches the object with the given matcher. | Why ignore the error? |
@@ -21,6 +21,8 @@ module CachingHeaders
request.session_options[:skip] = true # no cookies
+ @edge_caching_in_place = true # Used primarily for downstream meta information about whether a path is cached.
+
response.headers["Cache-Control"] = "public, no-cache" # Used only by Fastly.
response.headers["X-Accel-Expires"] = max_age.to_s # Used only by Nginx.
response.headers["Surrogate-Control"] = surrogate_control.presence || build_surrogate_control(
| [set_cache_control_headers->[headers,to_s,to_i,build_surrogate_control,public,session_options,presence],set_surrogate_key_header->[headers,join,session_options],extend] | Set the cache - control headers based on the passed in . | Is this Thread-safe? I think it is because the modules are included and used in instances of the ApplicationController so this would be tied to a particular instance...can someone double check my logic there? Is that correct? I want to make sure we don't start leaking variables. |
@@ -374,7 +374,7 @@ public class StringComparators
public int compare(String o1, String o2)
{
// return if o1 and o2 are the same object
- if (o1 == o2) {
+ if (Objects.equals(o1, o2)) {
return 0;
}
// we know o1 != o2
| [StringComparators->[StrlenComparator->[compare->[compare]],AlphanumericComparator->[compareNonNumeric->[isDigit,compare]],LexicographicComparator->[compare->[compare]],NumericComparator->[compare->[convertStringToBigDecimal,compare]]]] | Compares two strings in order to determine if they are the same. | Similar question: is this really better? |
@@ -172,9 +172,9 @@ module ApplicationHelper
html = if skip_avatar
''
else
- raw("<img src='#{user_avatar_absolute_url(user, :icon_small)}'" \
+ raw("<span class=\"global-avatar-container smart-annotation\"><img src='#{user_avatar_absolute_url(user, :icon_small)}'" \
"alt='avatar' class='atwho-user-img-popover'" \
- " ref='#{'missing-img' if missing_avatar(user, :icon_small)}'>")
+ " ref='#{'missing-img' if missing_avatar(user, :icon_small)}'></span>")
end
html =
| [project_page?->[in?],display_tooltip->[truncate,length,sanitize_input,strip],sample_groups_page_my_module?->[nil?],smart_annotation_filter_resources->[html],sample_groups_page_project?->[nil?],popover_for_user_name->[email,created_at,t,include?,missing_avatar,user_avatar_absolute_url,first,name,full_name,capitalize,raw,l],smart_annotation_notification->[fetch,base62_decode,include?,generate_annotation_notification,each,gsub,match,find_by_id],missing_avatar->[avatar],generate_annotation_notification->[assignments_notification,create,sanitize_input],user_avatar_absolute_url->[empty?,avatar,include?,missing_avatar,ssl?,url_for,present?,respond_to?],sample_types_page_my_module?->[nil?],sample_types_page_project?->[nil?],sample_groups_page_experiment?->[nil?],all_projects_page?->[in?],module_repository_page?->[nil?],sample_types_page_expermient?->[nil?],smart_annotation_filter_users->[base62_decode,popover_for_user_name,gsub,match,find_by_id],smart_annotation_parser->[is_a?,smart_annotation_filter_users,smart_annotation_filter_resources],include] | Displays a popover for a user. user_status - user_still_in_team - user_status - user. | Metrics/LineLength: Line is too long. [135/120] |
@@ -133,6 +133,10 @@ public class QuarkusMultipartFormDataPart {
return content;
}
+ public Multi<Byte> multiByteContent() {
+ return multiByteContent;
+ }
+
public String mediaType() {
return mediaType;
}
| [QuarkusMultipartFormDataPart->[NullPointerException]] | Returns the content and media type of this buffer. | Something we could improve (later) is to also support Multi<byte[]>, because it's what you receive most of the time (chunks, not bytes one by one). |
@@ -177,8 +177,12 @@ def find_ecg_events(raw, event_id=999, ch_name=None, tstart=0.0,
The events corresponding to the peaks of the R waves.
ch_ecg : string
Name of channel used.
- average_pulse : float
- Estimated average pulse.
+ average_pulse : float | np.nan
+ The estimated average pulse. If no ECG events could be found, this will
+ be ``nan``.
+ ecg : array | None
+ The ECG data of the synthesized ECG channel, if any. This will only
+ be returned if ``return_ecg=True`` was passed.
See Also
--------
| [find_ecg_events->[qrs_detector],create_ecg_epochs->[find_ecg_events]] | Find ECG events by localizing the R wave peaks. Get the channel index of the given channel. Compute the missing - nanoseconds in the series. | is this accurate? Do we ever return `np.nan`? It looks like the part of the PR that changed that in the code has been removed. |
@@ -313,8 +313,11 @@ class Version(OnChangeMixin, ModelBase):
self.deleted = True
self.save()
- for preview in previews:
- delete_preview_files.delay(preview)
+ for preview_pk in previews_pks:
+ # FIXME: oops that's a problem, the hard delete will have deleted
+ # the preview, so we can't get it from the db to delete the files.
+ # Need to be smarter.
+ delete_preview_files.delay(preview_pk)
@property
def is_user_disabled(self):
| [update_status->[update_status],Version->[was_auto_approved->[is_public],is_public->[is_public],transformer->[rollup,_compat_map],is_allowed_upload->[compatible_platforms],inherit_nomination->[reset_nomination_time],from_upload->[VersionCreateError,from_upload],transformer_activity->[rollup],delete->[save],VersionManager],inherit_nomination->[inherit_nomination],License->[LicenseManager],VersionManager->[__init__->[__init__]],ApplicationsVersions->[__unicode__->[get_application_display,is_compatible_app]]] | Delete a version object. | True, though do we actually hard delete versions anywhere outside of tests? |
@@ -0,0 +1,2 @@
+# Copyright (c) Microsoft Corporation.
+# Licensed under the MIT license.
| [No CFG could be retrieved] | No Summary Found. | if `analysis_utils` is only used by model compression, suggest to put this directory under `src/sdk/pynni/nni/compression` |
@@ -87,6 +87,7 @@ define([
* @param {Boolean} [options.show=true] Determines if this primitive will be shown.
* @param {Boolean} [options.vertexCacheOptimize=false] When <code>true</code>, geometry vertices are optimized for the pre and post-vertex-shader caches.
* @param {Boolean} [options.interleave=false] When <code>true</code>, geometry vertex attributes are interleaved, which can slightly improve rendering performance but increases load time.
+ * @param {Boolean} [options.compressNormal=true] When <code>true</code>, geometry normals are compressed, which will save memory.
* @param {Boolean} [options.releaseGeometryInstances=true] When <code>true</code>, the primitive does not keep a reference to the input <code>geometryInstances</code> to save memory.
* @param {Boolean} [options.allowPicking=true] When <code>true</code>, each geometry instance will only be pickable with {@link Scene#pick}. When <code>false</code>, GPU memory is saved.
* @param {Boolean} [options.asynchronous=true] Determines if the primitive will be created asynchronously or block until ready.
| [No CFG could be retrieved] | A primitive can either be created on a web worker or a main thread. A primitive can Ellipse Geometry. | This also does texture coordinates and tangent-space vectors, right? I wonder if we should just call this `compressVertices` and perhaps introduce more fine-grained per-attribute options later if needed, e.g., if someone does not want to compress texture coordinates because of artifacts. What do you think? |
@@ -138,8 +138,7 @@ public class DiskFileUpload extends AbstractDiskHttpData implements FileUpload {
HttpHeaderNames.CONTENT_LENGTH + ": " + length() + "\r\n" +
"Completed: " + isCompleted() +
"\r\nIsInMemory: " + isInMemory() + "\r\nRealFile: " +
- (file != null ? file.getAbsolutePath() : "null") + " DefaultDeleteAfter: " +
- deleteOnExitTemporaryFile;
+ (file != null ? file.getAbsolutePath() : "null") + " DefaultDeleteAfter: " + deleteOnExit;
}
@Override
| [DiskFileUpload->[copy->[copy],duplicate->[duplicate],equals->[equals],compareTo->[getHttpDataType,compareTo],hashCode->[hashCode],retain->[retain],touch->[touch],retainedDuplicate->[retainedDuplicate],replace->[getFilename,getContentType,getContentTransferEncoding,DiskFileUpload]]] | Returns a string representation of the header of a . | I think the `DefaultDeleteAfter` text should then also be changed to `DeleteAfter`. |
@@ -4,6 +4,7 @@ import paddle.v2.framework.core as core
import paddle.v2.framework.optimizer as optimizer
from paddle.v2.framework.framework import Program, g_program
+from paddle.v2.framework.save_load import save_persistables, load_persistables
from paddle.v2.framework.executor import Executor
import numpy as np
| [shuffle,LoDTensor,fc,SGDOptimizer,set,range,train,train_reader,mean,data,Program,CPUPlace,square_error_cost,batch,Executor,run,minimize,exit,array] | import paddle. v2. framework Function to compute the missing values. | It seems from this example that what users need is save/load_persistables. Then, do we really need save/load_params? |
@@ -1,6 +1,7 @@
class ImageUploadsController < ApplicationController
before_action :authenticate_user!
after_action :verify_authorized
+ rescue_from Errno::ENAMETOOLONG, with: :log_image_data_to_datadog
def create
authorize :image_upload
| [ImageUploadsController->[create->[limit_by_action,new,upload_images,respond_to,render,authorize,message,json,raise,cloudinary_link,blank?],upload_images->[track_image_uploads,store!,tap,map],cloudinary_link->[render,respond_to,json,url,cloud_cover_url,map],before_action,after_action]] | Creates a new cloudinary node. | hahaha I hate it when libraries don't wrap operating system errors :D |
@@ -94,6 +94,10 @@ func (r *Release) TarURL() string {
// APIFormat convert a Release to api.Release
func (r *Release) APIFormat() *api.Release {
+ apiAttachments := make([]*api.Attachment, len(r.Attachments))
+ for i := range r.Attachments {
+ apiAttachments[i] = r.Attachments[i].APIFormat()
+ }
return &api.Release{
ID: r.ID,
TagName: r.TagName,
| [APIFormat->[APIFormat,ZipURL,TarURL,APIURL],LoadAttributes->[loadAttributes],toConds] | APIFormat returns a JSON - serializable representation of the release. | This will only work if `r.Attachments` has been populated before calling `APIFormat()`. This means we will need to update each endpoint that uses `Release.APIFormat()` accordingly. |
@@ -37,7 +37,8 @@ namespace Microsoft.Xna.Framework {
public abstract string ScreenDeviceName { get; }
- private string _title;
+ private string _title = MonoGame.Utilities.AssemblyHelper.GetDefaultWindowTitle();
+
/// <summary>
/// Gets or sets the title of the game window.
/// </summary>
| [GameWindow->[EndScreenDeviceChange->[EndScreenDeviceChange]]] | Creates a base class for all of the components of a window. protected GameWindow class. | It's better to move assigning of variables to the constructor, it's more readable to be able to see all the starting values in there instead of searching for their declarations. |
@@ -137,6 +137,7 @@
<% controller_names.each do |name| %>
<li class="<%= "active" if controller_name == name %>"><a href="/internal/<%= name %>"><%= name %></a></li>
<% end %>
+ <li class="<%= "active" if controller_name == "podcasts" %>"><a href="/internal/podcasts">pod</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
| [No CFG could be retrieved] | Renders a single . | Podcasts link was not fitting into the list. |
@@ -231,13 +231,8 @@ public class FileExceptionStrategyFunctionalTestCase extends FunctionalTestCase
@Before
public void doSetUp()
{
- FileUtils.deleteTree(new File("./mule/temp"));
- }
-
- @After
- public void tearDown()
- {
- FileUtils.deleteTree(new File("./mule/temp"));
+ FileUtils.deleteTree(getFileInsideWorkingDirectory("temp"));
+ getFileInsideWorkingDirectory(WORKING_DIRECTORY_FOLDER).mkdirs();
}
protected File createDataFile(File folder, final String testMessage) throws Exception
| [FileExceptionStrategyFunctionalTestCase->[createDataFile->[createDataFile]]] | Method to create a data file if a is found. | This should not be necessary. Destroying the context already deletes recursively the working directory |
@@ -146,14 +146,14 @@ def run_random_forest(dataset, config, tuner, log):
elif limit_type == 'ntrials':
if trial_count >= trial_limit:
break
- except:
+ except Exception as err:
+ log.info(err)
break
# This line is required to fully terminate some advisors
tuner.handle_terminate()
log.info("Tuning done, the best parameters are:\n{}\n".format(best_params))
-
# retrain on the whole dataset
with Timer() as training:
best_model.fit(X_train, y_train)
| [preprocess_random_forest->[SimpleImputer,OrdinalEncoder,append,ColumnTransformer,fit,is_categorical,concatenate,enumerate,transform,Pipeline],run_random_forest->[predict,sum,info,int,copy,preprocess_random_forest,cross_val_score,time,append,pop,len,generate_parameters,format,estimator,float,update_search_space,receive_trial_result,Timer,predict_proba,isnan,handle_terminate,fit]] | Run a random forest with the given tuner. Checks if the current nan score is in the list of possible scores. | log.warning? log.warn? Have you tested this? |
@@ -228,7 +228,10 @@ Stderr:
accumulated_stdout += line
def _create_ngclient(self, port, stdout, stderr, stdin):
- return NailgunClient(port=port, ins=stdin, out=stdout, err=stderr)
+ kwargs = {"ins": stdin, "out": stdout, "err": stderr}
+ if port is not None:
+ kwargs["port"] = port
+ return NailgunClient(**kwargs)
def ensure_connectable(self, nailgun):
"""Ensures that a nailgun client is connectable or raises NailgunError."""
| [NailgunExecutor->[_get_nailgun_client->[_fingerprint,_check_nailgun_state],_spawn_nailgun_server->[ensure_connectable,_await_socket,_create_ngclient,_create_fingerprint_arg,_create_owner_arg],__init__->[__init__],_await_socket->[InitialNailgunConnectTimedOut],_runner->[Runner]],NailgunProcessGroup->[killall->[_iter_nailgun_instances]]] | Creates a NailgunClient object. | Why not just fix this in NailgunClient so you know it's fixed for all code paths? Change the defaulting there in the constructor params to None and then in the constructor body if None, use the intended default. |
@@ -2,7 +2,7 @@ package games.strategy.engine;
import static com.google.common.base.Preconditions.checkNotNull;
-import games.strategy.util.Version;
+import org.triplea.util.Version;
/**
* Wraps a {@link Version} and provides operations specific to game engine versions.
| [GameEngineVersion->[isCompatibleWithEngineVersion->[checkNotNull,withPoint,equals],isCompatibleWithMapMinimumEngineVersion->[checkNotNull,withPoint,isGreaterThanOrEqualTo],of->[checkNotNull,GameEngineVersion]]] | Package private for testing purposes. | Why does this class even exist? It looks like it should get merged into Version. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.