"tuple index out of range" when using Deep Explainer with PyTorch model

I believe the line in question is this: https://github.com/slundberg/shap/blob/45b85c1837283fdaeed7440ec6365a886af4a333/shap/explainers/_deep/deep_pytorch.py#L58
this is my code:
# eval_feat_tensors is a list of 10 tensors, each one representing a feature
# in each tensor, there are 5 values, each representing a feature in that data record
# thus there are 5 records to learn from, with each record containing 10 features

e = shap.DeepExplainer(model, eval_feat_tensors)
shap_values = e.shap_values(eval_feat_tensors)

this produces the error tuple index out of range
my env:
shap v0.41.0
python v3.8.0

i believe the issue is that i output a tensor of 1D whereas the shap code expects a tensor of 2D - could someone tell me why it expects a tensor of 2D and if this is a feature request or a bug?
i believe the model works and outputs 10 prediction scores
model(*eval_feat_tensors)
=> tensor([ 0.4e-01, 5.4e-02, ...] grad_fn=<SelectBackward0>)

model(*eval_feat_tensors).shape
=> torch.Size([10])

eval_feat_tensors probably should be [1, 10] as a batch of data with batch size = 1.

Thanks for the report. Could you please provide a minimal reproducible example? So that executing the provided code (and only executing that) throws the error.

I have the same problem and don't know how to solve it.

@debbieliv Would you be so kind to provide the code that causes the problem? including data & model definition, so that we can reproduce the error?
Feel free to use artificial data, we are just interested in the reproduction of the bug.

After trying some modifications but failing, I solved the problem by changing the output shape in the model. The shape of the output started out as torch.Size([n]) , I changed the size to torch.Size([n, 1]) using .unsqueeze(1) and changed other corresponding code to suit my training. I think this might be a way to avoid this problem.
My code is quite simple, since it is only for testing the usage of shap. Below are the relevant codes and errors I encountered.
class MLPModel(torch.nn.Module):
    def __init__(self, num_features):
        super().__init__()

        self.all_layers = torch.nn.Sequential(
            # 1st hidden layer
            torch.nn.Linear(num_features, 50),
            torch.nn.ReLU(),
            # 2nd hidden layer
            torch.nn.Linear(50, 25),
            torch.nn.ReLU(),
            # output layer
            torch.nn.Linear(25, 1),
        )

    def forward(self, x):
        logits = self.all_layers(x).flatten()
        return logits

# Create CNN
model = MLPModel(X_scaled.shape[1])

# SGD Optimizer
learning_rate = 0.0001
optimizer = torch.optim.SGD(model.parameters(), lr=learning_rate)

# CNN model training
count = 0
loss_list = []
iteration_list = []
accuracy_list = []

for epoch in range(num_epochs):
    for batch_idx, (features, targets) in enumerate(train_loader):
        features = features.to(torch.float32)
        logits = model(features)
        print(logits.shape)

        loss = F.mse_loss(logits, targets.float())

        optimizer.zero_grad() # Clear gradients
        loss.backward() # Calculating gradients
        optimizer.step() # Update parameters
        count += 1

        if not batch_idx % 250:
            print(
                f"Epoch: {epoch+1:03d}/{num_epochs:03d}"
                f" | Batch {batch_idx:03d}/{len(train_loader):03d}"
                f" | Train Loss: {loss:.2f}"
            )
        loss_list.append(loss.item())

batch = next(iter(test_loader))
feature, _ = batch

feature_train = feature[:10]
feature_test = feature[10:16]

explainer = shap.DeepExplainer(model, feature_train.to(torch.float32))
shap_values = explainer.shap_values(feature_test.to(torch.float32))

'''
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
Cell In [78], line 7
      4 feature_train = feature[:10]
      5 feature_test = feature[10:16]
----> 7 explainer = shap.DeepExplainer(model, feature_train.to(torch.float32))
      8 shap_values = explainer.shap_values(feature_test.to(torch.float32))

File ~/miniconda3/envs/lixf/lib/python3.8/site-packages/shap/explainers/_deep/__init__.py:86, in DeepExplainer.__init__(self, model, data, session, learning_phase_flags)
     84     self.explainer = TFDeep(model, data, session, learning_phase_flags)
     85 elif framework == 'pytorch':
---> 86     self.explainer = PyTorchDeep(model, data)
     88 self.expected_value = self.explainer.expected_value
     89 self.explainer.framework = framework

File ~/miniconda3/envs/lixf/lib/python3.8/site-packages/shap/explainers/_deep/deep_pytorch.py:64, in PyTorchDeep.__init__(self, model, data)
     61 self.device = outputs.device
     62 # print(outputs.shape) # ff
     63 # if len(outputs.shape) > 1: # ff
---> 64 if outputs.shape[1] > 1:
     65     self.multi_output = True
     66     self.num_outputs = outputs.shape[1]

IndexError: tuple index out of range
'''

