Flag with optional value

Is there already a way to have flag that can be empty, like "-p Password"?
If Password is not provided from the command-line, I would like to prompt user to enter it after launching command. This avoid showing the password in user bash history.

Only by checking If the value differs from the default. A useful trick is to do something like .Default("\0").Placeholder("PASSWORD") then if the password is still "\0" prompt.

Thanks Alec, that exactly what I need.

Just leaving a note here in case anyone stumbles upon this issue looking for the same solution. @alecthomas solution either no longer works or he didn't understand the problem @mremond and I are trying to solve.
The MySQL command line client may be called in one of three ways.
mysql
Attempts to login the user without a password. MySQL does not prompt the user for a password if logging in without one fails. The command line client simply exits with an "access denied" error message.
mysql -pmypassword
Attempts to login the user with the password "mypassword". This is not secure because it leaves the password in your bash history.
mysql -p
Prompts the user for their password. This is the prefered method when logging in from the command line.
As far as I can tell this can't be accomplished with Kingpin.
pass := kingpin.Flag("password", "Password.").Default("\000").Short('p').String()

That leaves the end user with two possibilities: don't use the -p flag or use it with a value, but using the -p flag without a value isn't possible. Even when a default has been set.
error: expected argument for flag '-p', try --help
The user should not be prompted for a password when -p isn't used. The user should only be prompted when using the -p flag without a value. Here's the solution I'm using, which perfectly recreates the MySQL behavior.
for i, a := range os.Args {
	if a == "-p" || a == "--password" {
		os.Args[i] = "--password=\000"
	}
}

pass := kingpin.Flag("password", "Password.").Short('p').String()

if *pass == "\000" {
    // Prompt for the user's password.
}

Note: MySQL doesn't allow a space character after the -p or --password flags, e.g. -p mypassword, so my solution works in this case.

@mremond 's problem wasn't the same as yours, afaik.
You are correct, there is no builtin way to do what you're asking for.

It's a bit of an edge case for sure. One simple fix which may be useful outside of this one situation would be having an error handler. The handler could return nil to disregard the error, or return a different error to customize the message shown to the user. For example:
Kingpin.OnError(func(flag string, err error) error {
    if flag == "--password" {
        // prompt for password
        return nil
    }
    // Return the original error, or a new one.
    // return errors.New("Are you crazy!")
    return err
})

Either way, Kingpin is great and pretty flexible!

For what its worth, @headzoo described exactly what i'm looking to do as well. Thanks!

@headzoo thanks, but I still do not understand what the point of Kingpin's .Default method is. What we want from it is to just set that default value for that FlagClause when the flag is present without arguments. kingpin.Flag("foo", "it defaults to bar").Default("bar").String()) should just set bar as the value when --foo is passed.

@headzoo thanks, but I still do not understand what the point of Kingpin's .Default method is. What we want from it is to just set that default value for that FlagClause when the flag is present without arguments. kingpin.Flag("foo", "it defaults to bar").Default("bar").String()) should just set bar as the value when --foo is passed.

It sets bar as the value when the flag is not present. It's identical to the behaviour of the stdlib's flag package.
Flags with optional values, ie. that can either take --flag or --flag foo are not supported.

It sets bar as the value when the flag is not present. It's identical to the behaviour of the stdlib's flag package.
Flags with optional values, ie. that can either take --flag or --flag foo are not supported.

Compatibility with some standard GNU/Linux tools requires this, for example ls --color is a shortcut to ls --color=always or just ls --color= (while ls --color=never and ls --color=auto is also possible).
   --color[=WHEN]
          colorize the output; WHEN can be 'always' (default if omitted), 'auto', or 'never'; more info below

Ah interesting. If there's a default value, there's no ambiguity because Kong could just set it to that value and pass it through transparently.

When user reads the manual where it mentions default value for a flag, it generally means default when flag is not passed. But kingpin does not seem to automatically set the default value (FlagClause.Default) when flag is not passed (that is kinda what library user expects, because they can set the default value themselves in a switch-case after parsing, so what's the point of FlagClause.Default? It's not shown in help either, so it's kinda useless right now.)
So I'm not really sure what you want to do here.

It definitely does set the default value when the value is not passed.

Sorry, you are right.
Then we need a second default?

Something like .AllowEmpty(value any) because it's not a very common case.

Something like that could work, yeah. I think the complication is that eg. in the GNU ls --color case, there's no way through the Kong API to tell if a value was set by Default(), or set because the user passed --color. I think you're right that it would have to replace Default(), and only populate the default value if the bare flag is passed. Does that sound about right?

It would probably have to be an error to use Default() and AllowEmpty() together.

No actually in this case both are needed. --color means --color=always which enables colors unconditionally. But if flag is missing, auto is assumed (enables colors if output is connected to a terminal, not piped or redirected)

Ah yes, good point 👍

My main concern is the ambiguity it causes when parsing and separating flags and their values from standalone arguments. For example, you can have a file named "always" in current directory, and run ls -l --color always which can either mean ls -l --color=always . (list current directory) or ls -l --color=always always (show file named always). In case of ls only the second one works because ls only recognizes --color=MODE and not --color MODE with space. While for other / normal flags with value, both = and space work (--format long or --format=long).

We can still have both Default() and AllowEmpty() and use them for the same flag. But the only catch is when you use AllowEmpty(), space can no longer be used to separate this flag from its value (only =). That could solve the problem.


Raise an error if race is not found by id

Previously Rally was lenient when a user was searching for a race by id
but it was not found. This leads to follow-up errors that are hard to
understand. With this commit we raise an error instead if a race is not
found by its id.

Thanks for the review! :)


Refactor cofig.py file into a package

We have a config.py that serves as a wrapper around the rtd-build package, I'm refactoring this to be a package due it has the same name config that it's used by https://github.com/rtfd/readthedocs-build/. Refs to https://github.com/rtfd/readthedocs-build/issues/50. Kind of this would be refactored later after moving the other repo completely anyway.

Closing this, we want a top level config package.


Fix Credo warnings

It is quite big change, but I have no idea how to split it into separate PRs. Should cleanup codebase a little.

It would be worth try to integrate https://github.com/integration/ebert into this project.

Thank you for this 🙂


feat[next][dace]: Cleanup scalar args

This PR simplifies the representation of program scalar arguments in the SDFG: instead of promoting them to symbols, we represent them as scalar data. Scalar to symbol promotion is a transformation pass available in DaCe that should be applied after lowering to SDFG, eventually.
Additional changes:

Fixes a problem in naming of input connectors for scalar expression tasklets: the connector name cannot match the argument name, otherwise we cannot pass the same value to two connectors in expressions like out = tmp * tmp.
Only propagate to lambda scope the symbols that are referenced.

cscs-ci run default


Thorium vertical Tab bar

please add a new option for vertical tab bar instead of horizontal tab bar ??

yes a custom vertical tab bar would be awesome

I agree. I relied on this so much with my other browsers since I use way too many tabs for horizontal to be viable. Also using it with a vertical monitor view is impossible.

same as #419


Uninstall Issue

Whenever i do %localappdata%\Discord\app-x.x.xxxx\app  <<< This thingy
I have no idea what those "X's" Mean. Ive deleted the Better discord file, but not these 2 things.

It means that the version number can vary and instead of changing each update it's a placeholder.

So then... Whats the version now?


Error on Ubuntu 18.04

Error: Unrecoverable! error native function rs2_pipeline_start: set_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Inappropriate ioctl for device
I'm getting this error try to use the API on ubuntu 18.04 kernel 5.4

Camera is D435
OS : ubuntu 18.04.5
SDK : 2.0
Language: Javascript

Hi @lmend22   That error indicates a problem releating to the kernel.  There have been a couple of past cases where it appeared because a kernel was installed that was not yet supported by librealsense.
Whilst kernel 5.4 is not yet officially supported by librealsense (support only goes up to 5.3 officially at the time of writing this), numerous people have been able to use 5.4 successfully.
Which firmware version is your D435 camera using, please?

Hello, @MartyG-RealSense I am also getting the same error but I am using the D415 and my firmware version is 5.12.06

Hi @DGabriel12   You could test whether your problem is related to the kernel by using a librealsense method called RSUSB backend.  It requires an internet connection but is not dependent on Linux versions or kernel versions and does not require patching.
https://github.com/IntelRealSense/librealsense/issues/6845#issuecomment-659540316

So I can open the real sense viewer this error I am getting comes when I try to run the examples from the https://www.npmjs.com/package/node-librealsense repo.

@MartyG-RealSense  I have tried kernels 4.16, 5.0, 5.3 and none of those worked

@MartyG-RealSense  how do I check the firmware driver?

Hi @lmend22   Apologies for the delay in responding further.  You can check the firmware driver version with the command rs-enumerate-devices.
It can also be checked in the RealSense Viewer program by clicking the Info button (the 'i' in a circle) at the top of the Viewer's options side-panel.

I checked the firmware and I have 5.12.6 so I don't think that the problem

@MartyG-RealSense any kernel that you know that definitely works?

I would go for kernel 5.3 based on the fact that it is the most recent kernel that is officially validated for use with librealsense.  But I see that you have already tried that.
If you are having problems with multiple kernels then I would return to my earlier suggestion of bypassing the kernel by trying the RSUSB backend install.
https://github.com/IntelRealSense/librealsense/issues/7190#issuecomment-680300057

Can you provide any website that gives you instructions on how to do that?

https://github.com/IntelRealSense/librealsense/issues/6845#issuecomment-659540316

@MartyG-RealSense  it didn't work :/

What error did you get, please when using the RSUSB method?

the same one Error: Unrecoverable! error native function rs2_pipeline_start: set_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Inappropriate ioctl for device

You should not be getting kernel errors on an RSUSB backend installation, as the -DFORCE_RSUSB_BACKEND=true CMake instruction installs dependencies over the internet connection instead of having to patch them in (it is a no-patching-required process).  May I confirm please that you are not running the patch script after RSUSB installation has been completed.

I just installed the RSUSB I don't know what to do after that

Once RSUSB installation is complete, you should not have to do anything else and should be able to use librealsense.
In the Ubuntu desktop, please try using the term realsense viewer in the search box to find the launch icon for the RealSense Viewer and try running it,

I think there is confusion here the real sense viewer works it has always worked I try to developing using the API for the real sense https://www.npmjs.com/package/node-librealsense using node js which is giving me that error.

Okay, I understand.  I saw the mention of Javascript at the start of this case but it did not seem relevant, given that the problem was apparently focused on the kernel error (suggesting that it was purely a librealsense installation issue).  Thank you for the clarification.
Going over the case again from the start, I note that the librealsense SDK version that you are using was not mentioned.  Which version is it please?

