patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -18,6 +18,9 @@ class Cquery(CMakePackage):
depends_on('llvm')
+ # trivial patch (missing header) by mueller@kip.uni-heidelberg.de
+ patch('fix-gcc10.patch', level=0, when='%gcc@10.0:')
+
def cmake_args(self):
args = ['-DCMAKE_EXPORT_COMPILE_COMMANDS=YES',
'-DSYSTEM_CLANG... | [Cquery->[depends_on,version]] | Return the list of arguments to pass to cmake. | Normally I'd ask for a link to a discussion, but the site for `cquery` mentions that it's no longer under development, so this seems fine. |
@@ -677,10 +677,12 @@ frappe.views.CommunicationComposer = Class.extend({
last_email_content = last_email_content.slice(0, 20 * 1024);
}
+ const fwd = this.forward ? "<br><b>Forwarded Message<b><br>" : "";
let communication_date = last_email.communication_date || last_email.creation;
content = `
... | [No CFG could be retrieved] | Show the last message in the message. Text content of a node with no empty lines replaced with a single line. | `reply` contains the signature too, so this will be rendered below the signature. |
@@ -93,7 +93,16 @@ func RunOpenShiftControllerManager(config *openshiftcontrolplanev1.OpenShiftCont
if err != nil {
return err
}
- go leaderelection.RunOrDie(context.Background(),
+
+ ctx, cancel := context.WithCancel(context.TODO())
+ go func() {
+ select {
+ case <-stopCh:
+ cancel()
+ }
+ }()
+
+ go lead... | [RESTClient,StatusCode,CoreV1,Warningf,RunOrDie,NewForConfig,StartInformers,Hostname,StartLogging,Events,Done,StartRecordingToSink,New,NewRecorder,Errorf,RunControllerServer,NewBroadcaster,PollImmediate,Infof,Do,V,Discovery,InitLogrus,Fatalf,Get,NewDefaultImageTemplate,ExpandOrDie,Raw,NewControllerContext,Background,Ab... | WaitForHealthyAPIServer waits for the API server to become available and returns an error if it Checks if the server is healthy. | wasn't there a new RunWithContext? |
@@ -174,9 +174,6 @@ func (c *Container) Commit(ctx context.Context, sess *session.Session, h *Handle
c.vm = vm.NewVirtualMachine(ctx, sess, res.Result.(types.ManagedObjectReference))
c.State = StateCreated
- // align the handle state w/the container
- h.State = &c.State
-
commitEvent = events.ContainerCrea... | [shutdown->[waitForPowerState],Signal->[startGuestProgram],stop->[shutdown],Error->[Error],Remove->[Remove],String,Error] | Commit commits the container Initialize the handle. | Why did we take this out? |
@@ -229,7 +229,11 @@ abstract class AbstractMessageProcessorChain extends AbstractExecutableComponent
// Apply processing strategy. This is done here to ensure notifications and interceptors do not execute on async processor
// threads which may be limited to avoid deadlocks.
if (processingStrategy != nu... | [AbstractMessageProcessorChain->[fireNotification->[fireNotification],getLocalOperatorErrorHook->[apply],setMuleContext->[getMessageProcessorsForLifecycle,setMuleContext],doOnNextOrErrorWithContext->[onComplete->[onComplete],onError->[onError],onSubscribe->[onSubscribe],onNext->[onNext]],stop->[getMessageProcessorsForL... | Resolves interceptors for the next thread. | only do the new stuff if te feature is enabled |
@@ -34,7 +34,17 @@ namespace System.Runtime.Serialization
private ISerializationSurrogateProvider? _serializationSurrogateProvider;
private bool _serializeReadOnlyTypes;
- private static SerializationOption _option = IsReflectionBackupAllowed() ? SerializationOption.ReflectionAsBackup : Seria... | [DataContractSerializer->[InternalReadObject->[InternalReadObject],InternalWriteObject->[InternalWriteObject],InternalWriteObjectContent->[InternalWriteObjectContent],Initialize->[Initialize]]] | A class that encapsulates the serialization logic for the given object type. Constructor for the class. | nit: I'd think a better name could be `GetDefaultSerializationOption`. |
@@ -110,13 +110,13 @@ namespace System.Xml
// Writes out the attribute with the specified LocalName and value.
public void WriteAttributeString(string localName, string value)
{
- WriteStartAttribute(null, localName, (string)null);
+ WriteStartAttribute(null, localName, ... | [XmlWriter->[WriteNmToken->[WriteString],WriteElementString->[WriteStartElement,WriteElementString,WriteEndElement,WriteString],WriteName->[WriteString],WriteNode->[WriteAttributes,WriteEndElement,WriteStartAttribute,WriteEntityRef,WriteCData,WriteEndAttribute,WriteStartElement,WriteComment,WriteFullEndElement,WriteCha... | Write an attribute with a string value. | Most of the public APIs accepting `string text` allowing null `text` |
@@ -194,7 +194,7 @@ public class ReportSubmitterTest {
}
@Test
- public void submit_a_report_on_existing_project_with_global_scan_permission() {
+ public void submit_a_report_on_existing_project_with_scan_permission_on_organization() {
userSession.setGlobalPermissions(SCAN_EXECUTION);
ComponentDto... | [ReportSubmitterTest->[submit_a_report_on_new_project_with_global_scan_permission->[toInputStream,any,thenReturn,mockSuccessfulPrepareSubmitCall,setGlobalPermissions,setKey,submit],submit_fails_with_organizationKey_does_not_match_organization_of_specified_component->[toInputStream,insert,getKey,insertProject,mockSucces... | submit a report on existing project with global scan permission. | hum... what does `setGlobalPermissions(SCAN_EXECUTION);` do now? shouldn't this test be updated according to its new name? |
@@ -137,6 +137,7 @@ func (cfg *StorageConfig) RegisterFlags(f *flag.FlagSet) {
f.Var(&cfg.S3, "s3.url", "S3 endpoint URL with escaped Key and Secret encoded. "+
"If only region is specified as a host, proper endpoint will be deduced. Use inmemory:///<bucket-name> to use a mock in-memory implementation.")
f.BoolV... | [NextPage->[NextPage],PutChunks->[BatchWrite],GetChunks->[Error],Add->[String],getDynamoDBChunks->[Send,Data,Error,Retryable],HasNextPage->[HasNextPage],TakeReqs->[String,Len],Send->[Send],RegisterFlags->[RegisterFlags],PutChunkAndIndex->[BatchWrite],String->[String],Add] | RegisterFlags registers flags for storage config. | Nit: `Set this to true to.." is a bit redundant, could just say "Force S3e requests to be made over HTTPS." If you change it, please change the one above to. |
@@ -78,7 +78,6 @@ import io.confluent.ksql.util.DecimalUtil;
import io.confluent.ksql.util.KsqlConfig;
import io.confluent.ksql.util.KsqlException;
import io.confluent.ksql.util.VisitorUtil;
-import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
| [ExpressionTypeManager->[Visitor->[visitFunctionCall->[getExpressionSqlType],visitSearchedCaseExpression->[getExpressionSqlType]],getExpressionSqlType->[getExpressionSqlType]]] | Imports the package that contains all of the functions that are part of the SQL. Gets the SqlType for a given expression. | rather than exposing `TypeContext` in `getExpressionSqlType` I think it would be better to just add a parameter that's a map from String to SqlType that contains the types for all the lambda parameters. `TypeContext` really feels like it should be an internal detail of this class. I know we have it being passed around ... |
@@ -33,7 +33,7 @@ class ClipTest(tf.test.TestCase):
clip_value = 4.4
ans = tf.clip_by_value(x, -clip_value, clip_value)
tf_ans = ans.eval()
-
+
self.assertAllClose(np_ans, tf_ans)
def testClipByValueNonFinite(self):
| [ClipTest->[testClipByGlobalNormSupportsNone->[assertTrue,ans,assertAllClose,clip_by_global_norm,eval,test_session,constant],testClipByNormNotClippedWithAxes->[assertAllClose,eval,test_session,constant,clip_by_norm],testClipByGlobalNormZero->[ans,assertAllClose,clip_by_global_norm,eval,test_session,constant],testClipBy... | Test clipping by value. | please don't add extra whitespace |
@@ -62,9 +62,14 @@ public class ConciseCompressedIndexedInts implements IndexedInts, Comparable<Con
}
@Override
- public int compareTo(ConciseCompressedIndexedInts conciseCompressedIndexedInts)
+ public int compareTo(@Nullable ImmutableBitmap conciseCompressedIndexedInts)
{
- return immutableConciseSet.... | [ConciseCompressedIndexedInts->[iterator->[next->[next],hasNext->[hasNext],iterator],size->[size],compareTo->[compareTo],ImmutableConciseSetObjectStrategy->[toBytes->[size,toBytes],compare->[compare]]]] | Compares this set to another set. | Technically an IllegalArgumentException |
@@ -464,6 +464,9 @@ namespace JsUtil
// Do nothing
}
+// Xplat-todo: revive BackgroundJobProcessor- we need this for the JIT
+#if ENABLE_BACKGROUND_JOB_PROCESSOR
+
// -------------------------------------------------------------------------------------------------------------------------
// Ba... | [No CFG could be retrieved] | This is a private method that is called by the background - thread processor when it is needed Magic number. | nit: Hard to find out where this #if ends. Add to #endif // ENABLE_BACKGROUND_JOB_PROCESSOR |
@@ -1185,7 +1185,9 @@ public class Workspace extends Processor {
IO.store("#\n# " + name.toUpperCase()
.replace('.', ' ') + "\n#\n", getFile(pdir, Project.BNDFILE));
- Project p = new Project(this, pdir);
+
+ projects.refresh();
+ Project p = getProject(name);
IO.mkdirs(p.getTarget());
IO.mkdirs(p... | [Workspace->[syncCache->[CachedFileRepo,init],isPresent->[isPresent],refresh->[refresh,getCurrentProjects,WorkspaceData],getProjectFromFile->[getProject],CachedFileRepo->[init->[init]],close->[close],_gestalt->[getGestalt],removeProject->[refresh],_repodigests->[getRepositories],createDefaultWorkspace->[Workspace],prop... | Creates a new project with the specified name. | I did not do this because they you cannot update many projects. Also, getProject() can return null which is not handled. Last, if you want to do this right we should add add/remove project methods. |
@@ -729,6 +729,7 @@ class ContentMapper implements ContentMapperInterface
'changed' => $document->getChanged(),
'changer' => $document->getChanger(),
'created' => $document->getCreated(),
+ 'publishedState' => $nodeState === WorkflowStage::PUBLISHED,
'publi... | [ContentMapper->[documentsToStructureCollection->[documentToStructure,optionsShouldExcludeDocument],loadExtensionData->[load],loadByResourceLocator->[loadByResourceLocator],loadByParent->[loadByParent]]] | Converts a row of data into an array. Returns array with data for a node in the tree. | Why did you have to touch this file? Is there still a dependency to it in the scope of this PR? |
@@ -589,7 +589,7 @@ TEMPLATES = [
{
'NAME': 'jinja2',
'BACKEND': 'django_jinja.backend.Jinja2',
- 'DIRS': [path('jinja2')],
+ 'DIRS': [path('jinja2'), path('static')],
'APP_DIRS': True,
'OPTIONS': {
# Use jinja2/ for jinja templates
| [pipeline_one_scss->[pipeline_scss],_get_locales->[path],path,_get_locales,pipeline_scss] | Creates a new feed fetcher config object. The main entry point for the extension chain. | This could be ``path('kuma/static')``, and then ``make build-static`` wouldn't be required. We can tease this apart in the next asset pipeline. |
@@ -8276,8 +8276,8 @@ void ok_to_send() {
SERIAL_ECHOPAIR(" L=", L);
SERIAL_ECHOPAIR(" R=", R);
SERIAL_ECHOLNPAIR(" offset=", offset);
+ last_offset = offset;
}
- last_offset = offset;
//*/
return offset;
| [No CFG could be retrieved] | This function is called to determine if a specific entry is found in the system. This function reverts to default settings and sets the appropriate values. | This line should be left outside of the braces where it is. The intent is to compare the previous offset to the current one (not just the last offset that was too large). |
@@ -55,8 +55,12 @@ $langs->load("cron");
$key = GETPOST('securitykey','alpha');
if (empty($key))
{
- echo 'Securitykey is required. Check setup of cron jobs module.';
- exit;
+ $key = argv[1];
+ if (empty($key))
+ {
+ echo 'Securitykey is required. Check setup of cron jobs module.';
+ exit;
+ }
}
if($key != $c... | [fetch,fetch_all,run_jobs,close,load,reprogram_jobs] | Check if a cron key is correct and execute the jobs user. class. php. | This script is not dedicated to be ran from CLI as it is into htdocs/public You may make a confusion between script with same name into dir scripts/cron (dedicated to be ran as CLI only) |
@@ -79,6 +79,10 @@ type ShipperConfig struct {
Topology_expire int
Tags []string
Geoip common.Geoip
+
+ // internal publisher queue sizes
+ QueueSize *int `yaml:"queue_size"`
+ BulkQueueSize *int `yaml:"bulk_queue_size"`
}
type Topology struct {
| [init->[PublishTopology,UpdateTopologyPeriodically]] | confirm - confirm whether the user has requested a single and if yes confirm the if returns the name of the shipper if it s localhost or the name of the. | I'm +1 on making this also visible in the config file but with a warning, that people that change it must understand what they are doing. |
@@ -18,6 +18,8 @@ import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.collect.ImmutableMap;
import com.google.common.graph.Traverser;
+import io.prestosql.execution.StageInfo;
+import io.prestosql.sql.planner.PlanFragment;
import io.pre... | [StatsAndCosts->[create->[StatsAndCosts,getStats],getForSubplan->[StatsAndCosts],StatsAndCosts]] | Creates an instance of StatsAndCosts that represents the statistics and costs of a single node. Get statistics for a single . | > `Move construction of StatsAndCosts from StageInto to StatsAndCosts` is it only the code being moved, or any changes? what's the benefit? |
@@ -316,8 +316,10 @@ angular.module('ngResource', ['ng']).
var self = this,
url = actionUrl || self.template,
val,
- encodedVal;
+ encodedVal,
+ suffix = '';
+ if (params.hasOwnProperty('suffix')) {suffix = params['suffix']; delete params['suf... | [No CFG could be retrieved] | This method is intended to be used to encode a key or value in a route. It set the url and params - delegate encoding to http. | This should not be here?? |
@@ -66,7 +66,7 @@ public class HeadlessGameServer {
private final List<Runnable> shutdownListeners = Arrays.asList(
lobbyWatcherResetupThread::shutdown,
() -> Optional.ofNullable(game).ifPresent(ServerGame::stopGame),
- () -> setupPanelModel.getPanel().cancel());
+ () -> Optional.ofNullable(s... | [HeadlessGameServer->[getChat->[getChat],waitForUsersHeadlessInstance->[waitForUsersHeadless],handleHeadlessGameServerArgs->[usage],waitForUsersHeadless->[setServerGame],start->[HeadlessGameServer],setServerGame->[getInstance],headless->[getInstance],getServerModel->[getServerModel]]] | Creates a new instance of the class that can be used to run a game on the server Load the user - specific data and start a headless game. | btw. This fixes a `NullPointerException` I encountered when shutting down the bot. |
@@ -333,10 +333,11 @@ def _time_frequency(X, Ws, use_fft):
tfrs = _cwt_convolve(X, Ws, mode)
for tfr in tfrs:
- tfr_abs = np.abs(tfr)
- psd += tfr_abs ** 2
- plf += tfr / tfr_abs
-
+ psd += tfr
+ plf += tfr / np.abs(tfr)
+ psd = np.abs(psd) / n_epochs
+ psd *= ps... | [AverageTFR->[plot->[_preproc_tfr],__iadd__->[_check_compat],__isub__->[_check_compat],__add__->[_check_compat],__sub__->[_check_compat],plot_topo->[_preproc_tfr]],_induced_power->[morlet,_time_frequency],_time_frequency->[_cwt_fft,_cwt_convolve],tfr_morlet->[AverageTFR,_induced_power],tfr_multitaper->[AverageTFR,_indu... | Aux of time_frequency for parallel computing over multiple channels. Compute the power during baseline after subtracting the mean from the time - frequency and then subtract Check if a is needed. | Moved the absolute value, division, and squaring operations to this function to be more DRY (and avoid errors). |
@@ -88,6 +88,18 @@ class Admin::EmailController < Admin::AdminController
render_json_dump(serializer)
end
+ def incoming_from_bounced
+ params.require(:id)
+
+ bounced = EmailLog.find(params[:id].to_i)
+ email_local_part, email_domain = SiteSetting.notification_email.split('@')
+ bounced_to_addre... | [skipped->[skipped],bounced->[bounced],delivery_method->[delivery_method],sent->[sent]] | finds a single node in the system and returns a json object with all the nodes that. | This is going to raise an error if the ID is invalid. We probably want to use `find_by` and raise `Discourse::InvalidParameters` instead so that the error message is clearer. |
@@ -33,3 +33,16 @@ def check_dimensions_match(dimension_1: int,
if dimension_1 != dimension_2:
raise ConfigurationError(f"{dim_1_name} must match {dim_2_name}, but got {dimension_1} "
f"and {dimension_2} instead")
+
+
+def cuda_is_valid(device_id: int):
+ if device_id ... | [log_pytorch_version_info->[info],ConfigurationError->[__str__->[repr],__init__->[super]],check_dimensions_match->[ConfigurationError],getLogger] | Check that two dimensions match. | I'm not a fan of this name, to me `cuda_is_valid` sounds like a function that returns a boolean. I would prefer it were called `check_for_gpu` or something that's more descriptive when you call it. |
@@ -5476,6 +5476,9 @@ spa_vdev_remove(spa_t *spa, uint64_t guid, boolean_t unspare)
* in this pool.
*/
if (vd == NULL || unspare) {
+ if (vd == NULL)
+ vd = spa_lookup_by_guid(spa, guid, B_TRUE);
+ spa_event_notify(spa, vd, ESC_ZFS_VDEV_REMOVE_AUX);
spa_vdev_remove_aux(spa->spa_spares.sav_config,
... | [No CFG could be retrieved] | Evacuate the given device. finds the vdev which is empty. | Just curious, why did you move up the spa_event_notify() to be before the actual spa_vdev_remove_aux()? |
@@ -229,6 +229,7 @@ func (es *EventStream) start(paths []string, callbackInfo uintptr) {
go func() {
runtime.LockOSThread()
es.rlref = CFRunLoopRef(C.CFRunLoopGetCurrent())
+ C.CFRetain(C.CFTypeRef(es.rlref))
C.FSEventStreamScheduleWithRunLoop(es.stream, C.CFRunLoopRef(es.rlref), C.kCFRunLoopDefaultMode)
... | [start->[LockOSThread,SetFinalizer,FSEventStreamScheduleWithRunLoop,CFRunLoopGetCurrent,CFRunLoopRun,FSEventStreamStart,CFRunLoopRef],CFStringRef,FSEventStreamInvalidate,CFUUIDRef,CFArrayGetCount,CFRunLoopStop,FSEventStreamCopyDescription,CFTimeInterval,CFAbsoluteTime,int,CFUUIDCreateString,ArrayCreateMutable,CFStringC... | start starts the event stream. | Good find. Does the upstream project need this too? If so can you please open a PR to contribute this back. |
@@ -456,9 +456,10 @@ def create_fake_order():
payment = create_payment(delivery_group)
if payment.status == PaymentStatus.CONFIRMED:
- order.change_status(OrderStatus.FULLY_PAID)
+ order.status = OrderStatus.FULLY_PAID
if random.choice([True, False]):
- order.change_status(... | [create_product_images->[create_product_image],create_fake_user->[create_address,get_email],create_fake_order->[create_delivery_group,create_address,get_email,create_payment,create_order_lines],create_product_sales->[create_fake_sale],create_products_by_class->[get_variant_combinations,get_price_override,set_product_at... | Create a fake order with no data. | You are already saving order on line 449, is it necessary for creating delivery group? |
@@ -61,3 +61,7 @@ class TeeLogger:
def cleanup(self) -> TextIO:
self.log.close()
return self.terminal
+
+ @staticmethod
+ def getvalue() -> str:
+ return ""
| [TeeLogger->[write->[write,replace_cr_with_newline],flush->[flush]]] | Close the log and return the terminal node ID. | This is just something I did so some tests not fail in PyCharm. |
@@ -327,7 +327,9 @@ func GetPassphraseStreamStored(m MetaContext) (pps *PassphraseStream, err error)
// GetTriplesecMaybePrompt will try to get the user's current triplesec.
// It will either pluck it out of the environment or prompt the user for
-// a passphrase if it can't be found.
+// a passphrase if it can't b... | [RetrieveSecret,GetUID,CInfof,GetDeviceIDForUID,GetSecret,UIs,SetLoginSession,CWarningf,GetUsername,CreateStreamCache,Error,SaveState,CDebugf,SecretStore,PassphraseStreamAndTriplesec,Session,Ctx,PostDecode,IsNil,CTrace,StoreSecret,LoadServerHalf,PopulateArgs,SetGeneration,PassphraseStreamCache,CurrentUID,Generation,Cur... | GetTriplesecMaybePrompt tries to get the current triplesec and passphrase stream from the GetPassphraseStreamViaPrompt gets the passphrase stream from the user. | is no use -> is not used |
@@ -69,12 +69,12 @@ public class SourceWindow implements LastSourceDocClosedHandler,
Provider<DesktopHooks> pDesktopHooks,
Satellite satellite,
EventBus events,
- SourceShim shim,
+ Source source,
SnippetServerOperations snippetServer,
ApplicationCommand... | [SourceWindow->[handleUnsavedChangesBeforeExit->[handleUnsavedChangesBeforeExit],getCurrentDocId->[getCurrentDocId],saveWithPrompt->[saveWithPrompt],getUnsavedChanges->[getUnsavedChanges],closeSourceWindow->[execute->[onReadyToQuit],getUnsavedChanges,onReadyToQuit,saveWithPrompt],getCurrentDocPath->[getCurrentDocPath],... | Creates a new instance of SourceWindow. load custom snippets into this window. | update file copyright year |
@@ -423,6 +423,16 @@ def setup_main_options(args):
# when to use color (takes always, auto, or never)
color.set_color_when(args.color)
+ # If install-root, upstream, or global command specified
+ # Target different install root here.
+ if args.install_root:
+ spack.store.install_root = args.... | [_profile_wrapper->[_invoke_command],SpackArgumentParser->[format_help_sections->[add_subcommand_group->[add_group],add_all_commands,index_commands,add_group,add_subcommand_group],add_command->[add_subparsers,add_parser],format_help->[format_help_sections]],print_setup_info->[shell_set],main->[_profile_wrapper,setup_ma... | Configure the main environment based on the basic options. | I think only one option should be available since they all set the same underlying attribute (and have the same effect). |
@@ -0,0 +1,17 @@
+/*
+ * Copyright The OpenTelemetry Authors
+ * SPDX-License-Identifier: Apache-2.0
+ */
+
+package io.opentelemetry.javaagent.instrumentation.guava;
+
+import io.opentelemetry.instrumentation.api.tracer.async.AsyncSpanEndStrategies;
+import io.opentelemetry.instrumentation.guava.GuavaAsyncSpanEndStrat... | [No CFG could be retrieved] | No Summary Found. | Nit: can you make it final and add a private constructor? |
@@ -84,9 +84,9 @@ public class AppenderatorDriverMetadata
.stream()
.filter(segmentIdentifier -> !activeSegmentsAlreadySeen.contains(
segmentIdentifier.toString()))
- ... | [AppenderatorDriverMetadata->[newHashMap,newHashSet,checkState,toList,getKey,collect,addAll,forEach,put]] | This class is used to provide the basic information about the segments that are currently in the append Returns the last segment ids and caller metadata if it is a non - null non - null. | are changes to SegmentState backward compatible ? it appears that possible values in SegmentState have changed with this patch. How will this work against the metadata persisted by previous versions of the code. e.g. someone upgrades druid which stops all peons on middle manager and restarts them with new code which wi... |
@@ -0,0 +1,13 @@
+# Generated by Django 2.2.12 on 2020-05-05 13:39
+
+from django.db import migrations
+
+
+def remove_waffle_switch(apps, schema_editor):
+ Switch = apps.get_model('waffle', 'Switch')
+ Switch.objects.filter(name='es-use-classic-similarity').all().delete()
+
+
+class Migration(migrations.Migratio... | [No CFG could be retrieved] | No Summary Found. | I don't see any model changes associated with this. Just curious, how did Django know to generate this migration? |
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class UsernameOverrider
+ def self.override(user, new_username)
+ if user.username_equals_to?(new_username)
+ # override anyway since case could've been changed:
+ UsernameChanger.change(user, new_username, user)
+ true
+ elsif user.username != Us... | [No CFG could be retrieved] | No Summary Found. | Would it make sense to move this method into the `UsernameChanger` class instead of creating a new class just for this method. |
@@ -21,6 +21,9 @@ import org.apache.shiro.realm.text.IniRealm;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.util.ThreadContext;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
+import org.apache.shiro.mgt.SecurityManager;
+import org.apache.shiro.config.Ini;
+import org.apache.shiro.co... | [SecurityUtils->[getRoles->[hasNext,getName,next,equals,getRealmsList,get,getKey,isAuthenticated,iterator,hasRole,add,getSubject],getRealmsList->[get,getRealms],getPrincipal->[isAuthenticated,getSubject,toString],isValidOrigin->[equals,contains,isEmpty,toLowerCase,getHost]]] | Creates a security object that can be used to access a managed object. Returns the authenticated user if any. | may need to remove import of `Ini`, doesn't seem to be used |
@@ -65,8 +65,9 @@ export function createRef() {
}
/**
- * @param {!Object} value
- * @return {!PreactDef.Context}
+ * @param {T=} value
+ * @return {!PreactDef.Context<T>}
+ * @template T
*/
export function createContext(value) {
return preact.createContext(value);
| [No CFG could be retrieved] | Creates a new element with a single - valued child or a child - of - child child Provides a way to specify the type of that should be used in the template. | Is there a reason this was required before? |
@@ -0,0 +1,10 @@
+from saleor.core.models import EventDeliveryAttempt
+from saleor.graphql.core.dataloaders import DataLoader
+
+
+class AttemptsByDeliveryLoader(DataLoader):
+ context_key = "attempts_by_delivery"
+
+ def batch_load(self, keys):
+ attempts = EventDeliveryAttempt.objects.in_bulk(keys)
+ ... | [No CFG could be retrieved] | No Summary Found. | Please use relative imports. |
@@ -308,6 +308,8 @@ public class OMKeyCreateRequest extends OMKeyRequest {
new CacheValue<>(Optional.of(omKeyInfo), trxnLogIndex));
omBucketInfo.incrUsedBytes(preAllocatedSpace);
+ // Update namespace quota
+ omBucketInfo.incrUsedNamespace(1L);
// Prepare response
omRespons... | [OMKeyCreateRequest->[preExecute->[setKeyName,shouldUseRatis,checkNotNull,getType,addAllKeyLocations,setClientID,getBlockTokenSecretManager,endsWith,allocateBlock,getIsMultipartKey,getOMNodeId,getPreallocateBlocksMax,setDataSize,setModificationTime,getKeyName,validateAndNormalizeKey,getScmBlockSize,getEnableFileSystemP... | This method is called by the OzoneManager to check if the given key is missing a This method is called when the key is not null. This method is called when a new key is requested. Returns the response of create key operation. | If the key is created successfully, but write failed before the commit key (for example, client crashes), then the key should not be counted. We'd better incrUsedNamespace(-1L), when we clean up this key in the background. |
@@ -133,8 +133,16 @@ export class ClickHandler {
if (!target || !target.href) {
return;
}
- Services.urlReplacementsForDoc(target).maybeExpandLink(target);
+ // First check if need to handle external link decoration.
+ let defaultExpandParamsUrl = null;
+ if (this.appendExtraParams_ && !t... | [No CFG could be retrieved] | Adds event listeners to the window and adds event listeners to the window. Opens a window dialog for a protocol link. | Would it be simpler to do all this in maybeExpandLink? |
@@ -552,7 +552,7 @@ void astrocorp_state::machine_start()
m_lamps.resolve();
}
-
+#if 0
/*
TODO: understand if later hardware uses different parameters (XTAL is almost surely NOT 20 MHz so ...). Also, weirdly enough, there's an unused
6x PAL XTAL according to notes, but VSync = 58,85 Hz?
| [No CFG could be retrieved] | region System API Load the show hand map and set the screen properties. | Please just nuke out this whole preprocessor block (and move the internal TODO note to where it belongs, i.e. `skilldrp` machine_config fn) |
@@ -131,4 +131,6 @@ public interface VirtualColumn extends Cacheable
* @return whether to use dot notation
*/
boolean usesDotNotation();
+
+ DoubleColumnSelector makeDoubleColumnSelector(String columnName, ColumnSelectorFactory factory);
}
| [No CFG could be retrieved] | Returns true if the current environment uses dot notation. | Please arrange this method along with other similar methods and add docs |
@@ -579,14 +579,14 @@ def inline_closure_call(func_ir, glbls, block, i, callee, typingctx=None,
callee_blocks = callee_ir.blocks
# 1. relabel callee_ir by adding an offset
- max_label = max(ir_utils._max_label, max(func_ir.blocks.keys()))
+ max_label = max(ir_utils._the_max_label.next(), max(func_ir.b... | [_find_iter_range->[_make_debug_print,debug_print],InlineWorker->[inline_ir->[copy_ir],run_untyped_passes->[run],inline_function->[inline_ir],__init__->[check]],_inline_const_arraycall->[inline_array->[_new_definition,debug_print],list_var_used,State,_make_debug_print,reset],_find_arraycall->[_make_debug_print],_inline... | Inline a closure call. This function is called from the callee IR to determine if a node in the IR is a Get the definition of a callee. 7. insert new block and add new callee block. | Was this the bug? |
@@ -45,8 +45,9 @@ public class OnErrorPropagateHandler extends TemplateOnErrorHandler {
};
}
- private boolean isTransactionInGlobalErrorHandler(String transactionRootContainer) {
- return flowLocation.isPresent() && transactionRootContainer.equals(flowLocation.get().getGlobalName());
+ private boolean i... | [OnErrorPropagateHandler->[isOwnedTransaction->[isTransactionInGlobalErrorHandler],getOwnedMessageProcessors->[getOwnedMessageProcessors],route->[isRedeliveryExhausted,route],duplicateFor->[OnErrorPropagateHandler]]] | Override beforeRouting to rollback if exception is not a superset of the current context. | use `Pattern.compile` to precompile the regex |
@@ -92,6 +92,16 @@ def test_read_segment():
raw2 = Raw(raw2_file, preload=True)
assert_array_equal(raw1._data, raw2._data)
+ # test the _read_segment function by only loading some of the data
+ raw1 = read_raw_edf(edf_path, preload=False)
+ raw2 = read_raw_edf(edf_path, preload=True)
+ blocks = ... | [test_read_segment->[assert_array_almost_equal,Raw,assert_array_equal,keys,assert_equal,sorted,join,read_raw_edf,save],test_append->[append,assert_true,copy,len,read_raw_edf],test_edf_data->[assert_array_almost_equal,print,loadmat,read_raw_edf,pick_types],test_bdf_data->[assert_array_almost_equal,,print,assert_true,loa... | Test read segment of BED file. | sorry I still don't get why you need seg to be a multiple of the block size. |
@@ -6,8 +6,8 @@ package submodule1
import (
"fmt"
+ "dash-named-schema/foo"
"github.com/blang/semver"
- "github.com/pulumi/pulumi/pkg/v3/codegen/internal/test/testdata/dash-named-schema/go/foo"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
| [Construct->[URN_,RegisterResource,Errorf],Printf,PkgVersion,RegisterResourceModule] | Construct creates a new resource object from a given type and name. | This now is guaranteed not to grab things off github. |
@@ -251,6 +251,13 @@ namespace Dynamo.Migration
string typeName = elNode.Attributes["type"].Value;
typeName = Nodes.Utilities.PreprocessTypeName(typeName);
+ // If we try to migrate Function node, then use its' nickname as type.
+ if (typeName == "Dynamo... | [NodeMigrationData->[CreateConnector->[GetGuidFromXmlElement]],MigrationManager->[ProcessWorkspace->[ProcessWorkspace]]] | Process nodes in workspace. | I couldn't find any example of DSFunction migration. I.e. when we try to migrate function node. Seems it's the first time :) |
@@ -169,7 +169,7 @@ func TestDataCollectorParseBytesToChefRunFailure(t *testing.T) {
assert.Equal(t, "", res1.Delta)
assert.Equal(t, "insights-test", res1.CookbookName)
assert.Equal(t, "0.1.1", res1.CookbookVersion)
- assert.Equal(t, false, res1.IgnoreFailure.GetBoolValue())
+ assert.Equal(t, true, res1.IgnoreFai... | [UnmarshalProtoFromString,UnmarshalProtoFromBytes,ParseBytesToLivenessPing,Equal,ParseBytesToChefAction,ReadFile,ParseBytesToChefRun,GetBoolValue,ParseBytesToComplianceReport,Len,Nil] | Verify the fields of the run. Error and run. Resources are equal. Tests that the resource is in the list. | This is the only real change to this test. The other tests are the go simplification. |
@@ -1039,7 +1039,9 @@ namespace Internal.JitInterface
#if READYTORUN
TypeDesc owningType = methodIL.OwningMethod.GetTypicalMethodDefinition().OwningType;
- bool recordToken = _compilation.NodeFactory.CompilationModuleGroup.VersionsWithType(owningType) && owningType is EcmaType;
+ b... | [No CFG could be retrieved] | Resolves a CorInfo_RESOLVED_TOKEN object. The method for handling missing missing fields. | Why do we need this? Wouldn't `HandleToModuleToken` make sure we don't record something dumb? (Trying to see if we can avoid leaking the handling of the faux `MethodIL` into this method.) |
@@ -474,11 +474,11 @@ public class URIExtractionNamespace implements ExtractionNamespace
public String toString()
{
return String.format(
- "TSVFlatDataParser = { columns = %s, delimiter = '%s', listDelimiter = '%s',keyColumn = %s, valueColumn = %s }",
+ "TSVFlatDataParser = { columns... | [URIExtractionNamespace->[TSVFlatDataParser->[toString->[toString],equals->[equals,getColumns,getKeyColumn,getValueColumn,getDelimiter],toString,DelegateParser,setFieldNames],equals->[equals,getUriPrefix,getUri,getFileRegex,getNamespaceParseSpec],hashCode->[hashCode,getUriPrefix,getFileRegex,getUri],JSONFlatDataParser-... | Returns a string representation of the object. | Why not just `keyColumns`? |
@@ -12,6 +12,10 @@ class PaymentError(Exception):
self.message = message
+class GatewayError(Exception):
+ pass
+
+
class CustomPaymentChoices:
MANUAL = 'manual'
| [ChargeStatus->[pgettext_lazy],TransactionKind->[pgettext_lazy],CustomPaymentChoices->[pgettext_lazy],get_payment_gateway->[import_module,ImproperlyConfigured,ValueError],PaymentError->[__init__->[super]],Enum,lower,upper] | Creates a PaymentError object from a given message. Returns a list of transaction types that can be charged off the customer founding source part. | The name strongly suggest that this should subclass `IOError` instead. |
@@ -132,4 +132,4 @@ def main(use_cuda):
if __name__ == '__main__':
# for use_cuda in (False, True):
- main(use_cuda=False)
+ main(use_cuda=True)
| [train->[train],train_program->[inference_program],infer->[infer],main->[train,infer],main] | The main entry point for the ethernet network. | `ParallelExecutor` only support GPU now. CPU version is under developing. |
@@ -2329,6 +2329,8 @@ class Archiver:
help='only display items with the given status characters')
subparser.add_argument('--json', action='store_true',
help='output stats as JSON (implies --stats)')
+ subparser.add_argument('--avoid-cache-s... | [main->[get_args,run,Archiver],with_repository->[decorator->[wrapper->[argument]]],Archiver->[do_prune->[print_error,write],do_mount->[print_error],do_check->[print_error],do_extract->[build_filter,print_warning,build_matcher],_list_archive->[_list_inner->[write],_list_inner,build_matcher],do_debug_get_obj->[write],run... | Build an argument parser for the borg - cli command. command line interface to run borg command command to serve a specific key file or directory This function is called when a key is not encrypted with a passphrase. | "avoid" sounds a bit like it would still do it for some cases, just not for most. `--no-chunks-cache-sync` ? |
@@ -394,7 +394,9 @@ export class AmpAdNetworkDoubleclickImpl extends AmpA4A {
getBlockParameters_() {
dev().assert(this.initialSize_);
dev().assert(this.jsonTargeting_);
- let sizeStr = `${this.initialSize_.width}x${this.initialSize_.height}`;
+ let sizeStr = this.isFluid
+ ? '320x50'
+ ... | [AmpAdNetworkDoubleclickImpl->[extractSize->[getPublisherSpecifiedRefreshInterval,width,height,extractAmpAnalyticsConfig,get,setGoogleLifecycleVarsFromHeaders,Number],getBlockParameters_->[serializeTargeting_,dev,user,isInManualExperiment,assign,join,googleBlockParameters,getMultiSizeDimensions,map],constructor->[resol... | Get block parameters. get the object representation of a . | Break after the operator. |
@@ -562,8 +562,12 @@ class Product(CountableDjangoObjectType):
@staticmethod
def resolve_is_available(root: models.Product, info):
country = info.context.country
+ channel_slug = str(info.context.channel_slug)
in_stock = is_product_in_stock(root, country)
- return root.is_visib... | [ProductVariant->[resolve_meta->[resolve_meta],resolve_pricing->[calculate_pricing_info->[calculate_pricing_with_product->[calculate_pricing_with_collections->[VariantPricingInfo]],calculate_pricing_with_variants->[calculate_pricing_with_collections->[]]]],resolve_private_meta->[resolve_private_meta]],Category->[resolv... | Resolve is available. | Why `str()` here? In other places we don't do that. |
@@ -105,6 +105,8 @@ def test_create_hello_world_lambda(rule_runner: RuleRunner, major_minor_interpre
names = set(zipfile.namelist())
assert "lambdex_handler.py" in names
assert "foo/bar/hello_world.py" in names
+ if sys.platform == "darwin":
+ assert "Building lambdas on macOS is not recommende... | [test_warn_files_targets->[create_python_awslambda],test_create_hello_world_lambda->[create_python_awslambda]] | Test create hello world lambda. A basic check for missing missing items. | Here, it's safe to use `sys` rather than `Platform` because it's a test. |
@@ -108,7 +108,7 @@ public class HoodieCompactionConfig extends DefaultHoodieConfig {
public static final String COMPACTION_REVERSE_LOG_READ_ENABLED_PROP = "hoodie.compaction.reverse.log.read";
public static final String DEFAULT_COMPACTION_REVERSE_LOG_READ_ENABLED = "false";
private static final String DEFAULT... | [HoodieCompactionConfig->[Builder->[build->[HoodieCompactionConfig]]]] | This class is used to provide a default value for the configuration properties. This method is used to set the default values for the cleanup file versions. | didn't we have any tests on this? if not, would have failed right. |
@@ -84,9 +84,9 @@ IMPLEMENT_PEM_write_cb_const(RSAPrivateKey, RSA, PEM_STRING_RSA,
IMPLEMENT_PEM_rw_const(RSAPublicKey, RSA, PEM_STRING_RSA_PUBLIC,
- RSAPublicKey) IMPLEMENT_PEM_rw(RSA_PUBKEY, RSA,
- PEM_STRING_PUBLIC,
- ... | [No CFG could be retrieved] | This method returns the private key associated with a given private key. private key private key private key private key private key private key private key private key private key. | It's still too indented... it should be flush to the left |
@@ -53,7 +53,7 @@ def data_path(dataset='evoked', path=None, force_update=False,
destdir = op.join(path, 'HF_SEF')
urls = {'evoked':
- 'https://osf.io/25f8d/download?version=1',
+ 'https://zenodo.org/record/3523071/files/hf_sef_evoked.tar.gz',
'raw':
'https://... | [data_path->[any,join,remove,_do_path_update,info,_check_option,_get_path,dict,sorted,open,split,keys,isdir,isfile,_fetch_file,extract,mkdir,listdir,getmembers]] | Get path to local copy of the high frequency SEF dataset. Download a file from the server and extract it into destdir. | I am surprised you don't have to update any hash |
@@ -122,7 +122,6 @@ ax.axhline(0, ls='--', color='r')
ax.set(title="Mean prediction score", xlabel="Channel", ylabel="Score ($r$)")
mne.viz.tight_layout()
-###############################################################################
# Investigate model coefficients
# ------------------------------
#
| [get_xticklabels,read_montage,max,scale,tight_layout,pcolormesh,join,loadmat,enumerate,resample,axvline,ReceptiveField,int,show,axhline,set,zeros,abs,plot,print,mean,data_path,setp,len,KFold,float,argmin,score,split,plot_topomap,RawArray,subplots,arange,legend,create_info,fit] | Fit the model and predict on held - out data. Plot the mean model coefficients for a given delay. | why remove this? It will fail to capture the section title |
@@ -143,11 +143,13 @@ func GetResourcePropertiesDetails(
replaces = step.Keys
}
- old := step.Old
- new := step.New
-
+ old, new := step.Old, step.New
if old == nil && new != nil {
- printObject(&b, new.Inputs, planning, indent, step.Op, false, debug)
+ if len(new.Outputs) > 0 {
+ printObject(&b, new.Outpu... | [IsObject,IsAssets,ArrayValue,NewArchiveProperty,DiffLinesToChars,Assertf,BoolValue,DiffMain,IsBool,PropertyKey,IsNull,Diff,IsOutput,Strings,Color,Itoa,NewAssetProperty,IgnoreError,New,GetAssets,StableKeys,Assert,Len,NumberValue,Prefix,IsComputed,TypeString,TrimSpace,Failf,TypeOf,IsAsset,IsText,AssetValue,GetPath,DiffC... | GetResourcePropertiesDetails returns a string representation of the object properties. printObject prints out the values of the property map. | Does this case actually occur with refresh? If so, how? |
@@ -105,14 +105,16 @@ exports.getFlags = function(config) {
source_map_include_content: !!argv.full_sourcemaps,
source_map_location_mapping: ['|/'],
//new_type_inf: true,
- language_in: 'ES6',
// By default closure puts all of the public exports on the global, but
// because of the wrapper m... | [No CFG could be retrieved] | Creates a closure extension that can be used to compile a single version of a n - dimensional Flags for the constant property. | Same question as above here: Should we use `NO_TRANSPILE` instead? |
@@ -67,7 +67,6 @@ module Users
end
send_user_otp(method)
- session[:code_sent] = 'true'
redirect_to login_two_factor_url(otp_delivery_preference: method, reauthn: reauthn?)
end
| [TwoFactorAuthenticationController->[reauthn_param->[permit,dig],show->[redirect_to,handle_valid_otp_delivery_preference,otp_delivery_preference,totp_enabled?,two_factor_enabled?],flash_error_for_exception->[t,code],send_user_otp->[send,to_s,confirmation_context?,direct_otp,create_direct_otp,increment,constantize],hand... | send a single OTP message. | I confirmed this isn't used in the code anywhere so removal is ok. Were there plans to use it somewhere? |
@@ -106,6 +106,7 @@ public class SamzaRunner extends PipelineRunner<SamzaPipelineResult> {
@Override
public SamzaPipelineResult run(Pipeline pipeline) {
+ SplittableParDo.validateNoPrimitiveReads(pipeline);
MetricsEnvironment.setMetricsSupported(true);
if (LOG.isDebugEnabled()) {
| [SamzaRunner->[getMetricsReporters->[getMetricsReporters],fromOptions->[SamzaRunner],runSamzaApp->[run]]] | Runs the SAMza application. | is it expected that we only validate in non-portable mode? i.e. this validation does not exist in runPortablePipeline() |
@@ -204,9 +204,9 @@ class PipelineClient(PipelineClientBase):
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.rest.HttpResponse
# """
- rest_request, request_to_run = _prepare_request(request)
+ rest_request = hasattr(... | [PipelineClient->[close->[__exit__],__exit__->[__exit__],__enter__->[__enter__],send_request->[close,_prepare_request]]] | This method is a generic method that runs the network request through the client s chained policies. | when the requests had a different surface area than the old requests, we had to convert it first to pass it through the pipelines. Now, we can directly pass through |
@@ -70,7 +70,15 @@ public abstract class KafkaExtractor<S, D> extends EventBasedExtractor<S, D> {
}
@Override
- public D readRecord(D reuse) throws DataRecordException, IOException {
+ public List<Tag<?>> generateTags(State state) {
+ List<Tag<?>> tags = super.generateTags(state);
+ tags.add(new Tag<Str... | [KafkaExtractor->[readRecord->[hasNext,RuntimeException,decodeRecord,offset,maintainStats,fetchNextMessageBuffer,next],maintainStats->[payloadSize],close->[setProp,getWorkUnitSizePropName,close,getPropAsLong,format,getId,info,getTopicName,setHighWaterMark],create,build,getLogger,getPropAsLong,register]] | Reads next record from the stream. | `KafkaExtractor` has been modified in #135 to pull from multiple partitions of the same topic. I suggest waiting until that PR is merged to make the corresponding changes here. |
@@ -180,6 +180,8 @@ func NewPulumiCmd() *cobra.Command {
"Enable verbose logging (e.g., v=3); anything >3 is very verbose")
cmd.PersistentFlags().StringVar(
&color, "color", "auto", "Colorize output. Choices are: always, never, raw, auto")
+ cmd.PersistentFlags().BoolVar(&httpstate.PrintFullStackNames, "full-na... | [StringVar,RawMessage,Dir,Colorize,Executable,Warningf,Now,MarkHidden,Encode,Add,IsTruthy,IgnoreClose,Flush,Stat,MatchString,ParseTolerant,IgnoreError,NewEncoder,RunFunc,Diag,New,StringVarP,NewClient,InitLogging,Run,After,Chdir,AddCommand,LookPath,GetCachedVersionFilePath,Bytes,TrimSpace,AssertNoError,MustCompile,InitP... | Flags for the command line interface. Adds commands to the cmd list. | I don't think we'll want to couple this flag directly into global state in the `httpstate` module. Some more notes in summary, but would love to find a way to scope this a bit more if possible. |
@@ -944,7 +944,7 @@ class Report(object):
@verbose
def parse_folder(self, data_path, pattern='*.fif', n_jobs=1, mri_decim=2,
- verbose=None):
+ sort=True, verbose=None):
"""Renders all the files in the folder.
Parameters
| [_iterate_mri_slices->[_build_image],_iterate_trans_views->[_fig_to_img],Report->[add_section->[_add_figs_to_section],_render_bem->[_get_id,_render_one_bem_axis,_render_image],_render_image->[_get_id,_render_array],_render_evoked->[_get_id,_fig_to_img],add_figs_to_section->[_add_figs_to_section],_add_figs_to_section->[... | Renders all the files in the folder containing data whose HTML report will be be generated. find unique n - jobs non - empty n - jobs - > htmls report_f. | I would call it sort_sections |
@@ -902,7 +902,12 @@ class TorchAgent(ABC, Agent):
elif not optimstate_fp16 and self.fp16:
# old optimizer was fp32, but now we're doing fp16.
# this is a bit clunky, but alternatives are worse
- self.optimizer.optimizer.load_state_dict(optim_states)
+ ... | [History->[_update_vecs->[parse],update_history->[_update_raw_strings,_update_vecs,_update_strings],add_reply->[_update_raw_strings,_update_vecs,_update_strings]],TorchAgent->[_vectorize_text->[_add_start_end_tokens],_set_text_vec->[get_history_str,_check_truncate,get_history_vec],vectorize->[_set_text_vec,_set_label_c... | Initialize optimizer with model parameters. Initialize a object. Load a from the model state. | warn_once instead maybe? |
@@ -1304,7 +1304,7 @@ module.exports = class kucoinfutures extends kucoin {
'datetime': this.iso8601 (timestamp),
'currency': code,
'amount': amount,
- 'fromAccount': 'futures',
+ 'fromAccount': 'future',
'toAccount': 'spot',
'status... | [No CFG could be retrieved] | Transfer out a specific order from futures to spot wallet Get the next n - block items that are available for a given market. | i don't think we should change this instance, let's only change the `.market` attributes |
@@ -476,7 +476,13 @@ func DeserializePropertyValue(v interface{}, dec config.Decrypter) (resource.Pro
if err != nil {
return resource.PropertyValue{}, err
}
- return resource.MakeSecret(ev), nil
+ prop := resource.MakeSecret(ev)
+ // If the decrypter is a cachingCrypter, insert the plain-... | [OperationType,IsObject,NewNullProperty,NewArrayProperty,ArrayValue,NewArchiveProperty,Mappable,Assertf,DeserializeAsset,ValueOf,Encrypter,PropertyKey,OfType,Wrap,NewNumberProperty,IsNotEmpty,NewAssetProperty,Serialize,Marshal,ParseTolerant,New,DeserializeArchive,Errorf,UpToDeploymentV2,Assert,StableKeys,DecryptValue,T... | The main function for the object - map - property - map - check. | Similar to above, can/should we move this responsibility inside the caching crypter somehow? |
@@ -1148,7 +1148,7 @@ public class DefaultChannelPipeline implements ChannelPipeline {
private final Unsafe unsafe;
HeadContext(DefaultChannelPipeline pipeline) {
- super(pipeline, null, HEAD_NAME, HeadContext.class);
+ super(pipeline, pipeline.channel.eventLoop(), HEAD_NAME, H... | [DefaultChannelPipeline->[destroyUp->[destroyUp],connect->[connect],write->[write],addAfter->[newContext,filterName,addAfter],remove->[remove],close->[close],TailContext->[exceptionCaught->[onUnhandledInboundException],userEventTriggered->[onUnhandledInboundUserEventTriggered],channelInactive->[onUnhandledInboundChanne... | Returns the handler that is associated with the . | should this be `pipeline.executor`? |
@@ -536,6 +536,7 @@ class WikiTablesSemanticParser(Model):
def from_params(cls, vocab, params: Params) -> 'WikiTablesSemanticParser':
question_embedder = TextFieldEmbedder.from_params(vocab, params.pop("question_embedder"))
encoder = Seq2SeqEncoder.from_params(params.pop("encoder"))
+ enti... | [WikiTablesDecoderState->[get_valid_actions->[get_valid_actions],combine_states->[WikiTablesDecoderState],_make_new_state_with_group_indices->[WikiTablesDecoderState],split_finished->[is_finished]],WikiTablesDecoderStep->[_get_actions_to_consider->[get_valid_actions],_compute_new_states->[WikiTablesDecoderState]],WikiT... | Constructs a SemanticParser from a dictionary of params. | This should just be `Seq2VecEncoder.from_params(params.pop('entity_encoder'))`. |
@@ -44,6 +44,6 @@ def add_parser(subparsers, parent_parser):
"--force",
action="store_true",
default=False,
- help="Overwrite '.dvc' if it exists. Will remove all local cache.",
+ help="Overwrite '.dvc' if it exists. It removes local cache.",
)
init_parser.set_defaults... | [CmdInit->[run_cmd->[init,error]],add_parser->[add_parser,set_defaults,add_argument]] | Setup parser for dvc init. | The previous message feels more clear, tbh Using "It" here feels unnatural. |
@@ -177,10 +177,10 @@ frappe.ui.form.Sidebar = Class.extend({
parent: this.sidebar.find(".form-shared")
});
},
- make_viewers: function() {
- this.frm.viewers = new frappe.ui.form.Viewers({
+ make_sidebar_users: function() {
+ this.frm.viewers = new frappe.ui.form.SidebarUsers({
frm: this.frm,
- parent... | [No CFG could be retrieved] | Component that creates the necessary elements for the tag editor. This method is called when a like is clicked. It sets up the like wrapper icon and. | `make_viewers` seemed fine, any particular reason to rename this? Also `sidebar` in the function name is redundant the file is only for sidebar, it's apparent already. |
@@ -588,10 +588,14 @@ public class ContainerStateMachine extends BaseStateMachine {
/**
* Reads the Entry from the Cache or loads it back by reading from disk.
*/
- private ByteString getCachedStateMachineData(Long logIndex, long term,
- ContainerCommandRequestProto requestProto) throws ExecutionExcept... | [ContainerStateMachine->[takeSnapshot->[persistContainerSet,isStateMachineHealthy],applyTransaction->[getContainerCommandRequestProto,getCommandExecutor,runCommand],readStateMachineData->[getContainerCommandRequestProto,dispatchCommand,getCachedStateMachineData],notifyGroupRemove->[notifyGroupRemove],getCachedStateMach... | Get the state machine data from the cache or create a new one if it doesn t exist. | lets not read from the tmp chunk file, as with this patch in, we should never read from the tmp file. |
@@ -720,7 +720,7 @@ cont_iv_snapshots_fetch(void *ns, uuid_t cont_uuid, uint64_t **snapshots,
}
D_ALLOC(*snapshots,
- sizeof(iv_entry->iv_snap.snaps[0]) * iv_entry->iv_snap.snap_cnt);
+ sizeof(iv_entry->iv_snap.snaps[0]) * iv_entry->iv_snap.snap_cnt);
if (*snapshots == NULL)
D_GOTO(free, rc = -DER_NOM... | [No CFG could be retrieved] | find the next unused key in the chain - DSS_NOMEM - if no entry in the list - if no entry in. | (style) line over 80 characters |
@@ -7,7 +7,7 @@ import jsonschema
from letsencrypt.client import crypto_util
from letsencrypt.client import le_util
-
+# pylint: disable=no-member
SCHEMATA = dict([
(schema, json.load(open(pkg_resources.resource_filename(
__name__, "schemata/%s.json" % schema)))) for schema in [
| [pretty->[loads,dumps],revocation_request->[create_sig,jose_b64encode],acme_object_validate->[validate,loads,ValidationError,isinstance],authorization_request->[create_sig,jose_b64decode],certificate_request->[create_sig,jose_b64encode],dict,open,resource_filename,load] | A function to provide a function to validate a JSON string against the ACME protocol using JSON Create a challengeRequest message. | disabling `no-member`? how come? |
@@ -113,9 +113,15 @@ def main(args):
if args.resume:
checkpoint = torch.load(args.resume, map_location='cpu')
model_without_ddp.load_state_dict(checkpoint['model'])
- optimizer.load_state_dict(checkpoint['optimizer'])
- lr_scheduler.load_state_dict(checkpoint['lr_scheduler'])
- ... | [get_transform->[DetectionPresetTrain,DetectionPresetEval],main->[step,parameters,DistributedSampler,DistributedDataParallel,timedelta,join,DataLoader,to,int,BatchSampler,set_epoch,SequentialSampler,save_on_master,range,state_dict,GroupedBatchSampler,load,time,get_dataset,train_one_epoch,print,evaluate,format,create_as... | Main function for training a single node. Train a single node in the model. Evaluate after every epoch . | Can you clarify why this is needed? Is this because you are assuming that we are resuming from a checkpoint that has been uploaded and thus doesn't have the `optimizer` / etc anymore? |
@@ -98,6 +98,8 @@ exports.rules = [
// alp handler needs to depend on src files
'ads/alp/handler.js->src/dom.js',
'ads/alp/handler.js->src/config.js',
+ // CSA needs to depend on src files
+ 'ads/google/csa.js->src/json.js',
],
},
{
| [No CFG could be retrieved] | JS files that are not in the same package as the 3P. A list of rules for AMP - A - Network extension. | let's just allow all `ads/**` to depend on `json.js`. |
@@ -270,6 +270,11 @@ func resourceAwsEMRCluster() *schema.Resource {
DiffSuppressFunc: suppressEquivalentJsonDiffs,
ValidateFunc: validation.ValidateJsonString,
},
+ "market": {
+ Type: schema.TypeString,
+ Required: true,
+ ForceNew: true,
+ },
"bid_pri... | [StringValueSlice,GetChangedKeysPrefix,GetChange,ForceNew,RemoveAutoScalingPolicy,NewSet,SetPartial,BoolValue,StringSlice,Close,StringValueMap,StringInSlice,RemoveTags,ListInstanceGroupsPages,Partial,HasPrefix,NonRetryableError,Set,ListInstances,Code,GetOkExists,ModifyInstanceGroups,Int64Value,ReadFile,GetOk,Marshal,De... | The kerberos schema contains all of the required fields and values for the user. The resource which is missing a lease is defined by the EBS spec. | Please note that adding new `Required` arguments represents a breaking change and can only be accepted at the minimum during major provider version updates. To keep backwards compatibility, I would recommend using `Optional: true` and `Computed: true` instead for these new `market` arguments. |
@@ -111,7 +111,7 @@ class ExecutionOptions:
process_execution_use_local_cache: bool
process_execution_local_enable_nailgun: bool
- remote_store_server: List[str]
+ remote_store_addresses: list[str]
remote_store_headers: Dict[str, str]
remote_store_thread_count: int
remote_store_chunk_by... | [OwnersNotFoundBehavior->[to_glob_match_error_behavior->[GlobMatchErrorBehavior]],FilesNotFoundBehavior->[to_glob_match_error_behavior->[GlobMatchErrorBehavior]],GlobalOptions->[register_options->[register_bootstrap_options],validate_instance->[validate_headers]],ExecutionOptions] | A property to indicate whether a specific authentication option is available. Missing key - value pairs for remote authentication. | I assume this PR is not where this option will be made singular? |
@@ -18,11 +18,11 @@
namespace Kratos {
Kernel::Kernel() : mpKratosCoreApplication(Kratos::make_shared<KratosApplication>(
std::string("KratosMultiphysics"))) {
- std::cout << " | / | " << std::endl;
- std::cout << " ' / __| _` | __| _ \\ __|" << std::endl;
- std::... | [IsImported->[GetApplicationsList],ImportApplication->[IsImported,GetApplicationsList]] | Kratos Multiphysics Kernel. | I know that this is not a performance bottleneck point but to make it in a good way you should avoid using KRATOS INFO macro in each line and calling it once in order to remove unnecessary performance overhead and preventing also any other message interlace your message lines. |
@@ -45,4 +45,5 @@ $vars = pages_prepare_form_vars(null, $parent_guid);
echo elgg_view_page(elgg_echo('add:object:page'), [
'content' => elgg_view_form('pages/edit', [], $vars),
+ 'filter_id' => 'pages/edit',
]);
| [canWriteToContainer,getURL,getContainerEntity,getDisplayName,canEdit] | View a page. | why not pages/new? |
@@ -149,7 +149,7 @@ def runtime_main(test_class):
parser.add_argument('--use_cuda', action='store_true')
parser.add_argument('--use_reduce', action='store_true')
parser.add_argument(
- '--use_reader_alloc', action='store_true', required=False, default=True)
+ '--use_reader_alloc', action='s... | [TestDistRunnerBase->[run_pserver->[get_model,get_transpiler],run_trainer->[get_model,get_transpiler,get_data]],TestDistBase->[_run_cluster->[start_pserver,_wait_ps_ready],check_with_place->[_run_cluster,_run_local],setUp->[_setup_config,_after_setup_config]],runtime_main->[run_pserver,run_trainer]] | Run the test. | This will cause dist_se_resnext test fail |
@@ -237,8 +237,13 @@ NATIVE_DEMOS = [
*combine_cases(
TestCase(options={'-at': 'yolo'}),
single_option_cases('-m',
+ ModelArg('person-vehicle-bike-detection-crossroad-yolov3-1020'),
ModelArg('yolo-v3-tf'),
ModelA... | [combine_cases->[join_cases],NativeDemo,single_option_cases,combine_cases,PythonDemo] | Creates a test case that tests all possible Nagios - related objects. Security barrier device demo. | There are no other `faceboxes` models. You should merge `-at` and `-m` here. |
@@ -406,6 +406,8 @@ public class Socket extends FileDescriptor {
setTrafficClass(fd, trafficClass);
}
+ public static native boolean isIPv6Available();
+
@Override
public String toString() {
return "Socket{" +
| [Socket->[sendFd->[sendFd],listen->[listen],setKeepAlive->[setKeepAlive],connect->[connect],getSendBufferSize->[getSendBufferSize],isTcpNoDelay->[isTcpNoDelay],newSocketDgram->[Socket],isInputShutdown->[isInputShutdown],sendTo->[sendTo],recvFrom->[recvFrom],newSocketDomain->[Socket],sendToAddresses->[sendToAddresses],a... | Sets the traffic class for this socket. | nit: we could cache this if we want. |
@@ -356,8 +356,13 @@ class TriggerCopyJobs(beam.DoFn):
copy_from_reference.projectId = vp.RuntimeValueProvider.get_value(
'project', str, '')
- copy_job_name = '%s_%s' % (
+ copy_job_name = '%s_%s_%s' % (
job_name_prefix,
+ _bq_uuid(
+ '%s:%s.%s' % (
+ ... | [WriteRecordsToFile->[process->[_make_new_file_writer]],BigQueryBatchFileLoads->[_write_files->[_ShardDestinations,WriteGroupedRecordsToFile],expand->[_write_files,_generate_job_name,_window_fn,_load_data,file_prefix_generator],_load_data->[WaitForBQJobs,TriggerCopyJobs,TriggerLoadJobs,DeleteTablesFn]],WriteGroupedReco... | Process a single n - node element. A context manager for the bq_copy_job_from_reference_to_. | May be update the seed to _bq_uuid() function instead of concatenating two UUIDs ? Also, I'm curious why the existing seed didn't work for this user. |
@@ -450,7 +450,14 @@ def get_or_create_bottleneck(sess, image_lists, label_name, index, image_dir,
category)
if not gfile.Exists(image_path):
tf.logging.fatal('File does not exist %s', image_path)
- image_data = gfile.FastGFile(image_path, 'rb').read()
+ jpgext = ['jpg... | [get_bottleneck_path->[get_image_path],get_random_distorted_bottlenecks->[get_image_path,run_bottleneck_on_image],get_random_cached_bottlenecks->[get_or_create_bottleneck],main->[create_inception_graph,get_random_distorted_bottlenecks,should_distort_images,get_random_cached_bottlenecks,cache_bottlenecks,add_final_train... | Retrieves or creates bottleneck values for an image. Get bottleneck values in the bottleneck_values file. | Use os.path.splitext() instead to figure out extension? |
@@ -84,7 +84,7 @@ def csv_fields(series):
row['data'].update(count=row['count'], date=row['date'])
# Sort the fields before returning them - we don't care much about column
# ordering, but it helps make the tests stable.
- return rv, sorted(fields)
+ return rv, sorted(fields, key=lambda field: ... | [usage_breakdown_series->[csv_fields,get_series],usage_series->[get_series],overview_series->[get_series],sources_series->[csv_fields,get_series],extract->[_extract_value->[extract],_extract_value,extract],downloads_series->[get_series],render_csv->[fudge_headers],render_json->[fudge_headers],stats_report->[check_stats... | Extract all the keys in the data dict for csv columns. Returns a dict with all items in the dict if it s already a dict. | How does changing the sort order fix the issue? It doesn't change the content of the fields |
@@ -316,11 +316,12 @@ func (b *tickerResult) GetAppStatus() *libkb.AppStatus {
}
type XLMExchangeRate struct {
- Price float64
- Currency string
+ Currency string
+ PriceFloat float64
+ PriceRat big.Rat
}
-func ExchangeRate(ctx context.Context, g *libkb.GlobalContext, currency string) (XLMExchangeRate, er... | [Box,PostJSON,StatusCode,GetSeedByGenerationOrSync,CurrentGeneration,PrimaryAccount,WithUID,CDebugf,UID,Post,SigningKey,New,CTraceTimed,IsNil,WithSelf,LoadUser,PostDecode,Errorf,WithNetContext,NewAPIArgWithNetContext,StellarProofReverseSigned,GetSeedByGeneration,Unbox,ParseUint,NewLoadUserArg,WithPublicKeyOptional,GetD... | RecentPayments returns a list of recent payments for the given account ID. GetExchangeRate returns exchange rate for given account. | this type looks unused now, right? |
@@ -639,6 +639,8 @@ static int kpb_buffer_data(struct comp_dev *dev, struct comp_buffer *source,
if (kpb->state == KPB_STATE_DRAINING)
draining_data->buffered_while_draining += size_to_copy;
+ timeout = platform_timer_get(platform_timer) +
+ clock_ms_to_ticks(PLATFORM_DEFAULT_CLOCK, 1);
/* Let's store audio... | [No CFG could be retrieved] | buffer real time data stream in internal buffer This function checks if there is enough space in the current buffer and if so copies what s. | Is it supposed to be 1 ms? |
@@ -519,7 +519,7 @@ public class UserResourceIT <% if (databaseType === 'cassandra') { %>extends Abs
<%_ if (searchEngine === 'elasticsearch') { _%>
mockUserSearchRepository.save(user);
<%_ } _%>
- <%_ if (cacheManagerIsAvailable === true) { _%>
+ <%_ if (cacheManagerIsAvailable... | [No CFG could be retrieved] | Get the user. check if user login is valid. | Really minor, but the extra space is not needed :) |
@@ -36,7 +36,7 @@ import lombok.extern.java.Log;
@AllArgsConstructor
public class HttpClient<ClientTypeT> implements Supplier<ClientTypeT> {
- private static final Decoder gsonDecoder = new GsonDecoder();
+ private static final Decoder gsonDecoder = JsonDecoder.gsonDecoder();
/**
* How long we can take to ... | [HttpClient->[get->[checkNotNull,target,toString],errorDecoder->[HttpCommunicationException,orElseGet,status,format],GsonDecoder]] | Creates a HttpClient which builds a new instance of a type that can be used to interact with Creates a new instance of the retryer. | A custom JSON decoder was needed (fun) for Instant deserialization. The server encodes instant into an epoch second plus epoch second, which seems to not be natively supported. |
@@ -59,7 +59,11 @@ public class GobblinHelixTaskStateTracker extends AbstractTaskStateTracker {
try {
this.scheduledReporters.put(task.getTaskId(), scheduleTaskMetricsUpdater(new TaskMetricsUpdater(task), task));
} catch (RejectedExecutionException ree) {
+ // Propagate the exception to caller tha... | [GobblinHelixTaskStateTracker->[onTaskCommitCompletion->[info,getWorkingState,updateByteMetrics,getTaskDuration,isEnabled,getTaskId,format,updateRecordMetrics,cancel,getWorkunit,containsKey],registerNewTask->[error,TaskMetricsUpdater,scheduleTaskMetricsUpdater,getTaskId,format,put],onTaskRunCompletion->[markTaskComplet... | Register a new task. | One question worth considering: Do we want to make the failure in scheduling TaskMetricsUpdater a fatal failure? or can it be made configurable? |
@@ -899,7 +899,7 @@ class ICA(ContainsMixin):
# re-append additionally picked ch_info
ch_info += [k for k in container.info['chs'] if k['ch_name'] in
add_channels]
- info['bads'] = [ch_names[k] for k in self.exclude]
+ info['bads'] = [ch_names[k] for k in... | [_find_sources->[get_score_funcs],run_ica->[fit,ICA,_detect_artifacts],get_score_funcs->[_make_xy_sfunc],corrmap->[get_components,_find_max_corrs],_sort_components->[copy],ICA->[_fit->[fit],_sources_as_evoked->[_transform_evoked],_apply_epochs->[_pre_whiten,_check_exclude],_transform_raw->[_pre_whiten,_transform],_fit_... | Exports the info of the missing coil. | Why is this necessary? |
@@ -246,6 +246,18 @@ public class Syncer {
return new Object[] { "success" };
}
+
+ private void trySetHostNum(JSONObject rMeta) {
+ //We perform this as old version of the sync server may not provide the hostNum
+ //And it's fine to continue without one.
+ try {
+ mHo... | [Syncer->[sync->[sync],mergeCards->[newerRows],finish->[finish],newerRows->[usnLim],chunk->[columnTypesForQuery,cursorForTable],applyChanges->[changes],start->[removed],publishProgress->[publishProgress],mergeNotes->[newerRows],getConf->[getConf],throwExceptionIfCancelled->[publishProgress],cursorForTable->[usnLim]]] | This method is called to perform a sync on the server. It will return a message if Checks if the schema of the current collection is valid and if so applies the changes and then step 4 - stream to server and perform a synchronous sync if it is not already in progress. | if it's mildly unexpected but fine to continue without, should be Timber.w I think. Unimportant in the grand scheme, but just want to either have a good debate on or harmonize on log levels. I consider 'e' to be things where you need to bomb out of an activity entirely, almost completely unrecoverable but not quite a c... |
@@ -646,7 +646,14 @@ class CI_Form_validation {
$this->_field_data[$row['field']]['postdata'] = (is_bool($result)) ? $postdata : $result;
}
}
-
+ else
+ {
+ log_message('debug', "Unable to find validation rule: ".$rule);
+ show_error("Undefined rule specified for field {$row['field']}: {$rule}"... | [CI_Form_validation->[set_rules->[set_rules],_execute->[_execute],strip_image_tags->[strip_image_tags],xss_clean->[xss_clean],valid_emails->[valid_email],run->[set_rules],valid_ip->[valid_ip],prep_for_form->[prep_for_form],_reduce_array->[_reduce_array]]] | Executes the validation of a single row of the data This function loops through each rule and runs it. This function will run the rule and grab the result This function checks if a rule passes and if so builds the error message. | You can put the content of lines 596~603, 616~623 and 630~637 here only once. |
@@ -454,13 +454,10 @@ class GitDownloader extends VcsDownloader implements DvcsDownloaderInterface
$command = sprintf('git checkout %s --', ProcessExecutor::escape($branch));
$fallbackCommand = sprintf('git checkout '.$force.'-B %s %s --', ProcessExecutor::escape($branch), ProcessExecutor::e... | [GitDownloader->[hasMetadataRepository->[normalizePath],cleanChanges->[getLocalChanges,getUnpushedChanges]]] | Updates the branch to commit. Checks if a branch is a tree branch or if it is a composer branch and if it. | put this command into `$resetCommand` variable and put it before the if-construction. the conditions are now evaluated in bash within a single process |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.