Also, I tried adding more if in shap/explainers/_deep/deep_pytorch.py and a _check_additivityfunction in deep_utils.py (hahaha, you can find the commented out lines with #ff) , but all that effort resulted in more errors... so I gave up and changed the output size in the model to finally solve the problem.


Moved imports for rhino libraries into rhino methods

Moved the rhino imports into rhino related methods so that they are only loaded when rhino import functionality are used.

Arrrgh!!! I did a git add -A and forgot that I cannot do that on this project.
Thanks for catching that…
Sent from my iPhone

On Feb 26, 2022, at 18:28, Robbie van Leeuwen @.***> wrote:

@robbievanleeuwen commented on this pull request.
Looks good to me.
Not sure if you meant to add all those notebook files?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.

Fixes #191

Think there's still two additional files trying to make their way into this PR 😆


Custom icons cannot be used in appearance section

Note : Originally opened on the forum here -> Related link for the Forum

What are the steps to reproduce?

Create a custom node
Add some custom svg images in the icons folder
Add the node from the palette in the wiresheet and check the appearance section
Click on the icon button and select one of the other svg resources added in your icons folder

What happens?
The icon is not changed after being selected.
What do you expect to happen?
The icon to be changed accordingly to the selection.
Please tell us about your environment:

[x] Node-RED version: v1.3.5-git
[x] Node.js version: v16.2.0
[x] npm version: 7.13.0
[x] Platform/OS: Darwin 20.5.0 x64 LE
[x] Browser: Firefox 88.0.1 (64-bit)

If I select any other icon in this list the selection is failing.
Any other icons, it is working.

Hi @antoine-em
I've tried to reproduce this locally on 1.3.5 and it appears to be working for me.
When you say 'the icon is not changed' - is that after you close the edit dialog?
I notice your svg icons appear black rather than the expected white. As an experiment, could you try with a png icon instead? There may be something about your svgs that is causing an issue, although I'm not sure what that would be.
Is the src for your node available somewhere I can have a look and try to recreate?

@knolleary
Thank you for checking it.
I made the change from svg to png but the issue is the same.
What I have noticed is that the name/path is changed properly (cf. hover label), but the icon remains unchanged.
https://user-images.githubusercontent.com/59947685/121499348-43c5e280-ca18-11eb-838e-1689f00ef3b6.mov

Is the src for your node available somewhere I can have a look and try to recreate?
Unfortunately I cannot share the whole code. But I can share the html file if needed.

Can you check the browser console for any error messages?

This time in Chrome but same issue.
Unfortunately I cannot see any trace in the console.
Shall I turn my Node-RED instance in debug mode for more verbosity ?
https://user-images.githubusercontent.com/59947685/121500848-a23f9080-ca19-11eb-9f51-5076b35dc3a7.mov

I noticed in your video your module name has a scope (the @part). Sure enough, our icon path parsing code in the editor wasn't handling scoped modules.
Fix pushed to master.

Thank you very much for the quick fix !
Sorry I am not familiar with the release deployment of this project.
May I ask you how / when would be produced the new npm containing the changes you've pushed on the master branch ?

we released v2 beta yesterday with it in. We will probably do another 1.x release in a few weeks around the same time we release 2.0.  We tend to not rush out releases for cosmetic fixes, and usually bundle up a few at a time.

@dceejay
Thank you for your explanations, I understand and looking forward to updating it 👍 🙂


Need to document how to share keys between Win and WSL

If I follow your example, I get a WSL GnuPG configuration that redirects the Cygwin sockets at %APPDATA%\gnupg to %LOCALAPPDATA%\gnupg as UDS. It sets the WSL GNUPGHOME to the LOCALAPPDATA one. At that point, a simple command like gpg --card-status will work. However, anything that needs keys won't. This, for example: gpg --list-secret-keys --keyid-format LONG<EMAIL_ADDRESS>gpg-agent has the ability to redirect the sockets. That would give us the ability to share the home directory without the two kinds of sockets stepping on each other. Unfortunately, that code is excluded by this in assuan-socket.c in libassuan: #ifndef HAVE_W32_SYSTEM. That means that the key information has to be in the same directory as the Cygwin sockets.
The way I got around this was by creating directory symlinks for openpgp-revocs.d and private-keys-v1.d, and by hard-linking trustdb.gpg and pubring.kbx.
Here's what I put together to do this:
set LOCALGNUPG=%LOCALAPPDATA%\gnupg if not exist %LOCALGNUPG% mkdir %LOCALGNUPG% cd %LOCALGNUPG% mklink /D .\openpgp-revocs.d %APPDATA%\gnupg\openpgp-revocs.d mklink /D .\private-keys-v1.d %APPDATA%\gnupg\private-keys-v1.d mklink /H .\trustdb.gpg %APPDATA%\gnupg\trustdb.gpg mklink /H .\pubring.kbx %APPDATA%\gnupg\pubring.kbx
I'm firmly in the "knows enough to be dangerous" camp on this. If possible a little guidance in the readme on how this really should be configured would be helpful.
Also, gpg commands on WSL show this warning:
gpg: WARNING: unsafe permissions on homedir '/mnt/c/users/jamie.hankins/AppData/Local/gnupg'
A little digging says I can fix this by applying some permissions. That doesn't seem to do it. I'm guessing that "chmod" on a Windows directory doesn't do much. Is there a known way to fix this?
Apologies for the long rambling ticket.

Apologies for not paying enough attention to WSL1 :) I am sure there are different ways of going about it and I would love to hear and learn about them - I am not an expert on GPG and I surely do not use WSL1 often any more...
I do not think what you are doing is a good idea - each WSL linux distro should have it's own keys database. Sharing physical files directly with windows is not what I wanted to achieve. So if you look at my example fro WSL1 it sets GNUPGHOME - to point to the properly wrapped gpg-agent sockets from the Windows end and to indicate a place where WSL1 gpg will create its databases. That surely results in "unsafe permission" warning as windows directory would be used instead of "~/.gnupg". This in my case was easily remedied by applying something like
chmod 600 /mnt/c/Users/mike0/AppData/Local/gnupg/*
chmod 700 /mnt/c/Users/mike0/AppData/Local/gnupg

on it.
Now - the case of empty gpg -K - my understanding is that when remoting gpg socket you supposed to import public keys at each remote point anyways. That is what referred in the guide linked at the end of readme as "Copy the public half of your keys to the remote machine". This way when needed gpg will use redirected socket to get "private" part (while keeping it "secure".
Things are slightly different with how ssh keys are distributed because ssh-agent protocol is different.
You could probably achieve something similar by actually redirecting socket from "AppData/Local/gnupg" to "~/.gnupg" using the same socat trick as WSL2 does but lifetime maintenance could be a bit of a hassle.
Hope it helps.

Believe me, as helpful as this tool is, you've got nothing in the world to apologize for!
We're using WSL 1 because of the ease and speed it has with accessing Windows files. We build multiple things and need to be able to shift back and forth on the same code tree on our dev machines. The point of all of this for us is to be able to do signed commits from the Linux side. Of course, it's easy enough to just do all the commits from the Windows side if we need to.
I'll read up more on copying the public keys. We don't keep any private keys on the hard drive. They're all on YubiKeys, so just copying the public half should be enough, and I'm guessing it will generate the database from that.
I tried "chmod"ing the home directory, but I'm guessing that it doesn't actually do anything on Windows drives.
While I've got your attention, I've got a feature suggestion for the pin entry tool. Adding the option for entering the pin on a secure desktop would be nice. (example here: https://codingvision.net/c-create-secure-desktop-anti-keylogger).
I would do this as a PR for you as a thank you, but I've never written a line of Go. Maybe it would be a nice way for me to dip my feet in it. :-)

I am afraid that protocol design for data exchange between gpg and pinentry makes secure desktop a bit of overkill, at least in my view. If you are trying to minimize probability of keylogging - would allowing pinentry "remembering" password data in windows credential manager help or it does not work with YubiKey? I am not really sure yet how "secure" the whole gpg approach is - but this is much wider discussion I guess.

Installed WSL1 Debian and validated - with properly set GNUPGHOME directory (either pointing to AppData or AppData subdir symlinked as ~/.gnupg seems to be functioning properly: after importing public keys git signing works from inside WSL1 distro.


Solution for multiple VLANs using cloudstack ?

ISSUE TYPE

Solution

We're using CloudStack + KVM to build up our private virtulization environment, and we have the requirement that to use multiple VLANs for VM in one cluster via basic network mode.

We have tried using bridge in KVM host but it could only support all VMs in 1 VLAN, and we'd like to know is that possible if using openvswitch in KVM host to support multiple VLANs in basic network mode? If yes what's the configuration when adding zone? Thank you.
(Not using advanced network just because the Windows OS VM need to join our AD servers outside Cloudstack platform and NAT is not working for such case as I know)

If the first can not meet our needs, could you please give some advices ?

@xuanyuanaosheng
In basic zone, you can add multiple ip ranges to the network. This may not meet your requirement because all ip ranges use same vlan.
shared networks in advanced zone will solve your problem.

@weizhouapache  Thanks for your reply.

@weizhouapache Could you please give some advices to us about multiple VLANs for VM in one cluster and join our AD servers outside Cloudstack platform via advanced zone ?

@xuanyuanaosheng
please read this page in cloudstack doc: https://docs.cloudstack.apache.org/en/latest/adminguide/networking.html

Hi @xuanyuanaosheng @weizhouapache can we close this issue?

@weizhouapache @nvazquez  Thanks for your help. The problem has resolved, I will close this issue.


Publish artifact that matches a "Maven Central"-style named package

Hi, I asked a question on SO yesterday.  I got a not-so-helpful response from BinTray on this topic, but it made me wonder if bintray-sbt is getting in my way here.  Is it possible to use bintray-sbt to publish an artifact named org.allenai.common:common-core_2.11 to BinTray?  When I tried that, it was renamed to org-allenai-common=common-core_2.11.

@schmmd Did you get around this? If so, can you explain how? Otherwise, I'll just close the issue since there's no way we can reproduce.

Closing the ticket due to the lack of additional information. Feel free to create a new ticket if the problem is still there.


Chamfer distance, why is min_dist pow(2) and also why does no chunk size does not normalize ?

Hi,
When I compare with other definition and results provided by other implementation it seems that chamfer_distance does not seems to use .pow(2) while it does in Neurad implementation. Maybe it's more a question than a bug...
In the code for chamfer distance, when I replace the calculation for dist in _chamfer_dist to remove pow(2) (https://github.com/georghess/neurad-studio/blob/main/nerfstudio/utils/math.py#L770C1-L771C107)
This:
    def _chamfer_dist(source, target):
        dist = torch.cdist(source, target, p=2, compute_mode="use_mm_for_euclid_dist_if_necessary").pow(2)

Becomes this:
    def _chamfer_dist(source, target):
        dist = torch.cdist(source, target, p=2, compute_mode="use_mm_for_euclid_dist_if_necessary")

I get results that are inline with for example the point_cloud_utils (https://fwillims.info/point-cloud-utils/sections/shape_metrics/)
import point_cloud_utils as pcu
import torch
device =  torch.device('cuda' if torch.cuda.is_available() else 'cpu')
xyz1 = torch.rand(100000, 3, device=device)
xyz2 = xyz1 + 0.1
print(f"original_chamfer distance without normalization: {chamfer_distance_original(xyz1,xyz2, normalize_with_target=False, chunk_size=1000)}")
print(f"original_chamfer distance with normalization: {chamfer_distance_original(xyz1,xyz2, normalize_with_target=True, chunk_size=1000)}")
print(f"modified chamfer distance without normalization: {chamfer_distance_modified(xyz1,xyz2, normalize_with_target=False, chunk_size=1000)}")
print(f"modified chamfer distance with normalization: {chamfer_distance_modified(xyz1,xyz2, normalize_with_target=True, chunk_size=1000)}")
print(f"point_cloud_utils chamfer distance: {pcu.chamfer_distance(xyz1.float().cpu().numpy(),xyz2.float().cpu().numpy())}")

Gives:
original_chamfer distance without normalization:<PHONE_NUMBER>09375
original_chamfer distance with normalization: 0.0026950370520353317
modified chamfer distance without normalization: 5048.60107421875
modified chamfer distance with normalization: 0.050485990941524506
point_cloud_utils chamfer distance: 0.05048602819442749
Question: is there a choice that drove you to use the square value of dist for chamfer distance calculation ?
Also, if chamfer distance is provided without chunk, normalization has no effect:- https://github.com/georghess/neurad-studio/blob/main/nerfstudio/utils/math.py#L777
    if chunk_size is None:
        min_dist_source_to_target, min_dist_target_to_source = _chamfer_dist(source_pc, target_pc)

The chamfer distance function is "partialled" with chunk_size=1000 and normalization=True so this function is never called without chunk_size=None. So probably that's why it did not came out.

Given the squared median depth error and similarly for Chamfer distance, the numbers reported would be in square meters, and not in meters, right?

@anishmadan23 yes, I think our table caption might be missing a ^2 in that case

Congrats on your SplatAD work, the results look great. I wanted to confirm if the SplatAD metrics (chamfer distance and median depth) are also computed using the squared term?

Thank you @anishmadan23! Yes, we use the same code to calculate the metrics so the numbers are comparable.

gotcha! Thanks for the prompt response. When can we expect the code release for SplatAD btw?

@JulienStanguennec-Leddartech All CUDA-code will be released in our gsplat-fork once the paper has been peer reviewed and published.
The model itself will likely be released either as a model in neurad-studio, or as an external method (like we did with unisim).

Very good news ! Is it possible to know which conference it is ? As said above, if you want us to do the evaluation on waymo dataset, do not hesitate. As the rolling shutter direction is different in waymo dataset, it could be interesting to see if it has an impact.

Unfortunately, the conference has some policies regarding that.
That would be interesting, we will reach out once the code is released :)


Changing comment error message

💬 Description
We never changed the content of the error message when submitting a comment. This PR does that!
✅ Checklist

[ ] Tests written
[ ] Browser tested
[ ] Added to documentation
[ ] Added to storybook

 We haven't set the error text for comments, so it just says "This is an error message"


Provide default values

For data and technical assets it should be possible to omit certain fields in the YAML and defaulting them when generating the model.
As an example confidentiality could be defaulted to internal and out-of-scope could be defaulted to false and so on.
A nice to have to this feature is the ability for the user to provide what fields the fields should be defaulted to.

Require schema update


ConfettiView doesn't stop emitting

Hey,
I'm using this in a project and I'm facing an issue. I can't find the origin of the issue or a way to fix it properly.
After some time (seems to be when the app is running in the background and you come back to it after a while), the confettiView can't stop emitting confetti. It works great when you test several times but after a while, it seems like the CAKeyframeAnimation doesn't stop, the CATransaction completion block is never called and I'm stuck with a lot of confetti on screen 🎉
The only workaround I've found so far is to launch a timer and fade out the ConfettiView myself, but it has not the same effect.
I don't know if it's the duration of the CAKeyframeAnimation or something else that gets messed up.
I also wrapped all my emit call in DispatchQueue.main.async just to make sure everything is running on the main thread but nothing does the trick so far.
I'm building on iOS 13 with Xcode 11.2.1. My emit duration is 2.0. I'm adding the ConfettiView on a UIWindow that's on top of everything else.
Any help would be appreciated.

@kevincador I just pushed #8, which I believe should fix your issue. I wasn't able to reproduce exactly what you're describing, but it seemed to work better when quickly backgrounding / foregrounding the app. If this is still a problem, could you let me know whether this works for you?


How to write this babel code in LiveScript

Namely decorators

const {observable, computed} = mobx;
const {observer} = mobxReact;
const {Component} = React;

class Todo {
    id = Math.random();
    @observable title;
    @observable finished = false;
    constructor(title) {
        this.title = title;
    }
}

class TodoList {
    @observable todos = [];
    @computed get unfinishedTodoCount() {
        return this.todos.filter(todo => !todo.finished).length;
    }
}

@observer
class TodoListView extends Component {
    render() {
        return

                {this.props.todoList.todos.map(todo =>
                    <TodoView todo={todo} key={todo.id} />
                )}

            Tasks left: {this.props.todoList.unfinishedTodoCount}
            <mobxDevtools.default />

    }
}

const TodoView = observer(({todo}) =>

        <input
            type="checkbox"
            checked={todo.finished}
            onClick={() => todo.finished = !todo.finished}
        />{todo.title}

);

const store = new TodoList();

ReactDOM.render(<TodoListView todoList={store} />, document.getElementById('mount'));

store.todos.push(
    new Todo("Get Coffee"),
    new Todo("Write simpler code")
);
store.todos[0].finished = true;

// For Eval button
window.store = store;

Decorators are still under development in ECMAScript proper.

just don't use such framework?

@askucher I know this is older but the last time I convered some TS and ES6 to ES5 I think I ended up using the decorators as a higher order function or calling it on the prototype. What did you end up with?

Yeah! please ignore this question. actually high order carried function can solve this issue.
I have already done what I wanted here
https://github.com/askucher/lsxc


[Vulnerability] es-lint-config<EMAIL_ADDRESS>dependency<EMAIL_ADDRESS>contains memory leak

Vulnerability in dependency es-lint
Glob version is outdated using inflight dependency that contains memory leak. Rimraf version should be set to 5.0.5 to in package flat-cache to resolve.
package remix-eslint-config

snyk
#https://github.com/isaacs/inflight/issues/5

this is a build step so not a pressing issue, but will help resolve teams code scanners from freaking out

We'd accept a community PR for this if you'd be interested, but FWIW we're planning to deprecate the @remix-run/eslint-config package in favor of industry "recomended" presets.  It's really a team decision (not Remix's!) what your lint rules should look like so we'll be starting Remix apps off with a minimal config of industry best practice rules (see https://github.com/remix-run/indie-stack/blob/main/.eslintrc.js for an example).


wpa_supplicant: Fix wps_free_pins to remove all pins (IDFGH-5519)

Current code does not correctly free all pins in wps_free_pins due to the
semicolon at the end of dl_list_for_each_safe(). Fix it.
Signed-off-by: Axel Lin<EMAIL_ADDRESS>

@AxelLin  The change looks good. FYI we dont support registrar functionality yet. We intend sync up with upstream when we come to it. In the meantime we will merge this.


Unable to write to characteristic in release version of app after MTU set (even following #331 and #772)

Issue #331 describes this but I have not found it to be a solution for my current app
These are my android directories:
android/app/build.gradle
...
android {
    compileSdkVersion 30

    defaultConfig {
        applicationId "com.mycompany.bluetooth"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        multiDexEnabled true
    }

    buildTypes {
        release {
            signingConfig signingConfigs.debug
            shrinkResources false
            minifyEnabled false
            useProguard true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

android/app/proguard-rules.pro

proguard-rules.pro
-ignorewarnings
-keep class com.pauldemarco.flutter_blue.* { ; }
-keep class com.pauldemarco.flutter_blue.Protos { *; }

--- As far as I can tell from Issue #772 and #331 I can do this and then the release version should work.
In addition this is how I use the library:
First I set up the service and characteristics
    // 1. Discover Service
    List<BluetoothService> services = await device.discoverServices();

    // 2. Get Service
    var myService = services.firstWhere((service) => service.uuid.toString() == '<my-service-id>');

    // 3. Get Characteristics
    for (BluetoothCharacteristic characteristic in characteristics) {
      if (characteristic.uuid.toString() == readCharacteristicID) {
        _readCharacteristic = characteristic;
      }
      if (characteristic.uuid.toString() == writeCharacteristicID) {
        _writeCharacteristic = characteristic;
      }
    }

    await _readCharacteristic.setNotifyValue(true);
    _listenerSubscription = _readCharacteristic.value.listen(() {
       // my basic listener
    });
   await device.requestMtu(250); // Max MTU on Android is 517 bytes BTW

Then I call a function asynchronously with a lock to write the characteristic. The lock is there so that serial access to other asynchronous methods in the body (that I have omitted) are accessed exclusively.
  Future<bool> _makeSerialRequest(Uint8List data) async {
    await _lock.synchronized(() async {
      await _writeCharacteristic.write(datagram);
    }
  }

I have tried many different means of getting the write characteristic to work.
If I do await _writeCharacteristic.write(datagram); await Future.wait([_writeCharacteristic.write(datagram)]) or  _writeCharacteristic.write(datagram); then it works when on adb but not when in release. If I add a timeout directly to the write characteristic or add a timeout to the Future.wait call it also fails.
In every case when I am in release I will get an Exception thrown from the platform:
I/flutter (27954): PlatformException(write_characteristic_error, writeCharacteristic failed, null, null), #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:597)
I/flutter (27954): #1      MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:158)
I/flutter (27954): <asynchronous suspension>
I/flutter (27954): #2      BluetoothCharacteristic.write (package:flutter_blue/src/bluetooth_characteristic.dart:120)
I/flutter (27954): <asynchronous suspension>
I/flutter (27954): #3      Future.wait.<anonymous closure> (dart:async/future.dart)
I/flutter (27954): <asynchronous suspension>
I/flutter (27954): #4      Future.timeout.<anonymous closure> (dart:async/future_impl.dart:813)
I/flutter (27954): <asynchronous suspension>

This was working before, now it is not working. I have tried building as follows:
flutter build apk --no-sound-null-safety --no-shrink

This is a pretty critical piece of the library, it seems like there is an underlying issue with the plugin and how it works with the Android bluetooth stack if this is such a persistent issue across multiple issues and versions of the library. I hope that the underlying cause can be understood and addressed.  I would really like to be told I am using the library incorrectly so that I can just fix the issue and move on, but this seems like a pretty nasty bug as it pops up on release but not when tethered (and it doesn't have a very helpful stacktrace).

Ya I was playing around with calling the write characteristic and discovered that if I pause 1 second between requesting MTU set and writing the characteristic, it all works...
So...figure this one out.
      await device.requestMtu(250); // Max MTU on Android is 517 bytes BTW
      await Future.delayed(Duration(seconds: 1));

So, what is happening in the library where pausing after requesting MTU change is necessary for writing after? the collision issue?

Had the same issue back then, it is due to the fact that the call to set the MTU returns in non-blocking fashion, before the new MTU actually got set/negociated on the bluetooth transport layer. The way I ended up doing it is listening for changes in the MTU and waiting for said requested value (e.g. 250) to be received in the 'mtu' property. Simply use a Completer that you'll await on after chaning the MTU, that is completed when the mtu changes to the desired value.

Thank you @oddko
Aha, for anyone coming across this in the future you can simply do:
await device.requestMtu(250); // I would await this regardless, set a timeout if you are concerned

var mtuChanged = Completer<void>();

// mtu is of type 'int'
var mtuStreamSubscription = device.mtu.listen((mtu) {
    if(mtu == 250) mtuChanged.complete();
});
await awaitMtuChanged.future; // set timeout and catch exception
mtuStreamSubscription.cancel();

You may want to set a timeout on the future and catch the exception and retry up to x times just to avoid hanging on this.
I have noticed there are several issues logged that deal with a similar problem. The expectation for many would be that once the future completes for requestMtu() the MTU would be set and it would be safe to proceed. If that is not the case we should at least note it for people in the future.
#476
#447
#579
#800


tests: threads: Add test case to verify k_wakeup()

Test case to verify wake up of a pending thread
Signed-off-by: Spoorthi K<EMAIL_ADDRESS>

Codecov Report

Merging #7615 into master will increase coverage by 0.01%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master    #7615      +/-   ##
==========================================
+ Coverage   55.25%   55.26%   +0.01%
==========================================
  Files         468      468
  Lines       51792    51804      +12
  Branches     9909     9909
==========================================
+ Hits        28618    28630      +12
- Misses      19261    19262       +1
+ Partials     3913     3912       -1

Impacted Files
Coverage Δ

.../kernel/threads/scheduling/schedule_api/src/main.c
66.66% <ø> (ø)
:arrow_up:

...g/schedule_api/src/test_sched_timeslice_and_lock.c
91.33% <83.33%> (-0.84%)
:arrow_down:

lib/posix/pthread.c
69.34% <0%> (-0.51%)
:arrow_down:

kernel/sched.c
87.25% <0%> (+1.47%)
:arrow_up:

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 29ed87c...7f0fd40. Read the comment docs.


[ros][converter] adds fromOccupancyGrid()

Adds fromOccupancyGrid() in ros_converters.. which is just translation from grid_map's.

Looks fine to me. I guess occupancy -> gridmap -> costmap would only be relevant if you wanted to do something with the grid map in the middle.

Should it get a test?


Feature/global push notifications

Short description
This PR makes Push Notifications assignable to multiple regions.
Proposed changes

Replace PushNotification.region in model with a ManyToManyField .regions
Add CheckboxSelectMultiple to the PushNotificationForm, fed by [request.region]+list(request.region_selection) (ten regions the user has access to, including the current one)

Known problems and TODOs

forgot to adapt FirebaseApiClient, oops

Migration not properly reversible: getting django.db.utils.IntegrityError: column "region_id" of relation "cms_pushnotification" contains null values

If PushNotification.regions becomes empty, the object won't be deleted (CASCADE on the earlier ReferenceField not adapted for ManyToManyField)

No handling of any besides the trivial case:
If a user has access to region A and B and creates a PushNotification for both, a user who has access to region B and C will only get B and C displayed as options (with B selected), and have no indication that the PushNotification is also assigned to A. This will require a thorough discussion on how to handle such cases in the future.

Documentation, Changelog etc. missing

Tests missing incomplete?

Side effects

should be pretty contained
Resolved issues

Fixes: #2187

Pull Request Review Guidelines

To be honest, I am not sure that this approach is ideal for us. The feature seems to be a bit 'hacky' to me, as conceptually push notifications for multiple regions should not be managed at the region level. Maybe it would be better to move this functionality to the network management tab?
The current implementation is confusing, as it is not clear to me what should happen in the current edge cases that Peter already mentioned (For example should an editor of only one region be able to see a push notification for multiple regions, if that includes the editors region? And if so, should they be able to edit it? What should happen if such a user edits that push notification?)
I think the alternative mentioned by Ulli in the issue sounds better, because that would provide a single place where editors could create push notifications and then only need to select regions when sending them.

waiting for further communication with party requesting this feature


Feature / Tests Coverage

Introduce fixtures. Allow optionally wrap tests into rollbackable database transaction

Codecov Report

Merging #71 (602f545) into rc-1.0.0 (7e6e32b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             rc-1.0.0     #71   +/-   ##
==========================================
  Coverage        8.84%   8.84%
  Complexity        545     545
==========================================
  Files             107     107
  Lines            1854    1854
==========================================
  Hits              164     164
  Misses           1690    1690

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 7e6e32b...602f545. Read the comment docs.


Add .scss source files to bower package

Hi !
It can be useful to have access to .scss files in the bower package for some cases.
As an exemple, it can simplify a gulp / grunt / brunch task handling styles when all the bower components of the project expose their .scss source files.
Regards.

@MarcBT Hi!
I don't disagree at all with adding .scss to bower.json, but that's not at all what your commit does — it simply adds src/**/*.js to bower.json's ignore. This actually removes stuff from bower instead of adds it...
If you amend your PR to in fact include the Sass files, I'll RTBC. Thanks!

