Leave-one-out ISC permutations/bootstraps not valid

When using permutation_isc and bootstrap_isc with pairwise=False, the permutations are carried out by applying signflips, group exchanges, or bootstrap resampling to the correlation values of individual subjects with the rest of the group. For example, in the one-sample permutation each subject's LOO value is randomly flipped or not flipped:
https://github.com/brainiak/brainiak/blob/69a0c93cceea79215622221e7952f4b2262892aa/brainiak/isc.py#L938
I don't think this is correct. When using LOO ISC, each subject's data is used to compute ISC value (as part of the "group"), and flipping the sign of a subject's data would impact every LOO value for all subjects, not just the LOO value of that specific subject. I believe this problem is true for both the 1-sample and 2-sample permutation and bootstrap tests as they are currently coded.
The Chen2016 reference, as far as I can tell, only describes permutations and bootstraps in the pairwise case, and does not describe a valid way of doing this for the leave-one-out case. I can't think of a way to do this that would be valid, so my proposed solution would be to have these functions thrown an error if they are attempted to be called with LOO ISCs.
Sam, let me know if I am misunderstanding how these functions are working.

@cbaldassano thanks for the comment! I'm trying to understand your question here... In the one-sample permutation test, the sign-flipping is applied to the correlation values resulting from the ISC computation (for both the pairwise and leave-one-out approaches). If you have N = 30 subjects, at each permutation you'll get a 30-long vector of -1s and +1s (and for low N, we compute the 2**N exact set of all permutations)—for both approaches. In the pairwise approach, the ISC computation results in an N x N correlation matrix (N*(N - 1)/2 unique correlation values) and the sign-flipping is applied to the rows/columns of the matrix to achieve a subject-wise (not pair-or element-wise) permutation. In the leave-one-out approach, the ISC computation results in N correlation values and the sign-flipping is applied to these N values for subject-wise permutation. You're correct that in the leave-one-out approach, each of these N correlation values corresponds to a left-out subject's correlation with the average of the N - 1 other subjects. But there's no flipping applied to the actual time series data feeding into the ISC computation (or components of the ISC computation like averaging the N - 1 subjects)... I'm not sure I see in principle why this would cause a problem (but it might!). Do you find that behaves strangely in practice?
In general, the time-series averaging step of the leave-one-out ISC computation causes issues. This is also why I only apply phase randomization and circular time-shift randomization to the left-out subject—because applying these randomizations prior to averaging will generally yield an average times series that simply flat or noise (and comparing a left-out subject in each randomization sample to a flat time series doesn't seem like a fair comparison).

But there's no flipping applied to the actual time series data feeding into the ISC computation (or components of the ISC computation like averaging the N - 1 subjects)

Right, this is my concern. In general for a permutation test (or bootstrapping), we want to do something independently to each of the exchangeable units in the dataset, which in this case are the subjects. Chen2016 talks explicitly about this, saying that we want to flip the signs of the subjects and not the individual pairwise correlation values.
The problem is that in the LOO case, there is no way to flip the sign of say subject #2, since flipping subject #2's sign would impact the LOO values for all subjects. Flipping just subject #2's LOO value means that this result no longer corresponds to a valid dataset - there is no operation we could do to the original data that would result in this set of LOO values. In Gang Chen terms, the subject #2 LOO value is not an exchangeable unit that can be permuted independently of the other LOO values.
So I think this is definitely a problem in principle. To get a sense for whether this is actually a problem in practice, I wrote a little test script generates permuted datasets by flipping (zero-mean) timescourses of random subjects. In the pairwise ISC case, this corresponds exactly to the permutation test in brainiak. I ran this on the univariate angular gyrus timecourses from Sherlock (16 subjects).
Here is the permutation distribution for randomly flipping subjects and then computing ISC ("LOO") and for the current brainiak version in which we flip individual subject LOO values ("LOO Flip1").

Code to reproduce is here
These do seem meaningfully different to me, though the biggest difference is on the lower tail which we usually don't care about.
It's up to you what you think makes the most sense here - one option would be to just add some more explanation in the documentation about what the LOO permutations/bootstraps are doing and the potential caveats, and let users decide on their own (since I don't think there is a better way to do this given just the LOO values).

Hi, sorry to interrupt, but I wanted to ask about this! I've been analyzing some of my data using the leave-one-out ISC approach and previously determined significance through BrainIAK's bootstrap isc function. It does look to me like the Gang Chen 2017 paper doesn't think that the current implementation is the correct way to do it. However, I wonder if this proposed version might be too conservative.
As an example: so this is what the leave-one-out ISC values look like for the lateral occipital cortex of two different populations of subjects (watching a very short, 90 TR video). Flipping random subjects (using the code above) gives a p-value of 0.02 for population 1 and a p-value of 0.09 for population 2. The Brainiak permutation and bootstrapping functions put them both as significant, p < 0.001. Maybe that shouldn't be the case for population 2, but I do think the ISC values for population 1 look pretty reliable. Do you have thoughts on this?

This is actually a great example of why the current implementation is misleading. The leave-one-out values in pop1 look tightly clustered around 0.2, so it seems like it should be obvious that the population mean here is >0. But these values are not independent samples - having a few very good subjects in this population will pull all of these points higher. So running a true permutation test (flipping random subject timecourses) shows that the confidence interval is still relatively wide (though 98% of it is above 0).

Hmm, I'm still unsure what to do about this. As far as I know, nobody has done the work to see how well various randomization tests will control false positive rates (FPRs) for the leave-one-out approach (in the style of Gang Chen's paper(s) on the pairwise approach). I'm fine with putting a disclaimer on these functions that they may not control FPRs (and point users to Gang Chen's work), but that disclaimer should apply to basically all of these statistical tests (because they haven't been thoroughly evaluated yet) as well as the subject-wise bootstrap and permutation tests (in certain contexts) recommended by Gang Chen. These are all imperfect solutions. In this sense, I'm not sure the software is wrong per se, but maybe we can do a better job of noting the limitations and preventing people from using it wrongly.
@cbaldassano, in your example, it seems like the permutation-based sign-flipping approach currently implemented in BrainIAK yields a wider—i.e. more conservative—null distribution (orange) than your approach (blue). I would be more inclined to stick with the more conservative approach, as it will yield lower FPRs. Again, one possible reason the null distribution generated by your approach is asymmetric, clustered at zero, and with very few values below zero is because during the averaging step of the ISC computation, the flipped time series will collapse to a roughly flat or noise time series; in most permutations, the left-out subject will be compared to this artificially flat time series, resulting in zero-ish correlation. This is also true of the phase randomization and circular time-shifting approaches if you randomize before the averaging step of the ISC computation. Averaging N–1 subjects that have been randomized in any way also arguably results in an invalid dataset. This is why in the phaseshift_isc and timeshift_isc functions, I apply the randomization to the left-out subject only, so that at least the comparison is made to a valid average time series.
@tristansyates—I'm surprised that @cbaldassano's proposed method is more conservative in your example. Isn't this inconsistent with the distributions in Chris's example? Just eyeballing those strip plots, I would guess that both populations should yield a significant group effect (mean > 0).
My reading of Gang Chen's work is that the leave-one-out approach (in particularly the averaging—i.e. smoothing—operation) is irredeemable in general... We can invent all sorts of ways of randomizing the input time series, but pinning down the statistical implications for these inventions will be difficult. (For example, what is the null hypothesis specified by randomly inverting subject time series? I have no idea.) All of these approaches may introduce oddities into the data that don't quite match the original data. For posterity, Chen has an appendix in the third installment of that series demonstrating that the leave-one-out approach also yields inflated FPRs (unsurprisingly), but I can't glean much from it: https://www.sciencedirect.com/science/article/pii/S1053811919310651#appsec1

@cbaldassano @tristansyates if you're interested (or know anyone else who might be), we could put our heads together and systematically evaluate how well these models control FPRs with simulated data using the leave-one-out approach (in the style of Gang Chen's work). Could turn into a nice little paper...

Starting to look into this simulation—will share soon.