@MartyG-RealSense 2.0

https://github.com/IntelRealSense/librealsense/issues/7190#issuecomment-680226679

I mean the SDK version number.  For example, 2.36.0

it 2.36.0

Thank you.  I asked because having a modern SDK helps to ensure that the problem is not related to an out of date SDK.  It is difficult to solve problems with node.js unfortunately due to a lack of past cases to refer to.
https://github.com/IntelRealSense/librealsense/issues/5856#issuecomment-591617064
My feeling is that if there is a problem related to the kernel then there may be something that went wrong or was missed in the node.js wrapper's installation process.
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/nodejs#notice-before-you-go-further

Hi @lmend22   Dyou still require asssistance with this case, please?  Thanks!

Case closed due to no further comments received.


Inconsistent ledger view in /accounts/{id} when streaming

I noticed Some extra balances error in /accounts/{id} stream. At first, I thought that it was the inconsistency issue propagated from stellar-core (we build Account object using a few DB queries without REPEATABLE READ transaction). But then I realized that we don't use REPEATABLE READ transaction in Horizon DB while streaming.
We should update the streaming code to start a REPEATABLE READ transaction (if not in a transaction already) before calling an action function and then rollback (only if not in a previously started transaction).
Additionally, we may do the same thing for a function getting data from core inside the action however we should first check if it affects core DB in any way.

Additionally, we may do the same thing for a function getting data from core inside the action however we should first check if it affects core DB in any way.

We've seen another instance today for non-streaming request and the reason is getting data from core in multiple requests. So we should probably add start a new REPEATABLE READ transaction when getting data from Stellar-Core.


Replacing / updating models with different query params

currently, when data is fetched from the server, it creates all new models rather than updating the data in the store. This can lead to orphan data objects, which are being observed but not updated.
https://github.com/artemis-ag/mobx-async-store/blob/63413f634b955557f99afbc10c5b98f32daf113e/src/Store.js#L813
We should figure out how and when to update the object (and relationships) themselves, to preserve observability.

This was done by the 7.0 release


FIX: Changed optional attribute of actions block in sigsci_stie_rule

Hi,
I fixed optional attribute of actions block in sigsci_site_rule resource. This is because the nested "signal" and "response_code" are optional, but "type" is required.
https://docs.fastly.com/signalsciences/api/#_corps__corpName__sites__siteName__rules_post
Background
For the current provider version (v1.2.4), this field is an optional attribute. Therefore, the terraform plan will pass even if there is no "actions" block.
Current behavior
For example, the following code will pass the terraform plan.
resource "sigsci_site_rule" "this" {
  site_short_name = "<site_short_name>"
  type            = "request"
  enabled         = true
  group_operator  = "all"
  reason          = "test rule"
  requestlogging  = "sampled"
  expiration      = ""

  conditions {
    ...
  }

#  actions block not set
}