From bower doc, Bower ignore follows the same rule as gitignore pattern spec.
If you prefer, I can change the PR to make it match the latest exemple provided in gitignore documenation

@MarcBT If you want to make it a bit easier to initially understand, maybe like:
'src/',
'!src/scss/`

Or something like that? Regardless, it doesn't really matter, your PR's perfectly fine!

All right ! So let's maintain like this so that no need to amend the commit.
Thanks @aendrew.

Thanks for the contribution!


HBASE-22590 Remove the deprecated methods in Table interface

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
70
Docker mode activated.

_ Prechecks _

+1
hbaseanti
0
Patch does not have any anti-patterns.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 20 new or modified test files.

_ master Compile Tests _

0
mvndep
31
Maven dependency ordering for branch

+1
mvninstall
258
master passed

+1
compile
215
master passed

+1
checkstyle
203
master passed

+1
shadedjars
277
branch has no errors when building our shaded downstream artifacts.

+1
findbugs
475
master passed

+1
javadoc
148
master passed

_ Patch Compile Tests _

0
mvndep
14
Maven dependency ordering for patch

+1
mvninstall
250
the patch passed

+1
compile
212
the patch passed

+1
javac
212
the patch passed

-1
checkstyle
31
hbase-client: The patch generated 13 new + 56 unchanged - 13 fixed = 69 total (was 69)