Yes, it is inconsistent with the simulation above, which is confusing to me (and I don't see any bugs in my code!). These are the distributions I'm getting for the two different methods with that population one data:

Is it possible that the number of TRs is making a difference here? At any rate, I'd be interested in looking into this more systemically!

Okay here's a first pass at getting FPRs for different tests using simulated data: https://github.com/snastase/isc-tests. The notebook should render interactively via Binder (link; takes awhile to build). Feel free to fork, contribute, etc. I haven't implemented @cbaldassano's proposed method yet. I'm seeing FPRs at ~.10–.15 for a nominal significance level of p = .05 across all tests, but I'm only running 100 simulations so far for the sake of time—we'll need to see what this looks like at 1000 iterations. I'm having a little trouble conceptually linking this to Gang Chen's simulation approach because here we want to simulate time series, whereas they're simulating correlation pairs (with varying rho where rho is the correlation between two correlation pairs pivoting on shared subject)... but I'm not sure we need to stick too closely to their framework. The correlated_data function should be useful for seeing how these null distributions shift as we vary the number of TRs, number of subjects, and correlation level. Might also be worth re-tooling that a bit to inject correlation in a handful of subjects, rather than uniformly across subjects, to see if there are pathologies when e.g. only two subjects are highly correlated by others are not (specified by the cov variable in multivariate_normal). Later on, maybe we can pull in actual fMRI data for a real-life example, or use resting-state data for evaluating FPRs.

@tristansyates—interesting! I'm curious how phaseshift_isc and timeshift_isc would measure up here as well.

I've never heard of binder before -- it's super cool! I've forked the directory and added @cbaldassano's  proposed method (here.)The FPR rate is 0.05, demonstrating that it is a more conservative test.
The actual fMRI data I've been working with also has some missing time points (we gaze code our participants and remove times when their eyes are not on the screen). (This is one of the reasons why we use the leave one out approach because we can nanmean the group). Along with simulating how correlations vary by non-uniformity, looking into the impact of missing time points may be something interesting to pursue as well.
@snastase I'll check how phaseshift and timeshift measure in the sample and let you know! Currently thinking that it'll be a narrower distribution like the blue one above

Oops yep something was wrong with my first test. This is the actual distribution and it mirrors what Chris showed! :

Thanks for setting up that notebook Sam! I created a pull request to add the flipping-timeseries test for comparison, and I just now realized that Tristan has a similar fork. Both Tristan's and mine are getting FPR=0.05 while the current brainiak methods are yielding higher FPRs. I'm not sure how to square this with the plots that Tristan and I were making in our own simulations though - maybe the relative shapes of these nulls (across methods) are different when there really is vs. is not a real signal in the data?

You may have noticed I tagged this issue for the upcoming BrainIAK release. Do you think you will converge on a solution in the next few weeks?

This will probably take a little more discussion to get a complete fix. I do think that my pull request (consistent with what Sam and Tristan were seeing) demonstrates that there is a problem with the way things are currently implemented in brainiak. I'm not sure whether we want to just say that the current way has some bias and flag this in the documentation, or if we think it is worth removing/deprecating the LOO brainiak functions. The solution I'm proposing would be done outside of the ISC function itself, so I don't know whether it is in scope to be part of the brainiak package itself. I'll leave it up to Sam about what to do, but my vote would be to have the isc code raise either a warning or error if someone tries to get p values from LOO ISC values.

Sorry—lost track of this for a few weeks. I agree with @cbaldassano that this will take a bit more work to fully resolve, so I'm not sure we should hold up the release (I don't have a ton of bandwidth to do it in the next weeks). I don't think we should remove or deprecate the nonparametric tests for leave-one-out ISCs—I'm seeing FPRs .05–.10 across all of these methods (at n_subjects = 30, n_TRs = 300), which is not ideal, but it's also not terrible; all of them are better (marginally) than the baseline parametric t-test (FPR = .11)—see the updated notebook here. However, we need to more systematically explore whether things misbehave at different parameter settings. But I think it's definitely a good idea to add a disclaimer to the documentation noting that these nonparametric tests may not strictly control FPRs at the nominal level. I also pulled in @cbaldassano's time-series flipping approach, adapted it to the style of the other tests, and tested a version where the sign-flipping is only applied to left-out subjects (to avoid this issue of averaging flipped or randomized time-series; yields FPR = .06). I'm still not entirely sure how to think about this approach. I'm not sure if it makes sense to flip the time series around zero (even if it's mean-centered) because I'm not sure BOLD time series has symmetric variance around zero (i.e. peaks and troughs in the time series aren't necessarily similarly shaped or distributed, and don't have the same physiological interpretation); and I don't know what null hypothesis is embodied in this null distribution.

Joining the conversation: circular shifting has also worked well for us, but you need to make sure you shift of enough time points (rule of thumb is one hrf tail ~ 30 seconds). I’ve also used block time shifting, which helps a bit when time series are not that long. First you chunk the time series in block of random size (but long enough to preserve autocorrelation, eg min length ~ 50 seconds), then you shuffle the blocks. There’s a reference for this method, I can link it once I’m not on mobile.


Bug with case conversions for snake case with numbers

Here's a new bug in v5.
Whenever a number is prefixed by a _ in snake case, change-case does not properly convert to the appropriate case.
Example:
changeCase.pascalCase("email_1_address", {separateNumbers: false})
changeCase.pascalCase("email_1_address", {separateNumbers: true})

Output: 'Email_1Address' in both cases
Expected: Email1Address, I think in both cases
This even breaks when converting cases back and forth:
changeCase.camelCase(
  changeCase.snakeCase("email1Address", {separateNumbers: true}
), {separateNumbers: true})

Output: 'email_1Address'
Expected: email1Address

This was working in v4 when using the camelCaseTransformMerge function.
changeCase.camelCase(str, {
  transform: changeCase.camelCaseTransformMerge,
})

Have you tried disabling the separateNumbers option? I think that should do what you’re asking for, you just have to be aware that it’s not reversible (same as v4 though).

I have published a new release with a mergeAmbiguousCharacters option for camelCase and pascalCase.
For the sake of this issue, I do want to clarify that this isn't a bug but expected behavior (without the option enabled). It works the same way in v4.
The behavior wasn't related to separateNumbers (which splits V1 into V_1), but instead the standard formatting of these two methods that prefixes an _ before numbers which can be unclear. Using your example, it's impossible to reverse email_1_address if it turns into Email1Address because it may be intentional to do email1 vs email_1.
Anyway, hopefully mergeAmbiguousCharacters supports your use-case in v5.2.

Looks great! Thanks, Blake!


Use library name alias in examples

openfermioncirq is a very long name. Does anyone have objections to using an alias (import openfermioncirq as ...) in examples? @Strilanc , @babbush ? Suggestions for the alias? I suggest ofc.

ofc is fine. oc also fine. Pick it and stick with it.


You must feed a value for placeholder tensor 'output' with dtype float and shape [?,1]

I have a neural net that has an input of [None, 353] and an ouput of [None, 1]. This however throws this error: You must feed a value for placeholder tensor 'output' with dtype float and shape [?,1] The output tensor in cppflow has shape -1, 1 and the input has -1, 353.
What is a proper way to solve this?
I have tried saving the model.pb again with the shape [1, 353] and [1, 1] but the same error came up.

Hi,
Could you provide a small example so it is possible to repeat and reproduce your problem? I cannot get the source of the problem without having a look at the Python code to generate the .pb and the C++ code to perform the inference.
If possible, try to post a small piece of code with just the minimum code to be able to reproduce the error.

Hey thanks for the quick respone, I really appreciate that.
I have created a Google Colab notebook (just like python notebook) in which I create the model, train and save etc. Here is a link of a copy of that notebook: link. You can edit it also if you want. I can also provide some example data if you like, but just random values should work as training.
The C++ is code is just this:
        Model model("./model/model.pb");
	model.restore("./model/model.ckpt");
	Tensor input(model, "input");
	Tensor prediction(model, "output");

        Board* board = new Board();
	board->setBoard("4b3/8/8/8/8/8/2B3P1/8 b - - 0 1");
	Feature* feature = new Feature(board);
	std::vector<double> featureVector = feature->generate();
	std::vector<float> featureVectorFloat(featureVector.begin(), featureVector.end());

        input.set_data(featureVectorFloat);
	model.run(input, prediction);
	auto result = prediction.get_data<float>();

Then at the model.cpp on this line: TF_SessionRun(this->session, nullptr, io.data(), iv.data(), inputs.size(), oo.data(), ov, outputs.size(), nullptr, 0, nullptr, this->status); it fails with the error in the title.

Hey, I think the problem is not related with the shapes. I would say that when you declare your model in the Python code you are calling 'output' to the actual target of the model (the labels or y_hat).
In your code self._y is called 'output' but actually it is not the output, is the data you feed to compare with. The actual output is self.y, the result of the network.
I would try to change the name of self._y to something else, like 'target' and rename self.y to 'output`. You can use tf.identity. Like this:
# Input variable and label
self.x = tf.placeholder(tf.float32, shape=[None, 353], name="input")
self._y = tf.placeholder(tf.float32, shape=[None, 1], name="target")

# Output
self.y = tf.identity(self.buildNetwork(self.x), name='output')

Now the C++ code should work. When you ask for the 'output' tensor, you will get your desired tensor, the result of applying the network.
Hope it works.

Thanks for the fast response, it still has the same error after building and training the network like that. Any other suggestions?

I have tried your code and I got the same error. I have tried to change what I suggested and now it is working. I guess you or I are missing something. I did not train, just create the model, initialize it and run it on C++ and it is working. I show you here the code I have used.
Python
I just changed the name of self._y to 'target' and the name of self.y to 'output'. I also changed the path where the model is saved.
tf.disable_eager_execution()
class Model(object):

    def __init__(self, restore=None):

        self.index = 0
        # Input variable and label
        self.x = tf.placeholder(tf.float32, shape=[None, 353], name="input")
        self._y = tf.placeholder(tf.float32, shape=[None, 1], name="target")

        # Output
        self.y = tf.identity(self.buildNetwork(self.x), name='output')

        # Build the optimizer
        self.cost = tf.reduce_mean(tf.abs(tf.subtract(self.y, self._y)))
        self.optimizer = tf.train.AdamOptimizer().minimize(self.cost)

        # Add ops to save and restore all the variables.
        self.saver = tf.train.Saver()
        # Operation to initialize the variables
        self.init = tf.global_variables_initializer()
        # Start session
        self.sess = tf.Session()

        self.sess.run(self.init)

        #self.sess.run(self.y, feed_dict={self.x: feature})
        with open('model.pb', 'wb') as f:
            f.write(tf.get_default_graph().as_graph_def().SerializeToString())

    # Build the network structure
    def buildNetwork(self, x):

        # Weights and biases for the first hidden layer
        globalW = tf.Variable(tf.random_normal([17, 11], stddev=0.35),
                              name="globalW")
        globalB = tf.Variable(tf.random_normal([11], stddev=0.35),
                               name="globalB")
        pieceW = tf.Variable(tf.random_normal([208, 100], stddev=0.35),
                              name="pieceW")
        pieceB = tf.Variable(tf.random_normal([100], stddev=0.35),
                               name="pieceB")
        squareW = tf.Variable(tf.random_normal([128, 60], stddev=0.35),
                               name="squareW")
        squareB = tf.Variable(tf.random_normal([60], stddev=0.35),
                               name="squareB")

        # Weights and biases for the second hidden layer
        w2 = tf.Variable(tf.random_normal([171, 75], stddev=0.35),
                              name="W2")
        b2 = tf.Variable(tf.random_normal([75], stddev=0.35),
                              name="B2")

        # Weights and biases for the output layer
        w3 = tf.Variable(tf.random_normal([75, 1], stddev=0.35),
                         name="W3")
        b3 = tf.Variable(tf.random_normal([1], stddev=0.35),
                         name="B3")

        # Network operation

        # First hidden layer
        globalOutput = tf.add(tf.matmul(tf.slice(x, [0, 0], [-1, 17]), globalW), globalB)
        print(globalOutput.shape)
        pieceOutput = tf.add(tf.matmul(tf.slice(x, [0, 17], [-1, 208]), pieceW), pieceB)
        squareOutput = tf.add(tf.matmul(tf.slice(x, [0, 17+208], [-1, -1]), squareW), squareB)
        layer1Output = tf.concat([globalOutput, pieceOutput, squareOutput], axis=1)

        # Second hidden layer
        layer2Input = tf.nn.relu6(layer1Output)
        layer2Output = tf.add(tf.matmul(layer2Input, w2), b2)

        # Output layer
        layer3Input = tf.nn.relu6(layer2Output)
        layer3Output = tf.add(tf.matmul(layer3Input, w3), b3)
        return tf.tanh(layer3Output)

