patch stringlengths 18 160k | callgraph stringlengths 4 179k | summary stringlengths 4 947 | msg stringlengths 6 3.42k |
|---|---|---|---|
@@ -107,15 +107,12 @@ class FrameState(object):
def __init__(self, f, local_vars=None, stack=()):
self.f = f
- if sys.version_info[0] >= 3:
- self.co = f.__code__
- else:
- self.co = f.func_code
+ self.co = f.__code__
self.vars = list(local_vars)
self.stack = list(stack)
def ... | [Const->[unwrap_all->[unwrap],__init__->[instance_to_type]],infer_return_type->[hashable,Const],union->[unwrap],element_type->[unwrap],instance_to_type->[TypeInferenceError,instance_to_type],FrameState->[copy->[FrameState],__or__->[FrameState,copy,union_list],closure_type->[Const],const_type->[Const],get_global->[Const... | Initialize a object. | <!--new_thread; commit:b015963f671ceb39f8033014eb6d4e46a4a734bc; resolved:0--> How can we drop the python 2 branch? Does `self.co = f.__code__` work for all versions? |
@@ -278,6 +278,10 @@ void menu_bed_leveling() {
SUBMENU(MSG_LEVEL_CORNERS, _lcd_level_bed_corners);
#endif
+ #if ENABLED(PROBE_OFFSET_MENU)
+ SUBMENU(MSG_PROBE_OFFSET, _lcd_probe_offset);
+ #endif
+
#if ENABLED(EEPROM_SETTINGS)
ACTION_ITEM(MSG_LOAD_EEPROM, ui.load_settings);
ACTION_ITEM(MSG_... | [No CFG could be retrieved] | Get the index of the first BED probe that is currently active. | As UBL user I can't see this menu item, don't you want to add it into `menu_ubl.cpp` too? |
@@ -32,6 +32,8 @@ use LibreNMS\OS;
class YamlDiscovery
{
+ private static $cache_time = 1800; // 30 minutes, Used for oid translation cache
+
/**
* @param OS $os
* @param DiscoveryItem|string $class
| [YamlDiscovery->[preCache->[getDeviceArray],discover->[preCache,isValid,getDeviceArray]]] | Creates a list of items from a YAML array or a class name. find the data array in pre - cache. | Is there a reason to only cache it for a short time? |
@@ -641,7 +641,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
$body = prepare_body($item,true);
$tmp_item = replace_macros($template,array(
- '$type' => implode("",array_slice(split("/",$item['verb']),-1)),
+ '$type' => implode("",array_slice(explode("/",$item['verb']),-... | [localize_item->[attributes],best_link_url->[get_baseurl],item_photo_menu->[get_baseurl],like_puller->[get_baseurl],status_editor->[get_baseurl],conversation->[get_baseurl]] | The conversation function Returns an array with html for each thread in the items array Renders a profile item Display a single item in a list This function maps all the like and dislike activities for each parent item in the activity array This function renders the iclapse - wrapper tag. | Confirmed. More efficient if this is not a regular expression. |
@@ -5,7 +5,7 @@ import itertools
import logging
from dataclasses import dataclass
from pathlib import PurePath
-from typing import Optional, Tuple
+from typing import Optional
from uuid import UUID
from pants.backend.python.rules.coverage import (
| [debug_python_test->[is_conftest],setup_pytest_for_target->[TestTargetSetup],run_python_test->[is_conftest]] | Creates a new object from a tuple of tuples. Checks if the target is a conftest target. | The changes in this file are so that `test --debug` uses the same `argv` and `env` as the normal `Process` would be. |
@@ -103,7 +103,7 @@ func WaitForBuilderAccount(c kclient.ServiceAccountsInterface) error {
}
return false, nil
}
- return wait.Poll(60, time.Duration(1*time.Second), waitFunc)
+ return wait.Poll(time.Duration(100*time.Millisecond), time.Duration(60*time.Second), waitFunc)
}
// WaitForAnImageStream waits for... | [GetPodName,Duration,Encode,NewRequirement,WriteFile,Stop,NewUUID,Poll,Errorf,Watch,AsSelector,Join,Contains,ResultChan,Get,Everything,NewStringSet,List,Getenv] | WaitForBuilderAccount waits for a build to complete or failed. Errorf returns error if the deployment status is OK or failed. | Since we know this happens quickly, 50 or 100 millisecond interval? |
@@ -183,7 +183,7 @@
"test:watch": "<%= clientPackageManager %> test <%= optionsForwarder %>--watch --clearCache",
"webpack:dev": "<%= clientPackageManager %> run webpack-dev-server <%= optionsForwarder %>--config webpack/webpack.dev.js --inline --hot --port=9060 --watch-content-base --env.stats=minimal",
... | [No CFG could be retrieved] | The main function for the main application. clientPackageManager run test. | but this means you won't have the progress when running these outside of maven/gradle as well right? My goal was not to have the progress at all when running from maven gradle and have progress and stats when running via npm |
@@ -23,8 +23,6 @@ type dataSource struct {
var _ ocrtypes.DataSource = (*dataSource)(nil)
// The context passed in here has a timeout of observationTimeout.
-// Gorm/pgx doesn't return a helpful error upon cancellation, so we manually check for cancellation and return a
-// appropriate error (FIXME: How does this w... | [Observe->[ToDecimal,Wrapf,SingularResult,Observation,ExecuteAndInsertNewRun,BigInt]] | Observe returns an observation of the current state of the data source. | Added a separate ctx for the tx where we insert the results, so we can save the results in the event of the observation ctx timing out. |
@@ -443,9 +443,9 @@ func (p *postgres) GetTeamsForUser(ctx context.Context, userID string) ([]storag
rows, err := p.db.QueryContext(ctx,
`SELECT t.id, t.name, t.description, t.projects, t.created_at, t.updated_at
FROM teams t
- LEFT JOIN teams_users_associations tu ON tu.team_id=t.id
+ LEFT JOIN teams_users_a... | [GetTeam->[getTeam],StoreTeam->[StoreTeamWithProjects],getTeam->[Scan,processError,Array,QueryRowContext],processError->[Debugf],RemoveUsers->[getTeam,processError,RowsAffected,Commit,WithCancel,touchTeam,BeginTx,ExecContext,Array],StoreTeamWithProjects->[Scan,processError,Array,QueryRowContext],DeleteTeam->[Scan,proce... | GetTeamsForUser returns a list of teams that the given user is a member of. | Why the added groupings? |
@@ -4,6 +4,7 @@ package keyvaluetags
import (
"fmt"
+ "github.com/aws/aws-sdk-go/service/qldb"
"reflect"
"github.com/aws/aws-sdk-go/service/acmpca"
| [Sprintf,TypeOf,String,Out] | This file contains code generation customizations for each AWS SDK service. - number of possible resources in the SDK. | Nit: Please sort this new import in the third-party imports section near the other services |
@@ -207,8 +207,10 @@ elseif ($event->type == 'charge.succeeded') {
}
elseif ($event->type == 'customer.source.created') {
-
- //TODO: save customer's source
+ global $conf;
+ $subject = 'Your payment has been received: '.$conf->entity.'';
+ $headers = 'From: "'.$conf->global->MAIN_INFO_SOCIETE_MAIL.'" <'.$conf->glo... | [fetch,getStripeCustomerAccount,addPaymentToBank,create,add_url_line,setDefaultLang,fetch_object,getSommePaiement,addline,createFromOrder,createPaymentStripe,classifyBilled,begin,switchEntity,load,getSumCreditNotesUsed,escape,getrights,generateDocument,query,getStripeAccount,validate,trans,num_rows,set_paid,commit,getS... | Event handler for the banktransfert_bank_transfert_send event. The source of a payment. | you are going to receive a lot of email |
@@ -3041,6 +3041,17 @@ namespace DotNetNuke.Services.Upgrade
ReIndexUserSearch();
}
+ private static void UpgradeToVersion742()
+ {
+ var containerFolder = string.Format("{0}Containers\\DarkKnightMobile", Globals.HostMapPath);
+ var skinFolder = string.Format("{0}Skins\\DarkKnightMobile", ... | [Upgrade->[UpgradeToVersion520->[AddModuleDefinition,AddModuleToPage,AddModuleControl,GetModuleDefinition],UpgradeToVersion720->[AddModuleDefinition,AddModuleControl,Upgrade],UpgradeToVersion600->[RemoveModuleControl,AddIconToAllowedFiles,FavIconsToPortalSettings,AddDefaultModuleIcons,GetModuleDefinition,RemoveModule,A... | This method upgrades the user s meta data from the current version 7. 0 to 7. | These two checks should be done separately and the corresponding package removed. If (!Directory.Exists(skinfolder)) { UninstallPackage("...") } If (!Directory.Exists(containerFolder)) { UninstallPackage("...") } |
@@ -607,6 +607,9 @@ public class InboundHttp2ToHttpAdapterTest {
verify(serverListener, times(2)).messageReceived(requestCaptor.capture());
capturedRequests = requestCaptor.getAllValues();
assertEquals(2, capturedRequests.size());
+ // We expect to not have this header ... | [InboundHttp2ToHttpAdapterTest->[HttpResponseDelegator->[channelRead0->[messageReceived]],boostrapEnv->[initChannel->[exceptionCaught->[exceptionCaught]],boostrapEnv],HttpSettingsDelegator->[channelRead0->[messageReceived]]]] | Test response header informational. Write headers and response. assertEquals - Asserts if response2 and request2 are identical. | Note this change was needed as we not correctly copied the headers before in our replace(...) methods. |
@@ -333,7 +333,9 @@ final class J9VMInternals {
private static void checkPackageAccess(final Class clazz, ProtectionDomain pd) {
final SecurityManager sm = System.getSecurityManager();
if (sm != null) {
- AccessController.doPrivileged(new PrivilegedAction() {
+ ProtectionDomain[] pdArray = (pd == null) ? ne... | [J9VMInternals->[copyThrowable->[copyThrowable,cloneThrowable],checkPackageAccess->[run->[checkPackageAccess]],formatNoSuchMethod->[getClassInfoStrings],prepare->[prepareClassImpl],completeInitialization->[completeInitialization],cloneThrowable->[run->[newInstance]]]] | Check if the given class has access to the given protection domain. | I don't think creation of an empty ProtectionDomain[] is required, null should be sufficient. |
@@ -40,12 +40,12 @@ public class FakeKafkaTopicClient implements KafkaTopicClient {
final String topicName;
final int numPartitions;
final short replicatonFactor;
- final String cleanupPolicy;
+ final TopicCleanupPolicy cleanupPolicy;
public FakeTopic(String topicName,
... | [FakeKafkaTopicClient->[createTopic->[FakeTopic],describeTopics->[getDescription]]] | This class will create a fake topic object for a given topic name and number of partitions. Returns a description of the topic that has no partition info. | should probably make these `private`. |
@@ -9,6 +9,8 @@ import (
"strconv"
"strings"
+ "github.com/elastic/beats/libbeat/common/cfgwarn"
+
"github.com/aws/aws-sdk-go-v2/service/sqs"
"github.com/aws/aws-sdk-go-v2/service/sqs/sqsiface"
| [Fetch->[Error,GetStartTimeEndTime,GetMetricDataResults,New,GetListMetricsOutput,Wrap],DefaultMetricSet,Itoa,NewLogger,Sprint,FindTimestamp,MustAddMetricSet,New,NewMetricSet,ListQueuesRequest,CheckTimestampInArray,EventMapping,Send,Event,IsZero,Wrap,Info,Split,Put] | Creates a new MetricSet instance with the given configuration. New creates a new metric set with the specified base metric set. | Nit: move to line ~21 |
@@ -600,7 +600,7 @@ rebuild_tgt_pool_disconnect_internal(void **state, unsigned int fail_loc)
/* hang the rebuild during scan */
if (arg->myrank == 0)
- daos_mgmt_set_params(arg->group, -1, DMG_KEY_FAIL_LOC, fail_loc,
+ daos_debug_set_params(arg->group, -1, DMG_KEY_FAIL_LOC, fail_loc,
0, NULL);
MPI_... | [int->[uuid_is_null,rebuild_add_back_tgts,test_get_leader,MPI_Barrier,daos_cont_destroy,daos_cont_close,rebuild_close_container_cb,dmg_pool_destroy,daos_mgmt_set_params,DP_UUID,daos_handle_is_inval,rebuild_pool_connect_internal,rebuild_io_validate,print_message,sleep,MPI_Bcast,rebuild_io,MPI_Allreduce,uuid_clear,rebuil... | Internal function to handle the rebuild of a single target pool. | (style) line over 80 characters |
@@ -289,13 +289,15 @@ public abstract class ParallelIndexPhaseRunner<SubTaskType extends Task, SubTask
@Override
public void collectReport(SubTaskReportType report)
{
- taskMonitor.collectReport(report);
+ if (taskMonitor != null) {
+ taskMonitor.collectReport(report);
+ }
}
@Override
... | [ParallelIndexPhaseRunner->[collectReport->[collectReport],getProgress->[getProgress],getRunningTaskIds->[getRunningTaskIds],CountingSubTaskSpecIterator->[next->[next,hasNext],hasNext->[hasNext]],getRunningSubTaskSpecs->[getRunningSubTaskSpecs],run->[subTaskSpecIterator,estimateTotalNumSubTasks,run],getReports->[getRep... | Collect a report from the task monitor. | `collectReport` should be called only when there is a subtask sending its report. Since `TaskMonitor` is responsible for spawning subtasks, it seems quite strange if `taskMonitor` is null when this method is called. How about adding a precondition that explodes when it's null? |
@@ -404,7 +404,7 @@ public class Helium {
* @return ordered list of enabled buildBundle package
*/
public List<HeliumPackage> getBundlePackagesToBundle() {
- Map<String, List<HeliumPackageSearchResult>> allPackages = getAllPackageInfoWithoutRefresh();
+ Map<String, List<HeliumPackageSearchResult>> allP... | [Helium->[getBundlePackagesToBundle->[getAllPackageInfoWithoutRefresh],getAllPackageInfo->[getAllPackageInfo],getSpellConfig->[getPackagePersistedConfig,getEnabledPackageInfo],getPackageConfig->[getPackagePersistedConfig,getPackageInfo],getAllEnabledPackages->[getAllPackageInfoWithoutRefresh],enable->[save,getPackageIn... | Get the list of bundle packages to be displayed in the helium configuration. | It will fetch `heliun.json` from web everytime. It this intended? |
@@ -169,9 +169,12 @@ limitations under the License.
"engines": {
"node": ">=<%= NODE_VERSION %>"
},
+ "config": {
+ "default_enviroment": "prod"
+ },
"scripts": {
"prettier:format": "prettier --write \"{,src/**/,webpack/}*.{<%= getPrettierExtensions() %>}\"",
- "lint": "eslint . --ext .js,.ts... | [No CFG could be retrieved] | Return a dict of version numbers that can be used to determine the version of the compiler. The e2e - client package manager. | no jsx, tsx for Angular: it's only for React |
@@ -99,10 +99,12 @@ namespace System.Security.Cryptography
throw new CryptographicException(SR.Cryptography_OpenInvalidHandle);
}
+#pragma warning disable CA1416 // https://github.com/dotnet/runtime/issues/51098
byte[] keyBlob = Interop.AppleCrypto.SecKeyExport(
... | [RSAImplementation->[RSASecurityTransforms->[VerifyHash->[VerifyHash],HashData->[HashData],TryDecrypt->[TryDecrypt],ImportRSAPublicKey->[ImportSubjectPublicKeyInfo],SecKeyPair->[ThrowIfDisposed],ImportEncryptedPkcs8PrivateKey->[ImportEncryptedPkcs8PrivateKey],SetKey->[ThrowIfDisposed],TryHashData->[TryHashData],Dispose... | Override this method to export the private key and the public key. | I'm not very happy about all these pragmas they are not really helping us to improve the dev experience. |
@@ -232,7 +232,11 @@ async def generate_lockfile(
initial_lockfile_digest_contents = await Get(
DigestContents, Digest, poetry_export_result.output_digest
)
- metadata = LockfileMetadata(req.requirements_hex_digest, req.interpreter_constraints)
+ metadata = LockfileMetadata.new(
+ req.re... | [setup_user_lockfile_requests->[PythonLockfileRequest,_UserLockfileRequests],determine_resolves_to_generate->[AmbiguousResolveNamesError],generate_lockfile->[PythonLockfile],generate_lockfiles_goal->[_SpecifiedUserResolves,GenerateLockfilesGoal]] | Generate a lockfile for a given node. Get a lockfile with optional optional optional optional optional optional optional optional optional optional optional optional optional. | I'm not absolutely convinced that this is the best place to put this parsing logic. It may be worth moving it over to `new` at some point, but for now, this works. |
@@ -441,6 +441,10 @@ public class CreateServiceOfferingCmd extends BaseCmd {
return storagePolicy;
}
+ public Boolean getDynamicScalingEnabled() {
+ return isDynamicScalingEnabled == null ? Boolean.TRUE : isDynamicScalingEnabled;
+ }
+
//////////////////////////////////////////////////... | [CreateServiceOfferingCmd->[execute->[getCommandName]]] | Returns the storage policy. | As the null check is in place, what about returning boolean instead of Boolean on this function? Also, this will mean that all the service offerings registered before 4.16 will now become dynamically scallable as well? |
@@ -246,4 +246,7 @@ func TestConfigSave(t *testing.T) {
cv, err := c.Value(nil)
assert.NoError(t, err)
assert.Equal(t, "value3", cv)
+
+ // We do not allow storing secrets for all stacks, since the encryption key for the secret is tied to the stack
+ e.RunCommandExpectError("pulumi", "config", "set", "secretA", "... | [Value,ProgramTest,DeleteEnvironment,Save,NewEnvironment,NotNil,NotEqual,Type,RunCommandExpectError,GetStackName,Join,Equal,RunCommand,Failed,ImportDirectory,Contains,Name,NoError,True,ModuleMember,Run,Load] | c. Value returns the value3 of the component. | Nit: Could we confirm we get the right error message too? |
@@ -134,14 +134,14 @@ class FromJsonCheckResultProcess(KratosMultiphysics.Process, KratosUnittest.Test
for node in self.sub_model_part.Nodes:
compute = self.__check_flag(node)
- if (compute == True):
+ if (compute is True):
for i in rang... | [FromJsonCheckResultProcess->[__init__->[__init__]]] | This method is called in order to finalize the current step of the solution. Check if the values of the variable are close or close to the last non - zero value Check if the value of the node is close to the value of the node. | I am curious, does this make a difference? |
@@ -921,9 +921,16 @@ io_rewritten_array_with_mixed_size(void **state)
assert_non_null(fbuf);
memset(fbuf, 0, size);
- /* Disabled Pool Aggrgation */
+ /* Disabled Pool Aggregation */
rc = set_pool_reclaim_strategy(state, aggr_disabled);
assert_int_equal(rc, 0);
+ /**
+ * set_pool_reclaim_strategy() to disab... | [insert_recxs->[insert_recxs_nowait,insert_wait],lookup_empty_single->[lookup],lookup_single->[lookup],void->[insert_nowait,insert_test,ioreq_init,insert_wait,lookup_single,enumerate_dkey,lookup,punch_akey,lookup_single_with_rxnr,punch_dkey,insert,enumerate_akey,punch_obj,ioreq_fini,insert_single_with_rxnr,close_reopen... | This function is called when a DOS array is rewritten with mixed size. This method is used to lookup the initial 4K record and insert the initial 4K record Re - write the same array with modified Two values read and verify the data with Two updated. | (style) code indent should use tabs where possible (style) please, no space before tabs |
@@ -319,6 +319,10 @@ public class ProductsController {
s.getStatus(),
s.getChannels().stream().map(c ->
new ChannelJson(
+ ... | [ProductsController->[synchronizeSubscriptions->[ContentSyncManager,getMessage,tryGetLock,fatal,json,unlockFile,updateSubscriptions],synchronizeChannelFamilies->[IllegalArgumentException,ContentSyncManager,getMessage,tryGetLock,fatal,updateChannelFamilies,json,hasRole,unlockFile,readChannelFamilies],synchronizeProducts... | This method returns the data for the given user. This method returns a product object with all base products of the current product. | I think this is too expensive and there is a better way to get the ID. Check line 300: there is a map "channelByLabel" of all Channels. Please use that map to get the Channel and the ID. |
@@ -137,9 +137,12 @@ define([
url : resource.url,
animationsRunning : false,
nodeTransformationsScratch : {},
- originalNodeMatrixHash : {}
+ originalNodeMatrixHash : {},
+ loadFail: false
... | [No CFG could be retrieved] | Creates a Model object for the given entity. Clipping plans. | Small style tweak, add a space before the `:` ` loadFail : false` |
@@ -203,9 +203,9 @@ export function sanitizeHtml(html, diffing) {
emit('<');
emit(tagName);
for (let i = 0; i < attribs.length; i += 2) {
- const attrName = attribs[i];
+ const attrName = attribs[i].toLowerCase();
const attrValue = attribs[i + 1];
- if (!isValidAttr(ta... | [No CFG could be retrieved] | Private functions - These functions are used to determine if a node should be inserted or not. Emit tag name and attribute names that can t be parsed. | This can be reverted right? |
@@ -834,7 +834,10 @@ def _prepare_mne_browse_raw(params, title, bgcolor, color, bad_color, inds,
size = tuple([float(s) for s in size])
fig = figure_nobar(facecolor=bgcolor, figsize=size)
- fig.canvas.set_window_title(title)
+ if title:
+ fig.canvas.set_window_title(title)
+ else:
+ ... | [_pick_bad_channels->[_plot_update_raw_proj],_label_clicked->[_plot_update_raw_proj],plot_raw_psd->[_set_psd_plot_params,_convert_psds]] | Set up the mne_browse_raw window. V scroll patches Plots a window of n_channels nan nan nan nan nan nan nan nan nan nan nan. | I guess you can also do `fig.canvas.set_window_title(title if title else "Raw")` |
@@ -213,6 +213,8 @@ out_pl:
pl_fini();
out_eq:
daos_eq_lib_fini();
+out_job:
+ dc_job_init();
out_agent:
dc_agent_fini();
out_hhash:
| [daos_init->[D_GOTO,pl_init,D_MUTEX_LOCK,daos_eq_lib_fini,dc_pool_init,dc_agent_init,DP_RC,daos_debug_init,dc_mgmt_net_cfg,daos_eq_lib_init,dc_mgmt_init,dc_agent_fini,daos_hhash_init,pl_fini,dc_obj_init,dc_cont_fini,D_ERROR,dc_mgmt_fini,D_MUTEX_UNLOCK,daos_debug_fini,dc_cont_init,daos_hhash_fini,dc_pool_fini],daos_fini... | init system functions end of function read_lock. | Shouldn't this be `dc_job_fini()`? |
@@ -67,8 +67,8 @@ class CollectionBulkDelete(ModelBulkDeleteMutation):
description = "Deletes collections."
model = models.Collection
permissions = (ProductPermissions.MANAGE_PRODUCTS,)
- error_type_class = ProductError
- error_type_field = "product_errors"
+ error_type_c... | [ProductVariantBulkCreate->[clean_variants->[clean_variant_input,validate_duplicated_sku,validate_duplicated_attribute_values],clean_channel_listings->[clean_price],perform_mutation->[save_variants,ProductVariantBulkCreate,clean_variants,create_variants],save_variants->[save,create_variant_channel_listings],save->[save... | Create a mutation that deletes all products and categories. get draft order lines for products. | Isn't this breaking for the dashboard? I think it is used there, but this should require simple regeneration of Typescript types. |
@@ -1169,6 +1169,17 @@ int BusyWithClassicConnection(EvalContext *ctx, ServerConnectionState *conn)
return false;
}
+ zret = ShortcutsExpand(filename, sizeof(filename) - 1,
+ SV.path_shortcuts,
+ conn->ipaddr, conn->revdns,
+ KeyPrintableHash(ConnectionInf... | [bool->[CompressPath,memset,strlen,ToLower,realpath,MapName],int->[ConnectionInfoKey,BN_bn2mpi,MapName,ReceiveTransaction,strlcpy,CheckStoreKey,xmalloc,IsRegexItemIn,BN_mpi2bn,BN_rand,BN_new,lstat,BN_cmp,SendTransaction,memcpy,strncmp,strlen,GetErrorStr,RSA_size,RSA_private_decrypt,LastSaw1,IsMatchItemIn,stat,BN_free,S... | Check if a connection is busy with a classic connection. Checks if a key is available and if so checks if it is authenticated. check if a key is available in the buffer check if the key is correct check if we can decrypt the message check if we can read a block of data from the socket check if we can send a message to ... | Second parameter should just be sizeof(filename), unless you're planning to append something of your own after doing this expansion; ShortcutsExpand() wants the size of the buffer it's writing to, not the max allowed strlen() of the final contents of the buffer. Same below. |
@@ -1302,6 +1302,8 @@ class Propal extends CommonObject
if (! $error)
{
+ // force load new object before launch hook
+ $this->fetch($this->id);
// Hook of thirdparty module
if (is_object($hookmanager))
{
| [Propal->[valid->[fetch],getLinesArray->[fetch_lines],info->[fetch],create->[addline],createFromClone->[create],create_from->[create]]] | Create a clone of the object reset all fields of a node that are not in the cluster This method is called when an object is modified by a hook. It is called by the. | A test at begin of clone method to be sure caller has made the fetch would be better i think |
@@ -205,9 +205,10 @@ class MemoryHandler(logging.handlers.MemoryHandler):
"""Close the memory handler, but don't set the target to None."""
# This allows the logging module which may only have a weak
# reference to the target handler to properly flush and close it.
- target = self.targ... | [TempHandler->[close->[close]],exit_with_log_path->[format],pre_arg_parse_except_hook->[flush]] | Close the memory handler but don t set the target to None. | nit: Can we make the changes in this file another way? `target` should always exist and I'd rather not ignore the error if it doesn't. |
@@ -278,6 +278,8 @@ def main(args):
m_speedup.speedup_model()
print('start finetuning...')
+ optimizer = torch.optim.SGD(model.parameters(), lr=0.01, momentum=0.9, weight_decay=5e-4)
+ scheduler = MultiStepLR(optimizer, milestones=[int(args.pretrain_epochs * 0.5), int(args.pretrain_epochs * 0.75)]... | [train->[train],main->[trainer->[train],get_model_optimizer_scheduler,train,test,get_data,get_dummy_input],main] | Main function for the pruner. export the pruned model masks for the model speedup and the pruner get the last non - zero node in the model. | I found the same code at line 147 and 148... #Resolved |
@@ -1250,7 +1250,9 @@ def test_sources_default_globs(sources_rule_runner: RuleRunner) -> None:
# NB: Not all globs will be matched with these files, specifically `default.f03` will not
# be matched. This is intentional to ensure that we use `any` glob conjunction rather
# than the normal `all` conjunctio... | [test_codegen_cannot_generate_language->[AvroSources,setup_codegen_protocol_tgt],test_owners_source_file_does_not_exist->[assert_owners],assert_dependencies_resolved->[get_target],test_filesystem_specs_nonexistent_file->[resolve_filesystem_specs],test_filesystem_specs_no_owner->[resolve_filesystem_specs],test_special_c... | Test that sources globs are matched with default files. | Ditto on writing `""` instead of `f`. |
@@ -280,7 +280,12 @@ class ContentDecodePolicy(SansIOHTTPPolicy):
# Try to use content-type from headers if available
content_type = None
if 'content-type' in response.headers:
- content_type = response.headers['content-type'].split(";")[0].strip().lower()
+ try:
+ ... | [ContentDecodePolicy->[deserialize_from_text->[_json_attemp],deserialize_from_http_generics->[deserialize_from_text,headers],on_response->[deserialize_from_http_generics]]] | Deserialize from HTTP response. Use bytes and headers to NOT use any requests or IO. | Is it a problem that we drop the charset? Also, we can probably specify maxsplit=1 if we are to drop everything anyways... |
@@ -441,7 +441,7 @@ if ( ! function_exists('log_message'))
{
static $_log;
- if ($_log === NULL)
+ if (empty($_log))
{
// references cannot be directly assigned to static variables, so we use an array
$_log[0] =& load_class('Log', 'core');
| [log_message->[write_log],_exception_handler->[log_exception,show_php_error],show_404->[show_404],show_error->[show_error]] | Log a message to the log file. | `empty()` isn't faster than `=== NULL`, this isn't related to `get_config()` anyway ... please revert it. :) |
@@ -1378,6 +1378,12 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_WAYPOINT_MOVEMENT_STOP_TIME_FOR_PLAYER] = sConfigMgr->GetIntDefault("WaypointMovementStopTimeForPlayer", 120);
+
+ m_int_configs[CONFIG_DUNGEON_ACCESS_REQUIREMENTS_PRINT_MODE] = sConfigMgr->GetIntDefault("Du... | [No CFG could be retrieved] | Intialize all integer values of the packet spoof punishment Initialize the object model list and the game object model list. | remove one whiteline here Currently there is a blank on 1404 and 1405 |
@@ -2177,6 +2177,10 @@ class Report(object):
Whether to render butterfly plots for (decimated) `~mne.io.Raw`
data.
+ .. versionadded:: 0.24.0
+ ica : bool
+ Whether to render `~mne.preprocessing.ICA` component topographies.
+
.. versionadded:: 0.24.0... | [Report->[add_image->[_get_dom_id,_html_image_element,_add_or_replace],add_epochs->[_html_epochs_element,_get_dom_id],_render_bem->[_render_one_bem_axis],add_figure->[_get_dom_id,_fig_to_img,_html_image_element,_add_or_replace],__getstate__->[_get_state_params],add_html->[_get_dom_id,_add_or_replace,_html_element],add_... | r Parse a folder containing data and return a BEM report. Missing time points in the data file. Finds missing missing files and returns a object. Render a single object from the specified files. | Currently without function, should be removed |
@@ -109,7 +109,7 @@ func testAccCheckEmrSecurityConfigurationExists(n string) resource.TestCheckFunc
}
const testAccEmrSecurityConfigurationConfig = `
-resource "aws_emr_security_configuration" "foo" {
+resource "aws_emr_security_configuration" "test" {
configuration = <<EOF
{
"EncryptionConfiguration": {
| [ParallelTest,StringValue,Meta,RootModule,ComposeTestCheckFunc,String,Errorf,DescribeSecurityConfiguration] | region aws_emr_security_configuration. | It is not an issue here, but I want to call out that there may be cases where these configurations might be shared across different resource tests. We've been encouraging folks not to reuse test configs and instead duplicate them to avoid such issues. |
@@ -1,12 +1,12 @@
<?php
+use \Friendica\Core\Config;
+
function community_init(App $a) {
if (! local_user()) {
unset($_SESSION['theme']);
unset($_SESSION['mobile-theme']);
}
-
-
}
| [No CFG could be retrieved] | The community_init function get all items in the community list. | Standards: Can you please add a space after commas in the whole file? |
@@ -22,4 +22,15 @@ class TextClassifierPredictor(Predictor):
Runs the underlying model, and adds the ``"label"`` to the output.
"""
sentence = json_dict["sentence"]
+ if isinstance(self._dataset_reader, StanfordSentimentTreeBankDatasetReader):
+ tokenizer = WordTokenizer()
+... | [TextClassifierPredictor->[predict->[predict_json],_json_to_instance->[text_to_instance]],register] | Converts a JSON object representing a nanoseconds into an instance of the class. | You should probably have a copy here. |
@@ -26,6 +26,7 @@ import org.apache.dubbo.registry.RegistryService;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
| [AbstractRegistryFactory->[destroyAll->[getRegistries]]] | Creates a new instance of the RegistryFactory interface. Get all registries that are not in the registry. | remove unused imports |
@@ -336,11 +336,16 @@ crt_init_opt(crt_group_id_t grpid, uint32_t flags, crt_init_options_t *opt)
addr_env);
}
+ if (strcmp(addr_env, "ofi+sockets") == 0) {
+ D_WARN("Overriding to use ofi+tcp;ofi_rxm \n");
+ addr_env = "ofi+tcp;ofi_rxm";
+ }
+
provider_found = false;
for (plugin_idx = 0; crt_na_d... | [No CFG could be retrieved] | Initialize the random number generator. finds the nad type of the requested provider and sets the appropriate flags. | (style) unnecessary whitespace before a quoted newline |
@@ -70,9 +70,10 @@ public class SwaggerUiProcessor {
@BuildStep
@Record(ExecutionTime.STATIC_INIT)
public void registerSwaggerUiServletExtension(SwaggerUiRecorder recorder,
- BuildProducer<ServletExtensionBuildItem> servletExtension,
+ BuildProducer<RouteBuildItem> routes,
... | [SwaggerUiProcessor->[updateApiUrl->[updateApiUrl]]] | Registers a Swagger UI servlet extension. This method extracts the files in the generated output that are not in the generated output. | Super minor nit-pick: I think it would be good to rename the method now that servlet isn't involved |
@@ -342,6 +342,11 @@ class RemoteLOCAL(RemoteBase):
if bar:
progress.finish_target(dir_relpath)
+ def _already_cached(self, path_info):
+ current_md5 = self.save_info(path_info).get(self.PARAM_MD5)
+
+ return not self.changed_cache(current_md5)
+
def _discard_working_direct... | [RemoteLOCAL->[pull->[md5s_to_path_infos,_group,exists,get,changed_cache_file],move->[move],_save_dir->[link,get,changed_cache,_move],collect_dir_cache->[unixpath,changed_cache],_group->[get],push->[func->[changed_cache_file],exists,_group,get,md5s_to_path_infos],dump_dir_cache->[get],_save_file->[link,get,changed_cach... | Checkout a file or directory with a specific checksum. Private method for discarding missing node - lease entries. | We should use `self.state.update()` here, since checksum might be already cached in the state db. |
@@ -187,5 +187,13 @@ module GobiertoBudgets
end
end
+ def test_percentage_difference
+ f1 = total(forecast: TOTAL_BUDGET)
+ f2 = total(executed: TOTAL_BUDGET/2)
+
+ with factories: [f1, f2] do
+ assert_equal "100.00 % more", stats.percentage_difference(variable1: :total_budget, va... | [SiteStatsTest->[test_total_budget_executed->[total],test_total_budget_per_inhabitant->[total],total->[factory_params],test_total_budget_updated->[total],test_total_income_budget_updated->[total_income],test_total_budget->[total],test_total_income_budget->[total_income],test_total_budget_executed_percentage->[total]]] | This method checks that all of the objects in the budgets_execution_summary have the. | Surrounding space missing for operator /. |
@@ -129,7 +129,7 @@ import java.util.concurrent.TimeUnit;
public class RemoteTaskRunner implements WorkerTaskRunner, TaskLogStreamer
{
private static final EmittingLogger log = new EmittingLogger(RemoteTaskRunner.class);
- private static final StatusResponseHandler RESPONSE_HANDLER = new StatusResponseHandler(Sta... | [RemoteTaskRunner->[tryAssignTask->[runPendingTasks,findWorkerRunningTask],scheduleTasksCleanupForWorker->[cancelWorkerCleanup],shutdown->[findWorkerRunningTask],run->[findWorkerRunningTask],start->[start],markWorkersLazy->[apply],getBlackListedWorkers->[getImmutableWorkerFromZK],announceTask->[isWorkerRunningTask],che... | A TaskRunner is a base class that can be used to run tasks on a single node. | `StatusResponseHandler.getInstance()` can be used directly. |
@@ -55,7 +55,7 @@ public class PreviewAction implements EditionsWsAction {
WebService.NewAction action = controller.createAction("preview")
.setSince("6.7")
.setPost(true)
- .setDescription("Preview the changes to SonarQube to match the specified license. Require 'Administer System' permission."... | [PreviewAction->[buildResponse->[build],computeNextState->[getEditionKey,requiresInstallationChange,getPluginKeys,NextState,isOffline],NextState->[getPendingEditionKey->[ofNullable]],define->[setHandler,setDescription],handle->[checkIsSystemAdministrator,IllegalArgumentException,create,orElseThrow,mandatoryParam,writeP... | Define the missing node. | I'm pretty sure, convention is "Require" (same as "Preview") I summon @teryk and @ganncamp to confirm :) |
@@ -63,17 +63,6 @@ class Jetpack_Infinite_Scroll_Extras {
*/
public function action_jetpack_modules_loaded() {
Jetpack::enable_module_configurable( __FILE__ );
- add_filter( 'jetpack_module_configuration_url_infinite-scroll', array( $this, 'infinite_scroll_configuration_url' ) );
- }
-
- /**
- * Overrides def... | [Jetpack_Infinite_Scroll_Extras->[action_wp_enqueue_scripts->[enqueue_scripts]]] | This method is called when Jetpack modules are loaded. It is called by Jet. | The settings under Settings > Reading have an additional option ("Use Google Analytics with Infinite Scroll") that is not found in the Jetpack dashboard settings. Should we keep the old link around until the Jetpack dashboard settings are updated to include all the Infinite Scroll settings? |
@@ -0,0 +1,6 @@
+FactoryGirl.define do
+ factory :grouping do
+ association :group
+ association :assignment
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | Trailing whitespace detected. |
@@ -36,10 +36,10 @@ class AnnotationsController < ApplicationController
def create
@text = AnnotationText.create({
- :content => params[:content],
- :annotation_category_id => params[:category_id],
- :creator_id => current_user.id,
- :last_editor_id => current_user.id
+ content: param... | [AnnotationsController->[destroy->[destroy],create->[create]]] | create a n - node with the given content. | Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis. |
@@ -53,11 +53,11 @@
<legend class="crayons-field__label mb-2">Who can join this community?</legend>
<div>
<div class="mb-2">
- <%= radio_button_tag :invite_only_mode, "0", class: "crayons-field crayons-field--radio", required: true %>
+ <%= radio_button_tag :invite_only_mode, "0", false, ... | [No CFG could be retrieved] | A list of fields that show how to join a community or a color field. Debugging tool for the n - node node. | The `crayons-radio` styles allow the radio buttons to receive the brand color styling. In addition, the required fields weren't being applied here. |
@@ -895,9 +895,10 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
for addr in vhost.addrs:
# In Apache 2.2, when a NameVirtualHost directive is not
# set, "*" and "_default_" will conflict when sharing a port
+ addrs = set((addr,))
if addr.... | [ApacheConfigurator->[_add_servername_alias->[_add_servernames],enhance->[choose_vhost],perform->[restart,perform],make_addrs_sni_ready->[is_name_vhost,add_name_vhost],_copy_create_ssl_vhost_skeleton->[_sift_line],get_virtual_hosts->[_create_vhost],_add_name_vhost_if_necessary->[is_name_vhost,add_name_vhost],cleanup->[... | Add NameVirtualHosts if necessary for new vhost. | Trying to restate what this does for sanity checking: In addition to ensuring that `addrs` is always defined, this change will cause `add_name_vhost` to be called once for every other vhost with the same address. Previously it would only be called if there was a `"*"` or `"_default_"` vhost. |
@@ -4164,7 +4164,7 @@ class Facture extends CommonInvoice
$sqlSit .= " AND fs.fk_statut in (".self::STATUS_VALIDATED.",".self::STATUS_CLOSED.")";
$sqlSit .= " GROUP BY fs.situation_cycle_ref";
$sqlSit .= " ORDER BY fs.situation_counter";
- $sql .= " AND ( f.type != ".self::TYPE_SITUATION." OR f.rowid IN (... | [Facture->[getLinesArray->[fetch_lines],deleteline->[delete,fetch],insert_discount->[fetch],update_percent->[update],info->[fetch],createFromOrder->[create],get_prev_sits->[fetch],updateline->[fetch,update],fetchPreviousNextSituationInvoice->[fetch],createFromCurrent->[create],validate->[fetch,fetch_lines,setCanceled],... | List all the qualified avoir invoices. This method is used to get a list of all the AFIR invoices that are if no error. | Inside a IN (...), we must use ->sanitize ->escape if for = '...' |
@@ -189,9 +189,15 @@ class R2Plus1dStem(nn.Sequential):
class VideoResNet(nn.Module):
- def __init__(self, block, conv_makers, layers,
- stem, num_classes=400,
- zero_init_residual=False):
+ def __init__(
+ self,
+ block: Type[Union[BasicBlock, Bottleneck]],
+ ... | [_video_resnet->[VideoResNet],VideoResNet->[_make_layer->[get_downsample_stride]],r2plus1d_18->[_video_resnet],mc3_18->[_video_resnet],r3d_18->[_video_resnet]] | Generic resnet video generator. | I believe block should be an `nn.Module`. The intention is to allow users pass their own custom blocks |
@@ -34,10 +34,10 @@
<div class="widget_headline">
<h3 class="widget_title"></h3>
<i class="fas fa-times fa-pull-right" aria-hidden="true"></i>
- <a class="fb-sharer" aria-label="facebook">
+ <a class="fb-sharer" ariafacebook">
<i class="fab fa-facebook fa-pull-right" aria-hid... | [No CFG could be retrieved] | A list of all components that can be found in the system. | Perhaps a typo? |
@@ -62,7 +62,7 @@ type Props = {
/**
* Invoked to obtain translated strings.
*/
- t: Function
+ t: Function,
};
/**
| [No CFG could be retrieved] | The first uploaded background is the first uploaded background. Enable or disable the . | No need for the trailing comma. |
@@ -14,6 +14,7 @@
limitations under the License.
"""
+import logging as log
import time
from collections import OrderedDict
from itertools import chain, cycle
| [AsyncPipeline->[_run_sync_steps->[close,setup,end,process],close->[join],run->[start]],PipelineStep->[start->[start],_run->[setup,end,process],join->[join]]] | Creates a class which implements the logic of the class. This method initializes the object with the necessary data. | In some cases you substitute `import logging as log` with `import loggging`, but here and in some other cases you still import it as log. |
@@ -98,6 +98,7 @@ module Users
)
create_user_event(:piv_cac_enabled)
Funnel::Registration::AddMfa.call(current_user.id, 'piv_cac')
+ session[:needs_to_setup_piv_cac_after_sign_in] = false
redirect_to after_sign_in_path_for(current_user)
end
| [PivCacAuthenticationSetupController->[render_error->[new],user_piv_cac_form->[new],render_prompt->[new],authorize_piv_cac_disable->[piv_cac_enabled?]]] | if piv_cac is enabled for the user create a new piv_c. | Before, this wasn't being set while processing a valid PIV submission, causing the `after_sign_in_path_for(current_user)` to put the user back to the PIV setup screen, even though they just set it up. |
@@ -150,6 +150,16 @@ type lightModuleConfig struct {
MetricSets []string `config:"metricsets"`
}
+// ProcessorsForMetricSet returns processors defined for the light metricset.
+func (s *LightModulesSource) ProcessorsForMetricSet(r *Register, moduleName string, metricSetName string) (*processors.Processors, error) ... | [MetricSetRegistration->[Registration,Wrapf,Errorf,loadModule],loadModule->[Wrapf,Dir,findModulePath,Errorf,loadModuleConfig,loadMetricSets],loadMetricSetConfig->[Unpack,Wrapf,LoadFile],Modules->[moduleNames],HasMetricSet->[Wrapf,findModulePath,Error,loadModuleConfig],ModulesInfo->[Sprintf,MetricSets,Join,Modules],HasM... | ModulesInfo returns a string representation of this source with a list of known metric sets. findModulePath finds the path to the module with the given name. | Check this error. |
@@ -71,7 +71,7 @@ def prime_app(ctx):
@hostgroups(settings.CELERY_HOSTGROUP, remote_kwargs={'ssh_key': settings.SSH_KEY})
def update_celery(ctx):
ctx.remote(settings.REMOTE_UPDATE_SCRIPT)
- ctx.remote('/usr/bin/supervisorctl restart %s' % settings.CELERY_SERVICE)
+ ctx.remote('/usr/bin/supervisorctl mresta... | [deploy->[checkin_changes,ping_newrelic,deploy_app,update_celery,deploy_kumascript],pre_update->[update_code,update_info],update_mdn->[pre_update,update],update->[database,update_locales,update_assets]] | Update celery service. | `mrestart` typo? Or are we using a library or something that gives it to us? |
@@ -78,9 +78,7 @@ class ConsumerGroupManager(object):
try:
collection.insert(consumer_group, safe=True)
except DuplicateKeyError:
- raise pulp_exceptions.PulpCodedValidationException(
- [PulpCodedException(error_codes.PLP1004, type=ConsumerGroup.collection_name,
... | [ConsumerGroupManager->[set_note->[add_notes],unset_note->[remove_notes]]] | Create a new consumer group. Insert a consumer group into the collection. | @barnabycourt, it looks like this was the only place in the code base that PLP1004 was used. Is it ok to remove that code? |
@@ -176,11 +176,13 @@ def choose_configurator_plugins(config, plugins, verb):
need_inst = need_auth = False
if verb == "certonly":
need_auth = True
- if verb == "install":
+ if verb == "install" or verb == "enhance":
need_inst = True
if config.authenticator:
l... | [cli_plugin_requests->[set_configurator],choose_configurator_plugins->[pick_authenticator,pick_configurator,pick_installer,record_chosen_plugins]] | Picks a configurator and a plugin that can be used to run the given plugin. Checks if installer and authenticator are missing and records the necessary information. | nit: We should update this error message so it makes sense for `enhance`. You can probably just use the value of `verb` in the warning. |
@@ -1950,12 +1950,7 @@ func (d *driver) deleteFile(ctx context.Context, file *pfs.File) error {
return pfsserver.ErrCommitFinished{file.Commit}
}
- prefix, err := d.scratchFilePrefix(ctx, file)
- if err != nil {
- return err
- }
-
- _, err = d.etcdClient.Put(ctx, path.Join(prefix, uuid.NewWithoutDashes()), tomb... | [deleteFile->[inspectCommit,scratchFilePrefix,checkIsAuthorized],listRepo->[getAccessLevel],scratchFilePrefix->[scratchPrefix],checkIsAuthorized->[initializePachConn],getTreeForFile->[scratchFilePrefix,inspectCommit,getTreeForCommit],filePathFromEtcdPath->[scratchPrefix],listBranch->[checkIsAuthorized],createRepo->[ini... | deleteFile deletes a file and all its repositories. | Merge this with the line above into a single return. |
@@ -127,7 +127,7 @@ def changed_files(args):
for f in files:
# Ignore non-Python files
- if not f.endswith('.py'):
+ if not (f.endswith('.py') or f.endswith('spack')):
continue
# Ignore files in the exclude locations
| [filter_file->[add_pattern_exemptions],flake8->[filter_file,prefix_relative,changed_files,is_package,flake8]] | Get list of changed files in the Spack repository. | Just make this `f == 'bin/spack'. All the names from `git ls-files` are root-relative, and your current code is going to catch `var/spack/repos/builtin/packages/openfoam-com/common/README-spack` as well as the spack script. |
@@ -11,11 +11,11 @@ import { setYoastComponentsL10n } from "./helpers/i18n";
/* Internal dependencies */
import "./helpers/babel-polyfill";
-import VideoTutorial from "yoast-components/composites/HelpCenter/views/VideoTutorial";
-import AlgoliaSearcher from "yoast-components/composites/AlgoliaSearch/AlgoliaSearcher... | [No CFG could be retrieved] | ContactSupport component. The help center component. | All these lines (14-18) can be combined in one single line. |
@@ -81,7 +81,9 @@ func TrimColorizedString(v string, maxLength int) string {
contract.Assertf(!tagRegexp.MatchString(textOrTag), "Got a tag when we did not expect it")
text := textOrTag
- if currentLength+len(text) > maxLength {
+ textLen := utf8.RuneCountInString(text)
+
+ if currentLength+textLen > ma... | [Colorize->[Failf,ReplaceAllString],MustCompile,FindAllStringIndex,Assertf,MatchString] | TrimColorizedString takes a string with embedded color tags and returns a new string with the. | I suspect the interaction between counting runes but trimming on byte boundaries is going to lead to wackiness in some cases. Is there a reason we moved to `utf8.RuneCountInString`? |
@@ -47,6 +47,7 @@ class CmdGC(CmdBase):
force=self.args.force,
jobs=self.args.jobs,
repos=self.args.repos,
+ workspace=self.args.workspace,
)
return 0
| [CmdGC->[run->[gc,abspath,confirm,warning]],add_parser->[add_argument,add_parser,set_defaults,append_doc_link],getLogger] | Removes unused objects from the cache. Garbage collect data files for a specific . | A general thought, not about this PR, - we should stop automatically making command line options into boolean kwargs, e.g. using `set()` would be more appropriate here. |
@@ -1,7 +1,7 @@
module CastCommon
extend ActiveSupport::Concern
- DIFF_FIELDS = %i(person_id name part)
+ DIFF_FIELDS = %i(person_id name part sort_number)
PUBLISH_FIELDS = DIFF_FIELDS + %i(work_id)
included do
| [to_diffable_hash->[delete_if,each_with_object,send,blank?],included,belongs_to,validates,extend] | Creates a diffable hash from the object. | Freeze mutable objects assigned to constants. |
@@ -10,8 +10,10 @@ class AtWhoController < ApplicationController
.limit(Constants::ATWHO_SEARCH_LIMIT)
.as_json
- # Add avatars, convert to JSON
+ # Add avatars, Base62, convert to JSON
res.each do |user_obj|
+ user_obj['full_name'] = user_obj['full_name'].truncate(Constants::NAM... | [AtWhoController->[check_users_permissions->[can_view_organization_users],users->[avatar_path,render,respond_to,json,as_json,each],load_vars->[find_by_id],before_action]] | This action shows the users missing a lease. It shows up in the index page. | Line is too long. [104/80] |
@@ -35,8 +35,8 @@ class JsonEncoderTest {
jsonEncoder.encode(sampleObject, SampleObject.class, template);
assertThat(
- template.requestBody().asString(),
- is(encodeWithGson(sampleObject).requestBody().asString()));
+ new String(template.body(), StandardCharsets.UTF_8),
+ is(new... | [JsonEncoderTest->[encodeWithGson->[encode,RequestTemplate,GsonEncoder],encodeObject->[SampleObject,is,encode,assertThat,asString],encodeString->[encode,assertThat,asString,is],JsonEncoder,RequestTemplate]] | Encode an object with a JSON and a Gson object. | Not sure if it's better to do array comparison here |
@@ -58,6 +58,12 @@ public class SimpleMessageStore extends AbstractMessageGroupStore
private volatile boolean isUsed;
private volatile boolean copyOnGet = false;
+
+ private final int maxWaitInMilliseconds;
+
+ private final static int DEFAULT_MAX_WAIT_IN_MILLISECONDS = 0;
+
+ private final static int DEFAULT_C... | [SimpleMessageStore->[pollMessageFromGroup->[removeMessagesFromGroup],fastMessageStore->[SimpleMessageStore],getGroupMetadata->[getMessageGroup],iterator->[iterator]]] | Creates a new SimpleMessageStore with a maximum capacity limited by the given number of messages and This method is called when the message cache is empty. | I'd call it like `upperBoundTimeout` and in `long` type. See `UpperBound.tryAcquire()`. |
@@ -17,6 +17,8 @@ limitations under the License.
from enum import Enum
from pathlib import Path
from copy import deepcopy
+from skimage.measure import find_contours
+from shapely.geometry import Polygon
import numpy as np
| [CoCoInstanceSegmentationRepresentation->[mask->[_load_mask]],CoCocInstanceSegmentationPrediction->[to_annotation->[CoCoInstanceSegmentationAnnotation]],SegmentationPrediction->[to_annotation->[SegmentationAnnotation]]] | Creates a new object that represents a single non - zero integer or a boolean representing whether a Constructor for a nifti_reader object. | it is not AC core requirements, it means that user may not have these libs installed, please make them optional. BTW, regarding contours finding, the same functionality provided in opencv, probably, it will be better if you will use it (because opencv provided in the same package and do not require specific dependencie... |
@@ -459,8 +459,8 @@ namespace Dynamo.Models
var libraryCore =
new ProtoCore.Core(new Options { RootCustomPropertyFilterPathName = string.Empty });
- libraryCore.Executives.Add(Language.kAssociative, new Executive(libraryCore));
- libraryCore.Executives.Add(Language.... | [DynamoModel->[InitializeNodeLibrary->[InitializeIncludedNodes],ForceRun->[ResetEngine],Paste->[Copy],RemoveWorkspace->[Dispose],ResetEngine->[ResetEngine],ShutDown->[OnShutdownStarted,OnShutdownCompleted],DumpLibraryToXml->[DumpLibraryToXml],ResetEngineInternal->[RegisterCustomNodeDefinitionWithEngine,Dispose],AddWork... | Initializes the node manager and the node manager. Load all functions defined in a library and add zero touch nodes to the search. | As these two parameters contain redundant information -- they both convey the information of "associative compiler", I'm thinking probably factory method would be better? For example: `librarycore.Compiler.Add(CompillerFactory.CreateImperativeCompiler(libraryCore); librarycore.Compiler.Add(CompillerFactory.CreateAssoci... |
@@ -1574,12 +1574,15 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
* This allows easy storage of plugin information in the plugin singleton without
* every plugin reimplementing the singleton pattern.
*
+ * @param <P> Class of the plugin
* @param clazz T... | [Jenkins->[getAllItems->[getAllItems],getUser->[get],_cleanUpShutdownTcpSlaveAgent->[add],setNumExecutors->[updateComputerList],getPlugin->[getPlugin],_cleanUpCloseDNSMulticast->[add],getViewActions->[getActions],getJDK->[getJDKs],setViews->[addView],getCloud->[getByName],getStaplerFallback->[getPrimaryView],getStoredV... | Get the plugin of the given class. | Does that work, or is that getting made into a paragraph in HTML? |
@@ -481,7 +481,8 @@ class Command(object):
'export-pkg' after a 'build' command.
"""
parser = argparse.ArgumentParser(description=self.package.__doc__, prog="conan package")
- parser.add_argument("path", help='path to a recipe (conanfile.py), e.g., conan package .')
+ parser.add... | [Command->[upload->[upload],copy->[copy],package->[package],test->[test],export->[export],info->[info],_show_help->[check_all_commands_listed],install->[install],download->[download],run->[_commands,_show_help],create->[create],source->[source],user->[user],remove->[remove],new->[new],build->[build],export_pkg->[export... | Package a single object. Package a single node - unique identifier in the local cache. | I would expect a removal of all ``--file`` command line arguments, for all commands, not just one |
@@ -423,9 +423,13 @@ namespace Dynamo.PackageManager
return String.Join(", ", pkgs.Select(x => x.Name));
}
- private void PackageOnExecuted(PackageManagerSearchElement element, PackageVersion version)
+ private void PackageOnExecuted(PackageManagerSearchElement element, PackageVer... | [PackageManagerSearchViewModel->[Refresh->[Sort],SetSortingKey->[Sort],SearchAndUpdateResults->[ClearSearchResults,AddToSearchResults,SearchAndUpdateResults],Sort->[Sort],Search->[Sort],PackageOnExecuted->[JoinPackageNames],KeyHandler->[SelectPrevious,SelectNext],RefreshAndSearch->[Refresh],SetSortingDirection->[Sort]]... | Method to join the package names. Checks if any of the required packages have a newer version of Dynamo and if so uninstall This method marks all packages that are not in use and downloads and installs them. | Use `String.IsNullOrEmpty(downloadPath)` instead. |
@@ -88,13 +88,6 @@ public class EmittingRequestLogger implements RequestLogger
return feed;
}
- @Override
- @JsonProperty("timestamp")
- public DateTime getCreatedTime()
- {
- return request.getTimestamp();
- }
-
@JsonProperty("service")
public String getService()
{
| [EmittingRequestLogger->[RequestLogEvent->[getQuery->[getQuery],getRemoteAddr->[getRemoteAddr],getQueryStats->[getQueryStats]],RequestLogEventBuilder->[build->[RequestLogEvent]]]] | Get the feed timestamp and service. | This method should stay, since it's part of the serialized JSON (same goes for anything `@JsonProperty`). |
@@ -4012,6 +4012,7 @@ def sequence_expand_as(x, y, name=None):
Examples:
.. code-block:: python
+ import paddle.fluid.layers as layers
x = fluid.layers.data(name='x', shape=[10], dtype='float32')
y = fluid.layers.data(name='y', shape=[10, 20],
| [ctc_greedy_decoder->[topk],py_func->[PyFuncRegistry],image_resize->[_is_list_or_turple_],sequence_first_step->[sequence_pool],nce->[_init_by_numpy_array],logical_xor->[_logical_op],elementwise_pow->[_elementwise_op],npair_loss->[reduce_sum,reduce_mean,expand,matmul,reshape,softmax_with_cross_entropy],elementwise_min->... | Sequence Expand As Layer. This layer expands the input variable x according to the zeroth sequence layer for the n - th node. | 40984099~ cc to @xsrobin |
@@ -124,12 +124,13 @@ public class TestCaseTest {
// Given:
final TopologyTestDriverContainer topologyTestDriverContainer = getSampleTopologyTestDriverContainer();
when(topologyTestDriver.readOutput(any(), any(), any()))
- .thenReturn(new ProducerRecord<>("bar_kafka", 1, 123456789L, "k1", "v1, v2"... | [TestCaseTest->[shouldProcessInputRecords->[processInput,pipeInput,of,getName,value,timestamp,topic,Topic,equalTo,empty,key,String,StringSerdeSupplier,capture,assertThat],shouldValidateOutputCorrectly->[thenReturn,verifyOutput,getSampleTopologyTestDriverContainer],shouldFailForIncorrectOutput->[expect,verifyOutput,then... | Should validate output row 0. | isn't this the default behaviour? |
@@ -88,8 +88,8 @@ func (d DocLanguageHelper) GetLanguageTypeString(pkg *schema.Package, moduleName
glog.Errorf("cannot calculate type string for type %q. could not find a package for module %q", t.String(), moduleName)
os.Exit(1)
}
- if _, ok := t.(*schema.EnumType); ok {
- return modPkg.inputType(t)
+ if typ,... | [GetResourceFunctionResultName->[GetFunctionName],GetDocLinkForResourceInputOrOutputType->[GetDocLinkForResourceType],GetDocLinkForFunctionInputOrOutputType->[GetDocLinkForResourceType],GetModuleDocLink->[GetDocLinkForResourceType]] | GetLanguageTypeString returns the language string for the given type. | What happens if we delete these lines entirely? I have a feeling that the call to `typeString` below will do the right thing. |
@@ -503,9 +503,12 @@ func main() {
currentNode.SetSyncFreq(*syncFreq)
currentNode.SetBeaconSyncFreq(*beaconSyncFreq)
- if nodeConfig.ShardID != shard.BeaconChainShardID && currentNode.NodeConfig.Role() != nodeconfig.ExplorerNode {
- utils.Logger().Info().Uint32("shardID", currentNode.Blockchain().ShardID()).Uint... | [Warn,LastCommitBitmap,SerializeToHexStr,Info,RunServices,GetMetricsFlag,WriteLastCommits,Rollback,SetShardIDProvider,Serialize,SupportSyncing,GetMemProfiling,New,GetLogInstance,Bool,SetBeaconGroupID,FindAccount,GetHandler,Seed,UpdateConsensusInformation,Network,FatalErrMsg,Println,SetPushgatewayIP,AddLogFile,Reshardin... | node - specific functions revertTo reverts the current node to the previous one. | why go is removed? |
@@ -805,7 +805,7 @@ define([
VertexFormat.pack(value._vertexFormat, array, startingIndex);
startingIndex += VertexFormat.packedLength;
- Rectangle.pack(value._rectangle, array, startingIndex);
+ Rectangle.pack(value.rectangle, array, startingIndex);
startingIndex += Rectangle.... | [No CFG could be retrieved] | Creates an array of the same size as the provided array. Creates a rectangle with the specified size. | Not sure we need to pack the rectangle. It looks like we're not unpacking it |
@@ -128,6 +128,11 @@ FXA_CONFIG = {
# CSP report endpoint which returns a 204 from addons-nginx in local dev.
CSP_REPORT_URI = '/csp-report'
+# Allow GA over http + www subdomain in local development.
+HTTP_GA_SRC = 'http://www.google-analytics.com'
+CSP_SCRIPT_SRC += (HTTP_GA_SRC,)
+CSP_IMG_SRC += (HTTP_GA_SRC,)
+... | [path,get,join,getenv] | Endpoint which returns a 204 from addons - nginx in local dev. | Do we need it in `CSP_IMG_SRC` too, but not for -dev/stage/prod? |
@@ -105,9 +105,17 @@ def to_pil_image(pic, mode=None):
Returns:
PIL Image: Image converted to PIL Image.
"""
- if not(_is_numpy_image(pic) or _is_tensor_image(pic)):
+ if not(torch.is_tensor(pic) or isinstance(pic, np.ndarray)):
raise TypeError('pic should be Tensor or ndarray. Got {}.... | [resized_crop->[resize,_is_pil_image,crop],adjust_brightness->[_is_pil_image],vflip->[_is_pil_image],five_crop->[center_crop,crop],pad->[_is_pil_image,pad],crop->[_is_pil_image,crop],adjust_gamma->[_is_pil_image],resize->[resize,_is_pil_image],center_crop->[crop],adjust_saturation->[_is_pil_image],adjust_hue->[_is_pil_... | Convert a torch. Tensor or numpy. ndarray to PIL Image. object. | can we use instead `isisntance(pic, torch.Tensor)`? This is the recommended way now to checking if something is an instance of a Tensor or not |
@@ -261,6 +261,15 @@ class InstallRequirement(object):
@property
def setup_py(self):
+ try:
+ import pkg_resources
+ except ImportError:
+ # Setuptools is not available
+ raise InstallationError(
+ "setuptools must be installed to install from a ... | [parse_requirements->[parse_requirements,from_line,from_editable],UninstallPthEntries->[remove->[remove],add->[add]],InstallRequirement->[from_path->[from_path],requirements->[egg_info_lines],egg_info_lines->[egg_info_data],install->[prepend_root],egg_info_data->[read_text_file],move_wheel_files->[move_wheel_files],run... | Get setup. py path. | I think this should be `import setuptools`? just noticed an interesting situation on ubuntu-precise ubuntu has a `python-pkg-resources` pkg, seperate from setuptools. so `import pkg_resources` works, but there's no setuptools, so I end up failing later with a different exception than yours. |
@@ -76,7 +76,7 @@ class EventHubProducerClient(ClientBaseAsync):
self,
fully_qualified_namespace: str,
eventhub_name: str,
- credential: Union["TokenCredential", AzureSasCredential],
+ credential: Union["AsyncTokenCredential", AzureSasCredential],
**kwargs
) -> Non... | [EventHubProducerClient->[close->[close],_start_producer->[_get_partitions],create_batch->[_get_max_mesage_size],send_batch->[_start_producer]]] | Initialize EventHubProducerClient with a single lease. | docstring also needs change |
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+class UserlandProjectPolicy < ApplicationPolicy
+ def update?
+ record.users.exists?(user)
+ end
+
+ def destroy?
+ record.users.exists?(user)
+ end
+end
| [No CFG could be retrieved] | No Summary Found. | Use 2 (not 3) spaces for indentation. |
@@ -90,7 +90,8 @@ export function handleClick(e, opt_viewerNavigate) {
const win = link.a.ownerDocument.defaultView;
const ancestors = win.location.ancestorOrigins;
if (ancestors && ancestors[ancestors.length - 1] == 'http://localhost:8000') {
- destination = destination.replace(`${urls.cdn}/c/`,
+ desti... | [No CFG could be retrieved] | Handles a click event. Determines if the given element is an anchor tag and if yes tries to figure out the A. | You want `host` here, not `hostname`. |
@@ -724,7 +724,12 @@ namespace Dynamo.Models
// is no additional location specified. Otherwise, update pathManager.PackageDirectories to include
// PackageFolders
if (PreferenceSettings.CustomPackageFolders.Count == 0)
- PreferenceSettings.CustomPackageFolders = new... | [DynamoModel->[RemoveWorkspace->[Dispose],Report3DPreviewOutage->[OnPreview3DOutage],InitializeNodeLibrary->[InitializeIncludedNodes],UngroupModel->[DeleteModelInternal],Dispose->[Dispose,LibraryLoaded],AddWorkspace->[OnWorkspaceSaved,OnWorkspaceSaving,CheckForInvalidInputSymbols],DeleteModelInternal->[Dispose],ShutDow... | Creates a new host object. The DynamoDBModel class is a base class for the DynamoDB model. | When will this case be true? |
@@ -17,5 +17,6 @@ package google
import "github.com/hashicorp/terraform/helper/schema"
var GeneratedSpannerResourcesMap = map[string]*schema.Resource{
+ "google_spanner_instance": resourceSpannerInstance(),
"google_spanner_database": resourceSpannerDatabase(),
}
| [No CFG could be retrieved] | The GeneratedSpannerResourcesMap is a mapping from the name of a resource to a resource. | We aren't using the generated provider map; can you add that to `provider.go`? |
@@ -956,7 +956,7 @@ namespace DotNetNuke.Modules.Admin.Authentication
//Override the redirected page title if page has loaded with ctl=Login
if (Request.QueryString["ctl"] != null)
{
- if (Request.QueryString["ctl"].ToLower() == "login")
+ if (Request... | [Login->[BindLoginControl->[AddLoginControlAttributes],PasswordUpdated->[ValidateUser],ShowPanel->[BindRegister,BindLogin],cmdAssociate_Click->[ValidateUser,UpdateProfile],ValidateUser->[ValidateUser,ShowPanel],OnInit->[OnInit],cmdProceed_Click->[ValidateUser],UserCreateCompleted->[ValidateUser,UpdateProfile],ProfileUp... | Override the base method to override the logic of the base class. | Please use `String#Equals(String, StringComparison)` |
@@ -38,6 +38,7 @@ func init() {
}
const LogPathMatcherName = "logs_path"
+const pathSeparator = string(os.PathSeparator)
type LogPathMatcher struct {
LogsPath string
| [MetadataIndex->[Split,Contains,HasPrefix,HasSuffix,Debug],Unpack,AddDefaultIndexerConfig,AddDefaultMatcherConfig,AddMatcher,NewConfig,Errorf,Debug] | Initialization functions for the object that creates a new object. Returns a LogPathMatcher for the given log path. | os.PathSeparator is already a const. Probably there is no point redefining here, unless you think it makes things more clear. I'd assume people reading this will be glad to find old good `os.PathSeparator` vs our own const |
@@ -445,10 +445,10 @@ def find_layout(info, ch_type=None, exclude='bads'):
layout_name = 'magnesWH3600'
elif has_CTF_grad:
layout_name = 'CTF-275'
- elif n_kit_grads <= 157:
- layout_name = 'KIT-157'
- elif n_kit_grads > 157:
- layout_name = 'KIT-AD'
+ elif n_kit_grads > 0:... | [make_grid_layout->[Layout],_box_size->[ydiff,xdiff],find_layout->[read_layout,make_eeg_layout],read_layout->[_read_lout,Layout,_read_lay],make_eeg_layout->[Layout],_pair_grad_sensors->[_find_topomap_coords],generate_2d_layout->[Layout,_box_size]] | Find a layout based on the channels in the info. Check if a specific version of the channel has a specific version of the channel. Return layout of vectorview or None if no layout is found. | why not adding a layout file for KIT-UMD? by doing this we could share the file between software. |
@@ -36,13 +36,16 @@ class RunnableFutureDecorator<V> extends AbstractRunnableFutureDecorator<V> {
* Decorates the given {@code task}
*
* @param task the task to be decorated
+ * @param classLoader the context {@link ClassLoader} on which the {@code task} should be executed
* @param scheduler the owne... | [RunnableFutureDecorator->[isDone->[isDone],wrapUp->[wrapUp],run->[run],get->[get],cancel->[cancel],isCancelled->[isCancelled]]] | run method. | I think this should be the last thing to be done on the task, because other things can be require the same context classloader. For example, on line 68 there is a logger, if I'm not wrong the context use dto log depends on the context classloader |
@@ -1573,6 +1573,15 @@ describes.realWin('amp-ad-network-doubleclick-impl', realWinConfig, (env) => {
expect(impl.getSafeframePath()).to.match(new RegExp(expectedPath));
});
+ it('should use the same random subdomain for every slot on a page', () => {
+ impl.experimentIds = [RANDOM_SUBDOMAIN_SAFEF... | [No CFG could be retrieved] | Adding some features to the safeframe element. Adds an additional amp - ad network doubleclick - impl to the page. | Would this have failed before? |
@@ -375,9 +375,14 @@ class Plugin::Instance
DiscoursePluginRegistry.register_group_param(param, self)
end
- # Add a custom scopes for search to Group, respecting if the plugin is enabled
- def register_group_scope_for_search(scope_name)
- DiscoursePluginRegistry.register_group_scope_for_search(scope_name... | [activate!->[generate_automatic_assets!,register_seed_data,ensure_directory],listen_for->[on],register_service_workers!->[register_service_worker],add_model_callback->[enabled?],register_seed_path_builder->[register_seed_path_builder],register_group_param->[register_group_param],topic_view_post_custom_fields_allowliste... | Registers a group param and scope for this group. | I think the docs should state which controller action it is used for. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.