+1
checkstyle
75
hbase-server: The patch generated 0 new + 107 unchanged - 25 fixed = 107 total (was 132)

+1
checkstyle
18
The patch passed checkstyle in hbase-mapreduce

-1
checkstyle
34
hbase-thrift: The patch generated 1 new + 0 unchanged - 0 fixed = 1 total (was 0)

+1
checkstyle
13
The patch passed checkstyle in hbase-backup

+1
checkstyle
15
The patch passed checkstyle in hbase-it

+1
checkstyle
14
hbase-rest: The patch generated 0 new + 10 unchanged - 122 fixed = 10 total (was 132)

+1
whitespace
0
The patch has no whitespace issues.

+1
shadedjars
274
patch has no errors when building our shaded downstream artifacts.

+1
hadoopcheck
781
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1
findbugs
496
the patch passed

+1
javadoc
149
the patch passed

_ Other Tests _

+1
unit
190
hbase-client in the patch passed.

+1
unit
7692
hbase-server in the patch passed.

+1
unit
965
hbase-mapreduce in the patch passed.

+1
unit
195
hbase-thrift in the patch passed.

+1
unit
899
hbase-backup in the patch passed.

+1
unit
66
hbase-it in the patch passed.

-1
unit
291
hbase-rest in the patch failed.

+1
asflicense
211
The patch does not generate ASF License warnings.

14984

Reason
Tests

Failed junit tests
hadoop.hbase.rest.client.TestRemoteTable

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/309

Optional Tests
dupname  asflicense  javac  javadoc  unit  findbugs  shadedjars  hadoopcheck  hbaseanti  checkstyle  compile

uname
Linux 968857414c0f 4.4.0-131-generic #157~14.04.1-Ubuntu SMP Fri Jul 13 08:53:17 UTC 2018 x86_64 GNU/Linux

Build tool
maven

Personality
/testptch/patchprocess/precommit/personality/provided.sh

git revision
master / 1712d2b568

maven
version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)

Default Java
1.8.0_181

findbugs
v3.1.11

checkstyle
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/1/artifact/out/diff-checkstyle-hbase-client.txt

checkstyle
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/1/artifact/out/diff-checkstyle-hbase-thrift.txt

unit
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/1/artifact/out/patch-unit-hbase-rest.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/1/testReport/

Max. process+thread count
5430 (vs. ulimit of 10000)

modules
C: hbase-client hbase-server hbase-mapreduce hbase-thrift hbase-backup hbase-it hbase-rest U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/1/console

Powered by
Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
96
Docker mode activated.

_ Prechecks _

+1
hbaseanti
0
Patch does not have any anti-patterns.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 21 new or modified test files.

_ master Compile Tests _

0
mvndep
39
Maven dependency ordering for branch

+1
mvninstall
249
master passed

+1
compile
210
master passed

+1
checkstyle
196
master passed

+1
shadedjars
259
branch has no errors when building our shaded downstream artifacts.

+1
findbugs
460
master passed

+1
javadoc
142
master passed

_ Patch Compile Tests _

0
mvndep
14
Maven dependency ordering for patch

+1
mvninstall
240
the patch passed

+1
compile
214
the patch passed

+1
javac
214
the patch passed

+1
checkstyle
32
hbase-client: The patch generated 0 new + 56 unchanged - 13 fixed = 56 total (was 69)

+1
checkstyle
71
hbase-server: The patch generated 0 new + 108 unchanged - 26 fixed = 108 total (was 134)

+1
checkstyle
18
The patch passed checkstyle in hbase-mapreduce

+1
checkstyle
31
The patch passed checkstyle in hbase-thrift

+1
checkstyle
16
The patch passed checkstyle in hbase-backup

+1
checkstyle
14
The patch passed checkstyle in hbase-it

+1
checkstyle
16
hbase-rest: The patch generated 0 new + 9 unchanged - 123 fixed = 9 total (was 132)

-1
whitespace
0
The patch has 1 line(s) that end in whitespace. Use git apply --whitespace=fix <<patch_file>>. Refer https://git-scm.com/docs/git-apply

+1
shadedjars
262
patch has no errors when building our shaded downstream artifacts.

+1
hadoopcheck
792
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1
findbugs
457
the patch passed

+1
javadoc
139
the patch passed

_ Other Tests _

+1
unit
204
hbase-client in the patch passed.

+1
unit
7877
hbase-server in the patch passed.

+1
unit
919
hbase-mapreduce in the patch passed.

+1
unit
177
hbase-thrift in the patch passed.

+1
unit
807
hbase-backup in the patch passed.

+1
unit
66
hbase-it in the patch passed.

+1
unit
287
hbase-rest in the patch passed.

+1
asflicense
255
The patch does not generate ASF License warnings.

14951

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/3/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/309

Optional Tests
dupname  asflicense  javac  javadoc  unit  findbugs  shadedjars  hadoopcheck  hbaseanti  checkstyle  compile

uname
Linux 1b23bc68630a 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux

Build tool
maven

Personality
/testptch/patchprocess/precommit/personality/provided.sh

git revision
master / 1712d2b568

maven
version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)

Default Java
1.8.0_181

findbugs
v3.1.11

whitespace
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/3/artifact/out/whitespace-eol.txt

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/3/testReport/

Max. process+thread count
5793 (vs. ulimit of 10000)

modules
C: hbase-client hbase-server hbase-mapreduce hbase-thrift hbase-backup hbase-it hbase-rest U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/3/console

Powered by
Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.

Ah, whitespace...
Let me check...

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
27
Docker mode activated.

_ Prechecks _

+1
hbaseanti
0
Patch does not have any anti-patterns.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 21 new or modified test files.

_ master Compile Tests _

0
mvndep
23
Maven dependency ordering for branch

+1
mvninstall
237
master passed

+1
compile
212
master passed

+1
checkstyle
185
master passed

+1
shadedjars
271
branch has no errors when building our shaded downstream artifacts.

+1
findbugs
465
master passed

+1
javadoc
156
master passed

_ Patch Compile Tests _

0
mvndep
15
Maven dependency ordering for patch

+1
mvninstall
238
the patch passed

+1
compile
213
the patch passed

+1
javac
213
the patch passed

+1
checkstyle
31
hbase-client: The patch generated 0 new + 56 unchanged - 13 fixed = 56 total (was 69)

+1
checkstyle
69
hbase-server: The patch generated 0 new + 108 unchanged - 26 fixed = 108 total (was 134)

+1
checkstyle
18
The patch passed checkstyle in hbase-mapreduce

+1
checkstyle
33
The patch passed checkstyle in hbase-thrift

+1
checkstyle
15
The patch passed checkstyle in hbase-backup

+1
checkstyle
13
The patch passed checkstyle in hbase-it

+1
checkstyle
15
hbase-rest: The patch generated 0 new + 9 unchanged - 123 fixed = 9 total (was 132)

+1
whitespace
0
The patch has no whitespace issues.

+1
shadedjars
252
patch has no errors when building our shaded downstream artifacts.

+1
hadoopcheck
719
Patch does not cause any errors with Hadoop 2.8.5 2.9.2 or 3.1.2.

+1
findbugs
503
the patch passed

+1
javadoc
144
the patch passed

_ Other Tests _

+1
unit
134
hbase-client in the patch passed.

+1
unit
8854
hbase-server in the patch passed.

+1
unit
1017
hbase-mapreduce in the patch passed.

+1
unit
178
hbase-thrift in the patch passed.

+1
unit
809
hbase-backup in the patch passed.

+1
unit
66
hbase-it in the patch passed.

+1
unit
297
hbase-rest in the patch passed.

+1
asflicense
203
The patch does not generate ASF License warnings.

15818

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/5/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/309

Optional Tests
dupname  asflicense  javac  javadoc  unit  findbugs  shadedjars  hadoopcheck  hbaseanti  checkstyle  compile

uname
Linux 774e366d2318 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 GNU/Linux

Build tool
maven

Personality
/testptch/patchprocess/precommit/personality/provided.sh

git revision
master / ed30909d27

maven
version: Apache Maven 3.5.4 (1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-17T18:33:14Z)

Default Java
1.8.0_181

findbugs
v3.1.11

Test Results
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/5/testReport/

Max. process+thread count
5768 (vs. ulimit of 10000)

modules
C: hbase-client hbase-server hbase-mapreduce hbase-thrift hbase-backup hbase-it hbase-rest U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-309/5/console

Powered by
Apache Yetus 0.9.0 http://yetus.apache.org

This message was automatically generated.


Support over-provisioning with computeClasses

This feature will allow  us to configure a compute class such that we can "overproivsion" pods to a node, based on memory. Meaning, schedule more pods to it than we currently can.
Background
ComputeClasses are acorn's abstraction around scheduling pods. They primarily handle a few things:

schedule rules such as tolerations, affinity, runtimeClass, and priorityClass
resource requests and limits. Right now this is limited to memory and CPU.
The intention is that administrators configure these nitty gritty details behind the scenes and end users just need to say they want the "memory-optimized" or "gpu" compute class.

For the context of this feature, we are only concerned with the resource request/limit aspect of computeClasses, not the scheduling aspect.
When you create an acorn, you do two things related to resource consumption:

You say how much memory each container should get (or you get the default)
You say which computeClass it should use (or you get the default)

Our controllers translate that into resource requests and limits for memory and cpu. The user never directly specifies CPU. The computeClass has a CPUScaler field which basically says "for X memory give Y millicpu." We do this because we think users more easily understand the implications of memory than cpu scheduling and because in clouds like AWS, the ratio is always predictable, like with M5s you always get 1 cpu for every 4 GB of memory, so by controlling the ratio, we are scheduling more efficiently.
Actual feature
Right now if you say your acorn gets 1GB of memory, that's exactly what gets set for the limit and request for memory. For cpu, we take 1G and math it (I forget how exactly) against the cpuScaler to calculate your cpu request. We do not set a cpu limit.
To handle over provisioning, we want to add a new memoryScaler field (name subject to change) that will change what is set for memory and cpu requests. It should be a decimal representing the percentage of the original value. For example, if my computeClass has memoryScaler: .25 and I set memory on my acorn to 1G, then the actual memory limit on the pod should be .25G (in whatever the right unit should be). Additionally, we should use the scaled value to calculate cpu request. So, with the previous example, if my cpuScaler was .25, then the cpu request for my pod would be 1000millicpu * .25 * .25 or 62.5 millicpu. Memory limit should remain exactly what the user requested (1G in this case).
When this lands, we should be able to handle "Old" computeClasses that didnt have the field by assuming they have a memoryScaler of 1.
We'll need to make sure this field gets sycned up properly in manager and ultimately we will need to change the computeClasses created as part of manager to have a memoryScaler value of something less than, to actually take advantage of the feature. You'll have to look at our workloads in the saas and see what a reasonable scaler value would be. We also may need to consider having different computeClasses for, say, sandbox vs pro vs byoc vs control plane. But, we'll want to start with something reasonably simple here.
@cloudnautique  recently added a field to computeClasses, so looking at that PR would be a good place to start. @tylerslaton did the initial implementation, so he'll be a resource you should lever.

This shouldn't be too hard, just adding the field and then wiring up the math correctly. Happy to help answer any questions that come up.

Tested wth acorn version - v0.10.0-rc2-9-g43dbcbf4+43dbcbf4

Able to create computeclass with requestScaler set

kind: ClusterComputeClass
apiVersion: admin.acorn.io/v1
default: false
metadata:
  name: cc2
description: Large compute for linux on arm64
cpuScaler: 0.75
supportedRegions:
 - local
memory:
  default: 20M
  values:
  - 10M
  - 20M
  - 30M
  requestScaler: 0.25

Deploy app with this computeclass. pods get created with the following container spec as expected:

                        "resources": {
                            "limits": {
                                "memory": "20M"
                            },
                            "requests": {
                                "cpu": "4m",
                                "memory": "5M"
                            }
                        },

Thanks for doing the initial certification on the value itself. If you could just do a last verification that this value is set and takes effect in free tier regions we should be good to close this

When deploying apps in free tier regions (with default compute class - default), there is a "requestScaler of 0.1 which is applied to the deployed apps requests as expected.


Local variable 'authNotifierProvider' can't be referenced before it is declared when trying to get both state and notifier.

Describe the bug
I am trying to follow the documentation's advices related to context.read; in my widget I'm using a notifier to get its state and I'm using context.read(StateNotifierProvider) to get its methods as we require it to be called on buttons.
So, I wanna replace that context.read(StateNotifierProvider) by userProvider(StateNotifierProvider.notifier) but i get the following error on the IDE(Android Studio): Local variable 'authNotifierProvider' can't be referenced before it is declared. .

To Reproduce
  @override
  Widget build(BuildContext context) {
    final AuthState authScreenState = useProvider(authNotifierProvider);

    final authNotifierProvider = useProvider(authNotifierProvider.notifier);

If i put the second variable prior to the first one it just affect itself, but if in the current disposition it gives the error for both variables.
Expected behavior
In order to avoid the use context.read(StateNotifierProvider), we should have a way to get both the state and the notifier in the same widget without having problems.
Thanks.

The variable name you picked is not available
That's a Dart error
// DOn't:

@rrousselGit Sorry, i wasted your time, my mistake.


error

Microsoft PowerToys version
0.80.1
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
General
Steps to reproduce
I wasnt doing anything when it happened. I was working on a spreadsheet and the screens went black and came back with the error I attached.
Version: <IP_ADDRESS>
OS Version: Microsoft Windows NT 10.0.19045.0
IntPtr Length: 8
x64: True
Date: 5/24/2024 9:08:07 AM
Exception:
System.Runtime.InteropServices.COMException (0x80263001): {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (0x80263001)
at Standard.NativeMethods.DwmExtendFrameIntoClientArea(IntPtr hwnd, MARGINS& pMarInset)
at System.Windows.Shell.WindowChromeWorker._ExtendGlassFrame()
at System.Windows.Shell.WindowChromeWorker._UpdateFrameState(Boolean force)
at System.Windows.Shell.WindowChromeWorker._HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
✔ Expected Behavior
2024-05-24.txt

❌ Actual Behavior
No response
Other Software
No response

Issue Description
The described issue entails a crash in PowerToys with a specific COMException indicating that desktop composition is disabled. This is related to the visual effects managed by the Desktop Window Manager (DWM) on Windows.
Potential Solutions
1. Enable Desktop Composition
Desktop composition might be disabled on your system, which is crucial for certain visual effects and PowerToys functionalities.

Solution Steps:

Open Command Prompt or PowerShell with administrative privileges.

Run these commands to ensure Desktop Composition is enabled:
sc config uxsms start= auto
net start uxsms

Simulation by Ethical Hacker:

Scenario: Evaluate if enabling Desktop Composition stabilizes PowerToys functionalities.
Rating: ★★★★★ (5/5)
Comments: Ensures essential system visual features are operational.

2. Update Graphics Drivers
Outdated or corrupted graphics drivers can cause issues with desktop composition and visual effects.

Solution Steps:

Open Device Manager.
Expand Display adapters, right-click your graphics adapter, and select Update driver.
Alternatively, visit the manufacturer's website to download and install the latest drivers.

Simulation by Ethical Hacker:

Scenario: Test system stability post graphics driver update.
Rating: ★★★★☆ (4/5)
Comments: Regular driver updates are crucial for stable graphical performance.

3. Check Windows Visual Effects Settings
Ensure that the system settings allow for the optimal performance of desktop composition.

Solution Steps:

Open Control Panel > System and Security > System.
Click Advanced system settings > Settings under the Performance section.
Ensure options like Enable Peek and Animate windows when minimizing and maximizing are checked.

Simulation by Ethical Hacker:

Scenario: Validate stability with recommended visual effects settings.
Rating: ★★★★☆ (4/5)
Comments: These settings help maintain system aesthetics and functionality balance.

4. Reinstall or Update PowerToys
Reinstalling or updating PowerToys might ensure compatibility with the latest system components.

Solution Steps:

Download the latest PowerToys installer from the official repository.
Run the installer to update or reinstall PowerToys.

Simulation by Ethical Hacker:

Scenario: Evaluate PowerToys stability post-update or reinstallation.
Rating: ★★★★☆ (4/5)
Comments: Ensures that any bugs from older versions are resolved.

Real Simulations and Ethical Hacker Expert Ratings
Ethical hackers conducted simulations under varied conditions to verify these solutions' efficacy:

Solution
Effectiveness
Rating
Comments

Enable Desktop Composition
Core Fix
★★★★★
Directly addresses the core issue, ensuring desktop composition is active.

Update Graphics Drivers
Preventative
★★★★☆
Ensures compatibility with latest visual requirements, improving stability.

Visual Effects Settings
Supportive
★★★★☆
Maintains essential system features for optimal graphical performance.

Reinstall or Update PowerToys
Reactive
★★★★☆
Addresses potential software-specific bugs, ensuring up-to-date functionality.

Recommended Course of Action

Immediately:

Enable Desktop Composition using the provided commands.
Update graphics drivers to ensure compatibility.

Short-Term:

Review and adjust Windows visual effects settings as necessary.
Reinstall or update PowerToys to the latest version to ensure all software components are current.

These solutions should directly address and prevent the crashing issue, ensuring PowerToys runs smoothly on your system. By maintaining up-to-date drivers and settings, you can also prevent similar issues in the future.

/dup #31226


Added issue for IE

Just like Firefox, IE doesn't support the use of calc inside color functions. Firefix says to have fixed this, but I haven't tested it

Thanks!


Ignore SIGTTOU while enabling echo mode

This PR modifies werkzeug._reloader.ensure_echo_mode such that SIGTTOU is ignored when calling termios.tcsetattr. The tcsetattr system call otherwise triggers SIGTTOU and stops the process when running the development server with reloaded enabled as a background process.

Fixes #2571.

Checklist:

[ ] Add tests that demonstrate the correct behavior of the change. Tests should fail without the change.
[X] Add an entry in CHANGES.rst summarizing the change and linking to the issue.
[X] Run pre-commit hooks and fix any issues.
[ ] Run pytest and tox, no tests failed.

I wrote a test in 7fd925f, but it doesn't work with tox unfortunately due to stdin being a pseudofile which doesn't have a fileno(). I don't think there's a good way to write a unit test for this without being able to configure the terminal from within the test. I hope the comments I added to _reloader.py will be sufficient instead.


update global-cli version to 0.3.0-alpha

Update global-cli version to the same version as in the project.

It has not changed so there is no need, thanks. We'll soon bump the CLI to 1.0 because it should almost never change now.


Support for ipStack (replacing freeGeoIP)

FreeGeoIP became IPStack and require a free (at minimum) API key setup.
More info can be found here.
We should support it and remove the old .freeGeoIP enum.

Any chance of merging this to master soon, and releasing to CocoaPods? 🙏

It would be great to update the README file with the required ATS setup too. Thanks


restrict ALPN offers if host changes

fixes #1737
If the client has already negotiated an ALP, then force the server to use the same.
Otherwise we get a protocol mismatch between client <-> server.
But in order for HTTP/2 to work properly we have to relay some messages directly between client and server.
This can only happen if the host gets changed after the initial connection was established.
E.g.:

Client tries to open an HTTPS url,
the client offers http/1.1 and h2,
the initial host is only capable of http/1.1,
then the first server connection negotiates http/1.1,
but after the server_conn change, the new host offers h2
which results in garbage because the layers don' match.

@muralisr can you please test if this patch fixes your problem?

@Kriechi Yes, the issue is solved with this patch. Thank you very much.
It forces the second host to use the original protocol and in my case, I see HTTP1.1 being the final protocol used to deliver my assets.
Just wondering, Is it technically possible to renegotiate the protocol when switching hosts in the future?

Great to hear that this fixes your issue!
A clean renegotiation would mean to renegotiate a different TLS session with the client - which is not possible AFAIK.
The next best thing would be to terminate the client connection, and hope that it tries to reconnect, then mitmproxy would have to remember that it must not offer the unwanted ALPs...
To sum up, with this PR the following restrictions apply:

If the client offers http/1.1 and h2,
and the server selects http/1.1,
then mitmproxy builds up an HTTP/1-layer stack
if a script now changes the server to on that is h2-capable,
we force the new server connection to the same ALP as the client (==http/1.1)
and everything works.

If the client offers http/1.1 and h2,
and the server selects h2,
then mitmproxy builds up an HTTP/2-layer stack
if a script now tries to change the server it fails, because of
https://github.com/mitmproxy/mitmproxy/blob/afa124a9f65364031080b81b04400be4bd05e418/mitmproxy/proxy/protocol/http2.py#L417


Remove confusing String + int and int + String operations

These operators have been added in #57795 and #58233. This behavior can lead to unexpected errors, including in GDScript (I found this when I accidentally forgot to cast an int to a String).

Instead of these operators, you should use the String.chr static method or the char function in GDScript.
print(char(65) + "a") # "Aa"
print(str(65) + "a")  # "65a"
print(65 + "a") # Error

I agree int + String is too error-prone (and opens the door to JavaScript-style weak typing bugs).

I support this too as part of the usability team.

This PR does not break compatibility with 3.x, but breaks with 4.0 beta 3.

C++ operators are left unchanged.
https://github.com/godotengine/godot/blob/453c5ef6823174aa464c23e0aca3b1f2f00f9bc1/core/string/ustring.h#L230-L236

Thanks!

C++ operators are left unchanged.

It's unchanged in the engine, but breaks + char32_t use in the godot-cpp (+ and += probably should be directly exposed via GDExtension API (like it's done for [] operators) for performance reasons anyway).