model = Model()

C++
Just a small piece of code (based on examples/load_model and on what you provided in your message) to load the model and run with some data.
#include "../../include/Model.h"
#include "../../include/Tensor.h"

#include <numeric>
#include <iomanip>

int main() {
    Model model("../model.pb");
    model.init();

    Tensor input(model, "input");
    Tensor prediction(model, "output");

    std::vector<float> data(353);
    std::iota(data.begin(), data.end(), 0);
    input.set_data(data);

    model.run(input, prediction);
    auto result = prediction.get_data<float>();

    std::cout << "END" << std::endl;

}

Could you try if this piece of code is working for you?

I forgot to name the Tensor 'outputy', after that I get this error: You must feed a value for placeholder tensor 'input_2' with dtype float and shape [?,353] I actually named the input placeholder input, so I don't know why it is doing this. I will try your example now.

Does the error appear executing the python script or the c++ code?
Which version of TensorFlow and on which OS are you running?

It appears when running C++. I added this: std::cout << TF_Message(status); to the status_check to get that output. Windows 10 Pro build 18362.900, Tensorflow from the download link you provided with cpu-only support version 1.15

When i show all variables in the Python snippet that I posted I don't get an operation called 'input_2'. There is one 'input', one 'target' and several other operations but there isn't a 'input_2'. May you be trying a different code snippet?

That is weird, when I copy-paste your snippet it does not have an input_2. Where did you download the Tensorflow from that you include in model.h and tensor.h? I have a tensorflow folder in my project which I reference, possibly that might have to do something with it?

From the official TensorFlow C API website. Then, does the snippet that I posted work? I think the error is not related with TF versions but rather with small typos or bugs in the code (like naming wrong a variable).

The problem with this on Windows is that you can't install the same you would on Linux and Mac. So I import the official C .lib file in my project and add the .dll to my PATH variable. But the include in my code still have to be changed to a header file, which is not installed globally. Thats why I also have to download Tensorflow repo and include header files from there.

But I guess that's not related to the errors.

Ok I got yours to work somehow, you are probably right. I still don't know why tho.
I copy pasted yours into my colab and that works, but what is the difference other than the names?

Names are how you declare which operation or tensor you want to use or feed. With the code that you first showed me, you were trying to get a placeholder as an output, while it was supposed to be an input, the target. I changed the name of the _y placeholder to 'target' and y to 'output', so when you ask for 'output' in the c++ code, it will run the operation related to y, that is, the whole network. Before you were trying to run the _y operation, but that's not an operation, is just a placeholder, so you cannot get anything from it.

Alright, that actually seems to be the problem. However, when doing inference it always returns -1.000000 instead of a value between -1 and 1. I did do inference in python on a single sample which did work. Any suggestions?

Did you save and restore the checkpoint properly?

Yeh i think so, i did this:
        Model model("./totalmodel/model.pb");
	//model.init();
	model.restore("./totalmodel/model.ckpt");
	Tensor input(model, "inputoud");
	Tensor prediction(model, "outputoud");
	Board* board = new Board();

	board->setBoard("r1b1k2r/2p2ppp/p1np1n2/1pb1p3/4P3/1BNP1N1P/1PP2PP1/R1B1R1K1 b kq - 0 1");

	Feature* feature = new Feature(board);
	std::vector<double> featureVector = feature->generate();
	std::vector<float> featureVectorFloat(featureVector.begin(), featureVector.end());
	input.set_data(featureVectorFloat);
	model.run(input, prediction);
	auto result = prediction.get_data<float>();

And i did this in python:
self.saver.save(self.sess, "drive/My Drive/Winchess-data/newest-model/model.ckpt")

The saver is done when creating the model like so:
self.saver = tf.train.Saver()

I have saved the checkpoint. When restoring it in Python it works, in C++ it only returns -1 or 1.
https://wetransfer.com/downloads/606f20cc885b4f422f6cf9aa09ea438920200611192224/09d37571e81abb79f68fcbc84eb49c2020200611192241/e24a56 here you have my saved files so you can try yourself

I tried your model in C++ and Python and using the same input I got the same output. For example feeding an input tensor of 353 values with the number (-0.05) I got an output of 0.51. I chose that number just to show an example with a value between -1 and 1. I show you the code I used:
c++

#include "../../include/Model.h"
#include "../../include/Tensor.h"

#include <numeric>
#include <iomanip>

int main() {
    Model model("../newnorm.pb");
    model.restore("../newnorm.ckpt");
    //model.init();

    Tensor input(model, "inputoud");
    Tensor prediction(model, "outputoud");

    std::vector<float> data(353);
    for (int i=0; i<353; i++)
        data[i] = -0.05;
    input.set_data(data);

    model.run(input, prediction);
    std::cout << "Output: " << prediction.get_data<float>()[0] << std::endl;
}

Python
import tensorflow.compat.v1 as tf
import numpy as np
tf.disable_eager_execution()

sess=tf.Session()
saver = tf.train.import_meta_graph('newnorm.ckpt.meta')
saver.restore(sess,tf.train.latest_checkpoint('./'))

graph = tf.get_default_graph()
input = graph.get_tensor_by_name("inputoud:0")
output = graph.get_tensor_by_name("outputoud:0")

output = sess.run(output, feed_dict={input: np.ones((1, 353)) * -0.05})

print(output)

May your problem be that you are not feeding the same values in your c++ code and your python code. If both of the above code snippets output the same for you that means that everything works fine. I would recommend you to review your code, and ensure that you are feeding the same values in Python and in C++.
Also, the topic of the issue has deviated from the initial error. I think is not related to the repository, but rather with the use of TensorFlow.

Alright I got it to work. I am doing the training in Google Colab with a link to my Google Drive. Apparently there was some issue with either saving with the same name or the TF session was not cleared properly. I got it working by resetting the runtime(colab specific) after each training session or reload of the model.
Thanks a lot for your help

I'm glad you made it work. I proceed to close the issue.


Update ChangeLog for 1.2.1

Why descriptions of DEVOPS-888 and  DEVOPS-877 are not included in the changelog?

DEVOPS-888 is in Daedalus.
DEVOPS-877 -- I thought this was just a debugging change that was no user visible but actually it affects the docker image. Have added it now.


HMR fails causing a full reload of the current page

Bug report
Describe the bug
We've recently upgraded from 5.0.0 to 6.1.0 and now navigation between pages seems to be broken due to a HMR related issue. What happens is:

We navigate to a new page using a Link component
The page is built
The url changes to the target
We see a HMR related warning in the console  (see below)
The page reloads
The original url is restored (it redirects back)

To clarify as well, the components are correctly mapped to.
VM12030 main.js:42500 [HMR] The following modules couldn't be hot updated: (Full reload needed)
This is usually because the modules which have changed (and their parents) do not know how to hot reload themselves. See https://webpack.js.org/concepts/hot-module-replacement/ for more details.

VM12030 main.js:42508 [HMR]  - undefined
(anonymous) @ VM12030 main.js:42508
logUpdates @ VM12030 main.js:42507
applyCallback @ VM12030 main.js:42468
(anonymous) @ VM12030 main.js:42476
Promise.then (async)
cb @ VM12030 main.js:42475
(anonymous) @ VM12030 main.js:42487
Promise.then (async)
check @ VM12030 main.js:42486
module.exports.webpackJsonp../node_modules/webpack-hot-middleware/process-update.js.module.exports @ VM12030 main.js:42447
processMessage @ VM12030 main.js:42384
handleMessage @ VM12030 main.js:42267
handleMessage @ VM12030 main.js:42230

It sounds like the same issue as the one here: https://github.com/zeit/next.js/issues/4643
Unfortunately the module in the warning above is not specified, it's just undefined and happens intermittently. After one failure, we can retry clicking the link and it tends to work. Navigating to pages directly via urls also works as expected.
To Reproduce
Will try and create an example repo, but this could be tricky given that HMR is just kind of magically handled in the background at the moment. So any guidance would be much appreciated!

It's probably fixed in latest canary with webpack 4

@timneutkens thanks, will test and get back to you asap

That sorted it, thanks a lot @timneutkens

👌 I thought so 😄


Add support for 008/39

008/39 - Cataloging source
    # - National bibliographic agency
    c - Cooperative cataloging program
    d - Other
    u - Unknown
    | - No attempt to code_

Right now the conversions have 'nac' for this byte, and the conversions default to #, which makes sense for most LC records but not for CONSER records or records with one of the other 3 codes.
Possibly bf:AdminMetadata.source.Source.code (#/c/d/u/|) would work but it probably would be better with a subclasss of Source (bf:CatalogingSource).

this commit addresses 008/39 by tying two 042 codes to 008/39 values or if the agent is dlc, but now that blank is set by 'dlc', we think the default should be 'd'? Thanks!


feat(#178): automatic app command parsing

Fixes #178

Current dependencies on/for this PR:

main

PR #180   👈

This stack of pull requests is managed by Graphite.

Merge activity

Jan 18, 7:38 PM: @MartinBernstorff merged this pull request with Graphite.


Connecting to a faulty url, does not return an error

Describe the bug

Connecting to a server while it is down, mistyped url, or no internet connection does not result in an error. The WebSocket does not emit any event to inform its delegate that the connection failed. I found that urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) is not implemented in NativeEngine. This is the place where those errors are fired.

Steps to Reproduce

Detailed steps to reproduce the problematic behavior:

        // not an existing url
        var request = URLRequest(url: URL(string: "wss://socket.test.k2.nl/match/2xj5crhn5vhy6vmys0stkqi3s8")!)
        request.setValue(url.host, forHTTPHeaderField: "Host")
        webSocket = WebSocket(request: request)

        webSocket.onEvent = { event in
            print(event)
        }

        webSocket.connect()

run this code and break on print(event) this will not be triggered
disabling internet connection and connecting to a valid url will also not trigger an event

Expected behavior

Connecting to an unreachable server should trigger an error event.

Environment:

OS/Version: iOS 14.4
Starscream Version: 4.0.4
Xcode version: 12.5

Additional context

Add any other context about the problem here.

We also encounter this problem，I found the Starscream use NWConnection，when use unreachable URL, the NWConnection does not call it's handler, below code in WebSocket.swift:
public convenience init(request: URLRequest, certPinner: CertificatePinning? = FoundationSecurity(), compressionHandler: CompressionHandler? = nil, useCustomEngine: Bool = true) {
        if #available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *), !useCustomEngine {
            self.init(request: request, engine: NativeEngine())
        } else if #available(macOS 10.14, iOS 12.0, watchOS 5.0, tvOS 12.0, *) {
            self.init(request: request, engine: WSEngine(transport: TCPTransport(), certPinner: certPinner, compressionHandler: compressionHandler))
        } else {
            self.init(request: request, engine: WSEngine(transport: FoundationTransport(), certPinner: certPinner, compressionHandler: compressionHandler))
        }
    }

