patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -295,6 +295,10 @@ public final class CommandParser {
}
}
+ public static String preserveCase(final String fieldOrSourceName) {
+ return "`" + fieldOrSourceName + "`";
+ }
+
public abstract static class SqlCommand {
private final String command;
| [CommandParser->[isCreateConnectorStatement->[size,equals],isInsertValuesStatement->[contains,size,equals],SqlPropertyCommand->[requireNonNull],parse->[toList,collect],splitSql->[charAt,append,indexOf,add,MigrationException,substring,StringBuffer,toString,isEmpty,validateToken,length,valueOf,startsWith],toFieldType->[getValue,getName,toList,IllegalStateException,toFieldType,toString,collect,forEach,put],transformToSqlCommand->[getMessage,text,SqlInsertValues,matches,MigrationException,matcher,SqlStatement,group,of,SqlPropertyCommand,getValues,empty,IllegalStateException,format,SqlConnectorStatement,toList,buildStatement,getStatement,collect,getStatementType],validateSupportedStatementType->[size,equals,get,MigrationException,contains],validateToken->[MigrationException],getStatementType->[isCreateConnectorStatement,isInsertValuesStatement,size,equals,validateSupportedStatementType,isDropConnectorStatement],isDropConnectorStatement->[size,equals],DefaultKsqlParser,of,compile]] | Validate supported statement type. | Does this need to be public? |
@@ -1493,8 +1493,9 @@ void reload_defaults(dt_iop_module_t *module)
// we might be called from presets update infrastructure => there is no image
if(!module->dev) goto end;
+ dt_image_t *img = &module->dev->image_storage;
// can't be switched on for non-raw or x-trans images:
- if(dt_image_is_raw(&module->dev->image_storage) && (module->dev->image_storage.buf_dsc.filters != 9u))
+ if(dt_image_is_raw(img) && (img->buf_dsc.filters != 9u) && !dt_image_is_monochrome(img))
module->hide_enable_button = 0;
else
module->hide_enable_button = 1;
| [No CFG could be retrieved] | process the given therapee entry Initializes the fields of the cacorrect_global_data_t and cac. | Resetting this module apparently enables it, and it can't be disabled back |
@@ -175,10 +175,18 @@ class Delivery extends BaseObject
case Protocol::DFRN:
self::deliverDFRN($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup);
+
+ if (in_array($cmd, [Delivery::POST, Delivery::COMMENT])) {
+ ItemDeliveryData::incrementQueueDone($target_id);
+ }
break;
case Protocol::DIASPORA:
self::deliverDiaspora($cmd, $contact, $owner, $items, $target_item, $public_message, $top_level, $followup);
+
+ if (in_array($cmd, [Delivery::POST, Delivery::COMMENT])) {
+ ItemDeliveryData::incrementQueueDone($target_id);
+ }
break;
case Protocol::OSTATUS:
| [Delivery->[deliverMail->[getHostName],execute->[getHostName]]] | This method is used to execute a specific command on an item. This function is called to find the post in the post - list and if the post is This function is used to check if there is any changes to the target item and if so This function is used to deliver a message to a specific network. | This doesn't respect if the item had been posted successfully or not. |
@@ -262,8 +262,8 @@ class ResultsController < ApplicationController
end
end
# Send the Zip file
- send_file zip_path, :disposition => 'inline',
- :filename => zip_name + '.zip'
+ send_file zip_path, disposition: 'inline',
+ filename: zip_name + '.zip'
end
def codeviewer
| [ResultsController->[update_remark_request_count->[update_remark_request_count]]] | downloads the zip of the given and returns it Displays a single node in the archive. | Align the elements of a hash literal if they span more than one line. |
@@ -728,7 +728,7 @@ public class GlueHiveMetastore
.withDatabaseName(table.getDatabaseName())
.withTableName(table.getTableName())
.withPartitionValues(partitionValues)));
- return Optional.of(GlueToPrestoConverter.convertPartition(result.getPartition(), table.getParameters()));
+ return Optional.of(new GluePartitionConverter(table).apply(result.getPartition()));
}
catch (EntityNotFoundException e) {
return Optional.empty();
| [GlueHiveMetastore->[dropColumn->[getExistingTable,replaceTable],dropTable->[getExistingTable],createTable->[createTable],updatePartitionStatistics->[getPartitionStatistics,updatePartitionStatistics],renameColumn->[getExistingTable,replaceTable],getSupportedColumnStatistics->[getSupportedColumnStatistics],updateTableStatistics->[getExistingTable,getTableStatistics],getTable->[getTable],getPartition->[getPartition],addColumn->[getExistingTable,replaceTable],dropPartition->[getExistingTable,deleteDir,isManagedTable],createDatabase->[createDatabase],setTableOwner->[getExistingTable],getDatabase->[getDatabase],getPartitions->[getPartitions],getPartitionsByNames->[getPartitionsByNames],getPartitionNamesByFilter->[getExistingTable]]] | Gets a partition by identity table and partition values. | Nit: No need to wrap here |
@@ -905,7 +905,7 @@ export class AmpStoryPlayer {
this.isCircularWrappingEnabled_ &&
this.isIndexOutofBounds_(this.currentIdx_ + 1)
) {
- this.go(1);
+ this.go(1, 0, {animate: true});
return;
}
| [No CFG could be retrieved] | Initializes a story object. Initialize button. | This code path is only followed when `circular-wrapping` is enabled, it would still not animate in the regular case |
@@ -794,9 +794,15 @@ func (r *registeredExecutor) startTaskWorker(ctx context.Context, d backend.Task
}
func (r *registeredExecutor) runTask(ctx context.Context, t *backend.Task, taskCompleter backend.TaskCompleter) error {
- logctx := logrus.WithField("task_name", r.name)
-
+ startTime := time.Now()
result, err := r.executor.Run(ctx, &task{backendTask: t})
+ endTime := time.Now()
+ logctx := logrus.WithFields(logrus.Fields{
+ "task_name": r.name,
+ "start_time": startTime,
+ "end_time": endTime,
+ "duration": endTime.Sub(startTime),
+ })
if err != nil {
err := taskCompleter.Fail(err.Error())
if err != nil {
| [startTaskPollers->[StartPoller,Add],Stop->[Stop],WakeupTaskPollerByTaskName->[WakeupPoller],CreateWorkflowSchedule->[String,CreateWorkflowSchedule],GetWorkflowScheduleByName->[GetWorkflowScheduleByName],ListWorkflowSchedules->[ListWorkflowSchedules],CancelWorkflow->[CancelWorkflow],runTask->[Fail],Start->[Start],UpdateWorkflowScheduleByName->[UpdateWorkflowScheduleByName],EnqueueWorkflow->[EnqueueWorkflow],processWorkflow->[Fail,Continue,Add,EnqueueTask,callOnWorkflowCompleteCallback,Filter,wakeupTaskPollersByRequests],GetWorkflowInstanceByName->[GetWorkflowInstanceByName],runWorkflowExecutor->[Stop,Add],StartPoller->[GetActiveWorkers,String,Next],startTaskWorker->[DecActiveWorkers,startTaskWorker,IncActiveWorkers,Add],String->[String],wakeupTaskPollersByRequests->[WakeupTaskPollerByTaskName],String] | runTask runs the given task in the background and returns an error if the task is not. | Should we also do a log `WithError` here so we can get an error message with all the context before we return? |
@@ -54,7 +54,7 @@ void ScriptApiEnv::environment_Step(float dtime)
try {
runCallbacks(1, RUN_CALLBACKS_MODE_FIRST);
} catch (LuaError &e) {
- getServer()->setAsyncFatalError(e.what());
+ getServer()->setAsyncFatalError(std::string("environment_Step: ") + e.what() + "\n" + script_get_backtrace(L));
}
}
| [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - Get the object ref of the event type and call callbacks. | those lines are too long, please split |
@@ -1129,6 +1129,12 @@ INPUT_PORTS_END
***************************************************************************/
static INPUT_PORTS_START( stepstag )
+ PORT_START("VOLUME") // $a30000.w
+ PORT_DIPNAME( 0x00ff, 0x0000, "Sound Volume") // Potentiometer output sampled by 8-bit A/D, then read by main CPU
+ PORT_DIPSETTING( 0x0000, "max") // TODO, 256 steps
+ PORT_DIPSETTING( 0x007f, "mid")
+ PORT_DIPSETTING( 0x00ff, "min")
+
PORT_START("BUTTONS") // $be0002.w
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_START2 ) // P2 start (middle)
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_PLAYER(2) // P2 left
| [No CFG could be retrieved] | MAC MAC MAC MAC MAC MAC MAC MAC MAC MAC MAC MAC MAC MAC MAC MAC MAC MAC INPUT_PORTS_END - Input for MAC MACMACMACMACMACMAC. | You can use an "adjuster" rather than DIP switches as an easier way to get a value from a range like this. |
@@ -224,8 +224,13 @@ class CombinedReviewQueueMixin:
class ExtensionQueueMixin:
def base_query(self):
query = super().base_query()
- types = _int_join(amo.GROUP_TYPE_ADDON + [amo.ADDON_THEME])
- query['where'].append(f'addons.addontype_id IN ({types})')
+ addons_without_search = amo.GROUP_TYPE_ADDON.copy()
+ addons_without_search.remove(amo.ADDON_SEARCH)
+ types = _int_join(addons_without_search + [amo.ADDON_THEME])
+ query['where'].append(
+ f'((addons.addontype_id IN ({types}) '
+ f'AND files.is_webextension = {False}) '
+ f'OR addons_addonreviewerflags.auto_approval_disabled = {True})')
return query
| [set_reviewing_cache->[get_reviewing_cache_key],get_reviewing_cache->[get_reviewing_cache_key],CombinedReviewQueueMixin->[base_query->[_int_join]],ViewQueue->[flags->[get_flags_for_row]],ReviewerScore->[get_breakdown_since->[get_key],get_breakdown->[get_key],all_users_by_score->[_leaderboard_list],award_points->[get_key,get_event],get_leaderboards->[get_key,_leaderboard_list],get_recent->[get_key],award_moderation_points->[get_key],get_total->[get_key]],send_notifications->[send_notification],ExtensionQueueMixin->[base_query->[_int_join]],clear_reviewing_cache->[get_reviewing_cache_key],AutoApprovalSummary->[create_summary_for_version->[AutoApprovalNotEnoughFilesError,check_is_recommendable,check_has_auto_approval_disabled,check_should_be_delayed,calculate_verdict,calculate_weight,check_is_locked],calculate_size_of_code_changes->[AutoApprovalNoValidationResultError,find_previous_confirmed_version,find_code_size],count_uses_unknown_minified_code->[_count_metadata_property],count_uses_innerhtml->[_count_linter_flag],count_violates_mozilla_conditions->[_count_linter_flag],check_is_locked->[get_reviewing_cache],_count_linter_flag->[_count_linter_flag_in_file->[AutoApprovalNoValidationResultError],_count_linter_flag_in_file],count_uses_custom_csp->[_count_linter_flag],count_uses_uses_coinminer->[_count_linter_flag],_count_metadata_property->[_count_property_in_linter_metadata_in_file->[AutoApprovalNoValidationResultError],_count_property_in_linter_metadata_in_file],count_uses_remote_scripts->[_count_linter_flag],count_uses_eval_or_document_write->[_count_linter_flag],count_uses_implied_eval->[_count_linter_flag]]] | Base query for AMI add - ons. | using `{False}` in an `f` string seems a little weird to me - can't you literally write `False`? |
@@ -818,9 +818,9 @@ namespace System.Xml
public abstract bool Read();
public virtual System.Threading.Tasks.Task<bool> ReadAsync() { throw null; }
public abstract bool ReadAttributeValue();
- public virtual object ReadContentAs(System.Type returnType, System.Xml.IXmlNamespaceResolver namespaceResolver) { throw null; }
+ public virtual object ReadContentAs(System.Type returnType, System.Xml.IXmlNamespaceResolver? namespaceResolver) { throw null; }
[System.Diagnostics.DebuggerStepThroughAttribute]
- public virtual System.Threading.Tasks.Task<object> ReadContentAsAsync(System.Type returnType, System.Xml.IXmlNamespaceResolver namespaceResolver) { throw null; }
+ public virtual System.Threading.Tasks.Task<object> ReadContentAsAsync(System.Type returnType, System.Xml.IXmlNamespaceResolver? namespaceResolver) { throw null; }
public virtual int ReadContentAsBase64(byte[] buffer, int index, int count) { throw null; }
public virtual System.Threading.Tasks.Task<int> ReadContentAsBase64Async(byte[] buffer, int index, int count) { throw null; }
public virtual int ReadContentAsBinHex(byte[] buffer, int index, int count) { throw null; }
| [XmlReader->[ReadString->[Never],ReadElementString->[Never]],XmlSchemaAny->[None],XmlAnyElementAttribute->[Field,Parameter,ReturnValue,Property],XmlRootAttribute->[Struct,Class,Enum,Interface,ReturnValue],XmlTextWriter->[Never],XmlIgnoreAttribute->[Field,Parameter,ReturnValue,Property],XmlEnumAttribute->[Field],XmlSchemaAnyAttribute->[None],XmlSchemaComplexType->[None],GetApplicationResourceStream->[Never],XmlSchemaProviderAttribute->[Interface,Struct,Class],XmlAnyAttributeAttribute->[Field,Parameter,ReturnValue,Property],XmlElementAttribute->[Field,Parameter,ReturnValue,Property],XmlTextReader->[Never],XmlSchema->[None],XmlSchemaAttribute->[None],XmlSchemaElement->[None],XmlTextAttribute->[Field,Parameter,ReturnValue,Property],GetSchema->[Never],XmlAttributeAttribute->[Field,Parameter,ReturnValue,Property],XmlSchemaType->[None],XmlNamespaceDeclarationsAttribute->[Field,Parameter,ReturnValue,Property],Never] | Reads content asynchronously. This method is used to read the content of a node. | Most likely couple of namespaceResolvers below should be nullable, i.e.: `ReadElementContentAs`, `ReadElementContentAsAsync` |
@@ -2717,6 +2717,12 @@ FuncInfo* PostVisitFunction(ParseNode* pnode, ByteCodeGenerator* byteCodeGenerat
return top;
}
+ if (top->paramScope && top->paramScope->GetCanMergeWithBodyScope())
+ {
+ Scope::MergeParamAndBodyScopes(pnode);
+ Scope::RemoveParamScope(pnode);
+ }
+
FuncInfo* const parentFunc = byteCodeGenerator->TopFuncInfo();
Js::FunctionBody * parentFunctionBody = parentFunc->byteCodeFunction->GetFunctionBody();
| [No CFG could be retrieved] | This function is called by the JS code generator when a new scope is being created. Check if a function has a deferred child. | Is this a change to how we handle the param scope that was necessary for precise capture? I'm concerned that this may have bugs and if it is not specific to precise capture, would be better to have in a separate change. |
@@ -580,6 +580,7 @@ function createHost($host, $community = NULL, $snmpver, $port = 161, $transport
'port' => $port,
'transport' => $transport,
'status' => '1',
+ 'ip' => $ip,
'snmpver' => $snmpver,
'poller_group' => $poller_group,
'status_reason' => '',
| [send_mail->[send,isSMTP,addAddress,isHTML,setFrom],RRDRecursiveFilterIterator->[accept->[isDir,getFilename]]] | create a host. | From the looks of it, $ip will be just the IP itself. This needs converting using the function we use elsewhere. |
@@ -59,6 +59,8 @@ func addEnrollFlags(cmd *cobra.Command) {
cmd.Flags().Uint16P("fleet-server-port", "", 0, "Fleet Server HTTP binding port (overrides the policy)")
cmd.Flags().StringP("fleet-server-cert", "", "", "Certificate to use for exposed Fleet Server HTTPS endpoint")
cmd.Flags().StringP("fleet-server-cert-key", "", "", "Private key to use for exposed Fleet Server HTTPS endpoint")
+ cmd.Flags().StringSliceP("headers", "", []string{}, "App auth token used for elasticsearch")
+ cmd.Flags().StringSliceP("kibana-headers", "", []string{}, "App auth token used for kibana")
cmd.Flags().BoolP("fleet-server-insecure-http", "", false, "Expose Fleet Server over HTTP (not recommended; insecure)")
cmd.Flags().StringP("certificate-authorities", "a", "", "Comma separated list of root certificate for server verifications")
cmd.Flags().StringP("ca-sha256", "p", "", "Comma separated list of certificate authorities hash pins used for certificate verifications")
| [GetUint16,PrintNotGA,GetBool,StringP,ConfigFile,MarkHidden,Exit,Confirm,Done,Itoa,Stop,StringToSlice,New,Notify,Errorf,Uint16P,BoolP,NewFromConfig,Fprintln,LoadFile,Execute,M,Fprintf,Sprintf,Background,WithCancel,GetString,Flags] | addEnrollFlags adds flags related to enroll agent into the command check if the token is empty. | I would name this `header` instead of `headers`. Being that its a multiple parameter, then it cleaner: `--header headera=1 --header headerb=2` |
@@ -21,6 +21,18 @@
#include <yara.h>
namespace osquery {
+
+// After a large scan of many files, the memory allocation could be
+// substantial. free() may not return it to operating system, but
+// rather keep it around in anticipation that app will reallocate.
+// Call malloc_trim() on linux to try to convince it to release.
+#ifdef LINUX
+FLAG(bool,
+ yara_malloc_trim,
+ true,
+ "Call malloc_trim() after yara scans (linux)");
+#endif
+
namespace tables {
void doYARAScan(YR_RULES* rules,
| [doYARAScan->[yr_rules_scan_file,push_back,INTEGER,c_str],genYara->[LOG,ok,size,insert,VLOG,doYARAScan,get,constraints,c_str,expandConstraints,isReadable,rules,resolveFilePattern,toString,compileSingleFile,count]] | Perform YARA scan for a given file. | Nitpick, `Call malloc_trim after YARA scans (Linux only)`, YARA is usually written in caps right? |
@@ -81,9 +81,9 @@ public class SampleDataExecutor extends AbstractParameterResolverExecutor {
if (cause instanceof SampleDataException) {
failureBuilder.withFailureCode(((SampleDataException) cause).getFailureCode());
}
- return resultFrom(failureBuilder.build());
+ throw new MuleRuntimeException(cause);
} catch (Exception e) {
- return resultFrom(newFailure(e).build());
+ throw new MuleRuntimeException(e);
}
}
| [SampleDataExecutor->[getSampleDataProviderModel->[getSampleDataProviderModel],getSampleData->[getSampleData]]] | Returns a sample data. | This failure is not needed anymore since the exception will be thrown |
@@ -176,6 +176,15 @@ class DataLakeDirectoryClient(PathClient):
:keyword int timeout:
The timeout parameter is expressed in seconds.
:return: None
+
+ .. admonition:: Example:
+
+ .. literalinclude:: ../samples/datalake_samples_directory.py
+ :start-after: [START delete_directory]
+ :end-before: [END delete_directory]
+ :language: python
+ :dedent: 12
+ :caption: Delete directory.
"""
return self._delete(**kwargs)
| [DataLakeDirectoryClient->[delete_sub_directory->[delete_directory],rename_directory->[DataLakeDirectoryClient],create_file->[create_file],get_sub_directory_client->[DataLakeDirectoryClient],create_sub_directory->[create_directory]]] | Deletes a directory. - The header of the resource that is returned if the resource has not been modified since. | I'm sure you did, but please make sure you generate docs locally and they seem fine. |
@@ -330,7 +330,9 @@ test_setup(void **state, unsigned int step, bool multi_rank,
/** Look at variables set by test arguments and setup container props */
if (dt_csum_type) {
- printf("\n-------\nChecksum enabled in test!\n-------\n");
+ print_message("\n-------\n"
+ "Checksum enabled in test!"
+ "\n-------\n");
entry = &csum_entry[co_props.dpp_nr];
entry->dpe_type = DAOS_PROP_CO_CSUM;
entry->dpe_val = dt_csum_type;
| [test_setup_next_step->[test_setup_pool_create],test_get_leader->[test_pool_get_info],daos_exclude_server->[daos_exclude_target],daos_add_server->[daos_add_target],get_daos_prop_with_user_acl_perms->[get_daos_prop_with_owner_and_acl,get_daos_acl_with_owner_perms],test_teardown->[test_teardown_cont_hdl,pool_destroy_safe,test_teardown_cont],get_daos_prop_with_owner_acl_perms->[get_daos_acl_with_owner_perms],test_make_dirs->[test_make_dirs],test_rebuild_wait->[test_rebuild_query],bool->[test_pool_get_info],test_setup->[test_setup_next_step]] | This function is called by the test system to setup a test object. This function clear all the variables set by test arguments and setup the container properties test_setup_next_step - test_setup_next_step. | (style) quoted string split across lines |
@@ -186,6 +186,18 @@ defineSuite([
}).toThrowDeveloperError();
});
+ it('equalsEpsilon', function() {
+ expect(CesiumMath.equalsEpsilon(1.0, 1.0, 0.0)).toEqual(true);
+ expect(CesiumMath.equalsEpsilon(1.0, 1.0, 1.0)).toEqual(true);
+ expect(CesiumMath.equalsEpsilon(1.0, 1.0 + CesiumMath.EPSILON7, CesiumMath.EPSILON7)).toEqual(true);
+ expect(CesiumMath.equalsEpsilon(1.0, 1.0 + CesiumMath.EPAILON7, CesiumMath.EPSILON9)).toEqual(false);
+
+ expect(CesiumMath.equalsEpsilon(3000000.0, 3000000.0, 0.0)).toEqual(true);
+ expect(CesiumMath.equalsEpsilon(3000000.0, 3000000.0, CesiumMath.EPSILON7)).toEqual(true);
+ expect(CesiumMath.equalsEpsilon(3000000.0, 3000000.2, CesiumMath.EPSILON7)).toEqual(true);
+ expect(CesiumMath.equalsEpsilon(3000000.0, 3000000.2, CesiumMath.EPSILON9)).toEqual(false);
+ });
+
it('equalsEpsilon throws for undefined left', function() {
expect(function() {
CesiumMath.equalsEpsilon(undefined, 5.0, CesiumMath.EPSILON16);
| [No CFG could be retrieved] | Private functions - Negative Pi To Pi Zero to Two Pi Equals to undefined 16 - bit version of the above. | typo here: `EPAILON7`. I'll fix and merge. |
@@ -11,8 +11,8 @@ import games.strategy.engine.history.Step;
import games.strategy.triplea.Constants;
public abstract class BaseEditDelegate extends BasePersistentDelegate {
- public static String EDITMODE_ON = "Turning on Edit Mode";
- public static String EDITMODE_OFF = "Turning off Edit Mode";
+ private static final String EDITMODE_ON = "Turning on Edit Mode";
+ private static final String EDITMODE_OFF = "Turning off Edit Mode";
/**
* Called before the delegate will run, AND before "start" is called.
| [BaseEditDelegate->[addComment->[checkPlayerID],start->[start],setDelegateBridgeAndPlayer->[setDelegateBridgeAndPlayer],getEditMode->[getEditMode],checkEditMode->[checkPlayerID,getEditMode]]] | Set the delegate bridge and the player. | These fields were not used outside this class, so I reduced their visibility appropriately as I was already modifying these lines. |
@@ -41,12 +41,18 @@ final class CollectHandle extends MethodHandle {
final int collectArraySize; /* Size of the collect array */
@VMCONSTANTPOOL_FIELD
final int collectPosition; /* The starting position of arguments to collect */
+ final Object emptyArray;
CollectHandle(MethodHandle next, int collectArraySize, int collectPosition) {
super(collectMethodType(next.type(), collectArraySize, collectPosition), KIND_COLLECT, new int[]{collectArraySize, collectPosition});
this.collectPosition = collectPosition;
this.collectArraySize = collectArraySize;
this.next = next;
+ if (collectArraySize == 0) {
+ emptyArray = Array.newInstance(next.type.arguments[collectPosition].getComponentType(), 0);
+ } else {
+ emptyArray = null;
+ }
}
CollectHandle(CollectHandle original, MethodType newType) {
| [CollectHandle->[invokeExact_thunkArchetype_X->[numArgsAfterCollectArray,collectionStart,numArgsToCollect,allocateArray],cloneWithNewType->[CollectHandle]]] | Creates a new CollectHandle subclass that can be used to call a method on an array of Check if the argument is an array type. | All values default to 0, so there's no need for the else case. |
@@ -25,7 +25,10 @@ public abstract class DbAttributesExtractor<REQUEST, RESPONSE>
protected void onStart(AttributesBuilder attributes, REQUEST request) {
set(attributes, SemanticAttributes.DB_SYSTEM, system(request));
set(attributes, SemanticAttributes.DB_USER, user(request));
- set(attributes, SemanticAttributes.DB_NAME, name(request));
+ AttributeKey<String> nameAttribute = dbNameAttribute();
+ if (nameAttribute != null) {
+ set(attributes, nameAttribute, name(request));
+ }
set(attributes, SemanticAttributes.DB_CONNECTION_STRING, connectionString(request));
set(attributes, SemanticAttributes.DB_STATEMENT, statement(request));
set(attributes, SemanticAttributes.DB_OPERATION, operation(request));
| [DbAttributesExtractor->[onStart->[system,statement,operation,user,set,name,connectionString]]] | Sets the missing tag values for the database. | Hmm this weirdness seems like a good reason to go to the spec and remove the keyspace attribute? Not filling in a generic attribute seems like a bug, non-cassandra aware tracing systems would still get benefit from it. |
@@ -208,6 +208,15 @@ namespace Dnn.ExportImport.Components.Services
var localPortalLanguages =
CBO.FillCollection<ExportPortalLanguage>(DataProvider.Instance().GetPortalLanguages(portalId, DateUtils.GetDatabaseUtcTime().AddYears(1), null));
var localLanguages = CBO.FillCollection<Locale>(DotNetNuke.Data.DataProvider.Instance().GetLanguages());
+
+ // ensure exported languages are enabled in target site
+ foreach(var lang in portalLanguages)
+ {
+
+ LocaleController.Instance.ActivateLanguage(portalId, lang.CultureCode, true);
+ LocaleController.Instance.PublishLanguage(portalId, lang.CultureCode, true);
+ }
+
foreach (var exportPortalLanguage in portalLanguages)
{
if (CheckCancelled(importJob)) return;
| [PortalExportService->[GetImportTotal->[Repository],ProcessPortalSettings->[CheckCancelled,CultureCode,PortalSettingId,LastModifiedByUserName,CreatedByUserName,CreatedByUserId,UpdatePortalSetting,AddYears,SettingName,IsSecure,CBO,Ignore,AddLogEntry,IsNullOrEmpty,ToString,Overwrite,GetPortalSettings,GetUserIdByName,FirstOrDefault,CollisionResolution,PortalId,LastModifiedByUserId,SettingValue],ImportData->[GetImportTotal,ToString,Completed,ProcessPortalLanguages,CheckPointStageCallback,AddSummary,Count,ProcessPortalSettings,ToList,Progress,Stage,TotalItems,ProcessedItems],ProcessPortalLanguages->[CheckCancelled,CultureCode,LastModifiedByUserName,CreatedByUserName,CreatedByUserId,Code,PortalLanguageId,IsPublished,AddPortalLanguage,AddYears,CBO,Ignore,AddLogEntry,UpdatePortalLanguage,GetLanguages,LanguageId,ToString,Overwrite,GetUserIdByName,FirstOrDefault,CollisionResolution,PortalId,GetPortalLanguages,LastModifiedByUserId],ExportData->[CheckCancelled,Count,AddSummary,ToList,CheckPointStageCallback,ProcessedItems,CBO,ToLocalTime,GetSetting,PortalSettingExportKey,RemoveEmptyEntries,Stage,ToString,TotalItems,GetPortalSettings,Completed,PortalId,Progress,GetPortalLanguages,CreateItems],Category_Portal]] | ProcessPortalLanguages - Process all portal languages in the import. if nesde nesde nesde nesde nesde nes. | I believe that this will fail, if the language isn't actually installed to the target portal. In the below loop you are going through and looking for local portal support, I would prefer to activate & publish in that loop, after it was validated that the value was created? Or am I missing something? |
@@ -21,7 +21,15 @@ with open('README.md', encoding="utf8") as f:
readme = f.read().split('--------------------')[-1]
with open('requirements.txt') as f:
- reqs = f.read()
+ reqs = []
+ for line in f:
+ line = line.strip()
+ if '>' in line:
+ reqs.append(line.split('>')[0])
+ elif '=' in line:
+ reqs.append(line.split('=')[0])
+ else:
+ reqs.append(line)
if __name__ == '__main__':
| [find_packages,read,exit,format,strip,setup,today,open] | Creates a new object. English Language. | we won't be expecting '~=' in , '<=' equirements.txt in the future? |
@@ -756,7 +756,9 @@ public class KafkaIO {
for (Map.Entry<String, Object> conf : getConsumerConfig().entrySet()) {
String key = conf.getKey();
if (!ignoredConsumerPropertiesKeys.contains(key)) {
- builder.add(DisplayData.item(key, ValueProvider.StaticValueProvider.of(conf.getValue())));
+ Object value = DisplayData.inferType(conf.getValue()) != null
+ ? conf.getValue() : conf.getValue().toString();
+ builder.add(DisplayData.item(key, ValueProvider.StaticValueProvider.of(value)));
}
}
}
| [KafkaIO->[TypedWithoutMetadata->[populateDisplayData->[populateDisplayData],expand->[apply]],KafkaWriter->[setup->[getProducerFactoryFn,apply],teardown->[close],processElement->[getTopic],getValueSerializer,getProducerConfig,getKeySerializer],UnboundedKafkaSource->[validate->[validate],getDefaultOutputCoder->[getKeyCoder,getValueCoder],split->[getConsumerConfig,getTopics,build,apply,getTopicPartitions]],fromAvro->[readWithCoders],Write->[updateProducerProperties->[updateKafkaProperties,getProducerConfig,build],expand->[apply],withProducerFactoryFn->[build],values->[build],validate->[getTopic],populateDisplayData->[populateDisplayData],withValueSerializer->[build],withKeySerializer->[build],withTopic->[build]],Read->[withTopicPartitions->[build],withConsumerFactoryFn->[build],withWatermarkFn2->[build],expand->[getMaxNumRecords,getKeyDeserializer,inferCoder,getKeyCoder,withMaxReadTime,getValueDeserializer,getValueCoder,withMaxNumRecords,getMaxReadTime],withWatermarkFn->[withWatermarkFn2],withValueDeserializer->[build],withKeyCoder->[build],withMaxReadTime->[build],validate->[getValueDeserializer,getKeyDeserializer],withKeyDeserializer->[build],withTopics->[build],updateConsumerProperties->[getConsumerConfig,build],withMaxNumRecords->[build],unwrapKafkaAndThen->[apply->[apply]],withValueCoder->[build],withTimestampFn2->[build],populateDisplayData->[populateDisplayData,getTopicPartitions,getTopics],withTimestampFn->[withTimestampFn2]],toAvro->[writeWithCoders],KafkaValueWrite->[populateDisplayData->[populateDisplayData],expand->[apply]],UnboundedKafkaReader->[getSplitBacklogBytes->[approxBacklogInBytes],close->[close],start->[run->[consumerPollLoop],getConsumerConfig,apply,nextBatch,getTopicPartitions],getWatermark->[getWatermarkFn,apply],getCheckpointMark->[reportBacklog],updateLatestOffsets->[setLatestOffset],getSplitBacklogMessageCount->[backlogMessageCount],advance->[nextBatch,apply,recordConsumed,getTimestampFn],apply->[PartitionState],getTopicPartitions]]] | Populates the display data with the values of the consumer configuration. | Can conf.getValue() be null? |
@@ -384,7 +384,11 @@ public class ApexParDoOperator<InputT, OutputT> extends BaseOperator
checkArgument(namespace instanceof WindowNamespace);
BoundedWindow window = ((WindowNamespace<?>) namespace).getWindow();
pushbackDoFnRunner.onTimer(
- timerData.getTimerId(), window, timerData.getTimestamp(), timerData.getDomain());
+ timerData.getTimerId(),
+ window,
+ timerData.getTimestamp(),
+ timerData.getTimestamp(),
+ timerData.getDomain());
}
pushbackDoFnRunner.finishBundle();
}
| [ApexParDoOperator->[setup->[outputWindowedValue->[output],timerInternals,stateInternals],processElementInReadyWindows->[processElementInReadyWindows],teardown->[teardown]]] | fire a timer. check if potentialOutputWatermark is greater than currentOutputWatermark and if so update outputWatermark. | Why is this timerData.getTimestamp() |
@@ -2226,7 +2226,8 @@ dfs_lookup_rel(dfs_t *dfs, dfs_obj_t *parent, const char *name, int flags,
stbuf->st_size = size;
stbuf->st_blocks = (stbuf->st_size + (1 << 9) - 1) >> 9;
}
- } else if (S_ISLNK(entry.mode)) {
+ break;
+ case S_IFLNK:
/* Create a truncated version of the string */
D_STRNDUP(obj->value, entry.value, entry.value_len + 1);
if (obj->value == NULL)
| [dfs_mount_root_cont->[dfs_cont_create,dfs_mount],dfs_umount_root_cont->[dfs_umount],dfs_lookup->[dfs_lookup],dfs_obj_local2global->[dfs_get_chunk_size],dfs_chmod->[dfs_lookup,dfs_release],dfs_access->[dfs_lookup,dfs_release]] | This function is called from the lookup_rel function of the object. D - A - D - B - C - C - C - C - C - D - Mach - O. | This is `dfs_lookup_rel`. Do we want to do something similar in `dfs_lookup`? |
@@ -1,7 +1,6 @@
module Articles
module Feeds
class LargeForemExperimental
- include FieldTest::Helpers
MINIMUM_SCORE_LATEST_FEED = -20
def initialize(user: nil, number_of_articles: 50, page: 1, tag: nil)
| [LargeForemExperimental->[more_comments_minimal_weight->[default_home_feed_and_featured_story],find_featured_story->[find_featured_story]]] | Initialize a new object with the values of the attributes. | This was a leftover from the A/B tests and is no longer needed. |
@@ -30,7 +30,7 @@ import org.apache.beam.sdk.values.KV;
* distribution of element processing timestamps, which can be collected and queried using {@link
* MetricsReader}.
*/
-public class TimeMonitor<K, V> extends DoFn<KV<K, V>, KV<K, V>> {
+public class TimeMonitor<T> extends DoFn<T, T> {
private Distribution timeDistribution;
| [TimeMonitor->[processElement->[element,output,currentTimeMillis,update],distribution]] | Implementation of a TimeMonitor class. | Thanks for making it more generic. Now that the `TimeMonitor` is used not only in load tests, could you move it to `beam-sdks-java-test-utils` module? This way there will be no need to import load tests in every IOIT (they still have to use utils). |
@@ -28,6 +28,8 @@ public interface MetaStore extends FunctionRegistry {
Optional<StructuredDataSource> getSourceForTopic(String ksqlTopicName);
+ Optional<StructuredDataSource> getSourceForKafkaTopic(String kafkaTopicName);
+
Map<String, StructuredDataSource> getAllStructuredDataSources();
Map<String, KsqlTopic> getAllKsqlTopics();
| [No CFG could be retrieved] | Get the source for a topic. | We have a one-to- many relation between kafka topic and StructuredDataSource. For instance, you can declare multiple KSQL streams on the same kafka topic. You need to return a collection(maybe set or list) here. |
@@ -85,6 +85,8 @@ public class OAuth2ServerConfiguration {<% if (databaseType == 'sql') { %>
.and()
.csrf()
.disable()
+ // By default CORS is disabled. Uncomment here and in application.yml to enable.
+ // .addFilterBefore(corsFilter, UsernamePasswordAuthenticationFilter.class)
.headers()
.frameOptions().disable()
.and()<% if (!websocket) { %>
| [No CFG could be retrieved] | Provides a subclass of the ResourceServerConfiguration interface. Use this method to configure the AuthorizationServer. | So the corsFilter might not be used at all? Then I don't like to have an unused variable around |
@@ -44,8 +44,10 @@ class SpacySentenceSplitter(SentenceSplitter):
self.spacy = get_spacy_model(language, parse=not rule_based, ner=False, pos_tags=False)
if rule_based:
# we use `sentencizer`, a built-in spacy module for rule-based sentence boundary detection.
- if not self.spacy.has_pipe('sentencizer'):
- sbd = self.spacy.create_pipe('sentencizer')
+ # depending on the spacy version, it could be called 'sentencizer' or 'sbd'
+ sbd_name = 'sbd' if spacy.__version__ < '2.1' else 'sentencizer'
+ if not self.spacy.has_pipe(sbd_name):
+ sbd = self.spacy.create_pipe(sbd_name)
self.spacy.add_pipe(sbd)
@overrides
| [SentenceSplitter->[batch_split_sentences->[split_sentences]]] | Initialize the object with a specific node. | If you changed this to a unique name which didn't depend on the version, you wouldn't have to disable the tests that only error because of the loading mismatch, rather than the changed model (the constituency parser test and the text_classification reader test). |
@@ -51,7 +51,7 @@ module MarkusConfigurator
if defined? REPOSITORY_TYPE
return REPOSITORY_TYPE
else
- return "svn"
+ return "git"
end
end
| [markus_config_repository_permission_file->[join],markus_config_validate_file->[to_s],markus_config_automated_tests_repository->[to_s,join],markus_config_logging_errorlogfile->[env,to_s,join],markus_config_session_cookie_expire_after->[weeks],markus_config_logging_logfile->[env,to_s,join],markus_config_pdf_storage->[to_s,join],markus_config_repository_storage->[to_s,join]] | Returns the markus config repository type or base url if not defined. | Prefer single-quoted strings when you don't need string interpolation or special symbols. |
@@ -33,6 +33,16 @@ public class PlatformInfo {
return ((null != osName) && osName.startsWith("Mac OS"));
}
+ /**
+ * Test if this is a pure OpenJ9 JDK, not a derivative or alternate VM.
+ * This is used by tests which require specific tools or packages with the JVM.
+ *
+ * @return true if this is a stock OpenJ9 JDK
+ */
+ public static boolean isOpenJ9() {
+ return isOpenJ9Status;
+ }
+
public static String getLibrarySuffix() {
String librarySuffix = ".so"; // default for Linux, AIX, and z/OS
if (isWindows()) {
| [PlatformInfo->[getLibrarySuffix->[isMacOS,isWindows]]] | Get the library suffix for the current OS. | I'm concerned this test is not going to be robust enough. While it may work as desired today, it may not give the desired results in the future, in particular if OpenJ9 is picked up and used in other ways. If you want to know if jps and jstack are supported, how about looking for these files? |
@@ -1439,7 +1439,7 @@ CHAKRA_API JsDefineProperty(_In_ JsValueRef object, _In_ JsPropertyIdRef propert
CHAKRA_API JsCreateArray(_In_ unsigned int length, _Out_ JsValueRef *result)
{
- return ContextAPIWrapper<true>([&] (Js::ScriptContext *scriptContext) -> JsErrorCode {
+ return ContextAPINoScriptWrapper([&](Js::ScriptContext *scriptContext) -> JsErrorCode {
PARAM_NOT_NULL(result);
*result = nullptr;
| [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - This is a JSRTAllocateArrayBuffer wrapper. | > ContextAPINoScriptWrapper([&](J [](start = 11, length = 31) Some changes unrelated to this PR? Need to evaluate carefully if these are safe. |
@@ -163,7 +163,7 @@ public class BatchAppenderatorTester implements AutoCloseable
null,
null,
null
- ).withBasePersistDirectory(createNewBasePersistDirectory());
+ ).withBasePersistDirectory(basePersistDirectory != null ? basePersistDirectory : createNewBasePersistDirectory());
metrics = new FireDepartmentMetrics();
| [BatchAppenderatorTester->[close->[close],getPathForHadoop->[getPathForHadoop]]] | Creates a new instance of the Task. This is a utility method that can be used to get the path for a segment in Hadoop. | Please annotate the parameter `basePersistDirectory` with `Nullable`. |
@@ -355,6 +355,9 @@ public abstract class IncrementalIndex<AggregatorType> implements Iterable<Row>,
private final Map<String, ColumnCapabilitiesImpl> columnCapabilities;
private final List<DimDim> dimValues;
+ // looks need a configuration
+ private final Ordering<Comparable> ordering = Ordering.natural().nullsFirst();
+
private final AtomicInteger numEntries = new AtomicInteger();
// This is modified on add() in a critical section.
| [IncrementalIndex->[loadDimensionIterable->[get,isEmpty],addNewDimension->[size,add,newDimDim],toTimeAndDims->[size,get,add,formatRow,getRowDimensionAsComparables],MetricDesc->[getName],getMaxTime->[getMaxTimeMillis,isEmpty],get->[get],formatRow->[apply],isEmpty->[get],getTypeFromDimVal->[size,get],TimeAndDimsComp->[compare->[get,compare,getValue]],NullValueConverterDimLookup->[getSortedIdFromUnsortedId->[getSortedIdFromUnsortedId],size->[size],getUnsortedIdFromSortedId->[getUnsortedIdFromSortedId],getValueFromSortedId->[getValueFromSortedId]],getRowDimensionAsComparables->[get,apply],makeColumnSelectorFactory->[makeDimensionSelectorUndecorated->[lookupName->[get,apply],getRow->[size->[size],get->[get],iterator->[apply->[],iterator]]],makeObjectColumnSelector->[get->[get]]],size->[get],getMetricType->[get],getDimVals->[size,get,add],getDimension->[get],getCapabilities->[get],getDimensionValues->[getDimension],getMetricIndex->[get],iterableWithPostAggregations->[iterator->[apply->[getAggVal,get,getAggsForRow],iterator,getFacts,getDimensions]],getInterval->[getMaxTimeMillis,isEmpty],NullValueConverterDimDim->[size->[size],contains->[contains],getId->[getId],sort->[sort],getValue->[getValue],add->[add],getMaxValue->[getMaxValue],getMinValue->[getMinValue]],add->[addToFacts],getMinTime->[isEmpty,getMinTimeMillis],iterator->[apply->[],iterator],size,get]] | Creates a column selector that returns a value of the specified column. return a DimensionSelector that selects the dimensions of the data. | do we have a test for ordering somewhere? |
@@ -2824,6 +2824,9 @@ receive_free(struct receive_writer_arg *rwa, struct drr_free *drrf)
if (dmu_object_info(rwa->os, drrf->drr_object, NULL) != 0)
return (SET_ERROR(EINVAL));
+ if (drrf->drr_object > rwa->max_object)
+ rwa->max_object = drrf->drr_object;
+
err = dmu_free_long_range(rwa->os, drrf->drr_object,
drrf->drr_offset, drrf->drr_length);
| [No CFG could be retrieved] | - - - - - - - - - - - - - - - - - - region Private functions. | You don't actually *need* these, since we only consider this value when doing a receive of a full send as a clone, and in that case you have to get an object record before you get any other kind of record for that object. Doesn't hurt to have them, though, and to have it be accurate in all cases. |
@@ -241,7 +241,7 @@ def handle_block(
channel_state.partner_state,
lock.secrethash,
)
- lock_has_expired, lock_expired_msg = channel.is_lock_expired(
+ lock_has_expired, _ = channel.is_lock_expired(
end_state=channel_state.our_state,
lock=lock,
block_number=block_number,
| [state_transition->[handle_onchain_secretreveal,handle_lock_expired,handle_unlock,handle_offchain_secretreveal,handle_block,handle_inittarget],handle_unlock->[handle_unlock],events_for_onchain_secretreveal->[events_for_onchain_secretreveal],handle_block->[events_for_onchain_secretreveal]] | Handle a block lock. | Wouldn't be handy, debugging wise, if we get to see the expiration reason? |
@@ -259,8 +259,15 @@ public abstract class SQLMetadataConnector implements MetadataStorageConnector
+ ")",
tableName, getPayloadType(), getQuoteString()
),
- StringUtils.format("CREATE INDEX idx_%1$s_datasource ON %1$s(dataSource)", tableName),
- StringUtils.format("CREATE INDEX idx_%1$s_used ON %1$s(used)", tableName)
+ StringUtils.format(
+ "CREATE INDEX idx_%1$s_datasource_end ON %1$s(dataSource, %2$send%2$s)",
+ tableName,
+ getQuoteString()
+ ),
+ StringUtils.format(
+ "CREATE INDEX idx_%1$s_datasource_sequence ON %1$s(dataSource, sequence_name)",
+ tableName
+ )
)
);
}
| [SQLMetadataConnector->[createAuditTable->[createTable,getPayloadType,createAuditTable,getSerialType],createSegmentTable->[createTable,getPayloadType,getQuoteString,createSegmentTable],createPendingSegmentsTable->[createTable,createPendingSegmentsTable,getPayloadType,getQuoteString],createConfigTable->[createTable,getPayloadType,createConfigTable],createRulesTable->[createTable,getPayloadType,createRulesTable],isTransientException->[isTransientException],createDataSourceTable->[createTable,getPayloadType,createDataSourceTable],inReadOnlyTransaction->[withHandle->[inTransaction],withHandle],getDatasource->[getValidationQuery,getConfig],createTaskTables->[createEntryTable,createLogTable,createLockTable],createSupervisorsTable->[createSupervisorsTable,createTable,getPayloadType,getSerialType],deleteAllRecords->[withHandle->[tableExists],retryWithHandle],createTable->[withHandle->[tableExists],retryWithHandle],createLockTable->[createTable,getPayloadType,getSerialType],retryWithHandle->[retryWithHandle],createEntryTable->[createTable,getPayloadType],createLogTable->[createTable,getPayloadType,getSerialType],lookup->[withHandle],compareAndSwap->[inTransaction]]] | create segment table. | @gianm sorry, I did not review these code carefully. There are no `sequence_name ` of `segmentTable`, `pendingSegmentsTable` does... |
@@ -553,7 +553,7 @@ func getRegistriesToTry(image string, store storage.Store, defaultTransport stri
" the image name '%s' is incomplete.", imageName)
}
for _, searchRegistry := range searchRegistries {
- pImage.registry = searchRegistry
+ pImage.registry = strings.TrimRight(searchRegistry, "/")
srcRef, err := alltransports.ParseImageName(pImage.returnFQName())
if err != nil {
return nil, errors.Errorf("unable to parse '%s'", pImage.returnFQName())
| [Decompose->[assembleFqName,findImageOnRegistry],GetManifest->[assembleFqName,GetManifest,assembleFqNameTransport],GetHistory->[getImage,getImageRef],ParseImageFilter->[GetImageInspectInfo],Pull->[Decompose],GetImageResults->[NewImage],getImageInspectInfo->[getImageRef],PullImage->[getPullListFromRef],findImageOnRegistry->[assembleFqName],getImageRef->[NewImage,getImage],GetFQName->[assembleFqName],HasLatest->[GetFQName,GetLocalImageName,GetManifest],Remove->[GetLocalImageName,GetImageID],getPullListFromRef->[getPullStruct],NewImage,returnFQName] | imageDecomposeStruct returns a pullStruct with the image name the tag the image name the getPullStruct returns a pullStruct with the name of the image that was passed to pull. | Won't this remove all '/' from the end and could that cause a problem for a registry where we want at least one to remain? |
@@ -2,6 +2,8 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+#nullable enable
+
using System;
using System.Buffers.Text;
using System.Diagnostics;
| [Interop->[cgroups->[TryFindHierarchyMount->[TryFindHierarchyMount],TryFindCGroupPathForSubsystem->[TryFindCGroupPathForSubsystem]]]] | Creates an instance of the class. Reads the memory value from a file. | NIT: normally we don't add empty row here |
@@ -151,6 +151,8 @@ public final class TicketGrantingTicketImpl extends AbstractTicket implements Ti
final List<Authentication> authentications = getChainedAuthentications();
service.setPrincipal(authentications.get(authentications.size()-1).getPrincipal());
+ // remove this service if it already exists to only keep the latest service ticket for a service
+ this.services.values().remove(service);
this.services.put(id, service);
return serviceTicket;
| [TicketGrantingTicketImpl->[getChainedAuthentications->[getAuthentication,getChainedAuthentications]]] | Grant service ticket. | Could you ever log into Service A, but have two active sessions for A and thus two STs? |
@@ -129,7 +129,6 @@ def create_or_get_tensor(scope, var_name, var, place):
if var is not None:
assert isinstance(var, np.ndarray)
tensor.set_recursive_sequence_lengths([])
- tensor.set_dims(var.shape)
tensor.set(var, place)
return tensor
| [TestBatchNormOpTraining->[ref_forward_backward->[_reference_grad,_reference_training],test_forward_backward->[test_with_place->[ref_forward_backward,__assert_close],test_with_place],setUp->[init_kernel_type]],TestBatchNormOpInference->[check_with_place->[create_or_get_tensor,_reference_testing,__assert_close],test_check_output->[check_with_place]],set_output_grad->[__set_tensor__],TestFP16BatchNormOpInference->[test_check_output->[check_with_place],setUp->[init_kernel_type]]] | Create or get a tensor for the . | Does this affect the test? |
@@ -12,6 +12,10 @@ module GobiertoPeople
@subject ||= GobiertoPeople::PersonMessage.new name: "Sender", email: "foo@example.com", person: person, body: "This is my message"
end
+ def site
+ @sites ||= sites(:madrid)
+ end
+
def test_valid
assert subject.valid?
end
| [PersonMessageTest->[test_deliver_method->[subject]]] | Test that the subject and the deliveries have a non - nil value. | Memoized variable @sites does not match method name site. Use @site instead. |
@@ -151,6 +151,10 @@ namespace Dynamo.PackageManager
{
ReadyParams = sp;
sp.CurrentWorkspaceChanged += OnCurrentWorkspaceChanged;
+
+ (sp.CurrentWorkspaceModel as WorkspaceModel).CollectingCustomNodePackageDependencies += GetCustomNodePackageFromID;
+ (sp.CurrentWorkspaceModel as WorkspaceModel).CollectingNodePackageDependencies += GetNodePackageFromAssemblyName;
+ currentWorkspace = (sp.CurrentWorkspaceModel as WorkspaceModel);
}
public void Shutdown()
| [PackageManagerExtension->[Shutdown->[Dispose],OnPackageLoaded->[OnMessageLogged]]] | This method is called when the workspace is ready. | @scottmitchell Does this mean newly installed custom node package will be added as well? Maybe not? |
@@ -217,7 +217,6 @@ class TestPantsDaemonIntegration(PantsDaemonIntegrationTestBase):
for cmd, run in zip(cmds, daemon_runs):
stderr_output = run.stderr_data.strip()
- self.assertEqual(stderr_output, '', 'Non-empty stderr for {}: {}'.format(cmd, stderr_output))
self.assertNotEqual(run.stdout_data, '', 'Empty stdout for {}'.format(cmd))
for run_pairs in zip(non_daemon_runs, daemon_runs):
| [launch_file_toucher->[join->[join]],TestPantsDaemonIntegration->[test_pantsd_invalidation_file_tracking->[full_pantsd_log->[join],full_pantsd_log],test_pantsd_filesystem_invalidation->[join,launch_file_toucher],test_pantsd_pid_change->[join],_assert_pantsd_keyboardinterrupt_signal->[join],test_pantsd_parse_exception_success->[join],test_pantsd_control_c->[_assert_pantsd_keyboardinterrupt_signal],test_pantsd_invalidation_stale_sources->[join],test_pantsd_multiple_parallel_runs->[join],test_pantsd_parent_runner_killed->[join],test_pantsd_lifecycle_non_invalidation_on_config_string->[join],test_pantsd_stacktrace_dump->[join],test_pantsd_client_env_var_is_inherited_by_pantsd_runner_children->[join],test_pantsd_sigquit->[_assert_pantsd_keyboardinterrupt_signal],test_pantsd_pid_deleted->[join]]] | Test that pantsd runs all commands and checks that the aligned output of the pants. | The issue I'm fixing here: Test expects stderr to be empty. However, I do not believe that assertion is always true. If one was to log, stderr would have the log output in stderr. Test is currently failing in CI because `INFO] waiting for file /home/travis/build/pantsbuild/pants/.pants.d/tmp/tmptb5bb5j_.pants.d/.pids/pantsd/pid to appear...` is present in stderr. I do not believe that is an issue. Please correct me if my conclusion is incorrect. |
@@ -14,10 +14,15 @@ from six.moves import configparser
from twitter.common.collections import OrderedSet
from pants.base.build_environment import get_buildroot, get_pants_cachedir, get_pants_configdir
+from pants.base.deprecated import deprecated_conditional
+from pants.option.global_options import GlobalOptionsRegistrar
from pants.util.eval import parse_expression
from pants.util.meta import AbstractClass
+GLOBAL_SECTION = 'GLOBAL'
+
+
class Config(AbstractClass):
"""Encapsulates ini-style config file loading and access.
| [_ChainedConfig->[get_source_for_option->[get_source_for_option,has_option],get_value->[has_section,get_value],sections->[sections],sources->[sources],has_option->[has_option],has_section->[has_section]],_SingleFileConfig->[get_source_for_option->[sources,has_option],get_value->[get],sections->[sections],has_option->[has_option],has_section->[has_section]],Config->[_create_parser->[update_dir_from_seed_values]]] | Creates a new config object from a list of config paths. Creates a config parser that supports the key - name value substitution. | Should this just use `from pants.option.arg_splitter import GLOBAL_SCOPE_CONFIG_SECTION`? It looks like that introduces no circular deps. |
@@ -135,7 +135,7 @@ public class AvroDataTranslator implements DataTranslator {
@Override
public Void visitMap(final Schema schema, final Void key, final Void value) {
if (schema.keySchema().type() != Type.STRING) {
- throw new IllegalArgumentException("Avro only supports MAPs with STRING keys");
+ throw new KsqlException("Avro only supports MAPs with STRING keys");
}
return null;
}
| [AvroDataTranslator->[throwOnInvalidSchema->[SchemaValidator],toKsqlRow->[toKsqlRow],replaceSchema->[convertStruct,replaceSchema],toConnectRow->[toConnectRow]]] | Throws an exception if the given schema is invalid. | Why this change? Statements with non-string map keys in Avro format should've already been rejected during validation, before reaching this, right? Same question for the other serde changes below. |
@@ -148,7 +148,8 @@ class InstallButton(object):
self.addon.status == file.status == amo.STATUS_PUBLIC):
url = file.latest_xpi_url()
download_url = file.latest_xpi_url(attachment=True)
- elif self.latest and self.is_beta and self.addon.show_beta:
+ elif (self.latest and self.is_beta and self.addon.show_beta and
+ waffle.switch_is_active('beta-versions')):
url = file.latest_xpi_url(beta=True)
download_url = file.latest_xpi_url(beta=True, attachment=True)
else:
| [InstallButton->[prepare->[append,list],fix_link->[urlparams],__init__->[is_unreviewed,is_featured],file_details->[latest_xpi_url,ugettext,get_url_path],links->[append,Link,fix_link,file_details]],ExperimentalInstallButton->[pgettext_lazy],FeaturedInstallButton->[_],big_install_button->[install_button,statusflags,Markup,escape],UnreviewedInstallButton->[split,pgettext_lazy],install_button->[is_authenticated,hasattr,render_to_string,get,Markup,install_button_factory],install_button_factory->[InstallButton,getattr,prepare],PersonaInstallButton->[links->[Link,ugettext,reverse,unicode],attrs->[super]]] | Get details about a file. | maybe you should just override `Addon.show_beta` ? |
@@ -284,6 +284,14 @@ public class ComponentRegistry extends AbstractComponentRegistry {
return inboundInvocationHandler;
}
+ /**
+ * Returns the cache configuration for this component registry
+ * @return config
+ */
+ public Configuration getConfiguration() {
+ return configuration;
+ }
+
/**
* Invoked before any {@link ModuleCommandInitializer}.
* This is a good place to register components that don't have any dependency.
| [ComponentRegistry->[cacheComponents->[getComponent],getClassLoader->[getClassLoader],getTimeService->[getTimeService],getLocalComponent->[getClassLoader,getComponent,getLocalComponent],getTransactionTable->[getComponent],getComponentMetadataRepo->[getComponentMetadataRepo],getOrCreateComponent->[getComponent],start->[start],getCacheMarshaller->[getComponent],getComponent->[getClassLoader,getComponent]]] | Returns the per - cache inbound invocation handler. | Couldn't `BatchingClusterEventManagerImpl` inject the configuration instead? |
@@ -125,6 +125,18 @@ public class DetermineHashedPartitionsJob implements Jobby
groupByJob.submit();
log.info("Job %s submitted, status available at: %s", groupByJob.getJobName(), groupByJob.getTrackingURL());
+ return groupByJob.getJobID().toString();
+ }
+ catch (Exception e) {
+ throw Throwables.propagate(e);
+ }
+ }
+
+ @Override
+ public boolean run()
+ {
+ try {
+
if (!groupByJob.waitForCompletion(true)) {
log.error("Job failed: %s", groupByJob.getJobID());
failureCause = Utils.getFailureMessage(groupByJob, config.JSON_MAPPER);
| [DetermineHashedPartitionsJob->[DetermineCardinalityReducer->[run->[run]],DetermineCardinalityMapper->[setup->[setup],run->[setup]]]] | This method is invoked when the job is run. It is responsible for group the partitions and Determines the intervals for the HADOOP segments and shards. This method is called when the job is scheduled to determine if there are any hashed partitions. | Please `throw new RuntimeException(e)` instead. |
@@ -816,6 +816,7 @@ class BasePipeline(object):
pm.create_pipeline(name)
self.add_preprocessing_stage(pm)
self.add_with_handling_stage(pm)
+ self.add_ssa_transformation_stage(pm)
self.add_pre_typing_stage(pm)
self.add_typing_stage(pm)
self.add_optimization_stage(pm)
| [compile_ir->[compile_local->[compile_ir],compile_local,compile_ir],ir_processing_stage->[run],compile_result->[CompileResult],compile_internal->[Pipeline,compile_extra],Pipeline->[define_pipelines->[define_objectmode_pipeline,define_interpreted_pipeline,define_nopython_pipeline]],BasePipeline->[stage_objectmode_backend->[_backend],stage_pre_parfor_pass->[run],stage_generic_rewrites->[fallback_context],stage_parfor_pass->[run],backend_object_mode->[giveup_context],backend_nopython_mode->[fallback_context],add_pre_typing_stage->[add_stage],stage_nopython_rewrites->[fallback_context],stage_inline_pass->[run],define_objectmode_pipeline->[add_stage,add_cleanup_stage,create_pipeline,add_preprocessing_stage],add_lowering_stage->[add_stage],_compile_ir->[_compile_core],stage_compile_interp_mode->[compile_result],frontend_looplift->[compile_ir],define_interpreted_pipeline->[add_stage,add_cleanup_stage,create_pipeline],_backend->[compile_result],add_typing_stage->[add_stage],_compile_core->[finalize,define_pipelines,_PipelineManager,run],stage_objectmode_frontend->[_EarlyPipelineCompletion,frontend_looplift],__init__->[_CompileStatus],add_optimization_stage->[add_stage],compile_extra->[extract_bytecode],stage_nopython_frontend->[fallback_context],add_with_handling_stage->[add_stage],add_cleanup_stage->[add_stage],stage_frontend_withlift->[compile_ir,_EarlyPipelineCompletion],_compile_bytecode->[_compile_core],add_preprocessing_stage->[add_stage],define_nopython_pipeline->[add_with_handling_stage,add_cleanup_stage,create_pipeline,add_preprocessing_stage,add_pre_typing_stage,add_stage,add_typing_stage,add_lowering_stage,add_optimization_stage],stage_nopython_backend->[_backend],stage_dead_branch_prune->[fallback_context]],_PipelineManager->[run->[_patch_error]],compile_extra->[compile_extra],Flags] | Add the nopython - mode pipeline to the pipeline manager. | Is this the correct way to introduce SSA in the pipeline? |
@@ -444,7 +444,14 @@ class TorchRankerAgent(TorchAgent):
):
cand_preds = self.block_repeats(cand_preds)
- preds = [cand_preds[i][0] for i in range(batchsize)]
+ if self.opt.get('inference', 'max') == 'max':
+ preds = [cand_preds[i][0] for i in range(batchsize)]
+ else:
+ # Top-k inference.
+ preds = []
+ for i in range(batchsize):
+ preds.append(random.choice(cand_preds[i][0 : self.opt['topk']]))
+
return Output(preds, cand_preds)
def block_repeats(self, cand_preds):
| [TorchRankerAgent->[eval_step->[score_candidates],train_step->[_get_train_preds,score_candidates,_get_batch_train_metrics],set_fixed_candidates->[get_task_candidates_path],_make_candidate_encs->[encode_candidates]]] | Evaluate a single batch of examples. Output the prediction of a in the model. | Topk in then generator is stochastic to the logits. Should we here too? |
@@ -225,9 +225,13 @@ class PipelineFile(FileMixin):
@property
def stages(self):
+ from dvc.parsing import DataLoader
+
data, _ = self._load()
+ spec = DataLoader(data)
+ resolved = spec.resolve()
lockfile_data = self._lockfile.load()
- return StageLoader(self, data.get("stages", {}), lockfile_data)
+ return StageLoader(self, resolved.get("stages", {}), lockfile_data)
def remove(self, force=False):
if not force:
| [check_dvc_filename->[is_valid_filename],Lockfile->[load->[exists,validate,LockfileCorruptedError],remove_stage->[exists,validate,remove]],SingleStageFile->[merge->[merge,dump],stages->[_load],stage->[_load],remove_stage->[remove],dump->[relpath,check_dvc_filename]],is_dvc_file->[is_valid_filename],FileMixin->[exists->[exists],relpath->[relpath],_load->[exists,check_dvc_filename]],Dvcfile->[__new__->[PipelineFile,SingleStageFile]],PipelineFile->[_dump_lockfile->[dump],stages->[_load],remove->[remove],remove_stage->[exists,validate,remove_stage],dump->[check_dvc_filename]]] | Returns a StageLoader object that loads all stages in the pipeline. | Hack for now, we'll need to short-circuit this function to the repo somehow. I like `repo.stages.get()` syntax (that means, we will need to think something for current `repo.stages`. |
@@ -540,7 +540,7 @@ public abstract class AbstractPlaceDelegate extends BaseTripleADelegate
}
final List<Unit> fighters = producer.getUnitCollection().getMatches(ownedFighters);
final Collection<Unit> movedFighters =
- getRemotePlayer().getNumberOfFightersToMoveToNewCarrier(fighters, producer);
+ bridge.getRemotePlayer().getNumberOfFightersToMoveToNewCarrier(fighters, producer);
if (movedFighters == null || movedFighters.isEmpty()) {
return null;
}
| [AbstractPlaceDelegate->[getMaxUnitsToBePlacedMap->[getAllProducers],getAllProducers->[getAllProducers,canProduce],updateProducedMap->[getAlreadyProduced],wasOwnedUnitThatCanProduceUnitsOrIsFactoryInTerritoryAtStartOfStep->[unitsAtStartOfStepInTerritory],unitWhichRequiresUnitsHasRequiredUnits->[getAllProducers],isPlayerAllowedToPlacementAnyTerritoryOwnedLand->[isPlaceInAnyTerritory],howManyOfEachConstructionCanPlace->[getAlreadyProduced],saveState->[saveState],getCanAllUnitsWithRequiresUnitsBePlacedCorrectly->[getMaxUnitsToBePlacedMap,getAllProducers,unitWhichRequiresUnitsHasRequiredUnits],initialize->[initialize],performPlaceFrom->[updateUndoablePlacementIndexes],isPlayerAllowedToPlacementAnySeaZoneByOwnedLand->[isPlaceInAnyTerritory],removeAirThatCantLand->[removeAirThatCantLand],checkProduction->[getAllProducers],getBestProducerComparator->[getMaxUnitsToBePlacedFrom],wasConquered->[wasConquered],freePlacementCapacity->[undoMove,performPlaceFrom,updateProducedMap,freePlacementCapacity,removeFromProducedMap],getTerritoriesWhereAirCantLand->[getTerritoriesWhereAirCantLand],loadState->[loadState],unitsPlacedInTerritorySoFar->[unitsAtStartOfStepInTerritory],end->[end],canProduce->[canProduce],getMaxUnitsToBePlacedFrom->[getMaxUnitsToBePlacedFrom,getAllProducers,getAlreadyProduced],removeFromProducedMap->[getAlreadyProduced],unitsAtStartOfStepInTerritory->[getAllProducers,getAlreadyProduced]]] | Method to move a unit from one territory to another. Returns the name of the node. | Are you sure this is safe? Just checking as I've ran across examples where the local data was not the same as the data on the bridge. It manifested as unexpected null data as the bridge data was only partially maintained. |
@@ -94,4 +94,12 @@ public class OMKeyCommitResponse extends OMClientResponse {
protected String getOzoneKeyName() {
return ozoneKeyName;
}
+
+ protected void maybeUpdateDeletedTable(OMMetadataManager omMetadataManager,
+ BatchOperation batchOperation) throws IOException {
+ if (this.keysToDelete != null) {
+ omMetadataManager.getDeletedTable().putWithBatch(batchOperation,
+ ozoneKeyName, keysToDelete);
+ }
+ }
}
| [OMKeyCommitResponse->[addToDBBatch->[deleteWithBatch,getBucketKey,getBucketName,putWithBatch,getVolumeName],checkStatusNotOK]] | Get the name of the Ozone key. | Minor: Can we rename this as updateDeletedTable? |
@@ -1004,8 +1004,6 @@ bool simple_wallet::init(const boost::program_options::variables_map& vm)
}
crypto::secret_key viewkey = *reinterpret_cast<const crypto::secret_key*>(viewkey_data.data());
- m_wallet_file=m_generate_from_view_key;
-
// check the view key matches the given address
crypto::public_key pkey;
if (!crypto::secret_key_to_public_key(viewkey, pkey)) {
| [No CFG could be retrieved] | Create a new account from a view secret key. missing keys are generated from the wallet file. | why remove this ? |
@@ -50,7 +50,7 @@ struct pool_svc {
struct ds_pool *ps_pool;
};
-static bool pool_disable_evict = false;
+static bool pool_disable_exclude = false;
static int pool_prop_read(struct rdb_tx *tx, const struct pool_svc *svc,
uint64_t bits, daos_prop_t **prop_out);
static int pool_space_query_bcast(crt_context_t ctx, struct pool_svc *svc,
| [No CFG could be retrieved] | The list of all possible pool attributes. This function writes the specified to the appropriate entry in the pool database. | (style) do not initialise statics to false |
@@ -60,7 +60,11 @@ class AssignmentsController < ApplicationController
def student_interface
@assignment = Assignment.find(params[:id])
if @assignment.is_hidden
- render file: "public/404.html", status: 404
+ render 'shared/http_status', formats: [:html],
+ locals: { code: '404',
+ message:
+ HttpStatusHelper::ERROR_CODE['message']['404'] },
+ status: 404, layout: false
return
end
| [AssignmentsController->[process_assignment_form->[new],create->[new],new->[new],update_assignment!->[new],decline_invitation->[decline_invitation]]] | This action is used to display a single node in the system. It is the base action This method is called by the submission module when a new - day token is found. | Align the elements of a hash literal if they span more than one line. |
@@ -41,8 +41,10 @@ public class BigtableReadIT {
BigtableTestOptions options = TestPipeline.testingPipelineOptions()
.as(BigtableTestOptions.class);
+ String project = TestPipeline.testingPipelineOptions().as(GcpOptions.class).getProject();
+
BigtableOptions.Builder bigtableOptionsBuilder = new BigtableOptions.Builder()
- .setProjectId(options.getProjectId())
+ .setProjectId(project)
.setInstanceId(options.getInstanceId());
final String tableId = "BigtableReadTest";
| [BigtableReadIT->[testE2EBigtableRead->[create,globally,getInstanceId,apply,isEqualTo,register,run,setInstanceId,as]]] | Example of how to read a chunk of data from a Bigtable. | Just for clarity, this will re-initialize the options, so just `options.as(GcpOptions.class).getProject()` will do here. |
@@ -186,6 +186,11 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo
return
}
} else {
+ if entry.IsLink() {
+ ctx.Data["Err_TreePath"] = true
+ ctx.RenderWithErr(ctx.Tr("repo.editor.file_is_a_symlink", part), EDIT_FILE, &form)
+ return
+ }
if entry.IsDir() {
ctx.Data["Err_TreePath"] = true
ctx.RenderWithErr(ctx.Tr("repo.editor.filename_is_a_directory", part), tplEditFile, &form)
| [Handle,NumFiles,Status,Size,NotFoundOrServerError,Close,DeleteRepoFile,Redirect,RenderWithErr,PlainText,HTML,GetTreeEntryByPath,Error,UpdateRepoFile,DeleteUploadByUUID,GetDiffPreview,Trace,HasError,JSON,NewUpload,TrimSpace,Tr,Join,Data,Name,GetFilesChangedSinceCommit,IsTextFile,IsErrNotExist,Read,NewReplacer,Split,ToUTF8WithErr,DetectContentType,GetBranch,Success,IsDir,Sprintf,FullName,Blob,FormFile,String,Replace,ReadAll,UploadRepoFiles,Trim] | if treeNames is empty newTreePath is a file or a directory in the tree ger_exists checks if a file already exists in the tree and if so it can clobber. | You need to replace the constant |
@@ -1,3 +1,6 @@
+import { propertyEqual } from "discourse/lib/computed";
+import { ajax } from "discourse/lib/ajax";
+import { popupAjaxError } from "discourse/lib/ajax-error";
import {
postUrl,
selectedElement,
| [No CFG could be retrieved] | The default component that displays a quote button if the user selects a post and the user selects Get the element that is selected in the list. | I think the name of this file is no longer representative of what is going on here. |
@@ -226,11 +226,13 @@ class AssignmentsController < ApplicationController
end
begin
- @assignment = process_assignment_form(@assignment, params)
- rescue Exception, RuntimeError => e
- @assignment.errors.add(:base, I18n.t('assignment.error',
- message: e.message))
- render :edit, id: @assignment.id
+ @assignment.transaction do
+ @assignment = process_assignment_form(@assignment, params)
+ end
+ rescue SubmissionRule::InvalidRuleType => e
+ @assignment.errors.add(:base, I18n.t('assignment.error',
+ message: e.message))
+ render :edit, id: @assignment.id
return
end
| [AssignmentsController->[update_assignment!->[new],new->[new],create->[new],decline_invitation->[decline_invitation]]] | Updates a single object. | Avoid rescuing the `Exception` class. |
@@ -7,13 +7,13 @@
* @kind function
*
* @description
- * Creates an injector function that can be used for retrieving services as well as for
+ * Creates an injector object that can be used for retrieving services as well as for
* dependency injection (see {@link guide/di dependency injection}).
*
* @param {Array.<string|Function>} modules A list of module functions or their aliases. See
* {@link angular.module}. The `ng` module must be explicitly added.
- * @returns {function()} Injector function. See {@link auto.$injector $injector}.
+ * @returns {function()} Injector object. See {@link auto.$injector $injector}.
*
* @example
* Typical usage
| [No CFG could be retrieved] | A function that can be used to create a injector function that can be used to create a Synthetic module which gets automatically added to each component. | @thorn0 , @caitp : Shouldn't also the type be changed (from `function()` to `Object`) ? |
@@ -146,11 +146,15 @@ public class DynamicMetadataDeclarationEnricher implements DeclarationEnricher {
String outputResolver = metadataScope.getOutputResolver().get().getResolverName();
String attributesResolver = metadataScope.getAttributesResolver().get().getResolverName();
String keysResolver = metadataScope.getKeysResolver().get().getResolverName();
+
+ //TODO MULE-15638 - Once Metadata API 2.0 is implemented we will know better if the resolver requires or not a connection of config.
declaration.addModelProperty(new TypeResolversInformationModelProperty(categoryName,
inputResolversByParam,
outputResolver,
attributesResolver,
- keysResolver));
+ keysResolver,
+ declaration.isRequiresConnection(),
+ declaration.isRequiresConnection()));
}
}
| [DynamicMetadataDeclarationEnricher->[EnricherDelegate->[enrichWithDsql->[enrichMetadataKeyParameters],getCategoryName->[getCategoryName]],enrich->[enrich]]] | This method is used to declare the type resolvers information for a given category. | this should come from the annotation |
@@ -2131,6 +2131,17 @@ func (e ChatClientError) IsImmediateFail() (chat1.OutboxErrorType, bool) {
//=============================================================================
+type ChatUsersAlreadyInConversationError struct {
+ Uids []keybase1.UID
+ ConvID chat1.ConversationID
+}
+
+func (e ChatUsersAlreadyInConversationError) Error() string {
+ return fmt.Sprintf("Cannot readd existing users to this conversation")
+}
+
+//=============================================================================
+
type ChatStalePreviousStateError struct{}
func (e ChatStalePreviousStateError) Error() string {
| [IsImmediateFail->[HasPrefix],Verbose->[Sprintf],Error->[ToDuration,Join,Error,Sprintf,Seqno,IsNil,PerTeamKeyGeneration,String,EncodeToString],StatusCode,Error,Sprintf,Contains,Cause,New,UIDFromString,ToLower,Errorf,GetProofStatus,Split,HumanError] | Error implements the error interface for ChatStalePreviousStateError. | what is this used for? |
@@ -72,6 +72,11 @@ namespace System.IO.Compression
}
}
+ /// <summary>Asynchronously releases the unmanaged resources used by the <see cref="System.IO.Compression.BrotliStream" />.</summary>
+ /// <returns>A task that represents the asynchronous dispose operation.</returns>
+ /// <remarks>The `DisposeAsync` method lets you perform a resource-intensive dispose operation without blocking the main thread. This performance consideration is particularly important in a Windows 8.x Store app or desktop app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the <see langword="async" /> and <see langword="await" /> keywords in Visual Basic and C#.
+ /// This method disposes the Brotli stream by writing any changes to the backing store and closing the stream to release resources.
+ /// Calling `DisposeAsync` allows the resources used by the <see cref="System.IO.Compression.BrotliStream" /> to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged).</remarks>
public override async ValueTask DisposeAsync()
{
try
| [BrotliStream->[ReleaseStateForDispose->[Dispose],Dispose->[Dispose]]] | Dispose the object. | What form did `` `DisposeAsync` `` have in the original input? It should have been rendered either as a `<see cref>` or as a `<c>` element. |
@@ -113,6 +113,17 @@ class CUDACodeLibrary(serialize.ReduceMixin, CodeLibrary):
arch = nvvm.get_arch_option(*cc)
options = self._nvvm_options.copy()
options['arch'] = arch
+ if not nvvm.NVVM().is_nvvm70:
+ # Avoid enabling debug for NVVM 3.4 as it has various issues. We
+ # need to warn the user that we're doing this if any of the
+ # functions that they're compiling have `debug=True` set, which we
+ # can determine by checking the NVVM options.
+ debug_callee = any(lib._nvvm_options.get('debug')
+ for lib in self.linking_libraries)
+ if options.get('debug') or debug_callee:
+ msg = "debuginfo is not generated for CUDA versions < 11.2"
+ warn(NumbaInvalidConfigWarning(msg))
+ options['debug'] = False
irs = [str(mod) for mod in self.modules]
| [CUDACodeLibrary->[get_cufunc->[get_cubin],get_cubin->[_get_ptxes],get_sass->[disassemble_cubin,get_cubin]]] | Get the list of ptxes for a given nexus sequence. | From OOB discussion, this message is going to be updated to include the function name so it's easy for users to find the function(s) causing this warning. |
@@ -238,7 +238,7 @@ class DatastoreioTest(unittest.TestCase):
elif req == kind_stat_req:
return kind_stat_resp
else:
- print kind_stat_req
+ print(kind_stat_req)
raise ValueError("Unknown req: %s" % req)
self._mock_datastore.run_query.side_effect = fake_run_query
| [DatastoreioTest->[test_DatastoreWriteFn_with_emtpy_batch->[check_DatastoreWriteFn],test_DatastoreWriteFn_with_multiple_batches->[check_DatastoreWriteFn],check_estimated_size_bytes->[fake_run_query->[ValueError],call,make_latest_timestamp_query,make_request,micros_from_timestamp,from_timestamp,make_stats_response,assertEqual,get_estimated_size_bytes,make_kind_stats_query],test_DatastoreWriteFn_with_batch_size_exact_multiple->[check_DatastoreWriteFn],test_get_estimated_size_bytes_without_namespace->[Timestamp,check_estimated_size_bytes],test_SplitQueryFn_with_num_splits->[fake_get_splits->[split_query],append,process,SplitQueryFn,object,assertEqual,len,verify_unique_keys,start_bundle],test_DatastoreWriteLargeEntities->[finish_bundle,to_upsert_mutation,DatastoreWriteFn,process,object,assertEqual,create_entities,add_properties,start_bundle],make_stats_response->[add,RunQueryResponse,add_properties],test_DatastoreWriteFn_with_one_batch->[check_DatastoreWriteFn],test_get_estimated_size_bytes_with_namespace->[Timestamp,check_estimated_size_bytes],check_DatastoreWriteFn->[create_commit,start_bundle,finish_bundle,process,object,assertEqual,map,create_entities,DatastoreWriteFn],test_SplitQueryFn_without_num_splits->[fake_get_splits->[split_query],append,process,SplitQueryFn,object,assertEqual,len,verify_unique_keys,start_bundle],setUp->[add,MagicMock,Query],split_query->[append,range,CopyFrom,Query],test_SplitQueryFn_with_exception->[append,process,SplitQueryFn,object,assertEqual,len,ValueError,verify_unique_keys,start_bundle],verify_unique_keys->[zip,set,assertEqual,len],test_SplitQueryFn_with_query_limit->[append,process,SplitQueryFn,object,assertEqual,len,start_bundle]],DynamicWriteBatcherTest->[test_slow_queries->[get_batch_size,report_latency,assertEquals],test_no_data->[get_batch_size,assertEquals],test_size_not_below_minimum->[get_batch_size,report_latency,assertEquals],setUp->[_DynamicBatchSizer],test_sliding_window->[get_batch_size,report_latency,assertEquals],test_fast_queries->[get_batch_size,report_latency,assertEquals]],skipIf,main] | A helper method to test get_estimated_size_bytes. | We have too many print statements. We should probably convert them to logs or remove them. |
@@ -153,6 +153,7 @@ func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.
err := fn(ctx, cancel)
if err != nil {
cancel()
+ _ = cmd.Wait()
return err
}
}
| [RunInDirWithEnv->[RunInDirTimeoutEnv],RunInDirFullPipeline->[RunInDirTimeoutFullPipeline],RunInDirTimeoutEnv->[String,RunInDirTimeoutEnvPipeline],RunInDirTimeoutPipeline->[RunInDirTimeoutEnvPipeline],Run->[RunTimeout],RunInDirTimeoutFullPipeline->[RunInDirTimeoutEnvFullPipeline],RunInDirBytes->[RunInDirTimeout],RunTimeout->[RunInDirTimeout],RunInDirTimeoutEnvFullPipelineFunc->[String]] | RunInDirTimeoutEnvFullPipelineFunc runs the command in the specified directory with the specified cant be called if the context is canceled. | Should we at least log if there is an error here? |
@@ -0,0 +1,9 @@
+"""
+This module contains a task for starting and monitoring Fivetran connector sync jobs
+"""
+try:
+ from prefect.tasks.fivetran.fivetran import FivetranSyncTask
+except ImportError as import_error:
+ raise ImportError(
+ 'Using `prefect.tasks.fivetran` requires Prefect to be installed with the "fivetran" extra.'
+ ) from import_error
| [No CFG could be retrieved] | No Summary Found. | Unless I'm mistaken, your task doesn't require any special dependencies, so it will actually be available automatically to every Prefect user! |
@@ -68,7 +68,6 @@ namespace ILCompiler.Reflection.ReadyToRun
case Machine.Amd64:
return ((Amd64.Registers)regnum).ToString();
case Machine.Arm:
- case Machine.ArmThumb2:
return ((Arm.Registers)regnum).ToString();
case Machine.Arm64:
return ((Arm64.Registers)regnum).ToString();
| [DebugInfo->[EnsureInitialized->[Image,DecodeUnsigned,ParseNativeVarInfo,ParseBounds,GetNextByteOffset,Machine,Assert,ReadUInt],ParseNativeVarInfo->[VLT_REG_BYREF,VariableLocation,VLT_REG,VLT_STK,EndOffset,Data3,VLT_REG_FP,Add,Max,VLT_REG_REG,Data1,VLT_STK_REG,ReadEncodedStackOffset,ReadUInt,VariableNumber,StartOffset,VLT_STK2,Data2,VLT_FIXED_VA,VLT_REG_STK,VarLocType,VLT_STK_BYREF,VLT_FPSTK],ParseBounds->[NativeOffset,ILOffset,ReadUInt,Assert,SourceTypes,MaxMappingValue,Add],ReadEncodedStackOffset->[ReadInt,I386],GetPlatformSpecificRegister->[ArmThumb2,Amd64,I386,Arm,Arm64,ToString],_readyToRunReader,EnsureInitialized,_offset]] | Get the platform - specific register name for a given machine. | It appears that the script is overwriting some expected changes like this one. We need to make sure we only add the expected changes. |
@@ -446,15 +446,15 @@ class ReceiveTransferRefundCancelRoute(AuthenticatedSenderStateChange):
def to_dict(self) -> typing.Dict[str, typing.Any]:
return {
'secret': serialize_bytes(self.secret),
- 'sender': to_checksum_address(self.sender),
'routes': self.routes,
'transfer': self.transfer,
+ 'balance_proof': self.balance_proof,
+ 'balance_hash': serialize_bytes(self.balance_proof.balance_hash),
}
@classmethod
def from_dict(cls, data) -> 'ReceiveTransferRefundCancelRoute':
instance = cls(
- sender=to_canonical_address(data['sender']),
routes=data['routes'],
transfer=data['transfer'],
secret=deserialize_bytes(data['secret']),
| [ActionInitInitiator->[__ne__->[__eq__]],ReceiveLockExpired->[__ne__->[__eq__]],ReceiveTransferRefund->[__ne__->[__eq__]],ActionInitMediator->[__ne__->[__eq__]],ReceiveSecretReveal->[__ne__->[__eq__]],ActionInitTarget->[__ne__->[__eq__]],ReceiveTransferRefundCancelRoute->[__ne__->[__eq__]],ReceiveSecretRequest->[__ne__->[__eq__]],ActionCancelRoute->[__ne__->[__eq__]]] | Serialize the object to a dictionary. | This is also part of the bugfix |
@@ -56,7 +56,7 @@ describes.realWin(
expect(iframe).to.not.be.null;
expect(iframe.tagName).to.equal('IFRAME');
expect(iframe.src).to.equal(
- 'https://www.dailymotion.com/embed/video/x2m8jpp?api=1&html=1&app=amp'
+ 'https://www.dailymotion.com/embed/video/x2m8jpp?api=1&html=1&app=amp&mute=0'
);
});
| [No CFG could be retrieved] | Initialize AMP - Dailymotion. Requires that the x2m8jpp iframe is present and that the data - videos. | To confirm: This doesn't change behavior to 0.1, correct? |
@@ -63,7 +63,7 @@ def fetch_checkout_lines(checkout: "Checkout") -> Iterable[CheckoutLineInfo]:
"variant__product__collections",
"variant__channel_listings__channel",
"variant__product__product_type",
- )
+ ).select_related()
lines_info = []
for line in lines:
| [fetch_checkout_lines->[CheckoutLineInfo],fetch_checkout_info->[CheckoutInfo]] | Fetch checkout lines as CheckoutLineInfo objects. | This drops 12 queries from the test case. I think this might be due to Django autocaching intermediary lookups that weren't listed (lines 70 and 71) |
@@ -35,13 +35,16 @@ var interfaceConfig = { // eslint-disable-line no-unused-vars
//main toolbar
'microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'fodeviceselection', 'hangup', // jshint ignore:line
//extended toolbar
- 'profile', 'addtocall', 'contacts', 'info', 'chat', 'recording', 'etherpad', 'sharedvideo', 'dialout', 'settings', 'raisehand', 'videoquality', 'filmstrip'], // jshint ignore:line
+ 'profile', 'contacts', 'info', 'chat', 'recording', 'etherpad', 'sharedvideo', 'settings', 'raisehand', 'videoquality', 'filmstrip'], // jshint ignore:line
/**
* Main Toolbar Buttons
* All of them should be in TOOLBAR_BUTTONS
*/
MAIN_TOOLBAR_BUTTONS: ['microphone', 'camera', 'desktop', 'invite', 'fullscreen', 'fodeviceselection', 'hangup'], // jshint ignore:line
SETTINGS_SECTIONS: ['language', 'devices', 'moderator'],
+ // TODO: rename invite to sharelink, once the complete transition to the
+ // new invite UI is done.
+ INVITE_OPTIONS: ['invite', 'dialout', 'addtocall'],
// Determines how the video would fit the screen. 'both' would fit the whole
// screen, 'height' would fit the original video height to the height of the
// screen, 'width' would fit the original video width to the width of the
| [No CFG could be retrieved] | Jitsi specific functions Displays the filmstrip and thumbnails of a given node. | Is this still a todo? Does it seem out of scope to do it now? |
@@ -611,6 +611,8 @@ discard_1(void **state)
ds.td_agg_epr.epr_lo, ds.td_iod_size);
aggregate_basic(arg, &ds, 0, NULL);
}
+
+ cleanup();
}
/*
* Discard on single akey-SV with epr [A, B].
| [run_discard_tests->[cmocka_run_group_tests_name,dts_create_config],run_aggregate_tests->[cmocka_run_group_tests_name,dts_create_config],int->[assert_rc_equal,rand,D_ALLOC,D_FREE,d_iov_set,vos_hdl2cont,vos_iterate,vos_obj_cache_current,strlen,assert_true,test_args_reset,assert_non_null,update_value,vos_obj_release,vos_obj_hold],daos_size_t->[assert_true],void->[generate_akeys,daos_unit_oid_is_null,d_iov_set,aggregate_10,daos_fail_loc_set,SCM_FREE,vos_pool_query,io_test_obj_update,assert_non_null,d_sgl_init,d_sgl_fini,rand,dts_buf_render,vos_aggregate,io_test_obj_fetch,phy_recs_nr,aggregate_multi,VERBOSE_MSG,min,strlen,dts_key_gen,do_punch,agg_punches_test_helper,assert_int_equal,generate_view,vos_obj_punch,assert_rc_equal,SCM_TOTAL,D_ALLOC,D_FREE,generate_or_verify,fill_cont,sleep,daos_fail_value_set,aggregate_9,NVME_FREE,generate_recx,get_ds_index,D_ALLOC_ARRAY,aggregate_11,dts_unit_oid_gen,print_error,assert_memory_equal,fetch_value,verify_view,print_space_info,NVME_TOTAL,DP_UOID,memset,aggregate_basic,get_view_len,assert_true,vos_discard,lookup_object,multi_view,agg_punches_test,update_value,aggregate_6]] | private static final int DAOS_IOD_SINGLE = 0 ; at_sv_IOD_SIZE_SMALL - discard epr. | I don't see the purpose of this call for each discard/aggregation test case. |
@@ -8,6 +8,7 @@ from conans.test.assets.sources import gen_function_cpp, gen_function_h
from conans.test.utils.tools import TestClient
+@pytest.mark.xfail(reason="NewCppInfo: xfail until it adds default folders for the components")
@pytest.mark.tool_cmake
def test_file_api():
"""
| [test_file_api->[gen_function_cpp,gen_cmakelists,dedent,TestClient,gen_function_h,join,run,save]] | Test API for C ++ file API. Generate C ++ functions for Huffman - C. Elogio is a class that represents a single node in the Elogio project. This function is called from the conan. py script. It is called from the con. | I don't see components here. but I trust you, just wanted to double check |
@@ -63,10 +63,12 @@ else:
initial_port = initial_port or 27854
for port in count(initial_port):
+ # Because it is not know which interface the socket will bind to,
+ # if there is any socket in the target port it must be skiped.
connect_using_port = (
conn
for conn in psutil.net_connections()
- if hasattr(conn, "laddr") and conn.laddr[0] == LOOPBACK and conn.laddr[1] == port
+ if hasattr(conn, "laddr") and conn.laddr[1] == port
)
if not any(connect_using_port):
| [get_http_rtt->[append,request,print,sleep,sum,range],_unused_ports->[listen,hasattr,setsockopt,getsockname,any,repeat,connect,bind,Port,net_connections,closing,socket,accept,count],get_free_port->[_unused_ports]] | Yields unused ports. | Otherwise port lookup does not work and running two instances fails. E.g. this wouldn't work: `python -m raiden smoketest` with `--eth-client parity` and `--eth-client geth` |
@@ -79,6 +79,7 @@ class Phist(CMakePackage):
depends_on('cmake@3.8:', type='build')
depends_on('blas')
depends_on('lapack')
+ depends_on('python@3')
depends_on('mpi', when='+mpi')
depends_on('trilinos+anasazi+belos+teuchos', when='+trilinos')
depends_on('trilinos@12:+tpetra', when='kernel_lib=tpetra')
| [Phist->[test_install->[working_dir,make],check->[working_dir,make],cmake_args->[],depends_on,version,on_package_attributes,variant,run_after]] | Create a configuration parameter that can be used to configure a single . Create a function to set the cmake arguments for the given n - tuple. | Is it not version specific? Say starting with 1.6.1? If so, you should add 'when=' |
@@ -166,6 +166,15 @@ cert = OptionMaker(
metavar='path',
help="Path to alternate CA bundle.")
+client_cert = OptionMaker(
+ '--client-cert',
+ dest='client_cert',
+ type='str',
+ default=None,
+ metavar='path',
+ help="Path to SSL client certificate, a single file containing the "
+ "private key and the certificate in PEM format.")
+
index_url = OptionMaker(
'-i', '--index-url', '--pypi-url',
dest='index_url',
| [make_option_group->[add_option,OptionGroup,make],OptionMaker->[make->[Option,deepcopy]],OptionMaker] | Options for the list of packages. Adds option mirrors and find_links to packages. | I'd like this help expanded a little bit to mention that it should be a single file that contains both the private key and the certificate. |
@@ -44,7 +44,9 @@ func fillCache(t *testing.T, cache cache.Cache) ([]string, []chunk.Chunk) {
ts.Add(chunkLen),
)
- buf, err := c.Encode()
+ err := c.Encode()
+ require.NoError(t, err)
+ buf, err := c.Encoded()
require.NoError(t, err)
keys = append(keys, c.ExternalKey())
| [Less->[ExternalKey],RemoveAll,NewMemcached,TempDir,Encode,Fetch,Add,NewDecodeContext,Itoa,Stop,Int,New,Empty,Len,ExternalKey,NewFifoCache,Store,Equal,Join,ParseExternalKey,Sort,NewMockCache,NoError,SampleValue,NewChunkFetcher,Fingerprint,NewChunk,TimeFromUnix,Background,Decode,Intn,NewDiskcache,NewSnappy,Run,FetchChunks] | testCacheSingle returns a list of strings and chunks from the given cache. testCacheMultiple tests that the cache has all the chunks for the given keys. | Just use `Encoded()` here now that it calls `Encode()` internally? |
@@ -171,4 +171,5 @@ public enum BeanMessage {
@MessageId("001529")INJECTION_TARGET_CREATED_FOR_CLASS_WITHOUT_APPROPRIATE_CONSTRUCTOR,
@MessageId("001530")INJECTION_TARGET_CANNOT_PRODUCE_INSTANCE,
@MessageId("001531")INSTANCE_ITERATOR_REMOVE_UNSUPPORTED,
+ @MessageId("001532")PASSIVATION_CAPABLE_BEAN_HAS_NULL_ID,
}
| [No CFG could be retrieved] | Invocation of INJECTION_TARGET_CREATED_FOR_CLASS_WITH_APPRO. | A localized message for this key needs to be added to impl/src/main/resources/org/jboss/weld/messages/bean_en.properties |
@@ -894,6 +894,7 @@ describe UserController, "when signing up" do
msg = "Attempted signup from suspected spammer, " \
"email: spammer@example.com, " \
"name: 'Download New Person 1080p!'"
+ allow(Rails.logger).to receive(:info)
expect(Rails.logger).to receive(:info).with(msg)
post :signup, params: {
| [make_request->[url_name,get],email,create,close_and_anonymise,new,let,be,describe,match_array,fixture_file_upload,first,it,name,map,to,show_user_path,save!,before,body,info_request_events,post,with,require,created_at,include,signin_path,parse,dirname,receive,now,allow_forgery_protection,match,destroy!,id,set_described_state,deliveries,redirect_to,load_file_fixture,context,url_name,token,get,not_to,info_requests,eq,users,info_request,after,render_template,reload,raise_error,and_return,expand_path] | Requires the action mailer to receive a signup request. re - renders the form and then sends a message to the user. | This commit is the same as the `Fix failing Users::SessionsController spec` commit after the fixup has been applied. I think theses could be merged together. |
@@ -1811,13 +1811,13 @@ void Server::SendMovePlayer(session_t peer_id)
assert(sao);
NetworkPacket pkt(TOCLIENT_MOVE_PLAYER, sizeof(v3f) + sizeof(f32) * 2, peer_id);
- pkt << sao->getBasePosition() << sao->getPitch() << sao->getYaw();
+ pkt << sao->getBasePosition() << sao->getLookPitch() << sao->getYaw();
{
v3f pos = sao->getBasePosition();
verbosestream << "Server: Sending TOCLIENT_MOVE_PLAYER"
<< " pos=(" << pos.X << "," << pos.Y << "," << pos.Z << ")"
- << " pitch=" << sao->getPitch()
+ << " pitch=" << sao->getLookPitch()
<< " yaw=" << sao->getYaw()
<< std::endl;
}
| [No CFG could be retrieved] | finds an active object in the network with a specific health value Send local player animations. | I was confused by sao.getYaw() here but remember that PlayerSAO inherits from UNITSAO. UNITSAO has contains the function for setYaw(), not in PlayerSAO. It is getting the player model yaw. |
@@ -201,9 +201,13 @@ func SetReadQuery(v uint64) RegionCreateOption {
// SetWrittenQuery sets the write query for the region.
func SetWrittenQuery(v uint64) RegionCreateOption {
q := &pdpb.QueryStats{
- Put: v / 3,
- Delete: v / 3,
- DeleteRange: v / 3,
+ Put: v / 7,
+ Delete: v / 7,
+ DeleteRange: v / 7,
+ Rollback: v / 7,
+ Prewrite: v / 7,
+ Commit: v / 7,
+ AcquirePessimisticLock: v / 7,
}
return SetQueryStats(q)
}
| [GetPeers,GetStoreId,Sort,GetRegionEpoch,GetId,Pow10] | SetRegion returns a function to set the parameters of the region. SetReportInterval sets the report interval for the region. | why use seven field to record the same query stat ?? |
@@ -118,7 +118,7 @@ class SemanticRoleLabeler(Model):
# Negative log likelihood criterion takes integer labels, not one hot.
if tags.dim() == 3:
_, tags = tags.max(-1)
- loss = self.sequence_loss(reshaped_log_probs, tags.view(-1))
+ loss = weighted_cross_entropy_with_logits(logits, tags, mask)
output_dict["loss"] = loss
return output_dict
| [SemanticRoleLabeler->[tag->[forward],from_params->[from_params]]] | Forward computation of a . encoder on all registered encoders. This method is called to find the tag and label of a given node in the model. | Remove the `self.sequence_loss` field and associated TODO above. |
@@ -0,0 +1,17 @@
+require 'set'
+
+# rubocop:disable Rails/HelperInstanceVariable
+module ScriptHelper
+ def javascript_pack_tag_once(name)
+ @scripts ||= Set.new
+ @scripts.add(name)
+ end
+
+ # rubocop:disable Rails/OutputSafety
+ def print_javascript_pack_once_tags
+ return unless @scripts
+ @scripts.map { |name| javascript_pack_tag(name) }.join('').html_safe
+ end
+ # rubocop:enable Rails/OutputSafety
+end
+# rubocop:enable Rails/HelperInstanceVariable
| [No CFG could be retrieved] | No Summary Found. | I'd call it `render_` not `print_` because when I see print I think STDOUT? |
@@ -446,6 +446,8 @@ class Scaffold_Command extends WP_CLI_Command {
if ( isset( $assoc_args['activate'] ) ) {
WP_CLI::run_command( array( 'plugin', 'activate', $plugin_slug ) );
+ } else if ( isset( $assoc_args['activate-network'] ) ) {
+ WP_CLI::run_command( array( 'plugin', 'activate', $plugin_slug), array( 'network' => true ) );
}
}
| [Scaffold_Command->[plugin->[create_file,maybe_create_plugins_dir],plugin_tests->[chmod,copy,create_file,init_wp_filesystem,mkdir],post_type->[_scaffold],_s->[maybe_create_themes_dir,init_wp_filesystem],create_file->[put_contents,init_wp_filesystem,mkdir],package_tests->[run],child_theme->[create_file,maybe_create_themes_dir],taxonomy->[quote_comma_list_elements,_scaffold],_scaffold->[extract_args,pluralize,get_textdomain,create_file,get_output_path,init_wp_filesystem]]] | Plugin main function. | Why is this code in this PR? |
@@ -336,10 +336,6 @@ def _train_worker(
master_port: int = 29500,
world_size: int = 1,
distributed_device_ids: List[str] = None,
- # For fine-tuning:
- model: Model = None,
- extend_vocab: bool = False,
- embedding_sources_mapping: Dict[str, str] = None,
) -> Optional[Model]:
"""
Helper to train the configured model/experiment. In distributed mode, this is spawned as a
| [TrainModel->[finish->[dump_metrics,evaluate,join,items,info],run->[train],from_partial_objects->[index_with,construct,cls,get,is_master,read_all_datasets,items,join,from_instances,save_to_files,ConfigurationError]],train_model_from_file->[train_model,from_file],_train_worker->[from_params,int,import_submodules,prepare_global_logging,exists,set_device,len,str,finish,prepare_environment,run,info,join,barrier,archive_model,init_process_group],train_model_from_args->[train_model_from_file],train_model->[to_file,_train_worker,pop,get,len,check_for_gpu,duplicate,load,isinstance,join,spawn,info,create_serialization_dir,make_vocab_from_params,archive_model,ConfigurationError],Train->[add_subparser->[add_parser,set_defaults,add_argument]],register,getLogger] | Helper function to train a worker with a single node - rank. A base class for the n - epoch weight - n - epoch model. Initialize a single n - tuple from the user s input. | `recover` is unused here. I wonder why. |
@@ -69,7 +69,7 @@ namespace System.ComponentModel
Volatile.Write(ref s_convertFromInvariantString, mi == null ? new object() : mi.CreateDelegate(typeof(Func<Type, string, object>)));
}
- if (!(s_convertFromInvariantString is Func<Type?, string?, object> convertFromInvariantString))
+ if (!(s_convertFromInvariantString is Func<Type, string?, object> convertFromInvariantString))
return false;
try
| [DefaultValueAttribute->[Equals->[Equals],GetHashCode->[GetHashCode]]] | Creates a new DefaultValueAttribute object from the specified string value. Default value attribute for the C - N - bit unsigned integer. | Why did we drop the nullable annotation? |
@@ -71,6 +71,13 @@ class DependencyContext(Subsystem, DependencyContextBase):
prop = prop or selector(ScalaPlatform.global_instance())
return prop
+ def dependencies_respecting_strict_deps(self, target):
+ if DependencyContext.global_instance().defaulted_property(target, lambda x: x.strict_deps):
+ dependencies = target.strict_dependencies(DependencyContext.global_instance())
+ else:
+ dependencies = DependencyContext.global_instance().all_dependencies(target)
+ return dependencies
+
class ResolvedJarAwareFingerprintStrategy(FingerprintStrategy):
"""Task fingerprint strategy that also includes the resolved coordinates of dependent jars."""
| [ResolvedJarAwareFingerprintStrategy->[direct->[defaulted_property],dependencies->[direct]]] | Computes a language property setting for a given target. | This doesn't use `self`, but should I think. |
@@ -144,7 +144,7 @@ class Trainer:
if is_best:
logger.info("Best validation performance so far. "
"Copying weights to %s/best.th'.", self._serialization_prefix)
- shutil.copy(model_path, os.path.join(model_path, "best.th"))
+ shutil.copyfile(model_path, os.path.join(self._serialization_prefix, "best.th"))
def _restore_checkpoint(self) -> int:
"""
| [Trainer->[train->[train],from_params->[Trainer]]] | Save a checkpoint of a specific . Load the last N - tuple from the model_state_epoch_. th. | Should you also modify `_restore_checkpoint` to load the best model? Or should that go somewhere else? |
@@ -55,6 +55,13 @@ describe Draft do
Draft.cleanup!
expect(Draft.count).to eq 1
+
+ # should cleanup drafts more than 180 days old
+ SiteSetting.stubs(:delete_drafts_older_than_n_days).returns(180)
+
+ Draft.last.update_columns(updated_at: 200.days.ago)
+ Draft.cleanup!
+ expect(Draft.count).to eq 0
end
| [to,context,cleanup!,create,describe,user,before,clear,current,next!,revise,private_message,eq,set,draft_key,update_all,it,require] | clear all drafts and remove all old drafts does not nuke new topic draft after a pm is created. | minor but simpler SiteSetting.delete_drafts_older_than_n_days = 180 no need to stub here . |
@@ -249,10 +249,10 @@ def provenanced_addresses_from_address_families(
)
# NB: This may be empty, as the result of filtering by tag and exclude patterns!
- yield ProvenancedBuildFileAddresses(
+ return ProvenancedBuildFileAddresses(
tuple(
ProvenancedBuildFileAddress(
- build_file_address=addr, provenance=addr_to_provenance.get(addr)
+ build_file_address=addr, provenance=addr_to_provenance[addr]
)
for addr in matched_addresses
)
| [_hydrate->[ResolvedTypeMismatchError],address_provenance_map->[AddressProvenanceMap],hydrate_struct->[consume_dependencies->[maybe_consume],collect_inline_dependencies->[maybe_append],_raise_did_you_mean,consume_dependencies,collect_inline_dependencies],provenanced_addresses_from_address_families->[_raise_did_you_mean]] | Given an AddressMapper and a list of Specs return matching addresses for that AddressFamily. Yields all build file addresses that have a tag and target that match the given filter. | Huh! TIL. Looks like they added this syntax in python 3.3. |
@@ -646,7 +646,7 @@ def test_automatic_vmrk_sfreq_recovery():
@testing.requires_testing_data
def test_event_id_stability_when_save_and_fif_reload(tmpdir):
"""Test load events from brainvision annotations when read_raw_fif."""
- fname = op.join(str(tmpdir), 'bv-raw.fif')
+ fname = tmpdir / 'bv-raw.fif'
raw = read_raw_brainvision(vhdr_path, eog=eog)
original_events, original_event_id = events_from_annotations(raw)
| [test_brainvision_vectorized_data->[assert_array_almost_equal,assert_array_equal,read_raw_brainvision,warns,array],test_parse_impedance->[datetime,read_raw_brainvision,len,replace,object_diff,enumerate,index,warns],test_vhdr_codepage_ansi->[split,write,read_raw_brainvision,assert_equal,str,copy,startswith,join,open,assert_allclose],test_meas_date->[repr,read_raw_brainvision],test_brainvision_data_software_filters_latin1_global_units->[_test_raw_reader,assert_equal,warns],test_brainvision_data_lowpass_filters->[all,any,assert_equal,zip,str,_test_raw_reader,warns],test_read_vhdr_annotations_and_events->[events_from_annotations,_stamp_to_dt,assert_array_equal,keys,append,read_raw_brainvision,update,sorted,copy,stack,array,enumerate,concatenate_raws,warns,assert_allclose],test_vhdr_versions->[split,raises,write,read_raw_brainvision,copy,startswith,join,open,assert_allclose],test_brainvision_data_partially_disabled_hw_filters->[all,any,assert_equal,zip,str,_test_raw_reader,warns],test_event_id_stability_when_save_and_fif_reload->[events_from_annotations,assert_array_equal,read_raw_brainvision,str,read_raw_fif,join,save],_mocked_meas_date_data->[readlines,basename,mktemp,str,copyfile,join,zip,open],test_brainvision_neuroone_export->[read_raw_brainvision,len],test_automatic_vmrk_sfreq_recovery->[assert_array_equal,read_annotations],test_read_vmrk_annotations->[write,read_annotations,str,join,open,range,next],test_brainvision_data->[assert_array_almost_equal,assert_equal,read_raw_brainvision,squeeze,read_raw_fif,repr,RuntimeError,_test_raw_reader,raises,pick_types],mocked_meas_date_file->[open,_stamp_to_dt,writelines],test_brainvision_data_highpass_filters->[all,any,assert_equal,zip,str,_test_raw_reader,warns],test_orig_units->[values,sum,read_raw_brainvision,len],test_coodinates_extraction->[max,read_raw_brainvision,len,warns,array],test_ascii->[split,write,read_raw_brainvision,copy,replace,startswith,join,encode,open,assert_allclose],run_tests_if_main,dtype,fixture,dirname,data_path,join,parametrize,array] | Test load events from brainvision annotations when read_raw_fif. | locally, this test failed, and I have no idea why. |
@@ -261,6 +261,9 @@ def validate_pai_trial_conifg(experiment_config):
print_warning(warning_information.format('dataDir'))
if experiment_config.get('trial').get('outputDir'):
print_warning(warning_information.format('outputDir'))
+ if experiment_config.get('trainingServicePlatform') == 'pai':
+ if experiment_config.get('trial').get('paiConfigPath'):
+ get_yml_content(experiment_config['trial']['paiConfigPath'])
def validate_all_content(experiment_config, config_path):
'''Validate whether experiment_config is valid'''
| [parse_advisor_content->[validate_customized_file],validate_annotation_content->[validate_search_space_content],validate_all_content->[parse_assessor_content,validate_annotation_content,validate_pai_trial_conifg,parse_tuner_content,parse_advisor_content,validate_common_content,parse_time,parse_path],parse_path->[parse_relative_path,expand_path],parse_assessor_content->[validate_customized_file],parse_tuner_content->[validate_customized_file]] | Validate the trial config. | what is the meaning of this line? unused return content |
@@ -62,11 +62,11 @@ class TestRegistrable(AllenNlpTestCase):
# Registering under a name that already exists should overwrite
# if exist_ok=True.
@base_class.register("fake", exist_ok=True) # noqa
- class FakeAlternate(base_class):
+ class FakeAlternate2(base_class):
pass
- assert base_class.by_name("fake") == FakeAlternate
+ assert base_class.by_name("fake") == FakeAlternate2
del Registrable._registry[base_class]["fake"]
| [TestRegistrable->[test_registry_has_builtin_text_field_embedders->[by_name],test_registry_has_builtin_tokenizers->[by_name],test_registry_has_builtin_token_indexers->[by_name],test_implicit_include_package->[,push_python_path,raises,write,getabsfile,str,read,join,mkdir,by_name,open],test_registry_has_builtin_regularizers->[by_name],test_registry_has_builtin_samplers->[by_name],test_registry_has_builtin_token_embedders->[by_name],test_registrable_functionality_works->[by_name,register,raises,list_available]]] | This function tests that the basic functionality works. | Python 3.8 flake8 complained about this for some reason |
@@ -745,7 +745,9 @@ public final class KsqlRestApplication implements Executable {
final ConcurrencyLimiter pullQueryConcurrencyLimiter = new ConcurrencyLimiter(
ksqlConfig.getInt(KsqlConfig.KSQL_QUERY_PULL_MAX_CONCURRENT_REQUESTS_CONFIG),
"pull queries");
-
+ final SlidingWindowRateLimiter pullBandRateLimiter = new SlidingWindowRateLimiter(
+ ksqlConfig.getInt(KsqlConfig.KSQL_QUERY_PULL_MAX_HOURLY_BANDWIDTH_CONFIG),
+ 3600 * 1000);
final DenyListPropertyValidator denyListPropertyValidator = new DenyListPropertyValidator(
ksqlConfig.getList(KsqlConfig.KSQL_PROPERTIES_OVERRIDES_DENYLIST));
| [KsqlRestApplication->[buildApplication->[buildApplication,KsqlRestApplication],shutdown->[shutdown],displayWelcomeMessage->[getListeners,displayWelcomeMessage],waitForPreconditions->[AbortApplicationStartException],loadSecurityExtension->[initialize],checkPreconditions->[KsqlFailedPrecondition]]] | Creates a KsqlRestApplication object. Creates a new agent for the given query. Creates a managed topic. Creates a new application with all the required parameters. | `3600 * 1000` might be good to either put in a constant here or maybe even in another config if we think we might adjust how this is enforced. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.