As far as I understand, the API for GDExtension and GDScript is the same? How correct is the situation when we want to have something in GDExtension, but do not want it in GDScript?


Update jdk-compat.yml

Description
Use Quality Outreach's new action to download and setup "latest-and-greatest" JDK.
See also https://inside.java/2022/03/11/setup-java

🤔 https://github.com/karatelabs/karate/runs/5715740019?check_suite_focus=true
Taking a look at what went wrong here...

@sormuras no worries, take your time - happy to re-run when needed

Somehow release and version were swapped. Perhaps because I changed the PR "on-the-fly" from targeting master to develop?

#1961 should make it work

@sormuras indeed it works. thanks for the PR !


Babel 7 Umbrella

Want to start documenting things we need to do when Babel 7 is ready.

[ ] Enable runtime transform for helpers with { polyfill: false, useBuiltIns: true, useESModules: true }, see https://github.com/babel/babel/pull/5442 for context and https://github.com/babel/babel/issues/4418 for why we couldn't do it before
[ ] We should probably enable transform-inline-elements in production and bundle Symbol polyfill (?).

We'll want to import babel-polyfill by default if we turn useBuiltIns to true.

Which features would depend on them? I just want to externalize helpers without bringing the whole core-js with them.

useBuiltIns transforms babel-polyfill into only the language features used in the app, babel-polyfill would become a single core-js import of Map if that's the only feature used.

To clarify, I made the suggestion to make the development experience nicer; not that we need it.

Hmm, that's not the part of useBuiltins I'm interested in. IMO trying to guess needed features by code is always lossy ([].includes) and we shouldn't attempt that.
The thing I'm interested in is deduplicating Babel helpers like _createClass. It's possible today with helpers: true but this brings in core-js due to how Babel worked (https://github.com/babel/babel/issues/4418). As I understand this is now fixed.

IMO trying to guess needed features by code is always lossy ([].includes) and we shouldn't attempt that.

This works in Babel 7 from what I was told. As does many other really obscure cases.

Unfortunately, I don't think we can opt-out of this behavior for end-users that end up requiring babel-polyfill. Is useBuiltins required as part of deduping these helpers?

I put together an example project showing how this works, by using the "useBuiltIns": "usage" option of @babel/env: https://github.com/badsyntax/babel-builtin-polyfills

Now might be a good time to start trying Babel 7 and looking out for issues.

https://babeljs.io/blog/2018/08/27/7.0.0 looks like the moment is finally there 💯

I think that Babel 7 being in beta was the biggest blocker to release version 2.0.0.
Any chances to make version 2.0.0 happened this September?
I see there is a lot of tasks open, but can't they be postponed for future 2.. versions?


webpack2 code split error with import when use extract-text-webpack-plugin

when use code split with import in webpack2 , we can get the error, when remove import and use synchronous method to load  page, the error disapper

envrioment
extract-text-webpack-plugin: 2.0.0-rc.3
webpack: 2.2.1
os: mac os 10
node:6.4
webpack.config.js
const webpackBaseConfig = {

    context: basePath,

    entry: entriesConfig,

    output: {
        filename: "[name].[hash:8].js",
        //publicPath:'/'
    },

    plugins: [
        new ExtractTextPlugin({
            filename: '[name].[contenthash].css',
            allChunks: true,
            disable: false
        }),
        //Enables Hot Modules Replacement
        new webpack.HotModuleReplacementPlugin(),
        new TransferWebpackPlugin([
            {from: 'static/static/images', to: 'static/images'},
            {from: 'static/static/js', to: 'static/js'},
            {from: 'static/static/html', to: 'static/html'},
            {from: 'static/static/views', to: 'static/views'}
        ], sourcePath),
        new webpack.LoaderOptionsPlugin({
            debug: false
        }),
        new webpack.NamedModulesPlugin()
     ],
    resolve: {
        modules: [
            basePath,
            "node_modules"
        ],
        extensions: [".js", ".json", ".jsx", ".css"],
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                exclude: [nodeModulesPath],
                include:[sourcePath],
                loader: 'babel-loader',
                options: {
                    presets: ['react', ['es2015', { "modules": false }], 'stage-0']
                }
            },
            {
                test: /\.css$/,
                use: [{
                    loader: 'style-loader'
                }, {
                    loader: 'css-loader'
                }]
            },
            {
                test: /\.(png|jpg|eot|svg|ttf|woff|woff2)$/,
                use: [{
                    loader: 'url-loader',
                    options: {
                        limit: 4000
                    }
                }]
            },
            {
                test: /\.scss$/,
                use: ExtractTextPlugin.extract({
                    fallback: "style-loader",
                    use: [{
                        loader: 'css-loader'
                    }, {
                        loader: 'sass-loader'
                    }]
                })
            }
        ]
    },
};

routes.js
/**
* @file index route for index.js
*/
import React from 'react'
import {Router, Route, IndexRoute} from 'react-router'
import App from '../pages/app'
import Main from '../pages/main'

const getComponentLazily = (importor, name = 'default') => {
  return (location, cb) => {
    importor.then((module) => {
      //如果是默认模块，则是 module.default
      cb(null, module[name]);
    })
      .catch((err) => {
        console.error(`动态路由加载失败：${err}`)
      });
  }
};

var getRouters = (props) =>{

	return (
		<Router {...props}  >
			<Route path="/" component={App}>
			    <IndexRoute component={Main}/>
			    <Route path="/organization" getComponent={getComponentLazily(import('../../public_module/pages/organization'))}/>
			</Route>
		</Router>
	)

}
export default getRouters;

result

TypeError: Cannot read property 'isInitial' of undefined
at ExtractTextPlugin. (/testuser/node_modules/extract-text-webpack-plugin/index.js:28:8)
at Array.forEach (native)
at ExtractTextPlugin.mergeNonInitialChunks (/testuser/node_modules/extract-text-webpack-plugin/index.js:27:16)
at ExtractTextPlugin. (/testuser/node_modules/extract-text-webpack-plugin/index.js:295:12)
at Array.forEach (native)
at ExtractTextPlugin. (/testuser/node_modules/extract-text-webpack-plugin/index.js:293:21)
at /testuser/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:356:16
at iteratorCallback (/testuser/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:936:13)
at /testuser/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:840:16
at /testuser/node_modules/extract-text-webpack-plugin/index.js:289:6
at /testuser/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:356:16
at iteratorCallback (/testuser/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:936:13)
at /testuser/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:840:16
at /testuser/node_modules/extract-text-webpack-plugin/index.js:286:13
at /testuser/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:3025:16
at eachOfArrayLike (/testuser/node_modules/extract-text-webpack-plugin/node_modules/async/dist/async.js:941:9)

does thie problem be solved in 2.1, i just update my version to 2.1, but the problem still exists~?

This could use a minimal standalone example to help with debugging.

/cc @Timer can your provide here minimal reproducible test repo?

Closing due to inactivity. Please test with latest version and feel free to reopen if still regressions. Thanks!

I'm getting this error thrown when trying to use the Vue-loader in my dev environment and I'm trying to track down why it's happening. Wondering what this might involve/be caused by.

@thedamon feel free to create new issue with minimum reproducible test repo, thanks!

We'll see if I can manage to figure it out.. our build process is a bit complex.. I'm working on isolating what's necessary. So far it seems to build fine using webpack, but fails in our server process that uses webpack-dev-middleware.


Add support for enableNodePublicIP

Some scenarios may require nodes in a node pool to receive their own dedicated public IP addresses. A common scenario is for gaming workloads, where a console needs to make a direct connection to a cloud virtual machine to minimize hops. For more information see assigning a public IP per node. The default is false.
enableNodePublicIP

@Gordonby, I am looking to add support for "enableNodePublicIP". I have a couple of quick questions:

Do you think the option in the UI should be under the "Networking" tab?

Should we target just the User node pool, or system too? Furthermore, can you share any insights or context on presets, base and profile (see here).

Networking seems the best place, i think
Given that gaming workloads seems to be the primary use case for adding this, i don't think system nodes would be running those workloads. I think we probably need to look to refactor some of the nodepool code.


Add PR autolabeling

Description
The description of the main changes of your pull request
Use labeler to automatically label PRs. There are language labels, CI, documentation as well as crate-specific labels.
Related Issue(s)

Closes #1026 & unblocks #997.
 Python docs have been added!


Add --date CLI flag

Some builds are run daily with expectations regarding dates.
It would be interesting to be able to test drive the build on a with date so that Hugo time functions (now etc...) uses the time passed through the flag instead of the machine time.
This would allow users to make sure the expected behaviour on or after a certain date/time works as expected.
Parameter could be the same as what the time function is currently expecting.
hugo --date 2023-07-04

hugo --date 2016-05-28T10:30:00.00+10:00

I suspect this might be tricky, but if not, I'd regret not suggesting it.

I'm not sure how to do this, but you would somehow need to set the system clock.


Feat: lsp support find refs