The class TCPTransport use NWConnection for data transport, so just delete the else if  as whole, or change TCPTransport to FoundationTransport


[$1000] Inconsistency in delete comment button for video file on archived workspace in web and android

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:

First open chrome web and create a new workspace
Go to announce of the created workspace and upload a video file
Next, delete the workspace and come back to the announce section again
Make sure to refresh the page
Right-click on the video file attachment and see that the delete button doesn’t appear for archived workspace
Next , open android app with the same user account and visit the announce section again
Now long press on the video file (you need to long press on the video file attachment itself) and see that the delete comment button is present. Thus, no consistency is there between web and android for archived workspace. In web ,delete comment button is not present whereas on android delete comment button is present.

Expected Result:
Android should not display the delete button for video file comments on archived workspaces
Actual Result:
The delete comment button is seen on android (incorrect), but is not seen on web chrome (correct) for video files in archived workspace
Workaround:
unknown
Platforms:

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

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

Version Number: 1.2.87-0
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:
https://user-images.githubusercontent.com/43996225/226076396-7d8b64b3-7686-4401-858a-524fcbb4fb30.mp4
https://user-images.githubusercontent.com/43996225/226076397-300fc1dc-c9f7-4db5-8e00-7451096d201f.mp4
https://user-images.githubusercontent.com/43996225/226076401-48b07fda-05df-42bf-a7d8-76551208eafa.mp4

Expensify/Expensify Issue URL:
Issue reported by: @avi-shek-jha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1679070606602909
View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~0109ece2dd91782609
Upwork Job ID:<PHONE_NUMBER>625151488
Last Price Increase: 2023-04-11

Bug0 Triage Checklist (Main S/O)