But,  when terraform apply then fails.
╷
│ Error: Validation failed - actions cannot be empty
│
│   with sigsci_site_rule.this,
│   on rule.tf line 4, in resource "sigsci_site_rule" "this":
│    4: resource "sigsci_site_rule" "this" {
│
╵

Expected behavior
When terraform plan is executed, it will fail.

LGTM, thank you @ponkio-o!


Error when populating localizations

When requesting pages with localizations (e.g. /api/pages?populate=localizations), I get the following error:
error: data.localizations.map is not a function
TypeError: data.localizations.map is not a function
    at transform (/node_modules/strapi-plugin-permalinks/server/middlewares/transform-api-response.js:48:47)
    at transform (/node_modules/strapi-plugin-permalinks/server/middlewares/transform-api-response.js:33:14)
    at /node_modules/strapi-plugin-permalinks/server/middlewares/transform-api-response.js:41:34
    at Array.map (<anonymous>)
    at transform (/node_modules/strapi-plugin-permalinks/server/middlewares/transform-api-response.js:41:21)
    at /node_modules/strapi-plugin-permalinks/server/middlewares/transform-api-response.js:90:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async /node_modules/@strapi/strapi/lib/middlewares/body.js:58:9
    at async /node_modules/@strapi/strapi/lib/middlewares/logger.js:9:5
    at async /node_modules/@strapi/strapi/lib/middlewares/powered-by.js:16:5

This should fix the issue:
if ( has( data, 'localizations' ) ) {
      data.localizations.data = data.localizations.data.map( entry => transform( entry, uid, config ) );
}

Strapi-Version: 4.8.2
Plugin-Version: 1.0.3

We are having the same issue. Please would it possible to action this for us? I can create a PR if need

Hi @mike85 @kwame-dat, a new version 1.0.4 of this plugin was released that has a fix for this issue. Sorry for the trouble! Let me know how it goes for you 🙂

Awesome, thanks! I hope I can test it soon. 🤩


DateTime property names should end in 'DateTime'

reference
For example Provider.Registered should be changed to Provider.RegisteredDateTime

closed because of solution redesign


Change weaver Cmd generation for Host Player

Describe the bug
Cmd code hides bugs in bypassing SendCommandInternal so in debug mode (editor or dev build) the bypass is avoided so bugs are exposed.
Per discussion with @paulpach change from this:
    public void CmdThrust(float thrusting, int spin)
    {
        if (isServer)
        {
            // we are ON the server, invoke directly
            CmdThrust(thrusting, spin);
            return;
        }
        NetworkWriter networkWriter = new NetworkWriter();
        networkWriter.Write(thrusting);
        networkWriter.WritePackedUInt32((uint)spin);
        base.SendCommandInternal(cmdName, networkWriter, cmdName);
    }

... to this:
    public void CmdThrust(float thrusting, int spin)
    {
        if (isServer && !Debug.isDebugBuild)
        {
            // we are ON the server, invoke directly
            CmdThrust(thrusting, spin);
            return;
        }
        NetworkWriter networkWriter = new NetworkWriter();
        networkWriter.Write(thrusting);
        networkWriter.WritePackedUInt32((uint)spin);
        base.SendCommandInternal(cmdName, networkWriter, cmdName);
    }

this has been replaced with:
public void CmdThrust(float thrusting, int spin)
    {
        NetworkWriter networkWriter = new NetworkWriter();
        networkWriter.Write(thrusting);
        networkWriter.WritePackedUInt32((uint)spin);
        base.SendCommandInternal(cmdName, networkWriter, cmdName);
    }


aCompcor ROI Mask - GM Voxels

What happened?
aCompCor mask may include gray mask voxels for some participants. It appears the procedure "a mask of pixels that likely contain a volume fraction of GM is subtracted from the aCompCor masks. This mask is obtained by dilating a GM mask extracted from the FreeSurfer aseg segmentation, and it ensures components are not extracted from voxels containing a minimal fraction of GM. Finally, these masks are resampled into BOLD space and binarized by thresholding at 0.99" doesn't work in all cases, esp. the dataset I am working with as rate is at least 1/10 or 1/15 where this occurs.
What command did you use?
fMRIPrep command: /opt/conda/envs/fmriprep/bin/fmriprep /bids_dir /output_dir participant --participant-label AB123 --fs-license-file license.txt --bids-filter-file task_list.json --ignore slicetiming --fd-spike-threshold .9 --output-space MNI152NLin2009cAsym:res-2 --project-goodvoxels --cifti-output 91k -vv -w /wd

What version of fMRIPrep are you running?
23.1.4
How are you running fMRIPrep?
Singularity
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
No
Please copy and paste any relevant log output.
No response
Additional information / screenshots
Including screen shot of freesurfer WM/GM/CSF contours and the image where acompcor ROI mask using for acompcor.

Hi @demidenm,
Thank you for this report.
The second image shows correct boundaries for CSF/WM/GM compartments.
Could you detail what we see on the first image and what are the colors meaning? It looks like the WM/GM boundary overlayed on the fMRI reference image. But if it is really the acompcor boundaries, then indeed there is an issue.

@julfou81 - Thanks for the note. Yes, the delineation of the CSF/WM/GM boundary seems reasonable (Left, above). However, I suspect it may contain excessively overlapping boundaries as a result of either fast segmentation or the fuzziness applied? The contours in the above are a visually over represented by the magenta color. Every instance of this type of delineation results in a poor acompcor ROI (In 1000+ fmriprep outputs, I have observed 50-60 of these). The other image (Right, above) I provided is the Brain mask and (anatomical/temporal) CompCor ROIs masks overlayed on the reference image. Specifically, the red = BOLD image mask, magenta = anatomical CompCor ROI, blue = temporal ComCor ROI and green = brain edge crown.
Note, when the freesurfer Brain mask and brain tissue segmentation of the T1w looks like the below, the aCompcor ROI oddity does not  occur and it is relatively normal.

@oesteban If you have a second, have you seen this GM/CSF swap before? Is there a good way to detect? I suppose we could take total volumes and sort those to check for plausible ordering WM > GM > CSF...

@demidenm ,
It is a very interesting case. From what I just read it seems that the origin of the issue is a segmentation failure from FSL FAST?  It looks like the underlying T1w image in the case where the FAST segmentation fails (in your first post) has a very different contrast (the WM look much brighter) than in your second case where the segmentation looks good. FAST is not using tissue priors and only relies on images intensity distribution. Do you think that for all the cases where aCompCor (and FAST) failed, there was an odd intensity distribution in the input T1w images?

That was a good test. What you could do now is to navigate through the working directory for this subject look into:
/wd/fmriprep_23_1_wf/single_subject_AB123_wf/anat_preproc_wf/t1w_dseg/
And look at how the fast command was run (in command.txt) for this subject and on which preprocessed image.

@julfou81 - thanks for note. Unfortunately the working dir was ran in tmp scratch so it isn't easily available. Nevertheless, I will try to rerun soon and extend hold on the fmriprep working dir to check.

@julfou81 - looking at the command, the command does differed a touch (e.g. uses does not remove bias field -N). However, the file that fmriprep uses is a noise corrected brain.
Here is fmriprep command.txt:
fast -N -p -g -S 1 /wd/fmriprep_23_1_wf/single_subject_AAA_wf/anat_preproc_wf/t1w_dseg/sub-AAA_ses-2YearFollowUpYArm1_rec-normalized_T1w_noise_corrected_corrected_xform_masked.nii.gz
I went ahead and compared the results using fast -N -p 3 -g -S 1 -o on both the fp and orig fast outputs. Labels: pve_0.nii.gz = Green
pve_1.nii.gz = Blue
pve_2.nii.gz = Red
./fp/
The fmriprep corrected imaged has a modified intensity and smoothness (direct comparison left v right below)

The segmentation labels, as above, do fail.

./orig/
The original T1w image is not as smooth as the above..

The resulting segmentations are correct.

Original T1w  vs fMRIPrep T1w-corrected

Thank you @demidenm for this thorough analysis! It is very interesting and it is the first time that I see such a strange behavior of FAST on human brain data.
A good point is that you are able to reproduce this strange behavior calling 'FAST' outside of fmriprep with the same input.
But it is rather strange, as the corrected image by fmriprep seems correctly debiased and denoised, with a nice contrast between GM and WM.
What is very strange is that this happens on several subjects but not all of them. It would be interesting to understand which specificity on those images triggers this inversion of labels.
I don't know FAST enough to propose an explanation of this behavior, you may ask in the FSL forum what they think about it, the FSL developers are responding there and they could explain the origin of this behavior.
The next step is of course to find a way so that this label inversion not happen within FMRIPREP for those subject. I see several options:

Either by changing the options in the FAST call by fmriprep that would require to issue a pull request within FMRIPREP
Or by finding an option in the fmriprep call that would make its behavior more robust for your subjects
Or by preparing your images before launching fmriprep so that this issue with FAST does not happen with the same fmriprep call

@julfou81 - thanks for the note! Will see if @oesteban @effigies arrive at a solution but the adding into the pipeline some kind of subject prep to avoid this may be helpful. TBH, I'm not quite sure what that may be. In the meantime, for my purposes a elegant way to flag this issue is to run bet+fast on the uncorrected T1w and estimate the dice(GM-uncorrected,GM-corrected). Bad ones would be approx <.50

Again, used a rough approach to calculate the % in which this occurs using the below .py code. The best approximation was the grey matter mask as the bet approach I use differs from freesurfer and so the CSF is too variability.
When I manually reviewed a subset of data, I found that it occured in ~10% of subjects. Running this check and manually confirming, I found that [less than] .25 dice similarity was a good indicator of which subjects had this issue. I pulled a subset and found that <.25 was a 1:1 indicator of the failure.

Interestingly enough, the proportion along which this occurs differs across scanners... Philips >> GE >> SIEMENS.

import os
import fnmatch
import argparse
import warnings
warnings.filterwarnings("ignore")
from glob import glob
from nipype.interfaces import fsl
from pyrelimri import similarity

# input arguments
parser = argparse.ArgumentParser(description="Script to run similarity estimate between func/anat masks")
parser.add_argument("--in_dat", help="path to subjects session subfolders")
parser.add_argument("--task", help="task label")
parser.add_argument("--run", help="task label", default=None)
parser.add_argument("--stype", help="similarity type, dice or jaccard")

# parse input args
args = parser.parse_args()
input_dir = args.in_dat
task = args.task
run = args.run
stype = args.stype

# folder paths
anat_dir = f'{input_dir}/anat'
func_dir = f'{input_dir}/func'
fmap_dir = f'{input_dir}/fmap'
fsl_out = f'{input_dir}/anat/fsl'

# glob files to set variables
anat_file = glob(f'{anat_dir}/*_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.nii.gz')[0]

# dont want to run on MNI but subject space, ignore MNI
all_files = glob(f'{anat_dir}/*.nii.gz')
filtered_files = [file for file in all_files if not fnmatch.fnmatch(file, '*space-MNI152*')]

# Check if any files are left after filtering
if filtered_files:
    # Use the filtered files as needed
    fp_gm = next((file for file in filtered_files if '_label-GM_probseg.nii.gz' in file), None)
    fp_wm = next((file for file in filtered_files if '_label-WM_probseg.nii.gz' in file), None)
    fp_csf = next((file for file in filtered_files if '_label-CSF_probseg.nii.gz' in file), None)
    t1w_file = next((file for file in filtered_files if '_T1w.nii.gz' in file), None)

if run is None:
    bold_file = glob(f'{func_dir}/*_task-{task}_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.nii.gz')[0]
else:
    bold_file = glob(f'{func_dir}/*_task-{task}_run-{run}_space-MNI152NLin2009cAsym_res-2_desc-brain_mask.nii.gz')[0]

if not os.path.exists(fsl_out):
    try:
        # Create the fsl output directory if it doesn't exist
        os.makedirs(fsl_out)
        # Create bet output name
        t1w_base = os.path.basename(t1w_file)
        prefix_t1w = t1w_base.rsplit('.', 2)[0]
        t1w_brain_fname = f'{fsl_out}/{prefix_t1w}-brain.nii.gz'
        # Run BET
        bet_run = fsl.BET()
        bet_run.inputs.in_file = t1w_file
        # bet_run.inputs.reduce_bias = True
        bet_run.inputs.robust = True
        bet_run.inputs.out_file = t1w_brain_fname
        bet_out = bet_run.run()
        # Run FAST
        fast_run = fsl.FAST()
        fast_run.inputs.in_files = t1w_brain_fname
        # fast_run.inputs.out_basename = t1w_brain_fname
        fast_out = fast_run.run()
    except Exception as e:
        # exception
        print(f"An error occurred: {e}")

# sets CSF [0], GM [1], WM [2]
orig_csf = glob(f'{fsl_out}/*_T1w-brain_pve_0.nii.gz')[0]
orig_gm = glob(f'{fsl_out}/*_T1w-brain_pve_1.nii.gz')[0]
orig_wm = glob(f'{fsl_out}/*_T1w-brain_pve_2.nii.gz')[0]

# run similarity
sim_anatfunc = similarity.image_similarity(imgfile1=anat_file,
                                           imgfile2=bold_file,
                                           similarity_type=stype)
origcsf_fpcsf = similarity.image_similarity(imgfile1=orig_csf,
                                            imgfile2=fp_csf,
                                            similarity_type=stype)
origwm_fpwm = similarity.image_similarity(imgfile1=orig_wm,
                                          imgfile2=fp_wm,
                                          similarity_type=stype)
origgm_fpgm = similarity.image_similarity(imgfile1=orig_gm,
                                          imgfile2=fp_gm,
                                          similarity_type=stype)

print(round(sim_anatfunc, 2), round(origcsf_fpcsf, 2),
      round(origwm_fpwm, 2), round(origgm_fpgm, 2))

I continue on this thread as I observed a similar pattern for the aCompCor ROI after fmriprep processing.
It is rather strange and interesting because the first execution on the same subject produced the correct aCompCor ROIs, while a second execution , where I asked for a new output space (after removing all the temporary folder from the previous execution) produced wrong ROIS.
I relaunched a third execution (still removing the temporary files from previous executions), and this time the correct ROIs were produced.
What I think triggered this change of behaviour? The addition of --level full --derivatives /work/$study/derivatives/fmriprepin the command line of fmriprep! Do you think this is possible?
I will test more extensively to try to reproduce this bug. Also, even if I requested the aCompCor ROIs as output, they are not produced, while they were in previous fmriprep version.
What version of fMRIPrep are you running?
23.2.1
How are you running fMRIPrep?
Singularity
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
Yes (freesurfer output) / No (I removed previously computed output and working directory from previous fmriprep execution)

I wanted to follow up on this issue, as this happened to some of our subjects with FMRIPREP v24.0.0.
I take back what I just said above, this wrong behavior in FMRIPREP for the creation of the aCompCor masks is not linked to wether or not we use the  --derivatives or --level  argument. It seems to happen randomly. For now the fix we found is just to delete the working directory (still keeping the freesurfer output) and re-run fmriprep all over again for the faulty subject. So far a re-execution of an execution is enough to obtain correct results.

@julfou81 - This is interesting. Wonder what is up with the ABCD study data as rerunning didnt really resolve this problem for me :(

Hey @pauldmccarthy, I wonder if you could have a look at this thread. In particular https://github.com/nipreps/fmriprep/issues/3195#issuecomment-1890634047 shows FAST sometimes mislabeling CSF and GM. I'm curious if there's something we can do to either detect this or parametrize FAST to avoid it.

Hi @effigies, I have seen instances of FAST failing on images where there is not enough variance in one or more of the tissue classes for it to be able to model the distribution of values within each class. Based on the screenshots in https://github.com/nipreps/fmriprep/issues/3195#issuecomment-1890634047, I'm guessing that this is what is happening here - the different tissue classes are too uniform for FAST to be able to accurately model them.
FAST is also sensitive to NaNs or non-zero values in non-brain regions, although I'm not sure if that's relevant here.
There are a few relevant posts on the FSL mailing list:

https://www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=FSL;f07779a9.1502
https://www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=FSL;b7039c9b.1502
https://www.jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=FSL;8adccc39.1508

I'm not familiar enough with fmriprep to know whether it is possible to pass fast an unprocessed (brain-extracted) T1?
What kind of normalisation/rescaling is being applied? If you can roughly predict the mean intensity of each tissue class, you could pass these values as priors to fast via the -s option. Or, if you have tissue priors in your standard space, and have already calculated a linear registration to that space, you can use the -a / -A options to give FAST those priors (see e.g. the MNI152 priors in $FSLDIR/data/standard/tissuepriors/).
I'm happy to play around if you could point me to an image which causes the failure.

Here is our T1w template workflow:
https://www.nipreps.org/smriprep/api/smriprep.workflows.anatomical.html#smriprep.workflows.anatomical.init_anat_template_wf
That's actually the 1-image variant of the workflow. Here's for 2+:

We denoise (Rician, I think) the images first. If there are multiple we bias-field correct, and then merge with Freesurfer's mri_robust_template.
It seems likely to be the DenoiseImage that's the problem here. We could recombine the original T1w images using the calculated transforms and pass that to FAST instead.

I want to share a new observation I made. I still can't wrap my head around it:  I tried very hard to obtain these wrong aCompCor masks with fmriprep v24.0.0 on a single subject where I saw wrong masks once (but didn't save the working directory).
I wonder if, in my case, I fall into this bad scenario for the aCompCor masks when I re-run fmriprep after:

I delete the working directory
I keep the fmriprep output directory! (even if the 1st execution was giving good aCompCor masks!)

(in my case I was rerunning fmriprep because I was fighting another bug: antsAI failing during the N4 correction of the bold images for skullstripping, similar to what was described here, but with no issue on coregistration: https://github.com/nipreps/fmriprep/issues/3163)
Every time I relaunched the fmriprep execution after deleting both the working directory and the output directory, the aCompcor masks were good.
I also took the input of fast used by fmriprep (in a case of a correct execution) and run fast many times on it and never got a wrong segmentation after over 10 tries. I wanted to check if I could save an input of fast causing a bad execution but with no luck so far. When I get a wrong execution (bad aCompCor masks) , the folder fast, among other, is not present in the working directory!


Recursion

It's not clear from the docs whether page-same-domain is supposed to crawl recursively. From my tests it doesn't seem to, but it's possible I'm doing something wrong. If not, then consider this a feature request for recursion.

@zsau Thank you for pointing the unclearness of the docs, I will updating it.
The current setup is the mod applies to initial seed list then page only for any additional seeds found.
Is there a particular way that you would like to see the recursion expressed?
Heritrix has the concept of hops
<!-- ...but REJECT those more than a configured link-hop-count from start... -->
    <bean class="org.archive.modules.deciderules.TooManyHopsDecideRule">
     <property name="maxHops" value="1"/>
    </bean>

Perhaps a pluggable "strategy" to determine when to end the crawl would be best, but in my case I don't currently need anything beyond the same-domain restriction. Setting a max # of hops seems reasonable, though.

@zsau this is implemented https://n0tan3rd.github.io/Squidwarc/manual/configuration.html


Use code font for displaying changes in Documenter

It now relies on the monospace font. We should use the Glamorous code font


[HOLD for payment 2023-06-12] [$1000] There is no current cell selection identifier on magic code input field once the field displays an error status

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Navigate to Sign in page
Enter email and click on 'continue' button
Enter a wrong magic code
Verify that magic code is marked red
Select one of the 6 cells to correct the error

Expected Result:
Green dash should be displayed on the selected cell to give feedback on which cell is selected
Actual Result:
No selection identifier is applied on the selected cell. Alp cells look the same
Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android / native
[x] Android / Chrome
[ ] iOS / native
[ ] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

Version Number: <IP_ADDRESS>
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
https://github.com/Expensify/App/assets/43996225/fe326c55-a220-4705-b3f9-f90fee254673
https://github.com/Expensify/App/assets/43996225/45fa6d42-a9f6-4554-9b40-fc989bca4a36
Expensify/Expensify Issue URL:
Issue reported by: @natnael-guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684314424188259
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~01975f5e132ef74741
Upwork Job ID:<PHONE_NUMBER>474609152
Last Price Increase: 2023-05-24

Why is no cursor being shown?

That seems like a bug as well.
On Sat, May 20, 2023 at 3:05 PM Sibtain Ali @.***>
wrote:

Why is no cursor being shown?
I don't think that cursor is shown even for the input when its green.
—
Reply to this email directly, view it on GitHub
https://github.com/Expensify/App/issues/19314#issuecomment-1555907890,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARWH5Q3WGATJHWXOXSSDL3XHC6R5ANCNFSM6AAAAAAYIFWP6Q
.
You are receiving this because you were mentioned.Message ID:
@.***>

But yeah, I would say we should fix the cursor issue first and start there. Perhaps we can even make the cursor red instead of green for these?

I am OOO, not sure why this got auto assigned to me. I am unassigning and rotating.

Looks good!

Not overdue! @mananjadhav can you please take a first look at @hoangzinh's proposal and let me know what you think?

I think @hoangzinh's proposal is good here. As soon as we update the digit it'll take the focused style.

I think @hoangzinh's proposal is good here. As soon as we update the digit it'll take the focused style.

Sorry for the delay, missed this comment!

@slafortune This is ready for the payout today. Here's are the checklist items

Offending PR: https://github.com/Expensify/App/pull/18885
Commented on the PR: https://github.com/Expensify/App/pull/18885/files#r1225948462
I don't think any updates in the process are required or in the checklist. It's a miss. I would even classify this a feature request. We did add more than a few other behaviors related to button click and then the input focus.
I recommend to add a regression test. The test steps from the PR are detailed, and also iterated to cover all the fixes. I think we should use those for regression test.

Regression test GH created -
Offers sent - @Natnael-Guchima @hoangzinh @mananjadhav

Thanks. Accepted @slafortune

Accepted.  Thanks @slafortune

Paid!

Sorry to bring this back up again, but it looks like we still aren't showing a cursor in the magic code input boxes. I thought this issue would fix that? Any ideas?

All of our inputs have a cursor in them:

So these should as well. This helps you identify which cell you are in.

I left a comment above specifically asking for the cursor to be fixed though. So I was anticipating that it would be included in this fix.


Install pip dependencies results a permission denied (libmamba Error opening for writing)

My environment.yaml:
name: base

channels:
  - conda-forge
  - anaconda

dependencies:
  - ipython
  # ... some modules...
  - SQLAlchemy
  - pip:
    - mpltw
    # - -r file:requirements.txt

when I run:
docker compose build flask
I got something like:
...
28.82 error    libmamba Error opening for writing "/mambafmGNjMtYFLS": Permission denied
28.82 error    libmamba Error opening for writing "/mambafmGNjMtYFLS": Permission denied
28.83
28.83 Installing pip packages: mpltw
29.69 ERROR: Could not open requirements file: [Errno 2] No such file or directory: '/mambafmGNjMtYFLS'
30.12 critical libmamba pip failed to install packages
------
failed to solve: process "/usr/local/bin/_dockerfile_shell.sh micromamba install -y -n base -f /environment.yaml &&     micromamba clean --all --yes" did not complete successfully: exit code: 1
...

Without pip dependencies, everything worked.
Then I "exec bash" into container,  use command:
ls -ld /
Output:
drwxr-xr-x 1 root root 4096 Aug  2 16:18 /
So I think mamba cannot write the "mambafmGNjMtYFLS" file in there (/).
The workaround I tried:
Change Dockerfile from:
FROM mambaorg/micromamba:1.4
LABEL<EMAIL_ADDRESS>\
      wisenvr.release-date="2023-08-02" \
      wisenvr.version="0.1.0"

COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yaml /environment.yaml

RUN micromamba install -y -n base -f /environment.yaml && \
    micromamba clean --all --yes

EXPOSE 8080/tcp

To:
FROM mambaorg/micromamba:1.4
LABEL<EMAIL_ADDRESS>\
      wisenvr.release-date="2023-08-02" \
      wisenvr.version="0.1.0"

COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yaml /app/environment.yaml

RUN micromamba install -y -n base -f /app/environment.yaml && \
    micromamba clean --all --yes

EXPOSE 8080/tcp

I put the environment.yaml in /app which I mount and mambauser has permission to write
then it Works.
It's a bug or?
Thanks.
btw, mamba-docker version 1.2 has no problem with pip dependency.

Hi @scku208 . When there are pip packages in the environment definition, micromamba needs to write a temporary file. This used to be written to /tmp/requirements.txt but this could collide with an existing file mamba #1894. Now a uniquely named temporary file is created instead. It appears this new temporary file goes into the same directory as the environment definition file (environment.yaml).  So write access is required to that directory.
This is a micromamba issue and not a docker specific issue, so I'm going to close and create a new issue for the micromamba team.


Different between 24.r vs 24.h or 24.w in portrait

Hi everyone ^_^
I have a misunderstanding about 24.r and different for others, and where I can use .r in my design?
BTW I use .r in all sizes in my design such as my draft (375,667) and declare Card width 330.r , height 178.r
so can you explain this, and I write true according to your package to get responsive design
Thank in advance

@AbdalazizAbdallah
Radius: .r
Height: .h
Width: .w
FontSize: .sp
This video will help to you. --> Video

ScreenUtil().setWidth(540)  (dart sdk>=2.6 : 540.w) //Adapted to screen width
ScreenUtil().setHeight(200) (dart sdk>=2.6 : 200.h) //Adapted to screen height , under normal circumstances, the height still uses x.w
ScreenUtil().radius(200)    (dart sdk>=2.6 : 200.r)    //Adapt according to the smaller of width or height
ScreenUtil().setSp(24)      (dart sdk>=2.6 : 24.sp) //Adapter font


Clarify instructions on initramfs support?

Description
The documentation at http://meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#image-with-initramfs is insufficient to get initramfs working.
Steps to reproduce the issue:

Follow the instructions at http://meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#image-with-initramfs

I tried core-image-tiny-initramfs, core-image-minimal, rpi-hwup-image. They all failed.

Attempt to build an image: bitbake core-image-full-cmdline

Describe the results you received:
ERROR: Nothing PROVIDES 'core-image-tiny-initramfs'
core-image-tiny-initramfs was skipped: incompatible with host arm-poky-linux-gnueabi (not in COMPATIBLE_HOST)

Describe the results you expected:
I think I somehow need to provide my own, rpi compatible, image that would be suitable for booting. I have no idea how to do that.

regular images are not suitable for bundling into initramfs so you have to define a initramfs image
Something like this core-image-minimal-initramfs.bb
require meta/recipes-core/images/core-image-minimal.bb

IMAGE_FSTYPES_rpi = " ${INITRAMFS_FSTYPES}"

Thanks for the reply. I will do some tests and will clarify the docs if I succeed. Please leave issue open.

@cveilleux Any updates on this?

Closing this due to inactivity. I've tested initramfs images and everything seems to work as expected.


Load service configs one by one lazily

This PR adds the option to add service configurations lazily.
This might be useful for users with many services configured. By default, APIcast loads all the services each time it downloads its configuration from the 3scale admin portal. With a large number of services, this could become problematic.
When this option is enabled, the configurations are loaded lazily. APIcast will only load the ones configured for the host specified in the host header of the request.
The option is not enabled by default. It is enabled using the APICAST_LOAD_SERVICES_WHEN_NEEDED env.
The PR also includes a couple of commits that clean up a bit the remote_v2 module used in this PR and also adds some comments.

@porueesq I added your suggestions here https://github.com/3scale/APIcast/pull/1099/commits/40f97968e84252fb834436b95d33ba2c9c584d38

Fixed conflicts in the changelog.


Babel fix

This PR introduces concatenating sources with \n so that each file starts on a new line to avoid issues such as one caused by having a one line comment at the end of the file, like with ts files compiled to js with source maps.
Also uses @babel/preset-env preset during build process to make sure output game.js is ES5.

Removed babel preset as it was not working well with global scope assignments. This can be addressed when working on new build process. So, this PR now only fixes concatenation issues.


Cleanup ndkBuild task invocation from build.gradle

Summary:
This diff will remove the custom Exec tasks that are invoking ndk-build
manually right now and instead rely on the AGP apis to do so.
I've added the externalNativeBuild block to do pass the ndk-build arguments and removed those that are already applied by AGP automatically (like NDK_DEBUG or so).
Changelog:
[Internal] - Cleanup ndkBuild command to use AGP APIs
Differential Revision: D30107012

Abandoning this for now, and we'll get back to it. Specifically we need to understand why the ndk-build is not running incremental builds correctly.


a test PR to make sure brigade is functioning

THIS IS A TEST. IT WILL BE CLOSED WHEN THE TEST IS DONE. DO NOT MERGE.

Test worked. closing


Yet more fixes to simnet

-- Fixed support for tap interfaces within virtual nodes.  Unlike a veth-pair, the two ends of a linux tap device cannot be in different namespaces.  To make it possible for a tap interface in a node namespace to be connected to bridge in a “network” namespace, simnet now constructs a “trunk line” veth-pair that spans the two namespaces, and a “tap bridge” in the node namespace.  The tap interface is connected to the tap bridge, along with one of the trunk interfaces.  The other trunk interface is connected to the bridge in the “network” namespace.  This allows packets to flow between the process holding the tap fd and the virtual network.
-- Eliminated the use of special short interface names when creating tap interfaces.  These interfaces now use the names “wifi”, “thread”, etc., just like normal interfaces.
-- Disabled automatic assignment of IPv6 link-local addresses on interfaces that don’t need them (e.g. the bridge interfaces in “network” namespaces, and the ends of a veth-pair that are plugged into bridges).
-- Simplified the two-device simnet layout.

Codecov Report

Merging #382 into master will decrease coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #382      +/-   ##
==========================================
- Coverage   54.48%   54.48%   -0.01%
==========================================
  Files         341      341
  Lines       58417    58417
==========================================
- Hits        31829    31826       -3
- Misses      26588    26591       +3

Impacted Files
Coverage Δ

src/lib/profiles/security/WeaveCert.cpp
88.5% <0%> (-0.46%)
:arrow_down:

src/test-apps/TestCASE.cpp
95.89% <0%> (-0.23%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d42cdfa...5ef6e1e. Read the comment docs.


add repository ref for nd package

Hi. I use nd from time to time and keep it in system. When I install any package npm shows me a warning that nd has no repository. This PR:

adds field repository and issues for package
updates homepage field, since you've renamed account on GitHub
it also moves fields name & author upper in package, because they're from number of most basic fields

Cool, thanks!


PR template have irrelevant keywords

Describe the Bug
Check the PR template to remove or replace irrelevant keywords.
Versions Used
Kubeclipper: master branch
Environment
None
How To Reproduce
Steps to reproduce the behavior:

Submit PR,  check out the PR comment.
See the first markdown comment.

Expected behavior
Show only information about KubeClipper.

/assign qinyer


Add pull_request_review_thread Event Support

GitHub added a new pull_request_review_thread webhook event that gets sent every time a comment is resolved or unresolved.

@doodla I had to remove reactions from the Comment payload since tests were failing due to "+1"/"-1" not matching up to the property names I used "plus_one"/"minus_one".
"reactions": {
    "url": "https://api.github.com/repos/doodla/octohook-playground/pulls/comments/839046410/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}

@doodla I had to remove reactions from the Comment payload since tests were failing due to "+1"/"-1" not matching up to the property names I used "plus_one"/"minus_one". If we want to add reactions to the model we might have to make the tests less strict.
"reactions": {
    "url": "https://api.github.com/repos/doodla/octohook-playground/pulls/comments/839046410/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}

Ah that's interesting that github sends numbers in the payload. Can we add it as a RawDict instead?

@doodla I had to remove reactions from the Comment payload since tests were failing due to "+1"/"-1" not matching up to the property names I used "plus_one"/"minus_one". If we want to add reactions to the model we might have to make the tests less strict.
"reactions": {
    "url": "https://api.github.com/repos/doodla/octohook-playground/pulls/comments/839046410/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}

Ah that's interesting that github sends numbers in the payload. Can we add it as a RawDict instead?

Ah didn't realize we could do that. Just added :+1:


working with ipynb files in VS Code is far from optimal

Type: Feature Request
VS Code does not give many options for working cell-wise.
in .ipynb files I often want to do things like undo some change in a particular cell or replace something in a particular cell only - this is a pain in VS Code and often creates problems as I accidently replace something in a completely different cell in my code.
VS Code offers some good features that Jupyter Notebook lacks, but many intuitive steps in Jupyter Notebook are a pain in VS code
VS Code version: Code 1.73.1<PHONE_NUMBER>f055b99068d3688932416f2346dd3b, 2022-11-09T04:27:29.066Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No

/extJupyter
I suggest you post detailed bug reports and feature requests to that extension's repository, ideally one item per issue.

It looks like this is caused by the Jupyter extension. Please file the issue to the Jupyter extension repository. Make sure to check their issue reporting template and provide them relevant information such as the extension version you're using. See also our issue reporting guidelines for more information.
Happy Coding!


Config structure

<<<<<<< api
    'api' => [
        'namespace' => '\Bitporch\Forum\Controllers\Api'
    ]

=======
    /*
    |--------------------------------------------------------------------------
    | Middleware
    |--------------------------------------------------------------------------
    |
    | Apply middleware for the routes registered by the package.
    |
    */
    'middleware'   => [
        'web' => [
            \Illuminate\Routing\Middleware\SubstituteBindings::class,
        ],
    ],
>>>>>>> master

Seeing this merge conflict from #89 made me wonder about the API config. I wonder if we should do it like this:
  'namespace' => '\Bitporch\Forum\Controllers\Api',
  'middleware' => [
    \Illuminate\Routing\Middleware\SubstituteBindings::class,
  ],
  'api' => [
    'namespace' => (...etc),
    'middleware' => [ (...etc...) ],
  ],

Or better yet:
'web' => [
    // Config
],
'api' => [
    // Config
],

Yeah, I guess that works well. Generic stuff that applies to both can just go above.

Yes. We need to provide the user with an option to toggle off whether he requires API or Web routes of the forum. The 2nd config format will make it easier

I believe this is sorted. If further discussion is needed #90 will be appropriate whilst it is open.


framereader: use the same alignement as visionbuf

follow up of https://github.com/commaai/openpilot/pull/23200#event-5757453814

it's allocated in CameraServer (in replay/camera.cc) by call framereader->getRGBSize().


Performance improvements

Performance improvements to IncrementalIndexedDB:

skip regenerating unique indices on save ~(since they're regenerated on load anyway)~ - this cuts save time in half (120ms to 60ms in my app)
fix typo that caused idIndex (which is regenerated ~on load~ lazily) to be saved.  On the same example app, this cut most DB saves from 2.5MB to as little as 2KB (if a few very heavy collections are not dirtied)
add a hook to "on IndexedDB started fetching" event, which can be used to speed up an app by taking advantage of concurrency (IDB is multi-threaded)

And for all of LokiJS:

opportunistically convert $in: Array queries into $inSet: Set queries if indexed search is not available - this changes O(n*m) search into O(n * log m) search which improved speed of a few of queries in Nozbe Teams by 4-10x.
change unique indicies and idIndex to be generated lazily

In Nozbe Teams, generating these indices takes 70-150ms at launch, depending on account, but they're almost never needed to launch the app! In fact, they're rarely needed at all, since most records/documents are fetched via queries and then kept around for a while (not fetched by ID).
It's mostly opening the app with ID in url and updating documents that causes index to be built. But even then, almost never all are needed at once, so only an extra 20-50ms penalty is paid (once) on some action.
There's no real downside to this - worst case scenario, the indices will be generated at launch anyway (just called from a different function); best case - 150ms saved :)
Since until now, both were generated on load, backwards compatibility is preserved - saved DB without these indices will still load correctly

Hi @techfort, this is ready for review now :)

@radex cheers! publishing on npm now


If decimal separator is pressed when CurrencyEditText is empty, a zero should be added to left side of decimal separator.

How to reproduce:
Insert a decimal separator and type some 99. It looks like .99 but it should be 0.99.

I'd like to take care of this, will prep a PR this week!

I'd like to take care of this, will prep a PR this week.

I'd like to work on this issue, preparing PR right now.

Fixed in #4.


bug: in latest helm, that uses source from main branch, unable to create a MB because it expects v1alpha1 version of kubestellar api - we are now at v2alpha1 in main

Describe the bug
KUBECONFIG=~/mcc-kscore-stage.config kubectl kubestellar ensure location wec7-wmw loc-name=wec7-wmw env=prod
--- current directory is /
current ws is root:imw1
imw is .
current cwsi is root:imw1
edge.kubestellar.io apibinding exists in workspace root:imw1
error: resource mapping not found for name: "wec7-wmw" namespace: "" from "STDIN": no matches for kind "SyncTarget" in version "edge.kubestellar.io/v1alpha1"
ensure CRDs are installed first
/opt/homebrew/bin/kubestellar/bin/kubectl-kubestellar-ensure-location: Creation of SyncTarget failed

Steps To Reproduce

install latest helm chart for kubestellar
imw1, wec7-wmw, and wec8-wmw were created by helm automatically as input to chart via values.yml
KUBECONFIG=~/mcc-kscore-stage.config kubectl ws tree

.
└── root
    ├── compute
    ├── espw
    ├── imw1
    ├── wec7-wmw
    └── wec8-wmw

KUBECONFIG=~/mcc-kscore-stage.config kubectl kubestellar ensure location wec7-wmw loc-name=wec7-wmw env=prod

--- current directory is /
current ws is root:imw1
imw is .
current cwsi is root:imw1
edge.kubestellar.io apibinding exists in workspace root:imw1
error: resource mapping not found for name: "wec7-wmw" namespace: "" from "STDIN": no matches for kind "SyncTarget" in version "edge.kubestellar.io/v1alpha1"
ensure CRDs are installed first
/opt/homebrew/bin/kubestellar/bin/kubectl-kubestellar-ensure-location: Creation of SyncTarget failed

Expected Behavior
I expect to be able to create a MB for an existing WMW and then to create a syncer to deploy to the WECs
Additional Context
No response

This suggests version mismatches. Progress on this requires knowing the versions involved. The branch named main is a variable that refers to different commits over time. Instantiating a Helm chart (sometimes called "creating a release" in Helm jargon, but only sometimes) involves saying what value to use for each of the chart's parameters. This chart's parameters are listed in https://github.com/kubestellar/kubestellar/blob/main/core-helm-chart/values.yaml , along with their default values. What did you use for the image.repository and image.tag parameters? An image tag is also a pointer that can vary over time. What image is actually being used? An unambiguous answer would include the SHA256 digest. If you could use kubectl exec to execute kubestellar-version in any of the containers then that would also give version information. What version of the kubestellar plugins are you using? kubestellar-version in your shell would give information on that.
The error message suggests that you are using release-0.7 plugins against a recent core.

on mcc-kscore-stage the output of Kubestellar-version is:
{"major":"1","minor":"24","gitVersion":"v1.24.3+kcp-v0.7.0","gitCommit":"c09408c2","gitTreeState":"dirty","buildDate":"2023-08-30T13:48:46Z","goVersion":"go1.19.12","compiler":"gc","platform":"darwin/arm64"}
helm values:

@clubanderson while I did not fully understand the versioning issue above I would like to clarify the following compatibility issue:
Old helm chart (aka --version < 1) is compatible with all and only ks containers v0.4.0, v0.6.0, v0.7.0 but NOT main-mc
New helm chart (aka --version == 1) is compatible ONLY with ks image main-mc (at the moment) and NOT any other version (including stable or latest)

@clubanderson : I think he said that and more. He said that the new Helm chart has to be used with a recent core image (which your display of chart parameters shows you did).


Prepare rancher-windows-gmsa chart for 2.7.0

rancher-windows-gmsa chart needs to be updated the charts for 2.7 by

File a PR removing the doNotRelease flag form the package.yaml; in this PR, you will also want to make any changes that need to be made to update the chart to the version you intend to release in 2.7. For example, for a charts like rancher-aks-operator / rancher-gke-operator / rancher-eks-operator, you will need to create a new branch in upstream for Rancher 2.7, cut the first release for that chart, and introduce those changes in to the package.yaml as well before removing the doNotRelease flag

To make your chart available for 2.7, almost every chart will also have to modify the Rancher Version annotations that scope it to 2.6, i.e. https://github.com/rancher/charts/blob/2e058e93ee01f2980e4750148842dd7f04262b38/charts/fleet-agent/100.0.5%2Bup0.3.11/Chart.yaml#L8

Once the PR is merged, ensure that the brand new chart is smoke tested by QA/dev

Expected versions:
rancher-windows-gmsa:
- 2.0.0
rancher-windows-gmsa-crd:
- 2.0.0

I installed the Windows GMSA (2.0.0) Chart onto a Windows Custom cluster on Rancher v2.7-head (Commit ID: 43f25cd) using dummy values, and was able to confirm the version installed was v2.0.0 (see screenshots). Therefore I am closing this ticket.


Add flow types to components; realted to #24

I've added some more flow types. As usual, feedback welcome.

@bvaughn, I've actually left some comments here and there. I see there's a conflict in ErrorDecoder, so no worries I'll fix that as well in the next push (should be tomorrow).

@bvaughn, how are we looking? I have a feeling I should have done a rebase instead of merge...What do you think?

No big deal WRT rebase vs merge. When we merge PRs into the main repo here, we squash anyway.
As for how we're looking- haven't had time to review yet. Will try to find time...sometime soon.

Alright, sounds good! No worries about reviewing. I have a few more changes that I've already done, but not committed because I wasn't sure about merge vs rebase.
Will polish that up and push then.
Cheers!

This looks great! Sorry for getting distracted and taking forever to circle back to this PR. 😄  Thanks so much!

No problem! Thanks for reviewing! A few more coming down the pipe this next week. We're nearly there :)


Roll Engine from 438685dad025 to 060fabbdcb37 (3 revisions)

https://github.com/flutter/engine/compare/438685dad025...060fabbdcb37
2020-09-29<EMAIL_ADDRESS>Roll Fuchsia Mac SDK from qyoO7f9Sk... to iiCa4hab1... (flutter/engine#21476)
2020-09-29<EMAIL_ADDRESS>Roll Dart SDK from 281f1e388107 to 4c0245356649 (1 revision) (flutter/engine#21475)
2020-09-29<EMAIL_ADDRESS>Roll Dart SDK from 58248a54dd58 to 281f1e388107 (1 revision) (flutter/engine#21472)
Also rolling transitive DEPS:
fuchsia/sdk/core/mac-amd64 from qyoO7f9SkxVU to iiCa4hab1cXy
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Commit queue failed; closing this roll.


[EWC/Volta]Can't use ENS name for the safe creation as an owner address

Title/Description
ENS name is defined as invalid owner address name during safe creation
Environment

Browser: FF/Chrome
Safe:
Wallet: WC/MM
App Version: 2.13.1
Environment:

staging (EWC)

Steps to reproduce

Go to 'the 2nd step of the safe creation flow
Add ENS name as an owner address (https://ens.energyweb.org/name/alice.ewc/details)

Expected result
It should be possible to add owner address using ENS name
https://energyweb.atlassian.net/wiki/spaces/EWF/pages/555745281/Using+ENS
Screenshots

Seems that web3 is not supporting EWC at the moment:

Maybe the EWC team should open an issue to web3 to ask for support? there is an issue that was open to ask for goerli support. What do you suggest? @tschubotz

CC @dasanra

Maybe the EWC team should open an issue to web3 to ask for support? there is an issue that was open to ask for goerli support. What do you suggest? @tschubotz

Hmm. And web3js doesn't allow to set a custom resolver and network, right?
I  think we should open an issue on web3js to see if they would be open to add EWC/Volta. We can then ask the EWF team to push it. What do you think?

Yes I agree, will do it and paste the issue number here

EWC won't be supported by web3 as this comment suggest. Any suggestions?

@Agupane I don't understand what they mean.

Unfortunately we do not support the ability to change the ENS name. I presume this was originally done as a security measure. You can see available networks here

What means "ability to change the ENS name"? We just want to add another network, i.e. the EWC network. How is this a security measure?

I thought the same..it's exactly the same request as goerlii, will ping him again to check if we are talking about the same

Puttin this on hold while waiting feedback from pr https://github.com/ethereum/web3.js/pull/3775


Redirect via meta refresh not followed - linux arm64 binary from debian/Kali box

Aquatone is not able to screenshot a site that returns this:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0;url=stuff/index.html" />
</head>
<body>
</body>
</html>

Aquatone (linux arm64 binary) does not follow the redirect, so no screenshot is taken.
Likely a Chromium issue.  But then again, webshooter also uses headless Chromium (via puppeteer) and it can capture this site, albeit with a longer timeout to get all of the refreshed page.  No amount of timeout helps aquatone deal with this page page.
aquatone: user-agent was "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36."  I'm using the arm64 binary for aquatone so aquatone appears to have it's own version of Chrome;  otherwise that box has Chromium 76.0.3809.100 built on Debian bullseye/sid, running on Debian kali-rolling
webshooter: user-agent was "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/69.0.3494.0 Safari/537.36"

This was a big issue on my last engagement. A lot of sites that were in-scope were using redirects via meta refresh and a bunch of screenshots were missed. Is this something that can be implemented in the next update?


docs: add KeyboardToolBarTheme type example

📜 Description
Added theme type to KeyboardToolbar theme example
📝 Checklist

[x] CI successfully passed
[x] I added new mocks and corresponding unit-tests if library API was changed

Hey @RodSarhan 👋
Thank you for the PR, but can't you extract KeyboardToolbarTheme from KeyboardToolbarProps as KeyboardToolbarProps["theme"]?

Hello, thanks for this awesome package 😁
Yeah it's not a big deal, I thought you just accidentally forgot to export it since most of the other useful types are already there.

@RodSarhan I think it was kind of intentional, because I didn't want to export many types from this package and if something belongs to a particular component (like a particular prop) then it should be retrieved from corresponding Props type.
Maybe you can change documentation to show how to extract KeyboardToolbarTheme from KeyboardToolbarProps?

Will be happy to review such PR (you can do these changes in this PR) 😊

@RodSarhan I left two minor improvements/suggestions - when you make changes I'll be happy to merge them 😊

got it, @kirillzyusko Thanks for reviewing, and sorry for bothering you with such a small detail

Thanks for reviewing, and sorry for bothering you with such a small detail

Everything is okay, no worries 😊

@RodSarhan would you mind to fix prettier? 👀 npm run format from root of the project

Thank you for your contribution @RodSarhan ❤


Fix AWS arm64 C++ build

Failure log example:
https://source.cloud.google.com/results/invocations/821ee767-106e-4712-8810-2e987ac4ac19/log
The change that introduced the problem is here:
https://github.com/grpc/grpc/pull/27135/files#diff-0c342e3092c150199bcfa74b763a9ac118864290bc70fa8febaf13ebd6c9c01fL20

also cleanup tools/internal_ci/linux/aws/grpc_aws_experiment_remote.sh at bit.

Adhoc build: https://fusion2.corp.google.com/invocations/dfbc7682-607c-4ad8-9608-cadf23a580e4/log


Add metadata to titanic

Updated metadata.yaml
Source verification: https://colab.research.google.com/drive/1HVivcFv5wHQ182ntPFhs5wOkMSuS3apN#scrollTo=AyQQlont_-V-

Nose test seems to be failing because of the colons in line 8, which has the title of the source publication from which most of the data originated. The colons are part of the title, so if the name of the book is removed, the test will probably progress further, but I don't know if there's some alternative method that would allow the title to be kept.

Hmm... I don't think we should use this titanic dataset with only three variables. I suggest we replace the existing dataset with one from https://www.openml.org/d/40945. @weixuanfu

Sounds good.

Same here. I think a recent force merging on master branch created a lot of conflicts and recreating a new branch should make a new clear PR.


Rewrite iptables provider to move most logic into the firewall provider

It would be nice if the firewall provider could one-shot the firewall configuration, using firewall_rule resources as input data. This would also:

remove most logic from the firewall_rule provider for iptables
allow for relative positioning of rules
allow us to remove rules that should not exist anymore (optionally, so we can still support fail2ban)

We could look into this for ufw and firewalld as well.

Fixed in #84.


can't save file

VSCode Version:1.32.3 (user setup)
Electron: 3.1.6
Chrome: 66.0.3359.181
Node.js: 10.2.0
V8: 6.6.346.32
OS: Windows_NT x64 10.0.17763
OS Version:win 10

Steps to Reproduce:
1.after edit ,press ctrl+s ,can not save file .but menu:file->save can save.
2.

Does this issue occur when all extensions are disabled?: Yes/No

What exactly do you mean by "cannot save file"?
The file contents isn't saved to disk?
Is there an error showing?
Does this reproduce if you disable all extensions?

no reply -> closing.

It is recommended that you use the same browser on the first setup,which is also happening in the same browser,which will most likely register after 1 hour try again and continuously.


refactor: address UX for KVM and SOL connection

removes confusing KVM and SOL buttons from persistent toolbar and moves them to respective kvm and sol pages
PR Checklist

[ ] Unit Tests have been added for new changes
[ ] API tests have been updated if applicable
[ ] All commented code has been removed
[ ] If you've added a dependency, you've ensured license is compatible with Apache 2.0 and clearly outlined the added dependency.

What are you changing?

Anything the reviewer should know when reviewing this PR?
If the there are associated PRs in other repositories, please link them here (i.e. open-amt-cloud-toolkit/repo#365 )

:tada: This PR is included in version 3.12.0 :tada:
The release is available on:

GitHub release
v3.12.0

Your semantic-release bot :package::rocket:


Uploading a large file using req.pipe() does not work

Uploading files larger than the read stream's highWatermark does not work.
This is tested with node 16.13.1
Sample server:
const express = require('express'),
    fs = require('fs'),
    http = require('http');

function upload(req, res) {
    const out = fs.createWriteStream('/tmp/out');
    req.pipe(out).on('finish', function () {
        console.log('upload finished');
        res.status(200).send({});
    });
}

const app = express();
app.post('/upload', upload);

http.createServer({}, app).listen(3000, function () {
    console.log('listening on port 3000');
});

You can test the server itself works using curl -F<EMAIL_ADDRESS>-X POST http://localhost:3000/upload
Superagent upload code:
'use strict';

const fs = require('fs'),
    superagent = require('superagent');

const readStream = fs.createReadStream('./largefile.txt');
const request = superagent.post('http://localhost:3000/upload')
request.on('response', function (response) {
    console.log('got response', response.status);
});
readStream.pipe(request);

The code above will just "hang" if largefile.txt is more than twice the highWaterMark. For fs, the default water mark is 64KB. So, if the file is say 200KB, the upload code will hang.

The reason the code hangs is because the 'drain' event is only emitted once at https://github.com/visionmedia/superagent/blob/048cf185d954028b1dccde0717d2488b2284c297/src/node/index.js#L799
Changing that bit of code to the below makes the upload work.
  req.on('drain', () => {
    this.emit('drain');
  });

'drain' event can be emitted multiple times (each time req.write() returns false).


Closing dataset on __exit__

In relation to what I noticed on #717, I noticed that on the __exit__ statement did not release datasets created during the acquisition. This allows a better graceful exit - at least in my implementation.

Found another way. Closing.


i get the image from the backend via api ,  but flutter must set constraints in container, but the image height are not the same, what should i do???

` return Container(
constraints:
BoxConstraints(
maxWidth:double.infinity,
maxHeight:550,
),
  child: Center(
          child: Swiper(
      scrollDirection: Axis.horizontal,
      itemBuilder: (BuildContext context, int index) {
        Map product=realSwiperData[index];
        return InkWell(
            onTap: () {
              print('/collections/${product['link']}');
            },
            child: CachedNetworkImage(imageUrl:imageHost+product['href'],fit: BoxFit.cover,),);
      },
      itemCount: realSwiperData?.length,
      //pagination: new SwiperPagination(),
      autoplay: realSwiperData.length>1,
      viewportFraction:1,
      // 当前视窗展示比例 小于1可见上一个和下一个视窗
      scale: 1,
      // layout: SwiperLayout, // 。
    ),
  ),
);`

the image from the api, so the height cannot be the same ,i only want to the real size of the image, but now only the maxHeight works !!!!

Ask your question here https://flutter.dev/community
Thanks you

 CachedNetworkImage(imageUrl:imageHost+product['href'],fit: BoxFit.Fill,),); try this maybe workds and
Ask your question here https://flutter.dev/community
Thank you

this dose not work.

Hi @wangxingxing123654,
This platform is not meant for assistance on personal code. Please see https://flutter.dev/community for resources and asking questions like this.
You may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you


Demo not working in Edge on Android

I came here from https://webpushdemo.azurewebsites.net/ which I found when looking for a solution to why my push notifications are not working in Edge on Android.
However, even the demo itself does not work on my Android phone! No notifications are showing up after pressing "Initiate push" and approving push notifications. It seems to work fine in other browsers.
I am testing on
Nokia 8.1, Android 10, Edge <IP_ADDRESS>55

Will it ever been solved?
The notification arrives to Edge Mobile, but without payload. Even with the encryption it arrives, but with the exception that the message should be long at least 104 bytes. As the payload is still missing.

As discovered by some users, Microsoft is still using Chromium 77.0.3865.116 for its Android based browser (summer 2019). It was never updated on Android. As there is no support contact or forum, probably the browser will never be updated in future.
I am not able to find any documentation from Microsoft about web push services.
If I implement this library:
https://github.com/web-push-libs/web-push-php
The Microsoft server accepts the request without any error message and forward an empty push notification to the mobile browser without any error, warning or log possibility.
But as said... It seems that the mobile team of Edge doesn't exist anymore.


HAP spec R1

I had a look at the HomeKit Accessory Protocol Specification (Non-Commercial Version), Release R1.  Some interesting observations:
1. Color Temperature
Looks like they silently introduced a Color Temperature characteristic (UUID CE) in iOS 10.3.  It's an uint32 between 50 and 400 and holds the Mired value (1,000,000 / K).  The LightBulb service has Color Temperature as optional characteristic.
2. Stateless Programmable Switch
They've documented the Stateless Programmable Switch and Programmable Switch Event characteristic in line with the iOS 10.3 behaviour.  Looks like we reverse engineered it correctly ;-), except for the Service Label service  (UUID CC), which holds the Service Label Namespace characteristic.
3. Stateful Programmable Switch
Looks like these have been silently removed.  There's no mention of a Stateful Programmable Switch service, nor of a Programmable Switch Output State characteristic.
4. iOS 11
No mention yet of the new iOS 11 services (like Sprinkler and Faucet).  Also no changes to the Speaker service, nor to the Volume and Mute characteristics.

See issue #457, @pdlove is already creating a PR.


For Technical Review - gsq-resource-authority-status

Didn't wait for Jodie. We can modify later!!

Change title to Queensland Resource Permit Status.
Change URI to /def/qld-resource-permit-status

Change definition to:
Stage in the life cycle of a Queensland Resource Permit.

Change definition to:
Stage in the life cycle of a Queensland Resource Permit.

Changes to title, URI, and definition made.

@dxwell @DavidCrosswellGSQ
I am unsure the topConcepts are real concepts. Is this another problem that needs a Collections solution? Thoughts?

@DavidCrosswellGSQ Major revision. Please re-review. Thanks.


Added custom settings

If specifying CUSTOM as the tap version, the custom_min, custom_max, custom_multiple and custom_add settings can be set to find the exact value for a given printer.
I realize that parameters can be passed to the command as well. Not sure it is really needed...

Why not add another user interface? Thanks for the PR!


[CI/CD] 통합 테스트

📝 Jacoco Test Coverage Report

Overall Project
37.5%
:x:

There is no coverage information present for the Files changed


Refactor spec use expect_correction in Lint cops

Part of #8127
Use newer expect_correction API in Lint namespace cops.
Move expected corrections to directly follow expected offenses.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[ ] Added tests.
[ ] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

I think we should tweak expect_offense so that we can abbreviate the error message, say with by putting [...] at the end of it.

I'm going to go with matching the message = ... pattern used in the rest of the files touched here with long offense messages (for consistency within the file and hopefully for improved readability).

💪 Lots of great work in there, thanks! 🎉
Result looks super clean. Great job.
BTW, we can now abbreviate the error messages with [...]; no need to amend this PR but if you continue cleaning up other specs...

Thanks @marcandre. I'm going to take a look at the style namespace cops this weekend (probably split into ranges to keep PR size reasonable).
I'll make use of the [...] abbreviation in those. Nice work getting that in.


improving logstash formatter

error in fields, message -> msg, prefixing host if field is already existing, consts for defaults, minor refactoring

Lgtm

Coverage decreased (-0.1%) to 67.257% when pulling 7175cb91b60b90585f37d091b10028c8a08c9643 on feature/improve-logstash-formater into fb0b0103951fb471cc1cb36818b31d1b512ee8b9 on master.


Workflow.Execution is NULL within workflow methods

@johncburns1: Reported seeing the Workflow.Execution==null inside a workflow method within one of his tests.  Is this not being initialized?

FIXED: The Workflow constructor wasn't initializing this.


Voice not working properly

I have tried using the voice feature, but it doesn't work properly. Sometimes, when I say "What is 2+2" in the voice message, the bot doesn't understand it correctly. Additionally, it doesn't send voice messages when I try to send them.

I am using a free service to run this bot, which has a very minimal system specification. As a result, I can only run some light voice recognition models. So this is expected.
If you want to run it yourself feel free to do that.
Here's the code for how a vosk model is loaded: https://github.com/Akash98Sky/gemi-voice/blob/main/stt/vosk.py#L14
You can download vosk models from here: https://alphacephei.com/vosk/models
But I will keep your feedback in mind for future improvements.

Additionally, it doesn't send voice messages when I try to send them.
This depends on the question you ask. Or, if you ask it to reply to it over voice or audio it'll do the same.

Thanks for the guidance.

Thanks for the guidance


test accuracy reporting

Dear Authors,
Thank you very much for your work and providing the code.
I just wanted to ask whether the numbers reported, i.e the test accuracy numbers are the best test accuracy or the test accuracy of the last epoch?
Since I see that in the codebase, we are logging the current best test accuracy that is obtained in the training process and that might reduce in later epochs.
Thanks and please let me know!

Dear Authors, any update on the above question?
Thank you, again!


[rule processor] Support data normalization

to @ryandeivert @mime-frame
cc @austinbyers
size: medium
contributes to: #105
Background
Currently, logs from different log sources (CarbonBlack, Osquery etc) can capture the same types of information, but using different schemas or different key names. Thus, it requires writing a rule for every log source and referencing the specific key-names used.
Example:

Log1 from LogSource1: {"host": "bob-pc", "cmdline": "wget 'evil.com'"}
Log2 from LogSource2: {"src_host": "bob-pc", "command": "wget 'hacked.com'"}

Using example above, it requires to write a rule for each log if you want to alert on any suspicious use of wget.  Example rules are like so:
Rule 1 for Log1 (pseudocode):
if rec['cmdline'] matches "wget *":
	return true
return false

Rule 2 for Log2 (pseudocode):
if rec['command'] matches "wget *":
	return true
return false

Data normalization feature will help you achieve writing one rule against all relevant logs. Applying data normalization, you can write one rule to alert on wget usage on logs shown above.
"""This is sample rule to alert on any suspicious use of wget"""
import fnmatch
from helpers.base import fetch_values_by_datatype

@rule(datatypes=['cmd'])
def alert_suspecious_wget(rec):
    results = fetch_values_by_datatype(rec, 'cmd')
    for result in results:
        if fnmatch(result, "wget *"):
            return true
    return false

We are using CEF (Common Event Format) standard to define normalized types. Please refer to CEF documentation (PDF) if you want to define your custom normalized types.
Changes

New configuration file types.json
This configuration file defines normalized types for each log source. This example shows the normalized types define for logs from cloudwatch.

{
  "cloudwatch":{
    "username": ["userName", "owner", "invokedBy"],
    "account": ["account", "recipientAccountId"],
    "protocol": ["protocol"],
    "event_type": ["eventType"],
    "event_name": ["eventName"],
    "region": ["region"],
    "agent": ["userAgent"],
    "ipv4": ["destination", "source", "sourceIPAddress"],
    "port": ["srcport", "destport"]
  }
}

Data normalization logic is applied in rule processor.

Testing

Add a sample rule using data normalization feature and integration test.

Integration test was passed.

Add unit test.

Unit test was passed.

Also it was tested in testing AWS account.

Normalized type ipaddress was working correctly
Normalized type event_type was working correctly

Upcoming

Types validation (validate value of normalized types, ipv4, domain, cmd, etc.).
Documentation about Data Normalization in details.

Coverage decreased (-0.003%) to 95.211% when pulling 7093697a20dbe2e234d289b3b136cb8736189380 on new_data_normalization into ec648d1398186d8f55ea6c73ff5eb8f63b512b5d on master.

For the types, I'm in favor of adopting a spec/standard vs. creating one ourselves.
Example: https://cee.mitre.org/language/1.0-beta1/core-profile.html
Granted it may not have everything we need, but we can borrow 90%+ of it.
Other possibilities: https://github.com/vz-risk/veris, ...

Coverage decreased (-0.003%) to 95.207% when pulling 70fc2e5d940b87ece78b2fe5f20909a4b26dd340 on new_data_normalization into abdbd24f3048e8835139b21470b3f3b26298e592 on master.

Coverage increased (+0.06%) to 95.332% when pulling dc3c0ee184ee65c7fac7a968424704cfce687828 on new_data_normalization into d988eafcbc73529721c18b43b6bf7bdd6dac929a on master.

@ryandeivert @mime-frame @austinbyers PTAL.

Coverage increased (+0.06%) to 95.332% when pulling e9570424417e740ac12f91b1d5827d4b193cfdfa on new_data_normalization into d988eafcbc73529721c18b43b6bf7bdd6dac929a on master.

Changes Unknown when pulling d2f2ebf754973c3942a2672ac6b1e4433d5f0520 on new_data_normalization into ** on master**.

Coverage increased (+0.06%) to 95.332% when pulling d6329b9ccf72d995942ccdb4fb0c9095be785016 on new_data_normalization into 8942c7d8b1324ad7caa67ab791814b87cb35baf2 on master.

Coverage increased (+0.002%) to 95.278% when pulling f97a6a77ecfa135fbb84e49298b63fc229e72f65 on new_data_normalization into a7f5d4fda8b8a263e1a6c87e17f450aa6f142e6d on master.

Coverage increased (+0.002%) to 95.278% when pulling 78a313bca88824d37b09547b03436d9f2e432be4 on new_data_normalization into a7f5d4fda8b8a263e1a6c87e17f450aa6f142e6d on master.

Coverage increased (+0.002%) to 95.278% when pulling e6add1053a40358b987a4027183c52e93c452540 on new_data_normalization into a7f5d4fda8b8a263e1a6c87e17f450aa6f142e6d on master.


feat: add elixir app

I would love to get the sample app running and see a video including the stats 🙏🏻

I'll take a look

@antonputra I need a DigitalOcean version of your setups 😄 AWS is way too complex 😭

I'll create benchmark in the future, I'll close this for now. Thanks!


Pie chart with startAngle makes react-spring animations weird

I was trying to modify the Pie chart example as per my needs as below

Change the startAngle of Pie to make the top segment in the center.
Move the label of each pie segment outside and make use of pie.centroid to keep it in center

I notice an issue with weird loading animation with react spring, which is spinning multiple times
DEMO - https://codesandbox.io/s/dawn-pond-608v5
I had to remove the animation for now, Please help or any guidance to fix the issue would be helpful

Looks like something is up with your fromLeaveTransition. Changing it too:
const fromLeaveTransition = ({ startAngle, endAngle }: PieArcDatum<any>) => ({
  startAngle,
  endAngle: startAngle,
  opacity: 0
});

Resolves the spinning: https://codesandbox.io/s/empty-snowflake-ilvwf?file=/Example.tsx
If you'd like to reverse the direction:
const fromLeaveTransition = ({ startAngle, endAngle }: PieArcDatum<any>) => ({
  startAngle: endAngle,
  endAngle,
  opacity: 0
});

Hope this helps!


Regression in dependency resolution with conflict resolution and different variants between conflicted versions

From a quick analysis of the error and reproducer, it seems that Gradle 7.6 incorrectly resolves the variant against kotlin-gradle-plugin-api:1.7.10 while 1.7.20 is selected. And since 1.7.10 does not have the gradle71RuntimeElements variant which was introduced in 1.7.20 only, we end up with a selection of incompatible variants as both gradle70RuntimeElements (lifted from 1.7.10) and gradle71RuntimeElements end up in the graph.
With Gradle 7.5.1, selection succeeds and correctly resolves gradle71RuntimeElements.
So it looks like something changed in the resolution system that causes unexpected node selection.
Error:
* What went wrong:
Execution failed for task ':plugin:generatePrecompiledScriptPluginAccessors'.
> Could not resolve all files for configuration ':plugin:runtimeClasspath'.
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20.
     Required by:
         project :plugin > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20
      > Multiple incompatible variants of org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 were selected:
           - Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle70RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.0, org.gradle.status=release, org.gradle.usage=java-runtime}
           - Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle71RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.1, org.gradle.status=release, org.gradle.usage=java-runtime}

   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20.
     Required by:
         project :plugin > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20
         project :plugin > org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20 > org.jetbrains.kotlin:kotlin-gradle-plugin-model:1.7.20
      > Multiple incompatible variants of org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 were selected:
           - Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle70RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.0, org.gradle.status=release, org.gradle.usage=java-runtime}
           - Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle71RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.1, org.gradle.status=release, org.gradle.usage=java-runtime}

   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.10.
     Required by:
         project :plugin > org.gradle.kotlin:gradle-kotlin-dsl-plugins:2.4.1 > org.jetbrains.kotlin:kotlin-sam-with-receiver:1.7.10
      > Multiple incompatible variants of org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 were selected:
           - Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle70RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.0, org.gradle.status=release, org.gradle.usage=java-runtime}
           - Variant org.jetbrains.kotlin:kotlin-gradle-plugin-api:1.7.20 variant gradle71RuntimeElements has attributes {org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.jvm.environment=standard-jvm, org.gradle.jvm.version=8, org.gradle.libraryelements=jar, org.gradle.plugin.api-version=7.1, org.gradle.status=release, org.gradle.usage=java-runtime}

Reproducer: https://github.com/cesar1000/kotlin_dependency_ambiguity

Further investigations have revealed that the issue is not in dependency management, but rather in the way the metadata works for the kotlin-gradle-plugin and kotlin-sam-with-receiver libraries.
In Gradle 7.5:

The plugin development plugins do not request the org.gradle.plugin.api-version attribute when resolving runtimeClasspath.
org.gradle.kotlin:gradle-kotlin-dsl-plugins:2.4.1 depends on kotlin-sam-with-receiver:1.7.10
kotlin-sam-with-receiver:1.7.10 resolves to variant runtimeElementsWithFixedAttribute since there is no org.gradle.plugin.api-version attribute requested
Which in turns resolves the same name variant in kotlin-gradle-plugin-api, which was already resolved anyway.

This means that resolution succeeds with Gradle < 7.6.
In Gradle 7.6:

The development plugins do add the attribute. This fix is needed and consistent.
org.gradle.kotlin:gradle-kotlin-dsl-plugins:2.4.1 depends on kotlin-sam-with-receiver:1.7.10
It ends up selecting the gradle70RuntimeElements in kotlin-sam-with-receiver:1.7.10 since that is the variant matching the requested attributes, in particular with the inclusion of org.gradle.plugin.api-version
That variant depends on kotlin-gradle-plugin-api with a specific capability org.jetbrains.kotlin:kotlin-gradle-plugin-api-gradle70.
This means that selection ends up picking the gradle70RuntimeElements for kotlin-gradle-plugin-api:1.7.20 in addition to the gradle71RuntimeElements

And then resolution fails because these two variants are incompatible given the difference in values for org.gradle.plugin.api-version.
One solution on the Gradle side is to make sure that org.gradle.kotlin:gradle-kotlin-dsl-plugins expresses a strictly version requirement for the Kotlin dependencies. So that any deviation from the supported setup breaks early.

Note that a workaround is to add a constraint:
constraints {
    implementation("org.jetbrains.kotlin:kotlin-sam-with-receiver:1.7.20")
}

Closing as there is nothing to do in Gradle for this

The issue on the Kotlin side is https://youtrack.jetbrains.com/issue/KT-54691/Kotlin-Gradle-Plugin-libraries-alignment-platform

That variant depends on kotlin-gradle-plugin-api with a specific capability org.jetbrains.kotlin:kotlin-gradle-plugin-api-gradle70.

Can you elaborate on that part? I thought 7.0 was an attribute named org.gradle.plugin.api-version. And that attribute was the minimum version of Gradle required by a given dependency. So even if kotlin-sam-with-receiver:1.7.10 declares org.gradle.plugin.api-version=7.0, there should be no issue resolving  kotlin-gradle-plugin-api to 1.7.20 with variant gradle71RuntimeElements?
Or are capabilities something different there? It feels weird that a dominator dependency forces their minimum version of Gradle on all dependencies.


'React' is defined but never used  @typescript-eslint/no-unused-vars

Hello everyone!
I have met the problem with .tsx files:
'React' is defined but never used  @typescript-eslint/no-unused-vars.
I have the only record in .eslintrc.json:
{ "extends": ["airbnb-typescript"] }
Could you help, how to resolve this problem?
I can resolve this problem with setting for "@typescript-eslint/no-unused-vars" next value:
"varsIgnorePattern": "React"
but it is not very correct.
Thank you!

Hey @artem-gorokhovskii
I can't replicate this one.
Does your tsx file look something like this?
import * as React from 'react';

Are you running the latest versions of eslint-* and @typescript-eslint/* packages?

Hi, @iamturns,
Yes, I have string such your string.
My versions were:
"@typescript-eslint/eslint-plugin": "2.3.0",
"eslint": "6.6.0",
"eslint-config-airbnb-typescript": "6.1.0",
"eslint-plugin-import": "2.18.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.14.3",
"eslint-plugin-react-hooks": "1.7.0",

After updating some packages:
"@typescript-eslint/eslint-plugin": "2.7.0",
"eslint-plugin-react": "7.16.0",
"eslint-plugin-react-hooks": "2.2.0",

I still have the same error.
UPD:
I had the error in file, where I used only ReactDOM.render without any jsx code and here imporing React is really useless action and linter is correct.
Thank you!

Cool, good to hear the linter finding hard-to-detect issues! 👍