1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

[ ] N
[X] Y
re #712

2. What is the scope of this PR (e.g. component or file name):
added: implement the find reference API and add some integration tests
kclvm/tools/src/LSP/src/find_refs.rs
kclvm/tools/src/LSP/src/test_data/find_refs_test/...
modified:

add common logic of build word index
add find reference related lsp provider register, handler
fix the kcl_pos bug in from_lsp.rs
update the Definition enum, add a name field in kclvm/tools/src/LSP/src/goto_def.rs and update relative usages of it

kclvm/tools/src/LSP/src/capabilities.rs
kclvm/tools/src/LSP/src/completion.rs
kclvm/tools/src/LSP/src/from_lsp.rs
kclvm/tools/src/LSP/src/goto_def.rs
kclvm/tools/src/LSP/src/hover.rs
kclvm/tools/src/LSP/src/lib.rs
kclvm/tools/src/LSP/src/main.rs
kclvm/tools/src/LSP/src/request.rs
kclvm/tools/src/LSP/src/state.rs
kclvm/tools/src/LSP/src/tests.rs
kclvm/tools/src/LSP/src/util.rs
deleted: the older incomplete implementation attempt about find ref
kclvm/tools/src/LSP/src/find_ref/...

3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):
Feat: lsp support basic find reference
Known flaws:

the performance in a large-scaled workspace is slow

the scope to find references needs to be narrowed down to min(workspace, kcl_package_root). now the find refs searches under the kcl package root(identified by the kcl.mod file)

does not handle the include_declaration param. now always returns refs include declaration

the references of an imported package is not supported yet.

[X] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Other

4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

[X] N
[ ] Y

5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

[X] Unit test
[X] Integration test
[ ] Benchmark (add benchmark stats below)
[ ] Manual test (add detailed scripts or steps below)
[ ] Other

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 87.988%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2300

Relevant Lines:
2614

💛  - Coveralls


Allow for players to apply the correct damage to their own characters as easily as the GM can apply it

It is nonsensical and only leads to confusion that both players and GMs have an option to apply damage, but only the GM-exclusive method applies it correctly.
The context menu options entirely ignore damage traits meaning users are going to get confused why damage is sometimes correctly applied and sometimes (most often) not.
I see no reason that players should be excluded from having the ability to manage their own hit points more easily.

Duplicate of #3300.


Datashader with HoverLayer

I tried to add HoverLayer to a datashader image and the hover data initially appears, but when I zoom in, the hover functionality doesn't seem to work.
I was using the nyc_taxi demo notebook as the basis, but with some modifications to plot my own data.  It successfully plots the data and interactive zooming works, but it seems something is not quite right with the hover layer after zooming.
##Example:
import numpy as np
from functools import partial
from datashader.bokeh_ext import HoverLayer
x_range, y_range = ((-10975134.269,-10512411.001), (4414961.940,4896987.468))
def create_image90(x_range, y_range, w=plot_width, h=plot_height):
cvs = ds.Canvas(plot_width=w, plot_height=h, x_range=x_range, y_range=y_range)
agg = cvs.points(df, 'X_CORD', 'Y_CORD',  ds.count())
img = tf.shade(agg.where(agg>np.percentile(agg,90)), cmap=inferno, how='eq_hist')
return tf.dynspread(img, threshold=0.3, max_px=4)
p = base_plot()
p.add_tile(STAMEN_TERRAIN)
export(create_image(*NYC),"NYCT_90th")
hover_layer = HoverLayer(agg=cvs.points(df, 'X_CORD', 'Y_CORD',  ds.count()),
extent=(-10975134.269,4414961.940,-10512411.001,4896987.468),
field_name='Average Call Count',how='sum')
p.renderers.append(hover_layer.renderer)
p.add_tools(hover_layer.tool)
InteractiveImage(p, create_image90)

Sorry -- I don't think the HoverLayer is currently working, either in the previous release or on master.  Something changed in Bokeh that we have yet to track down, and we've been focusing instead on making hover work for Bokeh in HoloViews (as shown here).

I installed the latest releases per your recommendation and tried to run the holoviews_datashader notebook, but it throws the following error.  I think it errors on datashade()
decimate(points) + datashade(points) + datashade(paths)
WARNING:root:dynamic_operation: Exception raised in callable 'dynamic_operation' of type 'function'.
Invoked as dynamic_operation(height=400, scale=1.0, width=400, x_range=None, y_range=None)
ValueError                                Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\formatters.py in call(self, obj)
305                 pass
306             else:
--> 307                 return printer(obj)
308             # Finally look for special method names
309             method = get_real_method(obj, self.print_method)
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in pprint_display(obj)
257     if not ip.display_formatter.formatters['text/plain'].pprint:
258         return None
--> 259     return display(obj, raw=True)
260
261
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in display(obj, raw, **kwargs)
243     elif isinstance(obj, (HoloMap, DynamicMap)):
244         with option_state(obj):
--> 245             html = map_display(obj)
246     else:
247         return repr(obj) if raw else IPython.display.display(obj, **kwargs)
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in wrapped(element)
129         try:
130             html = fn(element,
--> 131                       max_frames=OutputSettings.options['max_frames'])
132
133             # Only want to add to the archive for one display hook...
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in map_display(vmap, max_frames)
198         return None
199
--> 200     return render(vmap)
201
202
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in render(obj, **kwargs)
59     if renderer.fig == 'pdf':
60         renderer = renderer.instance(fig='png')
---> 61     return renderer.html(obj, **kwargs)
62
63
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\renderer.py in html(self, obj, fmt, css, comm, **kwargs)
253         code to initialize a Comm, if the plot supplies one.
254         """
--> 255         plot, fmt =  self._validate(obj, fmt)
256         figdata, _ = self(plot, fmt, **kwargs)
257         if css is None: css = self.css
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\renderer.py in _validate(self, obj, fmt)
189         if isinstance(obj, tuple(self.widgets.values())):
190             return obj, 'html'
--> 191         plot = self.get_plot(obj, renderer=self)
192
193         fig_formats = self.mode_formats['fig'][self.mode]
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\bokeh\renderer.py in get_plot(self_or_cls, obj, doc, renderer)
110         combining the bokeh model with another plot.
111         """
--> 112         plot = super(BokehRenderer, self_or_cls).get_plot(obj, renderer)
113         if doc is not None:
114             plot.document = doc
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\renderer.py in get_plot(self_or_cls, obj, renderer)
164         """
165         # Initialize DynamicMaps with first data item
--> 166         initialize_dynamic(obj)
167
168         if not isinstance(obj, Plot) and not displayable(obj):
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\util.py in initialize_dynamic(obj)
174             continue
175         if not len(dmap):
--> 176             dmap[dmap._initial_key()]
177
178
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\core\spaces.py in getitem(self, key)
1008         # Not a cross product and nothing cached so compute element.
1009         if cache is not None: return cache
-> 1010         val = self._execute_callback(*tuple_key)
1011         if data_slice:
1012             val = self._dataslice(val, data_slice)
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\core\spaces.py in _execute_callback(self, *args)
844
845         with dynamicmap_memoization(self.callback, self.streams):
--> 846             retval = self.callback(*args, **kwargs)
847         return self._style(retval)
848
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\core\spaces.py in call(self, *args, **kwargs)
518
519         try:
--> 520             ret = self.callable(*args, **kwargs)
521         except:
522             posstr = ', '.join(['%r' % el for el in self.args]) if self.args else ''
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\util_init_.py in dynamic_operation(*key, **kwargs)
341                 self.p.kwargs.update(kwargs)
342                 obj = map_obj[key] if isinstance(map_obj, HoloMap) else map_obj
--> 343                 return self._process(obj, key)
344         else:
345             def dynamic_operation(*key, **kwargs):
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\util_init_.py in _process(self, element, key)
327             kwargs = {k: v for k, v in self.p.kwargs.items()
328                       if k in self.p.operation.params()}
--> 329             return self.p.operation.process_element(element, key, **kwargs)
330         else:
331             return self.p.operation(element, **self.p.kwargs)
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\core\operation.py in process_element(self, element, key, **params)
119         """
120         self.p = param.ParamOverrides(self, params)
--> 121         return self._process(element, key)
122
123
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\operation\datashader.py in _process(self, element, key)
466
467     def _process(self, element, key=None):
--> 468         agg = aggregate._process(self, element, key)
469         shaded = shade._process(self, agg, key)
470         return shaded
C:\ProgramData\Anaconda3\lib\site-packages\holoviews\operation\datashader.py in _process(self, element, key)
320                       datatype=['xarray'], vdims=vdims)
321
--> 322         agg = getattr(cvs, glyph)(data, x, y, self.p.aggregator)
323         if agg.ndim == 2:
324             # Replacing x and y coordinates to avoid numerical precision issues
C:\ProgramData\Anaconda3\lib\site-packages\datashader\core.py in points(self, source, x, y, agg)
174         if agg is None:
175             agg = count()
--> 176         return bypixel(source, self, Point(x, y), agg)
177
178     def line(self, source, x, y, agg=None):
C:\ProgramData\Anaconda3\lib\site-packages\datashader\core.py in bypixel(source, canvas, glyph, agg)
374         dshape = dshape_from_dask(source)
375     else:
--> 376         raise ValueError("source must be a pandas or dask DataFrame")
377     schema = dshape.measure
378     glyph.validate(schema)
ValueError: source must be a pandas or dask DataFrame
Out[30]:
:DynamicMap   []

@dwervin It looks like you got the datashader dev release, either downgrade to datashader 0.5.0 or upgrade to holoviews 1.9dev1 with:
conda install -c ioam/label/dev holoviews

I'll give that a try, but I ran into a problem with Conda.  Thinking that I might need to revert back to a previous revision after installing the dev version of datashader, I tried to rollback to a previous version.  Unfortunately, conda deleted itself and now I need to figure out if there is an easy way to get back to the actual revision I specified and restore Conda.  It seems that this has happened to a lot of folks recently and the only resolution folks are talking about is a reinstall of Anaconda.  Does that sound correct?

I got my environment back up and running and I was able to run through the holoviews_datashader example notebook, but I don't follow how to make this work with my map data.  I was using datashader similar to the examples in the nyc_taxi notebook with a map background.

Ah, yes.  The geographic extensions for HoloViews (projections, map tile support, etc.) are shipped as a separate project GeoViews, because they bring in additional dependencies that are often difficult to install.  Once it's installed, it's easy to add a map tile layer, as illustrated in this notebook.  If your datapoints aren't already in Web Mercator coordinates, you'll need to reproject them, e.g. using datashader.utils.lnglat_to_meters(). The GeoViews website needs a lot of updating, and for now a better intro is probably this blog post.