[ ] This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
[ ] This bug is not a duplicate report (check E/App issues and #expensify-bugs)

If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead

[ ] This bug is reproducible using the reproduction steps in the OP. S/O

If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
If the reproduction steps aren't clear and you determine the correct steps, please update the OP.

[ ] This issue is filled out as thoroughly and clearly as possible

Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.

[ ] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@greg-schroeder Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Back from OOO, reviewing

Confirmed with the team:

I would say the web behavior is correct - when the workspace is deleted you shouldn’t be able to edit or delete the comments in that workspace chat

Job added to Upwork: https://www.upwork.com/jobs/~0109ece2dd91782609

Triggered auto assignment to @CortneyOfstad (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (External)

Proposal
Please re-state the problem that we are trying to solve in this issue.
On Android, when a workplace is closed we can still delete the comment
What is the root cause of that problem?
We don't always pass the parameter isArchivedRoom to showContextMenu
When we don't pass the parameter isArchivedRoom it takes the value false.
We then use this value to determine if Delete comment is possible or not here:
https://github.com/Expensify/App/blob/d57b3317a61dbd77ba4810926292eb8be414abc4/src/pages/home/report/ContextMenu/ContextMenuActions.js#L240-L241
What changes do you think we should make in order to solve the problem?
We should pass the right value of isArchivedRoom in parameters of showContextMenu() here  and here
We can use the method ReportUtils.isArchivedRoom() to get the right value
What alternative solutions did you explore? (Optional)

Proposal
Please re-state the problem that we are trying to solve in this issue.
The delete comment button should not be displayed in archived workspaces on web and android platforms.
On web, the button should disappear without refreshing the page.
On android, the button should not appear at all.
What is the root cause of that problem?
The reason for this bug is that ReportActionsView does not update when the workspace is deleted, because the shouldComponentUpdate function returns false.
https://github.com/Expensify/App/blob/main/src/pages/home/report/ReportActionsView.js#L123-L170
What changes do you think we should make in order to solve the problem?
To fix this bug, we need to add the deleting conditions in the shouldComponentUpdate function as shown below.
        if (nextProps.report.stateNum !== this.props.report.stateNum) {
            return true;
        }

        if (nextProps.report.statusNum !== this.props.report.statusNum) {
            return true;
        }

This is result video.

Proposal
Please re-state the problem that we are trying to solve in this issue.
Disabled context menu actions in archived room or chronos room still showing when long-press on touchable devices
What is the root cause of that problem?

This is the logic whether to show or hide context menu action item:
https://github.com/Expensify/App/blob/3a9ce6fc59bb54d25749579be9b082c7600b235b/src/pages/home/report/ContextMenu/BaseReportActionContextMenu.js#L56-L63
So if isArchivedRoom=true or isChronosReport=true, hide delete comment here

Above function is called from here:
https://github.com/Expensify/App/blob/3a9ce6fc59bb54d25749579be9b082c7600b235b/src/pages/home/report/ContextMenu/ReportActionContextMenu.js#L20-L32

Above function is called from here when long-press report action:
https://github.com/Expensify/App/blob/3a9ce6fc59bb54d25749579be9b082c7600b235b/src/components/ShowContextMenuContext.js#L23-L35
isArchivedRoom, isChronosReport prop values are not passed - this is the main root cause

Above function is called in several places:

attachment with preview (image or pdf) - ImageRenderer
attachment without preview (file) - BaseAnchorForAttachmentsOnly
code fencing - BasePreRenderer

So when long click these, Delete comment still shows in context menu
What changes do you think we should make in order to solve the problem?
Current code used React context (provider, consumer) to share values between different components

add isArchivedRoom, isChronosReport in context provider value
https://github.com/Expensify/App/blob/3a9ce6fc59bb54d25749579be9b082c7600b235b/src/pages/home/report/ReportActionItem.js#L174-L181
update this function so add isArchivedRoom, isChronosReport at the end of params and redirect to ReportActionContextMenu.showContextMenu
https://github.com/Expensify/App/blob/3a9ce6fc59bb54d25749579be9b082c7600b235b/src/components/ShowContextMenuContext.js#L23-L35
get newly added values from context consumer (ShowContextMenuContext.Consumer) and pass them to showContextMenuForReport
https://github.com/Expensify/App/blob/3a9ce6fc59bb54d25749579be9b082c7600b235b/src/components/HTMLEngineProvider/HTMLRenderers/ImageRenderer.js#L71
https://github.com/Expensify/App/blob/3a9ce6fc59bb54d25749579be9b082c7600b235b/src/components/AnchorForAttachmentsOnly/BaseAnchorForAttachmentsOnly.js#L66-L72
https://github.com/Expensify/App/blob/3a9ce6fc59bb54d25749579be9b082c7600b235b/src/components/HTMLEngineProvider/HTMLRenderers/PreRenderer/BasePreRenderer.js#L46

NOTE: previous proposal considered only "attachment without preview" case and also not handled chronos room case.
And we don't need to handle BaseAnchorForCommentsOnly because email and link already hide delete menu regardless of archived room or chronos room.
Demo:
https://user-images.githubusercontent.com/108292595/228436695-a09d05b6-2d33-4154-9e18-6e489ae5c0a5.mov

@tylerkaraszewski @eVoloshchak @greg-schroeder this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

@ShogunFire's proposal is good, short and simple explanation. However, it won't fully resolve this issue, since it's missing isChronosReport prop.
@hoangzinh, you're proposing the approach that has already been proposed by @ShogunFire here
@podrascanindragan47's proposal uses the same approach for android, but adds the additional check for web

This bug occurs because ReportActionsView does not re-render when the workspace is deleted. The shouldComponentUpdate function prevents it from updating, so the props for report.stateNum and report.statusNum are not passed down to the children components.

Strangly, the issue description doesn't specify that there's an issue on web, expected result contains only the changes needed for android (and iOS I suppose).
@tylerkaraszewski, do we want to also fix the need to refresh the page on web/Desktop (step 4 of the actions performed above)

I think we should proceed with @situchan's proposal, it's the only proposal that correctly uses both isArchivedRoom and isChronosReport props to determine if delete button should be hidden.
@situchan, please don't post big code chunks/diffs in your proposals, you should try to explain the general idea of your proposal using human language as much as possible (you will of course still need to use some amount of code, but try to keep it minimal).
🎀👀🎀 C+ reviewed!
cc: @tylerkaraszewski

Hello @eVoloshchak , I am not sure I am allowed to argue like this, so tell me if I need to hide this comment.

@ShogunFire's proposal is good, short and simple explanation. However, it won't fully resolve this issue, since it's missing isChronosReport prop.

I think passing the right value of isArchivedRoom would resolve this issue since this issue didn't mention chronos report but only archived reports.  The fact that the delete button appears in chronos report looks like another issue so I believe my proposal was correct.

I think passing the right value of isArchivedRoom would resolve this issue since this issue didn't mention chronos report but only archived reports. The fact that the delete button appears in chronos report looks like another issue so I believe my proposal was correct.

@ShogunFire, ok, that is a very valid point.
Adding a note that we should scope issues better in the future (to include web and chronos reports in this case), but since Android should not display the delete button for video file comments on archived workspaces is the only expected result, let's disregard the rest.

Note: Before submitting a proposal on an issue, be sure to read any other existing proposals. ALL NEW PROPOSALS MUST BE DIFFERENT FROM EXISTING PROPOSALS. The difference should be important, meaningful or considerable.

This is a tough call since all proposals are almost the same, but @ShogunFire's proposal was the first to figure out the root cause and submit a general solution, all of the subsequent proposals were inspired by and enhancing it.
The fact that BaseAnchorForCommentsOnly was linked instead of BaseAnchorForAttachmentsOnly isn't critical in my opinion, that would have been resolved during the initial testing, while the general idea proposed was correct.
Sorry for the confusion everyone
🎀👀🎀 C+ reviewed!
cc: @tylerkaraszewski

The fact that BaseAnchorForCommentsOnly was linked instead of BaseAnchorForAttachmentsOnly isn't critical in my opinion

I think it's critical. I believe the contributor confused because they didn't know below 👇

And we don't need to handle BaseAnchorForCommentsOnly because email and link already hide delete menu regardless of archived room or chronos room.

Since this issue is pretty straightforward, I think the proposal should be more accurate and more general.
Similar case: https://github.com/Expensify/App/issues/15815#issuecomment-1481578255
Without my proposal, these cases would have been easily missed:

attachment with preview (image or pdf) - ImageRenderer
attachment without preview (file) - BaseAnchorForAttachmentsOnly
code fencing - BasePreRenderer

Addons: If someone reports bug in chronos case in slack, it will be marked as DUPE immediately linking to this issue, which means that should be handled here.
Based on time and efforts spent for comprehensive solution, I'd appreciate if team can consider my proposal.

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Similar case: https://github.com/Expensify/App/issues/16767#issuecomment-1494866183
The proposal who handled more cases was finally picked up.

I am inclined to agree with @eVoloshchak and give this to @ShogunFire. It's especially difficult in this sort of situation where it's easy to have one proposal or solution "borrow" from others, so I think giving it to the first viable solution seems as fair as anything.

I will follow team's decision as always. But I didn't really borrow any solution from others in this issue since they were not worth referencing.

@tylerkaraszewski @eVoloshchak @greg-schroeder this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

@tylerkaraszewski, should we proceed with @ShogunFire's proposal?

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

Sorry, yes, proceed with @ShogunFire's proposal.

@tylerkaraszewski, could you assign @ShogunFire to this job please?

Thanks @tylerkaraszewski , I will do a PR before friday.
Just to let you know, the modif works fine but on Android it seems ReportActionItem is not rerendered after the workspace is deleted so the context menu still shows the delete comment option.
To resolve that problem I am using withOnyx to rerender when the report is changed and it works fine. Now to improve performance I am thinking of using withOnyx with a selector to only render when statusNum of the report is updated.

I think there's inconsistency between selecting proposals.
i.e. https://github.com/Expensify/App/issues/17216#issuecomment-1503372765
Especially:

I know it's high competition to propose a solution, but taking your time to analyze it and having the best proposal with all the information we need to review it is better

Not overdue, PR is in review, we're close to merging it

@tylerkaraszewski, @eVoloshchak, @ShogunFire, @greg-schroeder Whoops! This issue is 2 days overdue. Let's get this updated quick!

Not overdue, the PR is in review, waiting for a final review from @tylerkaraszewski

@tylerkaraszewski, @eVoloshchak, @ShogunFire, @greg-schroeder Whoops! This issue is 2 days overdue. Let's get this updated quick!

Not overdue, this was deployed to staging yesterday

Hmm - was this deployed @eVoloshchak? I think it was but I'm not sure why the automated comment didn't happen 🤔

@greg-schroeder, yep, this was deployed to production 3 days ago.
The PR description was edited by author, I'm guessing that's why automation failed

Ahhh, got it got it

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.12-0 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

https://github.com/Expensify/App/pull/17329

If no regressions arise, payment will be issued on 2023-05-16. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

[ ] External issue reporter
[ ] Contributor that fixed the issue
[ ] Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

Merged PR within 3 business days of assignment - 50% bonus
Merged PR more than 9 business days after assignment - 50% penalty

@greg-schroeder Hello, I see that the upwork job has been closed. Do I need to do something for the paiement ? It looks like there was no regression

It was closed due to timing out, but I'll send out offers now

I might just try re-adding the label to create one tbh... stand by

@ShogunFire can you tell me your Upwork details?

Thanks! Offers sent to @ShogunFire and @eVoloshchak. Upwork is not working properly right now so I just sent contracts to you both manually.
@avi-shek-jha can you post your Upwork details so I can get you paid for reporting this?

This is paid out with the exception of @avi-shek-jha - please post your details whenever you are able and I'll get you paid for reporting this.

Thanks !

@greg-schroeder Here's my upwork profile link: https://www.upwork.com/freelancers/~01a90e548bf808418c

Thank you! Sent you an offer


intl.get(messageKey) doesn't work in non-template code

Ember 1.10.0, ember-intl 1.1.1
Console output
$E.intl.get('messages.phone')
undefined
$E.intl.get
ember.debug.js:32014 function (keyName) {
        return get(this, keyName);
      }

The above message key "messages.phone" does exist and is output correctly via template code.  Trying to use intl.get() in a component or from the browser console (the above example used the ApplicationControler as $E) always returns 'undefined'.

That's using the Ember.get accessor.  The intl-get handlebar helper is not the same this.intl.get
Are you trying to just access the a locale's message object directly?
It would be this: $E.intl._getLocaleInstance('en').get('messages')
The service doesn't expose this in any sort of API that behaves like intl-get, which walks over all the "active" locale(s) and stops at the first one that has the key.

I was trying to do a message lookup, thinking there was an analogous function to the intl-get helper.  It seems like this is needed if you want to be able to retrieve locale message strings in code in order to be able to format them with formatMessage.  Could a function like this be added?  Is there more information I could provide?

For the sake of not blocking you until I publish another release, you can move these two functions an Ember.Mixin and then you'll get the behavior you're looking for.  https://github.com/yahoo/ember-intl/blob/master/app/helpers/intl-get.js#L9-L33

Thanks Jason.  We're still in heavy development, so we can wait for the next published release.  I used your suggested code from your first response as a temporary fix just to get things working.  Thanks for being so responsive and helpful.  It's much appreciated.

This would be a great addition. I will move it to a mixin for now.

1.2.0 resolves this: https://github.com/yahoo/ember-intl/blob/master/app/services/intl.js#L192-L206
this.intl.getTranslation(key) just note that it returns a promise to handle potential future changes to lazily load translations by default.


Do we want to maintain this repo?

Hi,
I'm looking for a good tutorial on Pangeo for a workshop next week, the repo looks really promising and when testing this morning it seems to work fine. Question are:

there are a few tiny mistakes in the notebooks/Welcome.md file, do we want to fix them?
More generally do we want to maintain this? I think this is really important to have this kind of tutorial for Pangeo.
Did I miss a more up to date binder repo for doing tutorial?

there are a few tiny mistakes in the notebooks/Welcome.md file, do we want to fix them?

Yes! I have just created a branch agu2018 so we have an "archive" of the actual AGU tutorial

More generally do we want to maintain this? I think this is really important to have this kind of tutorial for Pangeo.

I am happy to repurpose this as a general-purpose pangeo tutorial. In that case, do we also want to rename it to just pangeo-tutorial?

Did I miss a more up to date binder repo for doing tutorial?

I often use https://github.com/pangeo-data/pangeo_ocean_examples/, but this is a more ocean-focused theme.

I am happy to repurpose this as a general-purpose pangeo tutorial. In that case, do we also want to rename it to just pangeo-tutorial?

I think this would be very nice to have a maintained (even if this is only a best effort) repo for all around pangeo tutorial, and this one is a good start! If several folks use it regularly, we could maintain it every time we find something wrong. But experience has shown that this is hard to prevent this kind of repo to become stale.

I've renamed this to pangeo-tutorial. I'll be spending some time here tomorrow prepping for a tutorial I'll be giving next week.

Thanks @jhamman!
I'll use it again for a tutorial early june. I'll benefit from your update!


[WIP] Test local pyspark

Description

Resolves #770
How was this PR tested?

Tested locally
Reference: https://github.com/feathr-ai/feathr/pull/797
Does this PR introduce any user-facing changes?

[x] No. You can skip the rest of this section.
[ ] Yes. Make sure to clarify your proposed changes.

Current progress
Spark has hang. Need to debug this before testing this PR form Yuqing Cat.
https://github.com/feathr-ai/feathr/issues/693

Closing this PR as a container based sandbox feature has been added, the sandbox comes with local spark, local redis, local jupyter server, local feathr registry in one docker image. For anyone who is interested to try sandbox, please check this doc https://feathr-ai.github.io/feathr/quickstart_local_sandbox.html


cpu-freq: Try powersave if ondemand is not available

Motivation for this change
This should fix default governor picking on Sandy Bridge+ chips and close https://github.com/NixOS/nixpkgs/issues/9611
Not all people monitor their CPUs at least eventually. And we don't want them to shorten lives of their machines.
Things done

[ ] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

Probably figuring correct governor on install stage and setting it at hardware-configuration.nix should be a better approach (if that's possible).

See e.g., /sys/devices/system/cpu/cpufreq/*/scaling_available_governors.

@joachifm Okay, let's try this 2c8253c325834e16251936e994c100e893d79253


How to control legend labels length ?

Please ask questions on StackOverflow: https://stackoverflow.com/questions/tagged/chart.js


Need to pass --comments option to uglify for copyright notice preservation

Have not found a simple way to do this.  Would be surprised if its not already supported.

Per #713 you should be able to pass uglify: { ouput: { comments: /your_regex/ } }

Thank you guys for the assist 'o).


Non-smooth timeline scrolling

In many cases, timeline scrolling is not smooth. This is probably due to periodic refreshes conflicting with the timeline being scrolled.

This issue wasn't noticed in recent builds.


merge onboarding+projectmanagement into a template

@KirstieJane - i really like the project management and onboarding things you have setup. i forked the project management and started turning it into a template that people could use like the software carpentry template.
i think the onboarding can be merged with it into a single template repo. any thoughts before i go ahead and do this?

Hi @satra! Sorry for the slow reply!
I don't really know why, but my gut wants to keep onboarding & project management separate. I guess I want to keep onboarding as a very focused and specific set of tasks (that are not at all currently well developed!) rather than having them get lost in the mess of the day to day projects :confused:
BUT, there's absolutely no reason that you can't merge them for a template! Please do go ahead. I might even fork it back if it looks more sensible than my first iteration! 😀


collect data for demo

we need one or more datasets for the demo.
Should we:

take a fully labelled dataset
split it into labelled and unlabelled
serve this data at the demo
collect labelling from the demo
compare labelling from the demo against the known labels, thus able to compute accuracy, etc.
Might make a nice statistic for advertising / enticing clients?

closed in favour of smaller issues. We've already got the dataset now, just need to make it square images only. As for how quickly the data can be labelled, I've added that as it's own issue #320


setup_requires is vestigial

There's some old code in the install script which is supposed to make sure all the build requirements exist:
https://github.com/scipy/scipy/blob/2ed8169c5c4c9181cd38a52db614c692eb802c15/setup.py#L508-L524
This was added to address https://github.com/scipy/scipy/issues/3379.
The same issue exists/existed for:

https://github.com/nilearn/nistats/issues/154
https://github.com/scikit-learn/scikit-learn/issues/4164 (they ended up adopting your code: https://github.com/scikit-learn/scikit-learn/issues/4164#issuecomment-76982101)
https://github.com/scikit-learn/scikit-learn/issues/4164#issuecomment-71550942
https://github.com/apple/turicreate/issues/642

However it doesn't seem to work anymore:
[kousu@laptop scipy]$ python -m virtualenv ../venv
created virtual environment CPython3.8.5.final.0-64 in 365ms
  creator CPython3Posix(dest=/home/kousu/src/neuropoly/venv, clear=False, global=False)
  seeder FromAppData(download=False, pip=latest, setuptools=latest, wheel=latest, via=copy, app_data_dir=/home/kousu/.local/share/virtualenv/seed-app-data/v1.0.1)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
[kousu@laptop scipy]$ . ../venv/bin/activate
(venv) [kousu@laptop scipy]$ python setup.py install

Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:

  - `pip install .`       (from a git repo or downloaded source
                           release)
  - `pip install scipy`   (last SciPy release on PyPI)

Traceback (most recent call last):
  File "setup.py", line 590, in <module>
    setup_package()
  File "setup.py", line 565, in setup_package
    from numpy.distutils.core import setup
ModuleNotFoundError: No module named 'numpy'

pip works
(venv) [kousu@laptop scipy]$ pip install .
Processing /home/kousu/src/neuropoly/scipy
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ...

because you have https://github.com/scipy/scipy/blob/2ed8169c5c4c9181cd38a52db614c692eb802c15/pyproject.toml.
It seems like you're maintaining the build dependencies in two places: setup.py, where they're not being maintained, and pyproject.toml. I want to remove them from setup.py.

I don't really understand what happened. Did setuptools used to work differently? It looks to me like
https://github.com/scipy/scipy/blob/2ed8169c5c4c9181cd38a52db614c692eb802c15/setup.py#L564-L565
always runs before setup() has a chance to even see setup_requires. You have that run_build flag to prevent running that code if numpy isn't installed yet, but it's not doing its job. I want to get rid of that too.

https://github.com/scikit-image/scikit-image/issues/4919 is the same issue. And they have the same problem: their setup.py unconditionally imports numpy.distutils before setup() has a chance to run to install build deps. I guess that's why https://www.python.org/dev/peps/pep-0517/ exists, because specifying build deps inside of setup.py is fraught.

Yes basically what you wrote in the very last sentence.

If that setup_requires stuff doesn't work anymore, it's probably due to changes in setuptools now that that incorporates distutils. I'd expect it to work for setuptools < 0.49.
I think removing setup_requires is a good idea, because that invokes easy_install and now that there's a good alternative (pip using pyproject.toml) there's no need for that anymore.
Removing setup.py install or other regularly used commands isn't a good idea (yet), because that will break people's workflow and pip isn't the best option for everything (especially development related activities).

On August 15, 2020 3:56:04 PM EDT, Ralf Gommers<EMAIL_ADDRESS>wrote:

Removing setup.py install or other regularly used commands isn't a
good idea (yet), because that will break people's workflow and pip
isn't the best option for everything (especially development related
activities).

Cool. I can get behind this. 🍃

Alright new day new PR: https://github.com/scipy/scipy/pull/12729

This was fixed in gh-12728, closing.


Why was Moments removed?

I see the issue here: https://github.com/sindresorhus/refined-twitter/issues/7
Just curious what the thought process was behind that. Seems like a large chunk of the platform to hide.

Probably because it's not very useful.

That's a shame. I use it every day.


Not able to cancel the order

Exception 'Lalamove\Exceptions\NotFoundException' with message 'Client error: `PUT https://sandbox-rest.lalamove.com/v2/orders/132736/cancel` resulted in a `404 Not Found` response'

there is any thing wrong let me know with cancel endpoint

@thehiddennepali does the order exist?
According to the Lalamove API v2 docs this is the correct endpoint (and HTTP method)


feat(evm): Labeled Deposit Addresses

Description
This is V2 of #2040 to fix problem noticed by @milapsheth
Hi, I made implementation of labeled deposit address. I think is good to have as a first-class feature. We add this to our fork in testing, and want to upstream back to you.
Motivation: If you consider deposit address as "payment channel", or as like CEX deposit address as sometimes referenced then it make sense to allow labeling the deposit tuple of "(ASSET, FROM_CHAIN, TO_CHAIN, TO_ADDR)" for reusing. Allows more expressive user action and relay clients can become more simple because this adds ID-addressability instead of only Content-addressability to confirm-deposit.
After first linking, user may simply request confirmdeposit on my_address, from_chain, to_chain, asset, and label such as "self-bridging" for common uses. Then client can just send this!

When LinkAddress: user MAY set label. effects: labelname->address saved in KV store.
When ConfirmDeposit: user MAY specify label name. IF they specify label then their REQUEST is modified to insert address matching label name. For maximum compatibility, only the in-flight request is modified and before all processing. So is like if user just enter this address themself.
Label is immutable, so no backrun griefing.
Todos

[x] tests
[ ] generate docs
[ ] add CLI

Hi @xyuanatbgraph, direct transfers with deposit addresses are only supported as a legacy protocol and we don't plan to add new features to it. Labeling addresses sounds to me like it should fall into the application domain and not the routing layer. Going forward, we are planning to support new connections through a new and much more flexible routing layer called amplifier based on cosmwasm smart contracts (https://github.com/axelarnetwork/axelar-amplifier). We already rolled out the ability to deploy smart contracts with the latest release (albeit for now contracts can only be deployed through a governance proposal) and the amplifier protocol is going to follow soon. Together with the interchain token service (https://docs.axelar.dev/dev/send-tokens/interchain-tokens/intro) this will make it possible to handle a much wider range of connections and use cases. With the new protocol you will be able to interact with dedicated gateway contracts, which might solve your intended use as well.
Apart from all of these reasons, the legacy deposit addresses have always been intended as throwaway addresses, so labeling them and using them for extended periods of time breaks that assumption and could lead to unintended side effects.
Therefore I'm closing this PR.


Feature request with Geoip

Can you advice how to extract asnorg and country from geoip? There are function asn and full only. Its not easy to parse the full's response in polars, or is it? Thanks

I found the struct I can parse from the full method. Its good enough. Thanks.

Thanks for checking out the plugin! Feedback welcomed how to make it easiest to use. Maybe more python interfacing to simplify the struct parsing?


⚠ Bofrost.lu has degraded performance

In dab8216, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1525 ms

Resolved: Bofrost.lu performance has improved in 9206149.


Question: $distributedTaskContext

In the following Powershell script this variable is defined but I cannot seem to find what the value is supposed to be.
I can get the Modules loaded, but cannot seem  to determine what tfs is passing to this script from the run functional tests task.

That is from the old problematic, closed source, undocumented, sealed, legacy powershell execution handler.
It would be better to use the recommended execution handlers: https://github.com/Microsoft/vsts-task-lib

does this mean that I need to update tasks for the on premise tasks for tfs?

Are you writing a custom task? Or trying to understand what an in-the-box task is doing? This repo contains the in-the-box tasks as open-source examples and we are moving away from that handler (I believe most are converted now in master). releases/m83 is what shipped TFS RTM, 89 -> update1, 95 -> update 2/3. You shouldn't update the tasks that ship in the box. Newer tasks may demand newer features (you shouldn't take master and upload it to a 2015 RTM server).

I'm trying to figure out how the inbox task is working. I can't seem to get my variables and what not straight.

So then are these modules going to be more open in the upcoming releases:
Microsoft.TeamFoundation.DistributedTask.Task.Deployment.Azure
Microsoft.TeamFoundation.DistributedTask.Task.Deployment.Chef
Microsoft.TeamFoundation.DistributedTask.Task.Deployment.Internal
Microsoft.TeamFoundation.DistributedTask.Task.Deployment.RemoteDeployment
Microsoft.TeamFoundation.DistributedTask.Task.Internal
Microsoft.TeamFoundation.DistributedTask.Task.Common
Microsoft.Teamfoundation.DistributedTask.Task.CodeCoverage
Microsoft.TeamFoundation.DistributedTask.Task.DTA

No, those are part of the legacy execution handler.
It would be better to use one of the recommended execution handlers ("node" or "powershell3"): https://github.com/Microsoft/vsts-task-lib

I've gone ahead and closed since this doesn't sound like an issue with any of the tasks in this repo and the libs should get you going in the right direction. The legacy handler you are referring to is deprecated and simply still exists for back-compat. You should use the new libs. Let me know if any issues and we can reopen or open an issue in the lib repo.


How to query local data while offline

I have two tables, one is User and the other is Todo
Due to design reasons, they are not related.
Due to design reasons, they are not associated, but the todo table has a userid field.
User Table
@JsonSerializable()
@DataRepository([JSONServerAdapter], internalType: 'user')
class User extends DataModel<User> {
  @override
  final String id;
  final String nickname;

  User({
    required this.id,
    required this.nickname,
  });
}

Todo Table
@JsonSerializable()
@DataRepository([JSONServerAdapter], internalType: 'to-do')
class Todo extends DataModel<Todo> {
  @override
  final String? id;
  final String title;
  final bool completed;
  final String? userId;

  Todo({
    this.id,
    required this.title,
    this.completed = false,
    this.userId,
  });

  Todo toggleCompleted() {
    return Todo(
      id: id,
      title: title,
      completed: !completed,
      userId: userId,
    ).withKeyOf(this);
  }
}

How to query local data when offline?
Similar to MySQL
SELECT todo WHERE userId="xxx"

Another question is, I would like to know which data was created offline or created but not uploaded to the server. How do I need to search?
Sometimes I may need to clear all local data, can this be done?
This is the issue I encountered while using Flutterdata.
I hope to get your help.🙋
thank you！👨🏻💻

At the moment it's not possible to query, but I'm working on moving the backend from Hive to a database where queries will be possible.
For things created offline AND that were attempted to sync with a server but failed, try inspecting  repository.offlineOperations.  If you did not attempt to save they will not appear there

@frank06  can you please show me example code of how to access repository.offlineOperations ???

@alexdoan102  ref.users.offlineOperations


Feature #4848(#3957)

(The migrated issue seems to be Use CommandLineParser in all C++ samples - #4848)

@kirill-kornyakov @mshabunin , take a look, please.

@alalek, could you please review it?

@mshabunin, ok, let me reassign it to you. @alalek has few other opencl-related pull requests to review

@ValeryTyumen , thank you! But why didn't you use CommandLineParser::printMessage to show help message (like here)?

@mshabunin , I thought about that and decided to leave authors' help messages because they are more readable in my opinion. For example, there is no way to mark required and optional arguments in CommandLineParser::printMessage (with square brackets like here). Also there are (here again, here, here, etc.) some help messages with the content after command line args explanation and I didn't want to mix parser.printMessage with cout and printf. If needed, I'll change it.

I suggest to use CommandLineParser::check in all examples to catch different type conversion issues during argument handling.

@mshabunin, check the update, please.

@ValeryTyumen, since your change is rather big and contains many similar problems, lets split whole task into two stages:

[ ] concentrate our efforts (development and review) on several files until we get stable working scheme
[ ] propagate this general scheme to other files

I suggest first to stabilize files 3calibration.cpp, autofocus.cpp, calibration.cpp and create_mask.cpp.

@ValeryTyumen, here is the basic scheme as I see it:

Create parser
Check if --help option has been provided and show help message if it exists or parser.printMessage otherwise (exit if help showed)
Initialize all local variables from corresponding parser fields
Call parser.check to check for conversion errors (exit if failed)
Check all passed values for consistency, do not forget to check positional variables (@inputFile) for emptyness if they are required (exit if failed)

Please let me know if you have any thoughts on this.

@mshabunin, check it, please. I tried to apply scheme in all files where it's possible. By the way, can I have your e-mail for an off-topic question?

@mshabunin, I think I fixed that

@mshabunin, check, please. Sorry for the delay.

@ValeryTyumen , please resolve merge conflicts.

@ValeryTyumen , please squash all commits into one.

@mshabunin , I am not very good at git, but I can't squash all commits because of appearing merge conflicts.

@ValeryTyumen , please this branch contains the rebased commit: https://github.com/Itseez/opencv/compare/master...mshabunin:CommandLineArgs

Moved to #5828


Problem deploying to heroku using delayed_job

From heroku support staff:
"I've taken a look and it seems to be a problem with delayed_job 3.0.0.pre.3's gemspec. This is the gemspec we're getting from rubygems.org: https://gist.github.com/1ff12f33003b44870e59
Can you reach out to the authors and ask them to repush using ruby 1.8.7. Using ruby 1.9.x seems to cause issues. We've seen this happen before."

Fixing now.

You are the man, thanks!

 Won't happen again.

Would you mind elaborating on what happened? Just curious.

Essentially what is describe in blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html
I built the gem on 1.9.3 instead of 1.8.7.

Gotcha, thanks.
On Tue, Nov 15, 2011 at 8:08 AM, Brian Ryckbost <
<EMAIL_ADDRESS>
wrote:

Essentially what is describe in
blog.rubygems.org/2011/08/31/shaving-the-yaml-yak.html
I built the gem on 1.9.3 instead of 1.8.7.

Reply to this email directly or view it on GitHub:
https://github.com/collectiveidea/delayed_job/issues/305#issuecomment-2744333


Language in constant evaluation section is unclear

This text from Constant Evaluation: Constant Expressions is a bit murky:

Certain types of expressions can be evaluated at compile time. These are called constant expressions and are required in const contexts. In other places, such as in let statements, constant expressions may be evaluated at compile time. If errors, such as out of bounds array indexing or overflow occurs, then it is a compiler error if the value must be evaluated at compile time, otherwise it is just a warning, but the code will most likely panic when run.

Suggested rephrasing:

Certain types of expressions, called constant expressions, can be evaluated at compile time. In const contexts, these are the only allowed expressions, and are always evaluated at compile time. In other places, such as in let statements, constant expressions are allowed but not required, and may be evaluated at compile time. Errors such as out of bounds array indexing or overflow are compiler errors if the value must be evaluated at compile time (i.e. in const contexts); otherwise they are just warnings, but the code will most likely panic when run.

Happy to submit a PR to that effect or similar!

The rewording seems mostly better; happy to tweak it together in a PR if you want to submit one.

Cool; I'll try to get one open tomorrow. Very happy to tweak it – I was literally just saying "I think this is what actually makes sense" and figured it was only mostly right at best! 😆


Backport/1.0/2018 08 12

This change is

This will need the same treatment as the 1.1 backport for the CT map upgrade: https://github.com/cilium/cilium/pull/5176/commits/694ed36b49d63616d1284dea79c7b4193102faa0

Decided in developer meeting that 1.0 <-> 1.2 upgrade and downgrade path is not supported. Dropping connection tracking commits.

@joestringer I've cherry picked the backports from the 1.1 branch. Please review carefully so we have a 2nd pair of eyes.

test-me-please


I added support for views into the SQLDatabase class

Currently the SQLDatabase class does not support reflecting views. These simple changes adds view support.  Made it optional with a flag in the constructor that defaults to existing behavior.

@hwchase17 : Thank you for approving the changes. How do they get merged and released.  Sorry. First time I'm contributing to a public repo.  I saw that only 3/6 lint checks passed but not sure how to resolve the issues?

@hwchase17 : Thank you for approving the changes. How do they get merged and released. Sorry. First time I'm contributing to a public repo. I saw that only 3/6 lint checks passed but not sure how to resolve the issues?

i can fix lint and then merge! will be in tmrws release

@hwchase17 : Thank you! Would love any tips on how I could have done the process completely in case I have another bug/feature to work on. Sure the issues with lint are environmental for me. Also, assuming then you'll close this PR or is that on me to do? Finally, will I be listed as a contributor once the PR is merged? Thx!

there is a make format and make lint command you can run locally that will format and lint the code respectively!

Very nice. thank you!


⚠ Secret Website 3 has degraded performance

In 7aa85f9, Secret Website 3 ($SECRET_WEBSITE_3) experienced degraded performance:

HTTP code: 200
Response time: 2279 ms

Resolved: Secret Website 3 performance has improved in d112d47.


Question: ontology terms for binary interactions

My apologies if this is of topic, but this seemed a good place to ask my question. I am retrieving protein-protein interaction information and a lot of that data is annotated with PSI-MI terms e.g. in the BioGRID database.
Now, I am only interested in binary, direct interactions i.e., no interactions through complex as is sometimes detected by e.g. co-immunoprecipitation. I am looking for an extensive list of PSI-MI terms that represent experiments only detecting binary direct interactions. I was wondering whether someone could provide some guidelines? The only answer I could find on a similar question was this stackoverflow answer: https://bioinformatics.stackexchange.com/a/740/18621

Hi,
yes, it is possible to filter for 'direct interactions'.
One easy option is to download the interactions as PSI-MI TAB 2.7 and then filter the column 'interaction Type' for 'direct interaction (MI:0407)' if you want only Interaction between molecules that are in direct contact with each other, usually identified by biophysical methodology, for the IMEx interactions you can filter directly from IntAct advanced search page (https://www.ebi.ac.uk/intact/home#advanced-search).
or
If you also want also other physical binary interaction you should include also the term 'physical association (MI:0915)'.
In IMEx consortium this is the rules that we adopt:
Any interaction in which the participants form a single n-ary complex (identified with
techniques that can ascertain that only one complex is present, like x-ray
crystallography), or a binary complex which may involve more interactors than those
identified in the experiment should be described as ‘Physical Association’. Any
interaction with the Interaction Detection Method = ‘affinity chromatography’ or one of
their children (e.g. coimmunoprecipitation, pulldown, TAP) with one bait and only ONE
prey should be mapped to ‘Physical Association’ (unless the interaction occurs in vitro
and consists of only 2 highly purified proteins in which case they should be mapped to
‘direct interaction’ (see below).
for more see: https://raw.githubusercontent.com/intact-portal/intact-portal-documentation/master/assets/intact-curation-manual.pdf

Thank you so much for the information!


As a developer, I want to hook up a DB to manage the website

Tasks

Add tables for managing users, inventory, orders, and roles

Figure out the schema for each table, which should be easy to find after looking at industry usage

Hook up the DB to the backend API code
Add documentation for DB if anyone wants to locally set-up the DB and query it

After some trial and error, using a cloud NoSQL DB is more worth it, due to the following reasons:

prior experience with noSQL DBs

less uncertainty


Added the ability to get the RAPID from a file and modified Helios generator

Coverage decreased (-0.05%) to 95.373% when pulling c5d535e94af3f9c19e40e0b72c9fe141f837127b on mgermain:heliosrapid into 99859d2e36f7c2532a344c0a05e985ba03fd9fdc on SMART-Lab:master.

Coverage decreased (-0.05%) to 95.369% when pulling 42788987f0fec72afaac4b708d09df8dcde46ae5 on mgermain:heliosrapid into 99859d2e36f7c2532a344c0a05e985ba03fd9fdc on SMART-Lab:master.

Coverage decreased (-0.05%) to 95.369% when pulling fa2b50c639a338f507f8a70459bb4dba6f940c32 on mgermain:heliosrapid into 99859d2e36f7c2532a344c0a05e985ba03fd9fdc on SMART-Lab:master.

Coverage decreased (-0.05%) to 95.369% when pulling 6e5fbc7f7fd2bd0ba2b128030f734cfb60bdac8f on mgermain:heliosrapid into 99859d2e36f7c2532a344c0a05e985ba03fd9fdc on SMART-Lab:master.


gherkin: Commented Cucumber tags still being picked up in getTags()

Summary
Commenting out a single tag above a scenario (leaving the first tag uncommented). The Scenario object still picks up the commented tag using getTags()
Expected Behavior
The expected behaviour can be seen if you comment out the entire line of tags. In this case, none of the tags are picked up by getTags()
Current Behavior
Commenting a tag at the end of a list of tags on a scenario, and checking the getTags() values. The uncommented tag(s) are visible (expected), but the commented out tag(s) are also visible. It should be noted that where the comment starts, it is added to the corresponding tag value (e.g. instead of @exampleTag, it's now #@exampleTag)

Your Environment

Version used: cucumber-jvm 4.3.1
Operating System and version: Win 10

Can confirm this bug is still present in Gherkin 8/9. Basically any line staringt with a @ is interpreted as a tag and then split by white space.

And that is exactly what happens.
FeatureHeader! := #Language? Tags? #FeatureLine DescriptionHelper

A feature header has a language definition, tags, feature line and description helper.
Tags! := #TagLine+

The tags are defined as a tag line.
    @Override
    public boolean match_TagLine(Token token) {
        if (token.line.startsWith(GherkinLanguageConstants.TAG_PREFIX)) {
            setTokenMatched(token, TokenType.TagLine, null, null, null, token.line.getTags());
            return true;
        }
        return false;
    }

Which is then matched and split on whitespace.

The go implementation is definitely different. Tokens that don't start with @ are melded into the previous tag.
func (m *matcher) MatchTagLine(line *Line) (ok bool, token *Token, err error) {
	if line.StartsWith(TAG_PREFIX) {
		var tags []*LineSpan
		var column = line.Indent()
		splits := strings.Split(line.TrimmedLineText, TAG_PREFIX)
		for i := range splits {
			txt := strings.Trim(splits[i], " ")
			if txt != "" {
				tags = append(tags, &LineSpan{column, TAG_PREFIX + txt})
			}
			column = column + utf8.RuneCountInString(splits[i]) + 1
		}

		token, ok = m.newTokenAtLocation(line.LineNumber, line.Indent()), true
		token.Type = TokenTypeTagLine
		token.Items = tags
	}
	return
}

Javascript does the same as go, but uses a different algorithm.
  public getTags() {
    let column = this.indent + 1
    const items = this.trimmedLineText.trim().split('@')
    items.shift()
    return items.map(function(item) {
      const length = item.length
      const span = { column, text: '@' + item.trim() }
      column += length + 1
      return span
    })
  }

    @property
    def tags(self):
        column = self.indent + 1
        items = self._trimmed_line_text.strip().split('@')
        tags = []
        for item in items[1:]:
            tags.append({'column': column, 'text': '@' + item.strip()})
            column += len(item) + 1
        return tags

Same for python.
So I'm confident in saying that the Java implementation of Gherkin is splitting the tags incorrectly.
However Gherkin also doesn't support comments anywhere but at the start of the line. It is not possible to comment tags inline. So the syntax highlighting in IDEA is incorrect.


sot-tools: 2.3.4-1 in 'noetic/distribution.yaml' [bloom]

Increasing version of package(s) in repository sot-tools to 2.3.4-1:

upstream repository: https://github.com/stack-of-tasks/sot-tools.git
release repository: https://github.com/stack-of-tasks/sot-tools-ros-release.git
distro file: noetic/distribution.yaml
bloom version: 0.10.1
previous version for package: 2.3.3-1

Holding for Noetic sync


Removing Melonloader folder

The Mono-2.0-bdwgc.dll inside the Melonloader folder refuses to allow me to delete it, saying some other program is using it.  Nothing else is open, tried using Process Handler to stop it there, and no dice.  Couldn't install new version of Melonloader since that folder can't be removed due to dll inside.   Was able to rename the folder and then run MelonLoader installer, and it installed successfully, EMM working find in desktop mode.  Folder and that mono-2.0-bdwgc.dll still exist, unremovable.

Try restarting your computer, or try moving the melonloader folder and deleting it after moving it.


"Duplicate function implementation" eror when loading two models with same function name

monaco-editor version: 0.20.0
Browser: Chrome
OS: Windows 10
Playground code that reproduces the issue:
var editor = monaco.editor.create(document.getElementById("container"), {
	value: "",
	language: "typescript"
});

var model1 = monaco.editor.createModel("function hello() {}", "typescript", monaco.Uri.file("foo"));
editor.setModel(model1);

var model2 = monaco.editor.createModel("function hello() {}", "typescript", monaco.Uri.file("bar"));
editor.setModel(model2);

When two models have same function implementation and connected to same editor, there is an "Duplication function implementation" error.

Looks like all models connected to an editor are treated as if they are part of the same project. Is there a way to treat each model as a separate project?

Duplicate of https://github.com/microsoft/monaco-editor/issues/1105


SOllet.io

how to switch.SOL to another wallet from sollet.io.  please help

Copy your new address and use send button in sollet to make transfer.


KAFKA-6530: Use actual first offset of message set when rolling log segment

Use the exact first offset of message set when rolling log segment. This is possible to do for message format V2 and beyond without any performance penalty, because we have the first offset stored in the header. This augments the fix made in KAFKA-4451 to avoid using the heuristic for V2 and beyond messages.
Added unit tests to simulate cases where segment needs to roll because of overflow in index offsets. Verified that the new segment created in these cases uses the first offset, instead of the heuristic in use previously.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

@hachikuji I think I addressed all review comments. Please take a look when you get a chance.

Note that the failing builds are likely a result of the bug mentioned in ReplicaManager.

The two failing tests seem unrelated. I tried to reproduce locally after rebasing the PR, but was unable to do so. I rebased and removed a couple unneeded printlns. I will merge after the new builds complete.


Documents

Please update the docs. No information present on how can i download this application on my system.

Hello and welcome to the Sphinx respository!
Since the contributors agreed that the projet is not ready yet for an "official" release, you can currently only add the project as a dependency via gradle and services like jitpack (you would need to target the master). If you wish to contribute though, all you need to do is clone the repository and make pull requests. The wiki will in the future contain resources to explain how the API internally works, for now unfortunately there is nothing else than the javadocs (which is incomplete). For now all there is is a getting started explaining how to use the API. However if you have specific questions about how it works, feel free to either ask them here or to send me an email (antoine.tran@epfl.ch).
Note that Sphinx is not a program in itself that can be run, it's an API for developers who wish to add quizzes to their own program. There is a current implementation that's the discord bot, which is present under the discord-impl folder

If you are looking for a sample program that demonstrates how to use the API, you can check an example here: https://github.com/Tran-Antoine/sphinx/tree/samples/samples/src/main/java/helloquiz


build(deps): bump sigs.k8s.io/controller-runtime from v0.11.0-beta to…

… v0.11.0
The latest release was not noticed by dependabot so update
it manually.
Signed-off-by: Mikko Ylinen<EMAIL_ADDRESS>

Codecov Report

Merging #805 (50b8b0f) into main (cc7685e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #805   +/-   ##
=======================================
  Coverage   53.70%   53.70%
=======================================
  Files          39       39
  Lines        3545     3545
=======================================
  Hits         1904     1904
  Misses       1531     1531
  Partials      110      110

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 cc7685e...50b8b0f. Read the comment docs.


Adopt a versioning scheme

We need some kind of version scheme that npm will work with.
I'd like us to either:

bump the core version bits (x.y.z)
use hyphens and/or dots (2.5.0-some.stuff-here.0).

Example: 2.5.0-node-12-4-0.0,  next patch release is 2.5.0-node-12-4-0.1
Example: 2.5.0-community.0.1.0, next patch release is 2.5.0-community.0.1.1
We can mix and match hyphens and dots, pretty much whatever way we want.
Node will treat these as "prerelease" versions.

The things I suggested above are semver compliant.
Docs: https://docs.npmjs.com/misc/semver#versions -- https://semver.org/

The things I suggested above are semver compliant.

And so is 2.5.0+0.1.0, but npm seems to chop off plus signs + and anything to the right, so we can't do that.

cc @aminya please take a look and let me know what you think when you get the time. The release we published ended up with version 2.5.0, which seems unintended given the 2.5.0+0.1.0 tag here, and the version 2.5.0+0.1.0 in our package.json.
Looks like we need to stick to hyphens and dots, no pluses.

I took 2.5.0-atomic.1

That'll work.
I think it's not super obvious in a "working with upstream" context whose that is, but it'll at least publish with that version.

Yes. That works for us. The only consumer of our apm is our Atom. So this is not important.
Closing this.

Some day I picture Atom might want our version rather than bumping theirs. Theirs is, um... I don't want to say abandonware, it's early to say that, but it almost looks like it's not maintained, period.

I think they're only updating it when Atom development absolutely demands it.
The proper Visual Studio support greater than version 2015 is a really great quality of life improvement, and I can't really picture why they haven't merged it other than they don't have the time, or they're afraid to touch it, lest it breaks.
Afraid to touch it would be very near to abandonware, except that they need it, so they will go in and fix things when absolutey needed I guess. Not a great level of maintenance that is. I'd like it to be reasonably, proactively current. And nice to use. And so on.
Okay so none of that means usptream will use our versions. And if they have thoughts and opinions about our versioning scheme, they can certainly let us know. I'm all ears, upstream, if you're reading this! Would love to work with you on this piece of the Atom ecosystem! :heart:

Upstream merged the Node v12.0.0 bump.
But we already have that change here. And updating the core version 2.5.0 --> 2.5.1 would mess with our version scheme: [core]-atomic.[atomic_version]
Let's not merge upstream to here until they add a change (a feature, a bugfix, etc.) that's not on this fork yet.
There's no reason to shake up our versioning scheme just to "integrate a change we already have" (Node 12.0.0).
Since our changes are so few, I will consider rebasing on top of upstream for this repo, but the default posture is still to just merge upstream, keeping the full preserved history. and using (non-destructive) merge commits.


Provide a minified version.

I wonder if you could provide a minified version with it? Saving some extra bytes and other tool to minify it will be great.
Thanks.

I don't see why not. New 0.1.12 ships with minified version.