patch
stringlengths
18
160k
callgraph
stringlengths
4
179k
summary
stringlengths
4
947
msg
stringlengths
6
3.42k
@@ -113,7 +113,8 @@ def main(): img_retrieval = ImageRetrieval(args.model, args.device, args.gallery, INPUT_SIZE, args.cpu_extension) - frames = RoiDetectorOnVideo(args.i) + cap = open_images_capture(args.i, False) + frames = RoiDetectorOnVideo(cap) compute_emb...
[main->[compute_metrics,build_argparser,time_elapsed],main]
Main function of the roi - detect command. Computes metrics for a sequence of tokens.
The demo is supposed to be run on sequences of changing frames. It would be nice to report an error if `ImreadWrapper` triggered. The same is for whiteboard_inpainting_demo.
@@ -121,6 +121,17 @@ namespace System.Net.Quic.Implementations.MsQuic.Internal CredentialConfig config = default; config.Flags = flags; // TODO: consider using LOAD_ASYNCHRONOUS with a callback. + if (certificateContext != null) + { + ...
[SafeMsQuicConfigurationHandle->[ReleaseHandle->[ConfigurationCloseDelegate],Zero]]
Creates a new SafeMsQuicConfigurationHandle with the given options. Load a credential configuration that can be used to sign and sign a certificate. ConfigurationLoadCredentialDelegate - delegate to ConfigurationLoadCredential.
Is it valid for `certificate` to be reassigned here? if not, can we have some checks (maybe just asserts) to verify it was null?
@@ -147,8 +147,13 @@ class LayerHelper(LayerHelperBase): if 'use_cudnn' in self.kwargs and self.kwargs.get('use_cudnn'): act['use_cudnn'] = self.kwargs.get('use_cudnn') - if 'use_mkldnn' in self.kwargs: - act['use_mkldnn'] = self.kwargs.get('use_mkldnn') + + # priority o...
[LayerHelper->[append_bias_op->[append_op],input_dtype->[multiple_input],iter_inputs_and_params->[multiple_input,multiple_param_attr],input->[multiple_input],append_activation->[append_op]]]
Append an activation to the network.
Maybe it is better to implement this functionality in C++ side. There are 2 reasons, 1. `FLAGS_use_mkldnn ` is a GFLAG, which is declared and used in c++. 2. There may be other way to add an activation op, for example, `_append_activation_in_dygraph`.
@@ -112,7 +112,7 @@ def check_cpu_usage(first_proc, last_proc): cpu_usage = cpu_time / dt * 100. if cpu_usage > max(normal_cpu_usage * 1.15, normal_cpu_usage + 5.0): # cpu usage is high while playing sounds - if proc_name == "./_soundd" and cpu_usage < 25.: + if proc_name == "./_sou...
[TestOnroad->[test_cpu_usage->[check_cpu_usage]],check_cpu_usage->[cputime_total]]
Check if the user has a missing centric chunk in the system.
want to look into this weird CPU usage? maybe it has to do with the audio backend since this doesn't seem to happen on c3? c2 uses the opensl es backend
@@ -1393,8 +1393,7 @@ public class TripleAFrame extends MainGameFrame { } public static int save(final String filename, final GameData m_data) { - try (FileOutputStream fos = new FileOutputStream(filename); - ObjectOutputStream oos = new ObjectOutputStream(fos);) { + try (FileOutputStream fos = new...
[TripleAFrame->[waitForPlace->[waitForPlace],setShowChatTime->[setShowChatTime],getInGameLobbyWatcher->[getInGameLobbyWatcher,getGame],shutdown->[stopGame],waitForEndTurn->[waitForEndTurn],updateStep->[updateStep],getTechRolls->[requestWindowFocus],getBattlePanel->[getBattlePanel],setStatusWarningMessage->[setStatus],a...
Save GameData to a file.
Java7 has trouble closing these in the right order. Please write this as two different try-with-resources blocks (eg: two nest try-autoclose blocks)
@@ -819,7 +819,7 @@ d_backoff_seq_next(struct d_backoff_seq *seq) } /* Return a random backoff in [0, next]. */ - return (next * ((double)rand() / RAND_MAX)); + return (next * ((double)D_RAND() / RAND_MAX)); } double
[d_rank_list_realloc->[d_rank_list_alloc],d_rank_list_append->[d_rank_list_realloc],d_rank_list_identical->[d_rank_list_sort],uint32_array_to_rank_list->[d_rank_list_alloc],d_rank_list_copy->[d_rank_list_realloc],d_rank_list_del->[d_rank_list_realloc,d_rank_list_find],d_rank_list_dup_sort_uniq->[d_rank_list_dup]]
This function is used to return a random backoff value in the sequence next.
RAND_MAX is only relevant to rand(3) and random(3); with an lrand48_r-based implementation, here we should use a D_RAND_MAX, defined to be 2^31 (i.e., 0x80000000), no? (TBH, I struggle to understand how 2^31 works for 32-bit platforms---the lrand48 manual could use some clarification.)
@@ -44,6 +44,7 @@ module Verify redirect_to verify_session_dupe_path else show_warning if step.form_valid_but_vendor_validation_failed? + @view_model = SessionsNew.new render :new end end
[SessionsController->[step->[new],idv_profile_form->[new]]]
Checks if a new node id is found and if so redirects to the confirmation page if it.
Is this necessary if this is already defined in the `new` method?
@@ -1143,7 +1143,8 @@ class RawBTi(_BaseRaw): data = _read_data(bti_info) assert len(data) == len(info['ch_names']) self._projector_hashes = [None] - super(RawBTi, self).__init__(info, data, verbose=verbose) + super(RawBTi, self).__init__( + info, data, filenames=[pdf...
[_read_config->[dev_header,_correct_offset],_read_bti_header->[_read_config,_read_pfid_ed,_read_channel,_read_process,_read_assoc_file,_read_epoch,_read_event,_correct_offset],RawBTi->[__init__->[_rename_channels,_convert_dev_head_t,_read_bti_header,_setup_head_shape,_convert_coil_trans,_read_data]],_setup_head_shape->...
Initialize Neuromag object from a 4 - D PDF file. Get the best in the bti_info. Figure out the coil type and coordinates of a given node. Reads the national coil and national channel digitization points from Neuromag Add missing components to the C - code.
And what if you need to pass config and hs_file?
@@ -3,7 +3,7 @@ define([ '../Core/Cartesian3', '../Core/Cartographic', '../Core/Check', - '../Core/ClippingPlaneCollection', + '../Scene/ClippingPlaneCollection', '../Core/defaultValue', '../Core/defined', '../Core/defineProperties',
[No CFG could be retrieved]
Define functions for all the possible JS objects. Constructs a Cesium3DTileset from a sequence of objects.
Now that `ClippingPlaneCollection` is in a different folder make sure it's ordered in the correct location in this list as well. Fix throughout.
@@ -194,9 +194,11 @@ class UrlPatch(Patch): fetcher = fs.URLFetchStrategy(self.url, fetch_digest) mirror = os.path.join( os.path.dirname(stage.mirror_path), + 'mirror-stage', os.path.basename(self.url)) - self.stage = spack.stage.Stage(fetcher, mirror_path...
[PatchCache->[from_json->[PatchCache],patch_for_package->[from_dict],_index_patches->[to_dict],update->[update]],from_dict->[FilePatch,UrlPatch],UrlPatch->[fetch->[fetch]],Patch->[apply->[apply_patch]]]
Retrieve the patch in a temporary stage and compute self. path .
I don't fully understand why this is necessary -- can you explain it more?
@@ -235,10 +235,9 @@ func resourceAwsRoute53Record() *schema.Resource { }, "allow_overwrite": { - Type: schema.TypeBool, - Optional: true, - Computed: true, - Deprecated: "The next major version of the Terraform AWS Provider will require importing existing records", + Type: schema...
[StringLenBetween,LastIndex,GetChange,IsNewResource,StringInSlice,ListResourceRecordSetsPages,Set,Code,Unquote,Int64Value,MatchString,ChangeResourceRecordSets,GetOk,New,HasChange,GetHostedZone,Errorf,SetId,MustCompile,Bool,HasSuffix,SplitN,Join,ToLower,ToUpper,Id,Int64,Get,Printf,EqualFold,StringValue,TrimSuffix,Sprint...
Schema for a route53 record. Check if a record is in the Route53 zone.
Where there any tests removed when the attribute was deprecated that should be restored?
@@ -1442,3 +1442,12 @@ class GradientDescentTrainer(Trainer): num_gradient_accumulation_steps=num_gradient_accumulation_steps, use_amp=use_amp, ) + + +DEFAULT_CALLBACKS = ( + Lazy(SanityChecksCallback), + Lazy(ConsoleLoggerCallback), +) +""" +The default callbacks used by `Gradi...
[ConsoleLoggerCallback->[_log_fields->[_log_fields],on_epoch->[_get_train_and_validation_metrics]],GradientDescentTrainer->[from_partial_objects->[SanityCheckCallback],train->[on_start,on_end],_try_train->[_validation_loss,_train_epoch,on_epoch],_validation_loss->[on_batch,batch_outputs],_train_epoch->[rescale_gradient...
Construct a new Trainer from a sequence of partial objects. Construct a cuda - related object. Create a new object containing all of the properties of a single node.
@AkshitaB, I think I mentioned this idea to you in our 1-1 two weeks ago? Instead of using flags to disable certain default callbacks (like `run_sanity_checks: bool`), we could just specify the default callbacks like this. Let me know what you think. I'm not 100% sure this is better.
@@ -32,7 +32,8 @@ class Trainer: cuda_device: int = -1, grad_norm: Optional[float] = None, grad_clipping: Optional[float] = None, - log_one_line_per_batch: bool = False) -> None: + log_one_line_per_batch: bool = False, + ...
[Trainer->[train->[train],from_params->[Trainer]]]
Initialize a new object with the given parameters. Parameters for training a single node.
Can we handle this just by saying in the `validation_metric` docs that prepending a `-` means it decreases? The rest of the logic stays the same, you just do a tiny bit of processing in `__init__` to handle this.
@@ -74,7 +74,7 @@ def pick_plugin(config, default, plugins, question, ifaces): if len(prepared) > 1: logger.debug("Multiple candidate plugins: %s", prepared) - plugin_ep = choose_plugin(prepared.values(), question) + plugin_ep = choose_plugin(prepared.values()[::-1], question) if ...
[pick_authenticator->[pick_plugin],pick_configurator->[pick_plugin],pick_installer->[pick_plugin],pick_plugin->[choose_plugin]]
Pick a plugin from the list of plugins.
Wait, what? :O Why do you want plugins to be reversed alphabetical order? BTW, `prepared.values()` returns stuff in random order, so this makes it reverse random order. Also, if we really really really want to do reverse alphabetical order (which doesn't make any sense to me), unit tests are missing.
@@ -672,13 +672,13 @@ public interface ActiveMQServer extends ServiceComponent { SecurityAuth session, boolean checkConsumerCount, boolean removeConsumers, - boolean autoDeleteAddress) throws Exception; + boolean f...
[locateQueue->[locateQueue],bindingQuery->[bindingQuery]]
Destroy a queue.
Could use some doc here too to explain what it does.
@@ -183,6 +183,16 @@ func prepareUserInfo(ctx *context.Context) *models.User { } ctx.Data["Sources"] = sources + ctx.Data["TwoFactorEnabled"] = true + _, err = models.GetTwoFactorByUID(u.ID) + if err != nil { + if !models.IsErrTwoFactorNotEnrolled(err) { + ctx.InternalServerError(err) + return nil + } + ct...
[Context,LoginType,CreateUser,IsErrNameCharsNotAllowed,BuildComplexityError,GetUserByID,Redirect,IsErrEmailInvalid,IsErrUserHasOrgs,GetLoginSourceByID,RenderWithErr,HTML,Error,IsErrUserAlreadyExist,Sprint,UpdateUser,HashPassword,IsComplexEnough,IsErrNameReserved,ParseInt,IsErrEmailAlreadyUsed,HasError,Trace,IsLocal,Del...
CreateUser creates a new user and returns it AdminEditUser renders the user edit page with the given form.
~log the error is better so that we know what happened.~
@@ -69,6 +69,12 @@ def build_argparser(): help='Optional. The first image size used for CTPN model reshaping. ' 'Default: 600 600. Note that submitted images should have the same resolution, ' 'otherwis...
[ColorPalette->[min_distance->[dist]],main->[build_argparser,get_model,ColorPalette,print_raw_results,draw_detections],main]
Build the argument parser for the command line. Adds command line options for a specific . Option group for parsing command line options.
You should report an error if they are set for anything else.
@@ -129,6 +129,7 @@ func (s *supervisor) NeedUpdate() bool { // serviceGroup struct is the representation of the service_group table inside the db type serviceGroup struct { ID int32 `db:"id"` + HashId string `db:"hash_id"` Name string `db:"name"` NameSuffix string `db:"na...
[initDB->[Migrate,Wrapf,AddTableWithName,NewLogrusStandardLogger,SetKeys],ping->[Ping],connect->[ping,Wrapf,Open],initDB,WithFields,connect,Debug]
NeedUpdate returns true if the supervisor needs to update or not.
this is leftover from something else, but should look at if I can blow away any of these struct types
@@ -170,6 +170,7 @@ void WbHinge2Joint::setPosition(double position, int index) { WbMotor *const m2 = motor2(); if (m2) m2->setTargetPosition(position); + return; } bool WbHinge2Joint::resetJointPositions() {
[No CFG could be retrieved]
region Private methods missing header for the HingeJointSetHinge2Axis1 and HingeJointSet.
This `return` at the end of the method is useless
@@ -19,6 +19,7 @@ namespace System.Runtime.InteropServices _innerEventInfo = type.GetEvent(eventName)!; } + [SupportedOSPlatform("windows")] #pragma warning disable CS8765 // Nullability of parameters 'target' and 'handler' don't match overridden member public override void AddE...
[ComAwareEventInfo->[GetOtherMethods->[GetOtherMethods],RemoveEventHandler->[RemoveEventHandler],IsDefined->[IsDefined],AddEventHandler->[AddEventHandler],GetRemoveMethod->[GetRemoveMethod],GetCustomAttributes->[GetCustomAttributes],GetCustomAttributesData->[GetCustomAttributesData],GetAddMethod->[GetAddMethod],GetData...
Add an event handler to the target object.
It seems like the whole `ComAwareEventInfo` class should be marked as Windows-specific. In general, nothing "COM" specific will work outside of Windows.
@@ -249,7 +249,8 @@ class Jetpack_Geo_Location { * Add the georss namespace during RSS generation. */ public function rss_namespace() { - echo PHP_EOL . 'xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"' . PHP_EOL; + echo PHP_EOL . "\t" . 'xmlns:georss="http://w...
[Jetpack_Geo_Location->[get_meta_values->[sanitize_public,sanitize_coordinate]]]
Get the rss namespace.
Split apart for readability.
@@ -124,14 +124,8 @@ public class NonTxPrimaryOwnerBecomingNonOwnerTest extends MultipleCacheManagers checkPoint.trigger("allow_topology_" + duringJoinTopologyId + "_on_" + address(2)); // Wait for the write CH to contain the joiner everywhere - eventually(new Condition() { - @Override - ...
[NonTxPrimaryOwnerBecomingNonOwnerTest->[doTest->[getConfigurationBuilder]]]
Test if the write operation is satisfied. This method is called when a node is joining and the cache is able to proceed on a This method checks that the write operation is done and that the value on all the nodes in.
Could be replaced with 3 `eventuallyEquals(3, () -> cacheX.getRpcManager().getMembers().size())` calls.
@@ -45,10 +45,18 @@ import io.confluent.ksql.rest.entity.KsqlEntity; import io.confluent.ksql.rest.entity.KsqlErrorMessage; import io.confluent.ksql.rest.entity.KsqlHostInfoEntity; import io.confluent.ksql.rest.entity.StreamedRow; +import static io.confluent.ksql.rest.entity.StreamedRowMatchers.matchersRowsAnyOrder;...
[PullQueryRoutingFunctionalTest->[ClusterFormation->[toString->[toString]]]]
Imports the methods defined in the junit test suite. Imports all the classes that implement Ksql.
side note: it seems like your import ordering configuration needs to be updated so you don't just scramble the imports when you edit files. Not a big deal, but it makes the diff a little harder to read.
@@ -294,6 +294,12 @@ func (mod *modContext) genAwaitableType(w io.Writer, obj *schema.ObjectType) str fmt.Fprintf(w, " if %s and not isinstance(%s, %s):\n", pname, pname, ptype) fmt.Fprintf(w, " raise TypeError(\"Expected argument '%s' to be a %s\")\n", pname, ptype) + if prop.DeprecationMess...
[gen->[genHeader,add],genResource->[genHeader,has,add],genFunction->[genHeader,genAwaitableType],genPropertyConversionTables->[genHeader],genInit->[genHeader],genNestedStructureBullets->[genNestedStructureBullets],genConfig->[genHeader],genHeader,genPropertyConversionTables,add,gen]
genAwaitableType generates a class definition that can be used to create awaitable objects. returning a new object.
Curious - what is the UX of each of these? And specifically, why do we need both?
@@ -368,6 +368,15 @@ pool_prop_write(struct rdb_tx *tx, const rdb_path_t *kvs, daos_prop_t *prop) entry = &prop->dpp_entries[i]; switch (entry->dpe_type) { case DAOS_PROP_PO_LABEL: + if (entry->dpe_str == NULL || + strlen(entry->dpe_str) == 0) { + entry = daos_prop_entry_get(&pool_prop_default, + ...
[No CFG could be retrieved]
Writes a property to the DAOS system. region prop getter and setter.
is D_ASSERT() more appropriate given pool_prop_default should always have a label property?
@@ -376,8 +376,17 @@ define([ if (updater.fillEnabled) { if (updater.onTerrain) { + var zIndex = updater.zIndex; + var batchArray = this._groundColorBatches[zIndex]; + if (!defined(batchArray)) { + batchArray = createGroundColorBatc...
[No CFG could be retrieved]
Adds an object to the list of objects that have been added and removed. Adds a callback to the object that is used to update the color or material of an object.
Right now I create a three `new StaticGroundGeometryColorBatch` (one for each classification type) and one `new PrimitiveCollection()` for each zIndex. And I never remove them (the PrimitiveCollections get removed and destroyed on `GeometryVisualizer.destroy`) Do you think this is a problem? I didn't think it would be ...
@@ -120,6 +120,12 @@ namespace System [MethodImpl(MethodImplOptions.InternalCall)] internal static extern ulong GetGenerationSize(int gen); + [MethodImpl(MethodImplOptions.InternalCall)] + internal static extern ulong GetGenerationTimeBetweenGC(int gen); + + [MethodImpl(MethodIm...
[GC->[WaitForPendingFinalizers->[_WaitForPendingFinalizers],CancelFullGCNotification->[_CancelFullGCNotification],TryStartNoGCRegion->[StartNoGCRegionWorker],EndNoGCRegion->[_EndNoGCRegion],InvokeMemoryLoadChangeNotifications->[GetMemoryLoad],GetTotalMemory->[WaitForPendingFinalizers,Collect,GetTotalMemory],GCNotificat...
Returns the number of bytes allocated for a given generation.
If this information is important for telemetry, should we consider putting it on GCMemoryInfo? cc: @maoni
@@ -63,9 +63,8 @@ feature 'Password Recovery' do # Then I can set my password context 'user with only email confirmation resets password', email: true do before do - sign_up_with('email@example.com') - open_last_email - click_email_link_matching(/confirmation_token/) + User.create!(emai...
[reset_password_and_sign_back_in->[fill_in,click_button],visit,email,minute,create,have_title,feature,reset_password_sent_at,it,support_url,travel,to,have_content,return,before,click_button,reset_password_within,click_link,scenario,with,t,require,click_email_link_matching,include,generate,update,now,each,fill_in,contex...
includes a localized notice to reset the password in the email - - - - - - - - - - - - - - - - - -.
factory or faker for valid email addresses?
@@ -17,8 +17,9 @@ var ( Long: containerExistsDescription, Example: `podman container exists containerID podman container exists myctr || podman run --name myctr [etc...]`, - RunE: exists, - Args: cobra.ExactArgs(1), + RunE: exists, + Args: cobra.ExactArgs(1), + DisableFl...
[Background,ExactArgs,SetExitCode,ContainerExists,ContainerEngine]
ContainerContainerExistsimports imports the container - related functions into the container - related packages.
I think this should be automatically set in main.go
@@ -1402,7 +1402,7 @@ abstract class CI_DB_query_builder extends CI_DB_driver { $this->qb_orderby = NULL; } - $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby)) + $result = ($this->qb_distinct === TRUE OR ! empty($this->qb_groupby) OR in_array('groupby', $this->qb_cache_exists)) ? $thi...
[CI_DB_query_builder->[not_group_start->[group_start],get->[from,limit],_reset_select->[_reset_run],_merge_cache->[_track_aliases],having->[_wh],update->[where,set,limit],get_compiled_select->[from],_compile_select->[_limit,_from_tables],replace->[set],or_group_start->[group_start],_reset_write->[_reset_run],or_having-...
Count all results in a table.
Maybe better using `! empty($this->qb_cache_groupby)`
@@ -114,7 +114,7 @@ def action_sequence_to_sql(action_sequences: List[str]) -> str: if nonterminal == 'statement': query.extend(right_hand_side_tokens) else: - for query_index, token in reversed(list(enumerate(query))): + for query_index, token in list(enumerate(quer...
[initialize_valid_actions->[_unicode_members,format_action,sorted,defaultdict,repr,isinstance,join,set,items,valid_actions],format_action->[join,lstrip,upper,split],format_grammar_string->[items,join],action_sequence_to_sql->[list,split,extend,reversed,strip,join,enumerate,right_hand_side],SqlVisitor->[generic_visit->[...
Convert an action sequence like statement - > query ;. to a SQL string.
We don't need this reversed here now because we traverse them in the reversed order when we generate the action sequence, is that right?
@@ -1,7 +1,6 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information - namespace Dnn.Modules.ResourceManager.Components.Common { using System;
[Utils->[GetEnumDescription->[GetField,Description,GetCustomAttributes,ToString,Length],GetFolderGroupId->[GroupFolderPathStart,TryParse,GetFolder,IndexOf,Substring,StartsWith,DisplayPath,Length]]]
Gets a human friendly description of an enum value. folderGroupId - 1 if folderGroupId is not set.
Shouldn't this be `DotNetNuke.Modules.ResourceManager.*` for the namespace instead of `Dnn.Modules.ResourceManager.*`. I see this throughout the new module and to the best of my knowledge we agreed we are to use `DotNetNuke.*`
@@ -131,6 +131,12 @@ func (m *Manager) IsUserVisibleModule(mod string) bool { return false } +// IsModuleRegistered returns true if given module was registered +func (m *Manager) IsModuleRegistered(mod string) bool { + _, ok := m.modules[mod] + return ok +} + // listDeps recursively gets a list of dependencies fo...
[listDeps->[listDeps],DependenciesForModule->[listDeps],orderedDeps->[listDeps]]
IsUserVisibleModule returns true if the module is a user visible module false otherwise.
Let's not introduce new public methods to manager, that are not needed externally.
@@ -54,4 +54,13 @@ public class GameDescription implements Serializable { return hostName.startsWith(HeadlessGameServer.BOT_GAME_HOST_NAME_PREFIX) && HeadlessGameServer.BOT_GAME_HOST_COMMENT.equals(comment); } + + public String getFormattedBotStartTime() { + return startDateTime == null + ? ...
[GameDescription->[isBot->[startsWith,equals]]]
Check if this is a bot game.
This is moved from lobby game table model class, the 'null' check is added.
@@ -198,9 +198,7 @@ public class ApacheHttpClientInstrumentationModule extends InstrumentationModule scope = context.makeCurrent(); // Wrap the handler so we capture the status code - if (handler instanceof ResponseHandler) { - handler = new WrappingStatusSettingResponseHandler(context, (Res...
[ApacheHttpClientInstrumentationModule->[UriRequestAdvice->[methodEnter->[currentContext,makeCurrent,startSpan,shouldStartSpan],methodExit->[doMethodExit,close]],RequestWithHandlerAdvice->[methodEnter->[shouldStartSpan,WrappingStatusSettingResponseHandler,currentContext,startSpan,makeCurrent],methodExit->[doMethodExit,...
Method entry point for HTTP method.
It might be better to check `handler` for `null` before wrapping to ensure that in case of `null` handler execute would fail when it checks args passed to the method instead of failing with `NullPointerException` in `WrappingStatusSettingResponseHandler.handleResponse`
@@ -67,4 +67,5 @@ class TestSoftmaxWithCrossEntropyOp2(OpTest): if __name__ == "__main__": + exit(0) # FIXME: xe has bug unittest.main()
[TestSoftmaxWithCrossEntropyOp->[test_check_output->[check_output],test_check_grad->[check_grad],setUp->[apply_along_axis,randint,asmatrix,uniform,log,range]],TestSoftmaxWithCrossEntropyOp2->[test_check_output->[check_output],test_check_grad->[check_grad],setUp->[,uniform,apply_along_axis,sum]],main]
The main function of the unit test.
Can we file an issue on this?
@@ -25,6 +25,12 @@ class TestOptions(GoalSubsystem): """Runs tests.""" name = "test" + @classmethod + def register_options(cls, register) -> None: + super().register_options(register) + register('--debug', type=bool, fingerprint=True, default=False, + help='Run a single test target in an int...
[coordinator_of_tests->[is_testable,AddressAndTestResult],fast_test->[Test]]
Tests a single non - test target. Test for a given list of addresses.
You can drop `fingerprint=True`. `fingerprint` is irrelevant in a V2 world; we only need it when the subsystem may be used by V1 code.
@@ -65,6 +65,8 @@ namespace Microsoft.Extensions.Logging.Generators private void GenType(LoggerClass lc) { + int indentationSize = 0; + string nestedIndentation = ""; if (!string.IsNullOrWhiteSpace(lc.Namespace)) { ...
[LoggerMessageGenerator->[Emitter->[GenType->[UseLoggerMessageDefine],GenLogMethod->[GenParameters,GenHolder,GenCallbackArguments,UseLoggerMessageDefine,GenDefineTypes]]]]
GenType generates the type of a missing type.
Why do we need to keep track of both `int indentationSize` and `string nestedIndentation`? Couldn't we make due with just the string, and append / trim 4 spaces as necessary?
@@ -172,7 +172,7 @@ public class DubboBootstrap extends GenericEventListener { private AtomicBoolean started = new AtomicBoolean(false); - private AtomicBoolean ready = new AtomicBoolean(true); + private AtomicBoolean ready = new AtomicBoolean(false); private AtomicBoolean destroyed = new AtomicBo...
[DubboBootstrap->[await->[await],clearConfigs->[destroy],destroy->[unexportServices,unreferServices,unexportMetadataService,unregisterServiceInstance],service->[service],shutdown->[shutdown],getMetadataType->[getMetadataType],protocol->[protocol],start->[start,initialize,isOnlyRegisterProvider],unreferServices->[getCac...
Creates a new instance of DubboBootstrap.
We should adapt the way users use API to start ( such as directly refer with `ReferenceConfig` and this may cause dubbo-qos always return not ready state)
@@ -147,8 +147,15 @@ adc1_channel_t get_channel(int pin) { void HAL_adc_init() { // Configure ADC adc1_config_width(ADC_WIDTH_12Bit); - adc1_config_channel_atten(get_channel(36), ADC_ATTEN_11db); adc1_config_channel_atten(get_channel(39), ADC_ATTEN_11db); + adc1_config_channel_atten(get_channel(36), ADC_ATT...
[HAL_adc_init->[get_channel],HAL_adc_start_conversion->[get_channel]]
HAL ADC initialization.
There still might be some utility in enabling ADC2 channels, but I think we're good with 6 channels of ADC1 for now.
@@ -201,7 +201,7 @@ func (db *Postgres) insertNewServiceFromHealthCheckEvent( } // 4) Service - svc := newService(pkgIdent, health, did, sid, gid) + svc := newService(pkgIdent, health, did, sid, gid, svcMetadata.GetPackageIdent()) if svcMetadata.GetUpdateConfig() != nil { svc.Channel = svcMetadata.Upda...
[getDeploymentID->[SelectOne],insertNewServiceFromHealthCheckEvent->[getSupervisorID,GetChannel,GetFqdn,Transaction,getDeploymentID,GetApplication,GetServiceGroup,GetUpdateConfig,Insert,Wrap,GetEnvironment,GetSite,GetSupervisorId,getServiceGroupID],IngestHealthCheckEventWithoutMetrics->[GetPackageIdent,GetChannel,Debug...
insertNewServiceFromHealthCheckEvent inserts a new service from a health check event. This function is used to insert a service into the database.
You already have the package ident here, it is the first argument in this function.
@@ -57,5 +57,12 @@ class Mesa(AutotoolsPackage): depends_on('presentproto@1.0:', type='build') depends_on('pkg-config@0.9.0:', type='build') + + def configure_args(self): + #make('autoreconf -fi') + return ['--enable-osmesa', '--disable-dri', '--disable-egl', + '--enable-xlib...
[Mesa->[depends_on,version]]
requires that the system package manager to be installed.
you can remove it if it's not needed. Probably same for the old version above.
@@ -413,10 +413,17 @@ func buildCreate(ctx context.Context, d *data.Data, finder *find.Finder, vch *mo c.Proxies = fromImageFetchProxy(vch.Registry.ImageFetchProxy) _, _, err := c.Proxies.ProcessProxies() if err != nil { - return nil, util.NewError(400, fmt.Sprintf("Error processing proxies: %s", err...
[Handle->[Context,StatusCode,Error,NewPostTargetTargetVchDefault,Close,NewPostTargetTargetDatacenterDatacenterVchDefault,WithPayload,NewPostTargetTargetDatacenterDatacenterVchCreated,NewPostTargetTargetVchCreated],NewDispatcher,StringSlice,CheckImagesFiles,Ceil,SharesLevel,ProcessNetwork,ProcessCertificates,NewTextForm...
handleCreate creates a new vch object. fromIPRanges returns a list of strings that represent the IP address of the network that the.
Why can't you write a simple unit test to verify these new code paths?
@@ -13,11 +13,13 @@ class SiteConfig < RailsSettings::Base # site content field :community_description, type: :string, default: "A constructive and inclusive social network. Open source and radically transparent." + field :community_member_description, type: :string, default: "amazing humans who code." + fiel...
[SiteConfig->[auth_allowed?->[include?],cache_prefix,field,table_name]]
Site configuration based on Rails settings. description of the logo.
I'll remove the other defaults in a separate PR. I don't want to clutter this PR.
@@ -57,6 +57,12 @@ func blobRange(offset, size uint64) *storage.BlobRange { } else if size == 0 { return &storage.BlobRange{Start: offset} } + // TODO: This doesn't handle a read with offset: 0, size: 1 correctly - it + // will end up with Start: 0, End: 0, which the client library interprets as + // the full ra...
[IsNotExist->[As],Write->[Write,AddSpanToAnyExisting,FinishAnySpan],Exists->[GetBlobReference,TagAnySpan,Exists],Close->[AddSpanToAnyExisting,FinishAnySpan,PutBlockList,Close,Wait],Reader->[GetBlobReference,Get,GetRange],Delete->[GetBlobReference,DeleteIfExists],writeBlock->[Release,PutBlock,AddSpanToAnyExisting,Finish...
Delete deletes a blob from the container.
Yet another tragic story of a programmer lost to the darkness of not using right-open intervals. Though our work will never be done, we must continue to spread the light of right-open, that we may save as many as possible from this fate.
@@ -1509,6 +1509,17 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { }); } + // support (event), (^event), on-event, and onbubble-event bindings + if (isEventAttr = EVENT_DIRECTIVE_REGEXP.test(ngAttrName)) { + name = name.replace(EVENT_DI...
[No CFG could be retrieved]
private methods - > check if uri has a valid descriptor and add it if it has.
`on-event` (maybe `onbubble-event` too but seems less likely) potentially breaks existing apps (which might use this for a `&` isolate scope/controller binding property, for example). Do we want to do that?
@@ -11,8 +11,6 @@ import ( /* This file is generated automatically by go generate. Do not edit. - -Created 2020-12-18 15:58:20.661450253 -0600 CST m=+0.000135779 */ // Changed
[Changed->[IsNil,FieldByName,ValueOf,Indirect],ToParams->[Value,ValueOf,Slice,Set,Add,Field,FormatBool,Int,New,Errorf,Len,Type,Bool,Key,TypeOf,Next,FormatUint,MapRange,MarshalToString,Changed,FormatInt,Kind,Elem,Uint,String,Interface,NumField]]
Changed returns true if the field with the given name has been changed.
why did you remove this?
@@ -573,6 +573,14 @@ if ($resql) $moreforfilter .= $formother->select_categories('customer', $search_categ_cus, 'search_categ_cus', 1); $moreforfilter .= '</div>'; } + if (!empty($conf->expedition->enabled)){ + require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php'; + $formproduct = new F...
[fetch,selectMassAction,select_country,fetch_object,jdate,load_stats_commande_fournisseur,select_all_categories,order,getDocumentsLink,selectyesno,getLinesArray,select_salesrepresentatives,getNomUrl,getLoginUrl,select_dolusers,load_stats_commande,showDelay,initHooks,typent_array,idate,load,plimit,executeHooks,loadLangs...
This function returns a list of all prospects. This function is used to generate the HTML for a tag list.
When did this variable $search_warehouse is used ?
@@ -307,6 +307,7 @@ class Command(object): args = parser.parse_args(*args) cwd = get_cwd() + cwd = get_cwd() info = None try:
[Command->[upload->[upload],copy->[copy],package->[package],test->[test],export->[export],info->[info],_show_help->[check_all_commands_listed],install->[install],download->[download],run->[_commands,_show_help],create->[create],source->[source],remove->[remove,info],new->[new],build->[build],export_pkg->[export_pkg],im...
Installs the requirements specified in a recipe or a file of a conan file. Installs or updates a single missing key sequence.
for sure, this is not needed twice
@@ -198,6 +198,17 @@ func (r *Registrar) Stop() { r.wg.Wait() } +func (r *Registrar) flushRegistry() { + if err := r.writeRegistry(); err != nil { + logp.Err("Writing of registry returned error: %v. Continuing...", err) + } + + if r.out != nil { + r.out.Published(r.bufferedStateUpdates) + } + r.bufferedStateUpda...
[Start->[loadStates],writeRegistry->[GetStates],GetStates->[GetStates]]
Stop is used to stop the registar and write the current state to a file.
Should we add a check here that `if bufferedStateUpdates==0` it just returns? Like this flushTimeout could be set very low and still not have frequent writes in case there are no updates.
@@ -18,6 +18,17 @@ func init() { requestDuration.Register() } +// errorCode converts an error into an HTTP status code, modified from weaveworks/common/instrument +func errorCode(err error) string { + if err == nil { + return "200" + } + if resp, ok := httpgrpc.HTTPResponseFromError(err); ok { + return strconv.I...
[Stop->[Stop],Get->[Get],WatchPrefix->[WatchPrefix],WatchKey->[WatchKey],CAS->[CAS]]
Get - gets a key from the cache.
This only works for errors from GRPC layer. I don't think etcd or consul use GRPC. Update: etcd v3 does!
@@ -69,7 +69,7 @@ if ($result) print "<td>".$langs->trans("Person")."</td>"; print "<td>".$langs->trans("Label")."</td>"; print '<td class="nowrap" align="left">'.$langs->trans("DatePayment").'</td>'; - print_liste_field_titre($langs->trans("Type"),$_SERVER["PHP_SELF"],"c.libelle","",$paramlist,"",$so...
[free,query,getNomUrl,trans,num_rows,fetch_object,jdate,close,load]
Get all payment salaries related to a user. Print all the neccesary payment header.
Doesn't this break search?
@@ -541,7 +541,7 @@ void ChatPrompt::nickCompletion(const std::list<std::string>& names, bool backwa } } } - std::wstring replacement = completions[replacement_index] + L" "; + std::wstring replacement = completions[replacement_index] + L""; if (word_end < m_line.size() && isspace(word_end)) ++word_end; ...
[historyPrev->[replace],scroll->[scroll],step->[deleteByAge,step],formatChatLine->[clear],historyNext->[replace],scrollPageDown->[getRows,scroll],getRecentChat->[getLineCount],deleteByAge->[deleteOldest],nickCompletion->[replace],scrollPageUp->[getRows,scroll],clear->[clear],addMessage->[addLine],ChatLine->[getLineCoun...
This method is called when a user is asked to enter a Nick completion. find a replacement string and a word that will be replaced.
you don't need the `L""` here, you can remove it.
@@ -11,13 +11,13 @@ module AutomatedTestsClientHelper end end - def process_test_file(assignment, params, files, form_file, is_script) + def process_test_file(assignment, params, files, form_file, is_group) # custom variables - if is_script - new_file_param = :new_script - model_class = ...
[create_test_repo->[short_identifier,mkdir_p,join,exist?],process_test_file->[short_identifier,nil?,empty?,exists?,original_filename,parse,to_sym,clone,raise,join,t,file_name,push],process_test_form->[nil?,enable_test,token_start_date,non_regenerating_tokens,tokens_per_period,test_scripts_attributes,test_support_files_...
Creates a test repo and creates a new test file with the specified options. Updates the file name of the n - tag with the n - tag value. If the.
Metrics/CyclomaticComplexity: Cyclomatic complexity for process_test_file is too high. [11/6]<br>Metrics/MethodLength: Method has too many lines. [49/20]<br>Metrics/PerceivedComplexity: Perceived complexity for process_test_file is too high. [14/7]
@@ -46,3 +46,13 @@ class Metric(Registrable): if vocab: params["vocabulary"] = vocab return cls.by_name(metric_type)(**params.as_dict()) # type: ignore + + @staticmethod + def unwrap_variables(*tensors): + """ + If you actually passed in Variables to a Metric instead ...
[Metric->[from_params->[by_name,as_dict,list_available,pop_choice]]]
Create a metric from a list of params.
Nit: should this be `unwrap_tensors` instead of `unwrap_variables`?
@@ -47,9 +47,7 @@ def to_variable(value, block=None): dtype=value.dtype) var = py_var._ivar.value() tensor = var.get_tensor() - tensor.set(value, core.CPUPlace()) + tensor.set(value, framework._current_expected_place()) return py_var elif isinstance(value, fram...
[guard->[guard,_imperative_guard,current_block,Tracer,program_guard,Program],enabled->[_in_imperative_mode],to_variable->[CPUPlace,value,type,default_main_program,set,isinstance,get_tensor,Variable,ValueError]]
Convert a value to a Variable object.
...why remove this...
@@ -68,6 +68,10 @@ public enum KafkaReportingFormats { switch (this) { case AVRO: KafkaAvroEventReporter.Builder<?> builder = KafkaAvroEventReporter.Factory.forContext(context); + if (properties.getProperty(PusherUtils.KAFKA_PUSHER_CLASS_NAME_KEY, + PusherUtils.DEFAULT_KAFKA_P...
[eventReporterBuilder->[KafkaAvroSchemaRegistry,IllegalArgumentException,getProperty,forContext,withSchemaRegistry,valueOf],metricReporterBuilder->[KafkaAvroSchemaRegistry,IllegalArgumentException,getProperty,newBuilder,withSchemaRegistry,valueOf]]
This method is used to create a builder for the KafkaEventReporter.
Why not KafkaAvroEventKeyValueReporter.Factory.forContext() to be consistent with KafkaAvroEventReporter?
@@ -79,12 +79,6 @@ def test_file_review_status_handles_invalid_status_id(): def test_create_a_code_manager_url(): - with override_settings(CODE_MANAGER_URL='http://code-manager'): - assert jinja_helpers.code_manager_url('/some/path') == ( - 'http://code-manager/en-US/some/path' - ) - - ...
[test_code_manager_url_expects_a_relative_path->[raises,code_manager_url],test_create_a_code_manager_url->[override_settings,code_manager_url],test_file_review_status_handles_invalid_status_id->[File,file_review_status],test_version_status->[File,Addon,Version,version_status],TestCompareLink->[test_same_platform->[crea...
Test that a code manager url is created.
Can we use named parameters?
@@ -1848,9 +1848,7 @@ export class AmpA4A extends AMP.BaseElement { preinstallCallback_(embedWin, ampdoc) { const parentAmpdoc = this.getAmpDoc(); installUrlReplacementsForEmbed( - // TODO(#22733): Cleanup `parentAmpdoc` once ampdoc-fie is launched. - ampdoc || parentAmpdoc, - embedWin, + ...
[AmpA4A->[whenWithinViewport->[whenWithinViewport]]]
This is called before the A4A source is installed.
Is this related to the rest of this PR?
@@ -400,7 +400,7 @@ class Stage(object): """Returns the well-known source directory path.""" return os.path.join(self.path, _source_path_subdir) - def fetch(self, mirror_only=False): + def fetch(self, mirror_only=False, manual_download=False): """Downloads an archive or checks out cod...
[get_stage_root->[_resolve_paths,_first_accessible_path],get_checksums_for_versions->[fetch,Stage],_first_accessible_path->[_create_stage_root],Stage->[check->[check],fetch->[generate_fetchers,fetch,print_errors],cache_mirror->[check,fetch],__init__->[get_stage_root]],StageComposite->[__exit__->[__exit__],__enter__->[_...
Returns the path of the source directory. Yields a object for the given path digest expand and extension.
As we are at it, can we improve this docstring?
@@ -8,6 +8,7 @@ import unittest import parlai.scripts.display_data as display_data import parlai.core.testing_utils as testing_utils +from parlai.core.logging_utils import logger MODEL_OPTIONS = {
[TestTransresnet->[setUpClass->[parse_args,capture_output,set_defaults,setup_args,display_data],test_transresnet->[eval_model,assertEqual,format]],main]
Test for Transresnet pre - trained model. Tests if the data in the test dictionary is the same as the data in the test dictionary.
yeah let's just get rid of all the extra unnecessay logger imports
@@ -133,7 +133,10 @@ def _make_sparse_stc(X, active_set, forward, tmin, tstep, n_points_so_far = this_n_points_so_far vertices.append(this_vertno) - stc = SourceEstimate(X, vertices=vertices, tmin=tmin, tstep=tstep) + if pick_ori == 'vector': + stc = VectorSourceEsti...
[tf_mixed_norm->[_make_sparse_stc,_reapply_source_weighting,_prepare_gain,_make_dipoles_sparse,_compute_residual,_window_evoked],mixed_norm->[_reapply_source_weighting,_prepare_gain,_make_sparse_stc,_compute_residual,_make_dipoles_sparse],_prepare_gain->[_prepare_weights]]
Make a sparse estimate of the missing components in a source.
@larsoner would you mind looking at how to factorize this code with the few lines are the end of `apply_inverse` functions. That would avoid bugs due our variety of source space types.
@@ -475,6 +475,18 @@ public class HadoopFormatIO { return withValueTranslation(function).toBuilder().setValueCoder(coder).build(); } + /** + * Determines if key-value clone should be skipped or not (default is 'false'). Hadoop formats + * typically work with Writable data structures which are m...
[HadoopFormatIO->[CommitJobFn->[cleanupJob->[getOutputCommitter,getJobId]],AssignTaskFn->[createTaskIDForKV->[getJobId],getPartitioner->[getPartitioner],getJobId->[getJobId],getReducersCount->[getReducersCount]],ConfigurationCoder->[encode->[write]],Write->[populateDisplayData->[populateDisplayData]],SerializableSplit-...
Creates a new read with the key and value coders combined.
Please, make it configurable separately for keys and values like we do with other configuration options.
@@ -3,6 +3,13 @@ require "rails_helper" RSpec.describe Search::Base, type: :service do let(:document_id) { 123 } + def recreate_tag_index + Search::Tag.delete_index if described_class.index_exists? + Search::Tag.create_index + Search::Tag.add_alias + Search::Tag.update_mappings + end + before do ...
[let,describe,current,stub_const,delete_document,eql,it,map,env,freeze,to,update_mappings,before,add_alias,delete_alias,find_document,with,require,to_i,dig,receive,refresh_index,each,index,clear_elasticsearch_data,delete_index,create_index,not_to,eq,bulk_index,raise_error,and_return]
This method is used to describe the individual components of the n - core object that are indexed sets the i_am_a_tag field.
By only recreating a single index for these tests instead of all of them using `elasticsearch_reset: true` this spec's runtime went from 20+ seconds to 8 seconds.
@@ -244,7 +244,7 @@ def on_blockchain_event(raiden, event, current_block_number): handle_tokennetwork_new(raiden, event, current_block_number) elif data['event'] == EVENT_CHANNEL_OPENED: - handle_channel_new(raiden, event, current_block_number) + handle_channel_new(raiden, event, current_b...
[on_blockchain_event->[handle_channel_new,handle_tokennetwork_new,handle_channel_closed,handle_channel_batch_unlock,handle_channel_settled,handle_channel_new_balance,handle_secret_revealed]]
Handle a blockchain event.
I believe this value should have been added to all state changes that are related to token networks and channels. Why is it only being used in `handle_channel_new`?
@@ -419,7 +419,7 @@ def get_installed_distributions(local_only=True, return True # because of pkg_resources vendoring, mypy cannot find stub in typeshed - return [d for d in pkg_resources.working_set # type: ignore + return [d for d in pkg_resources.WorkingSet(paths) # type: ignore ...
[get_installed_distributions->[editables_only_test->[dist_is_editable],editable_test->[dist_is_editable],user_test,editables_only_test,local_test,editable_test],captured_stdout->[captured_output],unzip_file->[ensure_dir,has_leading_dir,split_leading_dir,current_umask],redact_netloc->[split_auth_from_netloc],unpack_file...
Returns a list of installed Distribution objects.
This will introduce incompatibilities when `paths` is `None`. `working_set` (which is built with `WorkingSet._build_master()` performs some extra checks when `__main__.__requires__` is set (a Setuptools implementation detail).
@@ -529,8 +529,10 @@ func (c *ClusterUpConfig) startKubelet(out io.Writer, masterConfigDir, nodeConfi } else if currentUser, err := user.Current(); err == nil { var cfgPath string cfgPath = filepath.Join(currentUser.HomeDir, ".docker", "config.json") - container.ContainerBinds = append(container.ContainerBinds...
[RemoteDirFor->[Join],makeMasterConfig->[NewKubeAPIServerStartConfig,imageFormat,Sprintf,GetPublicHostName,MakeMasterConfig,Errorf,openshiftImage,GetDockerClient],makeKubeDNSConfig->[MakeKubeDNSConfig],StartSelfHosted->[NewDefaultClientConfig,BuildConfig,NewForConfig,LoadFromFile,Info,makeKubeletFlags,LocalDirFor,GetDo...
startKubelet starts a kubelet based on the given flags. add flags that are not specified in flags This function is used to start a kubelet container.
is this right? shouldnt it check `if _, err := os.Stat(path); err == nil {`
@@ -78,6 +78,9 @@ func WithRealEnv(cb func(*RealEnv) error, customConfig ...*serviceenv.PachdFullC realEnv.LocalStorageDirectory = path.Join(realEnv.Directory, "localStorage") config.StorageRoot = realEnv.LocalStorageDirectory + if err := os.Setenv("STORAGE_BACKEND", "LOCAL"); err != nil { + panic(err) + } ...
[NewBlockAPIServer,NewConfiguration,InitServiceEnv,Join,NewAPIServer,Endpoints,Port,NewCache,Close,Unsetenv,Setenv,Hostname,Parse,JoinHostPort,Initialize]
WithRealEnv creates a mock environment and forwards all API calls to the API server. Allocate a unique identifier.
It's better to return the error so the test process can do cleanup (i.e. in defer blocks), but communicating via env vars is pretty bad because it means we can't do tests in parallel if the environment variable ever has to change.
@@ -1367,7 +1367,7 @@ func TestPipelineState(t *testing.T) { return err } if pipelineInfo.State != pps.PipelineState_PIPELINE_RUNNING { - return fmt.Errorf("no running pipeline") + return fmt.Errorf("pipeline should be in standby, not: %s", pipelineInfo.State.String()) } return nil }, backoff.NewT...
[DurationProto,PrintDetailedCommitInfo,Message,NewForConfig,JoinHostPort,SubscribeCommit,RandString,CreateRepo,DeleteCommit,ListDatum,Stop,SetBranch,ReadFile,New,NewPipeline,VisitInput,NotNil,Watch,StartCommit,FormatLabelSelector,Apps,GetFile,DeletePipeline,PrintDetailedJobInfo,ResultChan,NoError,Fatalf,Split,DeleteAll...
TestPipelineState tests if a job is in the pipeline and if it is in the running TestPipelineJobCounts tests the number of jobs in the pipeline.
Is this supposed to be checking if the pipeline is in standby?
@@ -378,14 +378,12 @@ ds_mgmt_pool_extend(uuid_t pool_uuid, d_rank_list_t *svc_ranks, /* TODO: Need to make pool service aware of new rank UUIDs */ - ntargets = rank_list->rl_nr; - - rc = ds_pool_extend(pool_uuid, ntargets, tgt_uuids, rank_list, + ntargets = unique_add_ranks->rl_nr; + rc = ds_pool_extend(pool_uui...
[No CFG could be retrieved]
This function is called from the DF_UUID and DP_UUID to create the This function evicts a single pool handle from the DP.
"ntargets" is some redundant, we can use "unique_add_ranks->rl_nr" directly.
@@ -8,6 +8,8 @@ # # usage: check_header_helper.py dir1 [ dir2 [ ... ] ] +from __future__ import (absolute_import, division, generators, nested_scopes, print_function, + unicode_literals, with_statement) import os import re import sys
[check_dir->[check_header],main->[check_dir],main]
Checks if a given file or directory has a header and if it has a header and if Check that all files in dirs start with the given header.
Oh the irony of the "header check" script not using its own headers!
@@ -1362,7 +1362,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv } public boolean passCmdLine(final String vmName, final String cmdLine) throws InternalErrorException { - final Script command = new Script(_patchScriptPath, 30 * 1000, s_logger); + final Scr...
[LibvirtComputingResource->[getInterfaces->[getInterfaces],isSnapshotSupported->[executeBashScript],getNetworkStats->[networkUsage],getVifDriver->[getVifDriver],cleanupVMNetworks->[getAllVifDrivers],checkNetwork->[getVifDriver],cleanupNetworkElementCommand->[vifHotUnPlug,VifHotPlug,getBroadcastUriFromBridge],getVPCNetw...
Pass a command line to a VM.
Curious question - Is that a desired timeout value? Seems too high.
@@ -98,3 +98,9 @@ export default class WalletGradient { return gradient[0]; } } + +WalletGradient.createWallet = () => { + // eslint-disable-next-line react-hooks/rules-of-hooks + const { colors } = useTheme(); + return colors.lightButton; +};
[No CFG could be retrieved]
Get gradient of the gradient.
i think you could just have it as static method in class
@@ -224,7 +224,15 @@ func receiveEthLog(le RPCLogEvent) { } func runJob(le RPCLogEvent, data models.JSON, initr models.Initiator) { - input := models.RunResult{Data: data} + payment, err := le.ContractPayment() + if err != nil { + logger.Errorw(err.Error(), le.ForLogger()...) + return + } + input := models.RunRes...
[ToDebug->[ForLogger],ValidateRunLog->[ForLogger],Unsubscribe->[Unsubscribe]]
receiveRunLog receives a single log event and runs the job specific to this initiator log event ToDebug prints this event via logger. Debugw.
Do we want to `return` on the error scenario? I don't think you'll have a valid payment to continue processing, and like you've mentioned, we would want to default to not running in any scenario off the happy path.
@@ -130,4 +130,11 @@ public class MuleMessageToHttpResponseTestCase extends AbstractMuleTestCase } Assert.assertTrue("Missing "+HttpConstants.HEADER_CONTENT_TYPE+" header", hasContentTypeHeader); } + + private MuleMessageToHttpResponse getMuleMessageToHttpResponse() throws Exception + { + ...
[MuleMessageToHttpResponseTestCase->[testSetCookieOnOutbound->[getHeaders,Cookie,getName,equals,thenReturn,mock,HashSet,add,assertEquals,createResponse,MuleMessageToHttpResponse],testSetDateOnOutbound->[getValue,assertTrue,getHeaders,setLenient,getName,equals,parse,mock,replaceFirst,SimpleDateFormat,createResponse,Mule...
Test content type on outbound.
can;t you have this transformer as a field attribute initialized on @Before?
@@ -87,6 +87,9 @@ public class SnapshotDataFactoryImpl implements SnapshotDataFactory { @Override public SnapshotInfo getSnapshot(long snapshotId, DataStoreRole role) { SnapshotVO snapshot = snapshotDao.findById(snapshotId); + if (snapshot == null) { + return null; + } ...
[SnapshotDataFactoryImpl->[getReadySnapshotOnCache->[getSnapshot],listSnapshotOnCache->[getSnapshot]]]
Get the snapshot with the given id and role.
@DaanHoogland just check whether the 'null' returned here is being verified or not wherever this method is called, to avoid any NPE.
@@ -673,6 +673,11 @@ static void tdfb_process(struct comp_dev *dev, struct comp_buffer *source, /* calc new free and available */ comp_update_buffer_consume(source, source_bytes); comp_update_buffer_produce(sink, sink_bytes); + + /* Update sound direction estimate */ + tdfb_direction_estimate(cd, frames, source->...
[No CFG could be retrieved]
function to handle the get_data command of the specified type of buffer Copy the components from source to sink.
The control events are not yet generated. Need to add filtering and hysteresis to avoid user space to be woken up too often.
@@ -31,7 +31,7 @@ type challengeProvider struct { } func (c *challengeProvider) getCertificate(domain string) (cert *tls.Certificate, exists bool) { - log.Debugf("Challenge GetCertificate %s", domain) + log.Debugf("Look for existing ACME challenge for %s...", domain) if !strings.HasSuffix(domain, ".acme.invalid")...
[CleanUp->[Commit,Unlock,Begin,Lock,Debugf],getCertificate->[OperationWithRecover,Init,RLock,Errorf,RetryNotify,NewExponentialBackOff,Get,RUnlock,HasSuffix,Debugf],Present->[Commit,Unlock,Begin,Lock,Debugf],GenerateKey,Sprintf,PemCert,X509KeyPair,MarshalPKCS1PrivateKey,EncodeToString,Sum256,EncodeToMemory,MarshalECPriv...
getCertificate returns the certificate associated with the given domain.
/Look for/Looking for an/
@@ -17,6 +17,7 @@ module Users if result.success? process_successful_creation else + flash.now[:error] = t('email_addresses.add.duplicate') if duplicate_email? render :show end end
[EmailsController->[verify->[email,redirect_to,render,new,blank?],edit->[new],show->[new],handle_successful_delete->[t,create_user_event],process_updates->[email_changed?,redirect_to,t],email_address->[find],update->[to_h,new,render,track_event,bypass_sign_in,success?,submit],authorize_user_to_edit_email->[user],proces...
add a node id.
Wouldn't the error automatically show up if we added a validation to the form and stuck this message on the `emails` key in the errors hash?
@@ -107,14 +107,14 @@ func (js *spawner) RegisterDelegate(delegate Delegate) { func (js *spawner) runLoop() { defer close(js.chDone) + defer js.destroy() // Initialize the Postgres event listener for new jobs - var chNewJobs <-chan string - listener, err := js.orm.ListenForNewJobs() + newJobs, err := js.orm.Li...
[startUnclaimedServices->[Start],Stop->[Stop],CreateJob->[CreateJob],DeleteJob->[DeleteJob],runLoop->[Stop]]
runLoop runs the main loop.
Do we really want to limp on in this instance or give up and error out the whole application?
@@ -201,6 +201,9 @@ type KV struct { cfg KVConfig + // dns discovery provider + provider *dns.Provider + // Protects access to memberlist and broadcasts fields. initWG sync.WaitGroup memberlist *memberlist.Memberlist
[starting->[buildMemberlistConfig],Get->[Get],List->[List],GetBroadcasts->[GetBroadcasts],WatchPrefix->[WatchPrefix,get],MergeRemoteState->[GetCodec,broadcastNewValue,notifyWatchers],NotifyMsg->[GetCodec,notifyWatchers],RegisterFlags->[RegisterFlags],trySingleCas->[get],WatchKey->[get,WatchKey],CAS->[notifyWatchers,CAS...
generateRandomSuffix returns a random suffix for a key - value store. This function is exported to allow consumers of the prometheus package to collect statistics about the number of.
Nit: I would call this `dnsProvider` or `resolver`. `provider` sounds too generic,.
@@ -13,7 +13,7 @@ internal static partial class Interop internal static extern unsafe int ReadStdin(byte* buffer, int bufferSize); [DllImport(Libraries.SystemNative, EntryPoint = "SystemNative_InitializeConsoleBeforeRead")] - internal static extern unsafe void InitializeConsoleBeforeRead(byte...
[Interop->[Sys->[UninitializeConsoleAfterRead->[SystemNative],InitializeConsoleBeforeRead->[SystemNative],ReadStdin->[SystemNative]]]]
Initialize the console before and after reads.
nit: rename `enableCrNl` to `convertCrToNl`. nit2: with how the code ended up, `= false` may be a nice default.
@@ -74,6 +74,10 @@ public class UdfFactory { } public KsqlFunction getFunction(final List<Schema.Type> paramTypes) { - return functions.get(paramTypes); + final KsqlFunction function = functions.get(paramTypes); + if (function == null) { + throw new KsqlException("Function '" + name + "' does not ...
[UdfFactory->[copy->[UdfFactory,putAll],checkCompatible->[containsKey,KsqlException,get,getKudfClass],getFunction->[get],addFunction->[toList,checkCompatible,put,collect]]]
Get function.
For the error message lets' use the type names consistent with the types user sees. You can use `TYPE_MAP` in `SchemaUtil.java`. The type names you use here are internal type names.
@@ -538,7 +538,7 @@ class ActivityLog(ModelBase): validation = 'ignored' file_ = self.f(u'<a href="{0}">{1}</a> (validation {2})', - reverse('files.list', args=[arg.pk]), + arg.get_url_path(arg.pk), ...
[ActivityLog->[__str__->[to_string],to_string->[f],create->[ActivityLog,create,set_arguments],arguments->[arguments_builder],SafeFormatter,ActivityLogManager],ActivityLogToken->[is_valid->[is_expired]],ActivityLogManager->[current_month_user_approve_reviews->[user_approve_reviews],monthly_reviews_user_position->[user_p...
Returns a string representation of the action. Displays a tag missing from the database.
are you sure about this? File.get_url_path seems to be an instance method that doesn't require the id, and is the download link (rather than an admin manage page)
@@ -106,6 +106,7 @@ type MetricSet interface { HostData() HostData // HostData returns the parsed host data. Registration() MetricSetRegistration // Params used in registration. Metrics() *monitoring.Registry // MetricSet specific metrics + Logger() *logp.Logger // MetricSet ...
[GoString->[String],FullyQualifiedName->[Name],String->[Name,String]]
Name returns the name of the module and the config used to create the module. 2. 2.
I like the idea, though I would have went with a shorter `Log()` name in effort to keep the code lines shorter like (`ms.Log().Info(...)`).
@@ -470,6 +470,10 @@ int X509_STORE_CTX_print_verify_cb(int ok, X509_STORE_CTX *ctx) int cert_error = X509_STORE_CTX_get_error(ctx); BIO *bio = BIO_new(BIO_s_mem()); /* may be NULL */ + if (bio == NULL) { + ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE); + return 0; + ...
[X509_STORE_CTX_print_verify_cb->[ossl_x509_print_ex_brief],ossl_x509_print_ex_brief->[X509_print_ex],int->[ossl_x509_print_ex_brief],X509_signature_print->[X509_signature_dump]]
X509_STORE_CTX_print_verify_cb - X509_STORE Print all non - trust certs in the current cert store.
An error is already raised by BIO_new in case of malloc failure.
@@ -822,4 +822,16 @@ class Themes extends Module { private function is_theme_switch() { return did_action( 'after_switch_theme' ); } + + /** + * Return Total number of objects. + * + * @param array $config Full Sync config. + * + * @return int total + */ + public function total( $config ) { + return 1; + ...
[Themes->[sync_add_widgets_to_sidebar->[get_widget_name,get_sidebar_name],sync_widgets_reordered->[get_sidebar_name],sync_sidebar_widgets_actions->[sync_add_widgets_to_sidebar,sync_widgets_reordered,sync_remove_widgets_from_sidebar],sync_remove_widgets_from_sidebar->[get_widget_name,get_sidebar_name]]]
Checks if the current theme is a theme switch.
Seems like we define this in a bunch of module classes. Should we make it a trait?
@@ -2150,9 +2150,6 @@ public class CalciteQueryTest extends BaseCalciteQueryTest @Test public void testCountNullableExpression() throws Exception { - // Cannot vectorize due to expression filter. - cannotVectorize(); - testQuery( "SELECT COUNT(CASE WHEN dim2 = 'abc' THEN 'yes' WHEN dim2 = '...
[CalciteQueryTest->[testGroupByLong->[testQuery,build,of],testExactCountDistinctUsingSubqueryWithWhereToOuterFilter->[testQuery,replaceWithDefault,build,of],testGroupByExtractYear->[testQuery,cannotVectorize,build,of],testUnplannableExactCountDistinctQueries->[of,assertQueryIsUnplannable],testCountStarWithTimeAndDimFil...
This test fails if the count of null values is not met.
Nit: you could leave out `.virtualColumns()` if you aren't setting any.
@@ -114,6 +114,7 @@ func (cfg *RingConfig) ToRingConfig() ring.Config { rc.KVStore = cfg.KVStore rc.HeartbeatTimeout = cfg.HeartbeatTimeout rc.ReplicationFactor = cfg.ReplicationFactor + rc.ZoneAwarenessEnabled = cfg.ZoneAwarenessEnabled return rc }
[ToRingConfig->[DefaultValues],ToLifecyclerConfig->[Sprintf,GetInstancePort,GetInstanceAddr],RegisterFlags->[StringVar,Error,RegisterFlagsWithPrefix,Hostname,Log,DurationVar,Exit,Var,IntVar],NewOp]
ToRingConfig converts the ring config to a ring config.
This whole function could be removed if we did the cleanup above.
@@ -1409,6 +1409,14 @@ bool CryptoBuiltInImpl::decrypt(const KeyMaterial& master, Session& sess, return false; } + if (security_debug.fake_encryption) { + out.length(n); + for (unsigned i = 0; i < n; i++) { + out[i] = ciphertext[i]; + } + return true; + } + CipherContext ctx; // sessi...
[No CFG could be retrieved]
- - - - - - - - - - - - - - - - - - if ciphertext is not found in header return false.
Use the sequence's `get_buffer()` method to change it all at once.
@@ -191,15 +191,15 @@ public class DDLEngine { } if (createTable.getProperties().get(DDLConfig.TOPIC_NAME_PROPERTY) == null) { - throw new KQLException("Topic (topic) for the table should be set in WITH clause."); + throw new KQLException("Topic for the table should be set in WITH clause."); ...
[DDLEngine->[createTable->[enforceString],createStream->[enforceString]]]
Create a new table in KQL. Get the topic from the metastore and add it to the metastore.
Is this change correct? Isn't this a key in the data, which should be case sensitive?
@@ -249,7 +249,7 @@ define([ this._tileProvider.beginUpdate(context, frameState, commandList); selectTilesForRendering(this, context, frameState); - processTileLoadQueue(this, context, frameState); + processTileLoadQueue(this, context, frameState, commandList); ...
[No CFG could be retrieved]
The base class for the QuadtreePrimitive class. This is a utility method that allows for deterministic release of WebGL resources.
I think you are starting to see what I mean that passing this separate parameters around is a pain, and we might be better off putting everything in `frameState`, which is still fits well conceptually.
@@ -30,6 +30,8 @@ public class Slf4JLoggerFactory extends InternalLoggerFactory { @SuppressWarnings("deprecation") public static final InternalLoggerFactory INSTANCE = new Slf4JLoggerFactory(); + public static final InternalLoggerFactory INSTANCE_WITH_NOP_CHECK = new Slf4JLoggerFactory(true); + /** ...
[Slf4JLoggerFactory->[wrapLogger->[Slf4JLogger,LocationAwareSlf4JLogger],newInstance->[wrapLogger,getLogger],Slf4JLoggerFactory,getILoggerFactory,NoClassDefFoundError]]
Creates a LoggerFactory which creates a new instance of the NOP LoggerFactory and wraps the.
Make the instance package private?
@@ -18,7 +18,10 @@ from allennlp.nn.util import sequence_cross_entropy_with_logits from allennlp.nn.util import sort_batch_by_length from allennlp.nn.util import viterbi_decode from allennlp.nn.util import weighted_sum - +from allennlp.nn.util import flatten_batched_indices +from allennlp.nn.util import batched_inde...
[TestNnUtil->[test_weighted_sum_works_on_simple_input->[rand,from_numpy,Variable,weighted_sum,FloatTensor,assert_almost_equal],test_data_structure_as_variables_correctly_allocates_cuda_tensors->[IntTensor,ByteTensor,torch_array_dict,arrays_to_variables,ones,zeros,FloatTensor],test_weighted_sum_handles_higher_order_inpu...
Test arrays_to_variables to see if they are all arrays that can be converted to.
With this many imports (and with functions like this generally), I'm in favor of just doing `from allennlp.nn import util`, and using `util.bucket_distance`, etc., below.
@@ -56,11 +56,13 @@ class Hwloc(AutotoolsPackage): depends_on('pkgconfig', type='build') + depends_on('cuda', when='+nvml') depends_on('cuda', when='+cuda') + depends_on('opengl', when='+gl') depends_on('libpciaccess', when='+pci') depends_on('libxml2', when='+libxml2') depends_on('ca...
[Hwloc->[url_for_version->[up_to],configure_args->[append,enable_or_disable,extend],variant,depends_on,version]]
Return a URL for the given version of hwloc.
this should just read `depends_on('gl', when='+gl')`. In Spack, `gl` is a virtual package and e.g. `opengl` provides it.
@@ -0,0 +1,18 @@ +package io.quarkus.devtools.testing; + +import org.junit.jupiter.api.extension.AfterAllCallback; +import org.junit.jupiter.api.extension.BeforeAllCallback; +import org.junit.jupiter.api.extension.ExtensionContext; + +public class RegistryClientTest implements BeforeAllCallback, AfterAllCallback { + + ...
[No CFG could be retrieved]
No Summary Found.
Now anything that uses this class will be setup to use the quarkus-bom platform.
@@ -55,6 +55,18 @@ func GetRelease(ctx *context.APIContext) { ctx.JSON(200, release.APIFormat()) } +func getPagesInfo(ctx *context.APIContext) (int, int) { + page := ctx.QueryInt("page") + if page == 0 { + page = 1 + } + perPage := ctx.QueryInt("per_page") + if perPage == 0 { + perPage = setting.API.DefaultPagin...
[IsErrReleaseNotExist,Status,JSON,Error,GetRelease,ParamsInt64,APIFormat,ServerError,IsErrReleaseAlreadyExist,DeleteReleaseByID,UpdateRelease,LoadAttributes,GetReleasesByRepoID,GetReleaseByID,CreateRelease]
ListReleases lists all releases of a given release GetReleasesByRepoID returns a list of releases with the given ID.
It should not allow `perPage` to be more then `MaxResponseItems`
@@ -129,13 +129,10 @@ class BiattentiveClassificationNetwork(Model): if len(self._elmo._scalar_mixes) != self._num_elmo_layers: raise ConfigurationError( - "Elmo object has num_output_representations=%s, but this does not " - "match the number of use...
[BiattentiveClassificationNetwork->[from_params->[from_params]]]
Initialize the BiattentiveClassificationNetwork with the given parameters. Checks that the passed in object is compatible with the input and output matrices. Check if the specified node has a missing node in the network.
Aside: Did `black` force this change? If not, while I appreciate cleanups, it's probably best to leave them for another PR just to keep the diff small.
@@ -50,7 +50,6 @@ public abstract class AbstractLockingInterceptor extends DDAsyncInterceptor { private final boolean trace = getLog().isTraceEnabled(); protected LockManager lockManager; - protected DataContainer<Object, Object> dataContainer; protected ClusteringDependentLogic cdl; protected fin...
[AbstractLockingInterceptor->[visitReadWriteKeyCommand->[visitDataWriteCommand],visitReadWriteKeyValueCommand->[visitDataWriteCommand],visitWriteOnlyKeyCommand->[visitDataWriteCommand],lockAllAndRecord->[lockAllAndRecord],visitWriteOnlyKeyValueCommand->[visitDataWriteCommand]]]
Unlock all locks for the given object.
remove unused import
@@ -177,6 +177,9 @@ export class AmpIframe extends AMP.BaseElement { * @override */ onLayoutMeasure() { + this.isLikeFixedAd_ = isAdLike(this.element) && + !isAdPositionAllowed(this.element, this.win); + // We remeasured this tag, lets also remeasure the iframe. Should be // free now and ...
[No CFG could be retrieved]
Callback for the pre - connect event. Gets the layout box of the intersection element of the iframe.
This looks good, but needs to be renamed now since it combines more than just "ad-like" behavior. It could be, for instance, `isDisallowedAsAd_` or some such.