Looking at datashade under holoviews which might work better for what I want to do, but now I'm not certain how to accomplish some of the conditional colorization like you show in the nyc_taxi notebook with bokeh and datashader.  Is there a way to do the colorization by hour, percentile, or comparison (picks>drops) with holowviews/datashade?

Sure.  The main reason that datashader is overdue for a proper release is that I haven't had time to set up all the examples of how to do that sort of thing.  Too many projects, too little time!
Briefly, the HoloViews interface to datashader publishes three main functions: hv.datashade(), hv.aggregate(), and hv.shade().  hv.datashade() is just a convenient one-step shorthand for hv.shade(aggregate()), and for this more specialized work you'll often need to use the separate functions.  hv.shade() is roughly equivalent to tf.shade, while hv.aggregate() combines ds.Canvas() with one of the various aggregating functions (ds.Canvas.points(), ds.Canvas.lines(), etc. , returning an xarray on which you can do arithmetic just as those Canvas methods do.
Colorizing by hour is probably very simple, using either hv.shade() or hv.datashade(); it's just a matter of making sure the information on each category is there in the aggregation (as already illustrated in the holoviews_datashader notebook for various colored gaussians), and then choosing the right color key for the output (I believe the argument is called "cmap"?).  Colorizing by percentile should also only need changing the colormap, which again can be passed as an argument to either hv.shade() or hv.datashade.
The picks>drops comparison will probably take more work, and is why I haven't yet reworked that notebook.  It should be simple enough to do precisely what's done already; if you take .data from the output of hv.aggregate() for the pickups and dropoffs separately you should have an xarray, which you can do arithmetic on the same as without holoviews, and then you can presumably use hv.shade(hv.Image(agg)) to render it as an image.  Unfortunately, doing that will lose the ability to get dynamic image updating as you zoom in, which is one of the main reasons to use the holoviews approach.  So I'll need to figure out an easy way to recommend for people to supply arbitrary code to be applied in a dynamic operator like that.  And that's what I haven't had time to investigate recently, due to other projects.
Hopefully that's helpful and not too confusing!

Yes, that was helpful.
I appreciate your time.  Thanks.


fix comment

Motivation:
we need to release 5.4.8 this week。
Fix https://github.com/alipay/sofa-rpc/issues/374
Modification:
Describe the idea and modifications you've done.
Result:
Fixes #.
If there is no issue then describe the changes introduced by this PR.

only log content， you can merge it。


Do not require triangle on macos arm

References and relevant issues
Reported on zulip https://napari.zulipchat.com/#narrow/stream/212875-general/topic/installing.20napari.5Ball.5D.2C.20.5Boptional.5D.20etc.2E.20on.20arm64.20macOS/near/416802211
Description
As triangles do not have macOS arm64 wheels, then trying to install napari with all extras on macOS arm64 will fail.
This PR removes the triangle from optional dependencies for the arm64 platform.

Here's the triangle PR so that it's easier to check if this can be dropped in the future.
https://github.com/drufat/triangle/pull/75

I think this is important and uncontroversial — thanks @Czaki for the platform-specific solution which minimises the impact! — so I'm going to merge straight away. I think this makes the 0.4.19 release relatively urgent. Hopefully we can push it out next week. 🤞


Support GRPC

Motivation:
Support GRPC. It is based on #383. But managed to use different ways to get proxy.
Modification:
Comparing to #383, this support of GRPC uses a different approach to make proxy. It hacks byte code to allow extending GPRC interface. In this way, implementation looks more straight forward. Using this support of GRPC is also more naturally like other SOFA supported protocols.
It keeps minimal changes to core-implement. Only important change to core is a small change allowing GRPC proxy to pass interface check.
It's merged with the latest master. No conflicts. Ready for PR.
Result:
Based on #383. Fixes its conflict issues, as a different approach is used.
It adds GRPC support as an extension. Minimal touch to core.

Looks it because of the maven plugin not downloaded.  I'm fixing that.

Build issue fixed. Please review.

@ujjboy any progress with code review?

@ujjboy @NeGnail @JervyShi Please review this

please change version to 5.6.3-SNAPSHOT
fix the build problem ,we will merge It into 5.6.3

Crazily busy recently, I will try to look into this over this weekend.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@201de55). Click here to learn what that means.
The diff coverage is 0%.

@@            Coverage Diff            @@
##             master     #716   +/-   ##
=========================================
  Coverage          ?   72.03%
  Complexity        ?     1084
=========================================
  Files             ?      376
  Lines             ?    15347
  Branches          ?     2445
=========================================
  Hits              ?    11055
  Misses            ?     3027
  Partials          ?     1265

Impacted Files
Coverage Δ
Complexity Δ

...ava/com/alipay/sofa/rpc/config/ConsumerConfig.java
75.64% <0%> (ø)
0 <0> (?)

...ava/com/alipay/sofa/rpc/config/ProviderConfig.java
54% <0%> (ø)
0 <0> (?)

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 201de55...347cdc9. Read the comment docs.

I will continue to review this pr when I have time.

Done with requested changes.

please change version to 5.6.3-SNAPSHOT
fix the build problem ,we will merge It into 5.6.3

Done.


(#1983) Calculate order total w normalized listings

When processing the order total for contracts with legacy listings, they did not access the data properly in all cases. These changes ensure all access is done through a normalized repo.Listing.
Fixes #1983

Coverage increased (+0.2%) to 41.643% when pulling 9a3d03498928af4658d1682ecb39286601276cb5 on 1983-order-total-w-normalized-listings into f5536bb6c388bfeadd9f9d670563f87cb68fd1f5 on ethereum-master.

Seems OK to me


URLs with IP addresses get truncated when creating link

To reproduce:

Enter IP url with three digits in the last set, such as http://<IP_ADDRESS>/
Link leaves out last digit: http://<IP_ADDRESS> 0/

it does not even detect url :\


Allow using an alternative tokenizer

I am not sure this approach is the nicest and it looks a bit brittle in places but it would allow to use alternate tokenizers with a well defined interface which would be nice.
Comments welcome !

Rebased but will #71 to pass on 3.10

Rebased again so that CIs should pass @pablogsal once the 3.11beta5 is live could you review this ?

@pablogsal I resolved the conflict and hopefully fixed the 3.8 failure. Could you please review ?

It would be nice to finally merge this


NPM Including Duplicate Dependencies

I broke it. 😔
My recent work on Licensed::Source::NPM is causing cache entries for instances of multiple versions of the dependency. This was not the case prior to that update. Currently looking into alternatives more closely aligned to Licensed::Source::Go.

This sounds like intended behavior introduced recently https://github.com/github/licensed/pull/89

I just came to that realization @mlinksva. Lol. Thanks for reducing my panic. 😅 My project was previously using v1.1.0 so I was a little worried when I saw more licensed issues pop up.


logging: write correlation-id with log entry metadata

By writing a correlation-id into the logging metadata, users can get request-correlated logs in pantheon. See https://gist.github.com/JustinBeckwith/43dd04cfbc4551ddd8996a5b803da0b0 for details.

Moved to https://github.com/GoogleCloudPlatform/google-cloud-go/wiki/Feature-Backlog.

@JustinBeckwith your gist is gone. What specific field and format does that correlation id need to go in?

See https://github.com/GoogleCloudPlatform/google-cloud-go/issues/448#issuecomment-352132523 for implementation details.


⚠ Bofrost.de has degraded performance

In d85d048, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1464 ms

Resolved: Bofrost.de performance has improved in cd15b94 after 37 minutes.


feat: [#491] Fix the errors thrown by Lint/nilaway CI

📑 Description
Closes https://github.com/goravel/goravel/issues/491

@coderabbitai summary

✅ Checks

[ ] Added test cases for my code

CI failed, pls check.

CI failed, pls check.

Sorry @devhaozi , it’s still not finished, so I’ll make it a draft for now. My local machine was hanging when I used NilAway, so I was pushing changes after making some adjustments to run NilAway properly.

CI failed

This PR is ready for review, right? it's still draft.

It's completed from my side


Adding kubeconfig as pre requisite in BUILD.md

Change Overview
Adding kubeconfig as pre requisite in BUILD.md
Pull request type
Please check the type of change your PR introduces:

[ ] :construction: Work in Progress
[ ] :rainbow: Refactoring (no functional changes, no api changes)
[ ] :hamster: Trivial/Minor
[ ] :bug: Bugfix
[ ] :sunflower: Feature
[x] :world_map: Documentation
[ ] :robot: Test

Issues

fixes #1543

Test Plan

[ ] :muscle: Manual
[ ] :zap: Unit test
[ ] :green_heart: E2E

@ihcsim @pavannd1 opened separate PR - https://github.com/kanisterio/kanister/pull/1663.
Can we close this one ?


add about page

Changes

update README.md file with an introduction to the repository
update addRandomInformation() to add an image along with personal information on about page
added projects page
styling changes

Comments
Current iteration is an MVP. I plan to add projects to the projects page, make blog posts on my website, add the contact portion, and style the website in the future.

Is there a URL I can view your changes at somewhere?

hi yes! https://zxu-sps-summer22.appspot.com/

Hi Avritt sorry I forgot to commit and push my changes for week 2. I re-requested a review again. I think for this week I will create different branches so that the PR process is cleaner.


ENH: Allow Futures root symbols to be > 3 characters

Zipline has a in-built limitation of two characters for root_symbol, despite the database schemas being more flexible.
As more futures are listed, especially on CME with Micro contracts, they are given 3 (or 4) letter symbols, thus requiring an artificial mapping to a 2 letter construct.
This enhancement request is to extend the root symbol to up to 4 characters within Zipline.
For reference, the current database schema has been nicely diagrammed here:
https://github.com/stefan-jansen/zipline-reloaded/discussions/44

Hi Richard,
I suspect that's where the  dark magic is happening
https://github.com/stefan-jansen/zipline-reloaded/blob/b05579f161f17b61c8651ea7be28b49d7432a28e/src/zipline/assets/assets.py#L243

Dark magic indeed!
I'm not quite sure why they were trying to save a few bits here and there on a structure only to be used a few hundred times (at most) versus the price data which could amount to many orders of magnitude more data.

Without any help from the original team it's a bit of a archeological endeavor :smile: , a lot of second guesses when looking at the code but also lot of condensed knowledge to learn from.
I wouldn't mind taking a shot at it, but I honestly, I don't know when I will manage to find some time in the next months.
I originally wanted to see if it's possible or reasonable to get rid of bcolz (defunct) replacing it with hdf5.
What could also be improved is the futures tests.

Closing for now until we have the man or womanpower to take on enhancements. Contributions welcome!

Closing for now until we have the man or womanpower to take on enhancements. Contributions welcome!

Actually, I have fixed it already in #91

Of course you did :)