if you want use Sequential，you can look here

if i have "Conv","C2f","SPPF","Bottleneck".net
you can look it:
enum SequentialType<B:Backend>{
    Conv(Conv<B>),
    C2f(C2f<B>),
    SPPF(SPPF<B>),
    Bottleneck(Bottleneck<B>)
}
struct Sequential<B:Backend>{
    layers:Vec<SequentialType<B>>
}

impl <B:Backend>Sequential<B> {
    fn new() -> Sequential<B> {
        Self{
            layers: vec![],
        }
    }
    fn add(mut self,layer:SequentialType<B>){
        self.layers.push(layer)
    }
    fn forward(&self, input:Tensor<B,4>) -> Tensor<B, 4> {
        let mut x = input.clone();
        for i in self.layers{
            match i{
                SequentialType::Conv(k) => {
                    x = k.forward(x)
                }
                SequentialType::C2f(k) => {
                    x = k.forward(x)
                }
                SequentialType::SPPF(k) => {
                    x = k.forward(x)
                }
                SequentialType::Bottleneck(k) => {
                    x = k.forward(x)
                }
            }
        }
        return x;
    }
}

Thank you for sharing this how-to. We should add a section in the book on how to have a sequential forwards. @nathanielsimard , @louisfd, would you agree?
Also related, we have an enhancement ticket for allowing enum modules, please see: https://github.com/burn-rs/burn/issues/726

@antimora I'm not sure this is ready to go on the book. We may find better options with proper support beforehand.

Does this deserialise well from pytorch Sequential?

Does this deserialise well from pytorch Sequential?
Edit: SequentialType needs to implement Module.

Please give a try. Probably we need to update our PyTorchRecorder. I haven't tested this particular use case. If you can provide me with a minimal example, I can fix it.

@finnkauski , here is an open issue ticket for Enum modules: https://github.com/tracel-ai/burn/issues/726

How to embed sequential into module.
enum SequentialType<B: Backend> {
    Conv2d(Conv2d<B>),
    BatchNorm2d(BatchNorm<B, 2>),
    BasicBlock(BasicBlock<B>),
    Sequential(Sequential<B>),
}

struct Sequential<B: Backend> {
    layers: Vec<SequentialType<B>>,
}

impl<B: Backend> Sequential<B> {
    fn new() -> Self {
        Self { layers: Vec::new() }
    }

    fn add(&mut self, layer: SequentialType<B>) {
        self.layers.push(layer);
    }

    fn forward(&self, x: Tensor<B, 4>) -> Tensor<B, 4> {
        let mut x = x;
        for layer in &self.layers {
            match layer {
                SequentialType::Conv2d(conv) => x = conv.forward(x),
                SequentialType::BatchNorm2d(bn) => x = bn.forward(x),
                SequentialType::BasicBlock(block) => x = block.forward(x),
                SequentialType::Sequential(sequential) => x = sequential.forward(x),
            }
        }
        x
    }
}

#[derive(Module, Debug)]
pub struct BasicBlock<B: Backend> {
    expansion: usize,
    bn_momentum: f64,
    conv1: Conv2d<B>,
    bn1: BatchNorm<B, 2>,
    relu: ReLU,
    conv2: Conv2d<B>,
    bn2: BatchNorm<B, 2>,
    downsample: Sequential<B>,
    stride: usize,
    planes: usize,
}

error[E0277]: the trait bound `Sequential<B>: Module<B>` is not satisfied
  --> src\lore_dector.rs:43:10
   |
43 | #[derive(Module, Debug)]
   |          ^^^^^^ the trait `Module<B>` is not implemented for `Sequential<B>`
   |
   = help: the following other types implement trait `Module<B>`:
             bool
             i8
             i16
             i32
             i64
             usize
             u8
             u16
           and 60 others
   = note: required for `std::option::Option<Sequential<B>>` to implement `Module<B>`
   = note: this error originates in the derive macro `burn::serde::Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Sequential<B>: Module<B>` is not satisfied
  --> src\lore_dector.rs:44:12
   |
44 | pub struct BasicBlock<B: Backend> {
   |            ^^^^^^^^^^^^^^^^^^^^^^ the trait `Module<B>` is not implemented for `Sequential<B>`
   |
   = help: the following other types implement trait `Module<B>`:
             bool
             i8
             i16
             i32
             i64
             usize
             u8
             u16
           and 60 others
   = note: required for `std::option::Option<Sequential<B>>` to implement `Module<B>`
note: required because it appears within the type `BasicBlockRecord<B>`

How to embed sequential into module.
enum SequentialType<B: Backend> {
    Conv2d(Conv2d<B>),
    BatchNorm2d(BatchNorm<B, 2>),
    BasicBlock(BasicBlock<B>),
    Sequential(Sequential<B>),
}

struct Sequential<B: Backend> {
    layers: Vec<SequentialType<B>>,
}

impl<B: Backend> Sequential<B> {
    fn new() -> Self {
        Self { layers: Vec::new() }
    }

    fn add(&mut self, layer: SequentialType<B>) {
        self.layers.push(layer);
    }

    fn forward(&self, x: Tensor<B, 4>) -> Tensor<B, 4> {
        let mut x = x;
        for layer in &self.layers {
            match layer {
                SequentialType::Conv2d(conv) => x = conv.forward(x),
                SequentialType::BatchNorm2d(bn) => x = bn.forward(x),
                SequentialType::BasicBlock(block) => x = block.forward(x),
                SequentialType::Sequential(sequential) => x = sequential.forward(x),
            }
        }
        x
    }
}

#[derive(Module, Debug)]
pub struct BasicBlock<B: Backend> {
    expansion: usize,
    bn_momentum: f64,
    conv1: Conv2d<B>,
    bn1: BatchNorm<B, 2>,
    relu: ReLU,
    conv2: Conv2d<B>,
    bn2: BatchNorm<B, 2>,
    downsample: Sequential<B>,
    stride: usize,
    planes: usize,
}

error[E0277]: the trait bound `Sequential<B>: Module<B>` is not satisfied
  --> src\lore_dector.rs:43:10
   |
43 | #[derive(Module, Debug)]
   |          ^^^^^^ the trait `Module<B>` is not implemented for `Sequential<B>`
   |
   = help: the following other types implement trait `Module<B>`:
             bool
             i8
             i16
             i32
             i64
             usize
             u8
             u16
           and 60 others
   = note: required for `std::option::Option<Sequential<B>>` to implement `Module<B>`
   = note: this error originates in the derive macro `burn::serde::Deserialize` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound `Sequential<B>: Module<B>` is not satisfied
  --> src\lore_dector.rs:44:12
   |
44 | pub struct BasicBlock<B: Backend> {
   |            ^^^^^^^^^^^^^^^^^^^^^^ the trait `Module<B>` is not implemented for `Sequential<B>`
   |
   = help: the following other types implement trait `Module<B>`:
             bool
             i8
             i16
             i32
             i64
             usize
             u8
             u16
           and 60 others
   = note: required for `std::option::Option<Sequential<B>>` to implement `Module<B>`
note: required because it appears within the type `BasicBlockRecord<B>`

You need to #[derive(Module)].
We just added support for enum modules in #1337. You can use the latest version on main to do something like this:
#[derive(Module, Debug)]
enum SequentialType<B: Backend> {
...
}

#[derive(Module, Debug)]
struct Sequential<B: Backend> {
    layers: Vec<SequentialType<B>>,
}


[FEATURE RQST] -

I would prefer being able to utilize both, your plugin, and literally ANY theme, however, I cannot find a single theme that allows your plugin to work as intended.
The image clarity allowed by utilizing your plugin would indeed be invaluable to me were this not the case.
Problems when both a theme and your plugin are enabled:
-Images take much longer to show up, slowing discord down quite a bit when there are enough images in a channel.
-Images stay on-screen after closing the advanced view.
-Images do not display correctly depending on the theme enabled.
I am unsure if the stuttering could be improved by much, however, if there is a way to make sure images close correctly while a theme is enabled, I would be very happy.
Edit: The same incompatibility seems to exist with DevilBro's ImageUtilities Plugin. This is a very important plugin that I would have loved to use alonside yours. This makes me sad.

Hey, I would like to clarify that I have gone out of my way to make it as compatible as possible with ImageUtilities as possible. Try switching the information bar to only show on hover, rather than under the image all the time. This has been a long standing issue that I have fixed so many times, but DevilBro keeps fiddling around with it. 🤦
As for themes, it should generally be fine, so I assume it's a plugin related thing. Could you name some themes that cause issues? I'm actually not an active theme user.
Apologies for the late reply, I've been busy.


Will the designer always be ran out off process?

Or is the plan to one day bring the designer back into the Visual Studio process?

I don't believe that'd ever happen. Consider, VS is running on net472 and your project targets .NET - the designer has to run out-of-proc. Now, it's plausible to consider that one day VS may run on .NET, then .NET Framework projects have to run out-of-proc. Not to mention the present scenario - VS is a 64-bit process, and your .NET Framework project requires 32-bit support...
And once you have both version of the designer running out-of-proc, then there's little to no incentive bring those in-proc.

That makes sense, thanks for the insight. This really helps me understand some of the challenges you have had with the designer and is very interesting.

You may find some of these blogs insightful:

https://devblogs.microsoft.com/dotnet/state-of-the-windows-forms-designer-for-net-applications/
https://devblogs.microsoft.com/dotnet/custom-controls-for-winforms-out-of-process-designer/

I've never built a custom control before, and don't have experience with the designer. But if I can, I'll try to get up to speed and implement something similar to what is described in IDragSourceHelper::InitializeFromWindow Remarks.

The DI_GETDRAGIMAGE message allows you to source a drag image from a custom control. It is defined in Shlobj.h and must be registered with RegisterWindowMessage. When the window specified by hwnd receives the DI_GETDRAGIMAGE message, the lParam value holds a pointer to an SHDRAGIMAGE structure. The handler should fill the structure with the drag image bitmap information.


logpath for logoutput

Hey,
an very nice feature was an logpath and some logging features.
restic -r xyz backup ~/home --log /tmp/job1.log
greetings
Sam

Hey, thanks for the suggestion. We don't have a clear concept for logging yet.

I agree with @whereisaaron, here's a script that I set up to work around that: backup_restic.sh.
(note that I have defined $RESTIC_BACKUP_TARGET and $RESTIC_EXCLUDES_FILE, in addition to$RESTIC_REPOSITORY and $RESTIC_PASSWORD_FILE
Here's a sample output from pastebin,
It is not perfect because the parts of the output that are changing don't get printed, as they are produced.
The awk script should be able to handle that, but it is not working as I expected.
Also, I can not understand why it does not print password is correct, that get printed if I launch the command from the CLI without redirections.

An addition or an alternative to what @whereisaaron is proposing is having the possibility to print progress information when a signal is received. This is how, for example how tar shows progress (see the --totals flag).

@fd0 the current output is really only suited to running backups by hand, interactively. But who does that? Noone but the devs :-)  Everyone schedules their backups and just wants a record of what happened, or to stream log output into log monitoring tools to get an alert when something bad is in the log.
If you don't have a concept yet, then I'd suggest jump to the current status quo:

Leave the current output if stdout is a tty or if --interactive flag
Log to stdout if no tty or if --noninteractive flag
Use structured logging in JSON with a simple structured logger like Uber's 'zap'
Don't have log file arguments or try to manage own logs, just stream them to stdout

@whereisaaron nice suggestions. If running "noninteractive", so i.e. as systemd.timer job, at certain intervals the progress should be reported (as new line, not like in interactive) though. Otherwise it's hard to debug a very long running backup and to see how it progresses. Kinda like what @CristianCantoro does with his script.

@CristianCantoro the new 0.9.0 release  has totals, there is no --totals option or signal mechanism, but with --verbose you get totals at the end, e.g.
Files:          14 new,    16 changed, 43200 unmodified
Dirs:            0 new,     2 changed,     0 unmodified
Data Blobs:    290 new
Tree Blobs:      3 new
Added:      261.509 MiB

processed 43230 files, 51.587 GiB in 11:30

Given #1494 is now merged and I would like to enable logging for #2270, would it perhaps be time to resume discusison?

Given #1494 is now merged and I would like to enable logging for #2270, would it perhaps be time to resume discussion?

Yes please.  Logging is still a fairly arcane process.

Given #1494 is now merged and I would like to enable logging for #2270, would it perhaps be time to resume discussion?

Yes please. Logging is still a fairly arcane process.

It appears work was started in PR #2436, but that wasn’t merged.


header layout funky

Will look like this;

hello teachosm, wondering what the exact issue is? sorry, i'm confused, would like to help

@osmlab/teachosm - is this still open?  can we close?

OBE


Java version, please?

I really want to use Nova, but I do not know Kotlin and don't fancy learning it specifically for Nova.
Could a Java template please be provided?
Edit: If possible, could Java-based documentation also be available?

Nova doesn't support Java


Polymer doesn't recognize inline svg in the HTML file (in pub build)

This issue was originally filed by<EMAIL_ADDRESS>
What steps will reproduce the problem?

create the new HTML file in the web directory
write an HTML code inside and include the inline svg element with some usual child elements (like <linearGradient />)
include Polymer into the pubspec.yaml (as a dependency) and into the dart file (as an import)
use Polymer (in the dart script and HTML file)
call run build

What is the expected output? What do you see instead?
Polymer running pub build should recognize and handle with inline svg elements in an usual way (just like HTML elements). But it throws unexpected warnings (see below).
What version of the product are you using? On what operating system?
Dart 1.3.3, Polymer 0.9.5+2, Windows 7
I also use the widget.dart as a dependency from its GitHub repository (version 0.3.0-dev)
Please provide any additional information below.
Pub Build output:
C:\Users\Pavel\Projects\my-project>pub build --trace
find: >     bin [: No such file or directory
Loading source assets... (2.5s)
Loading observe transformers... (5.5s)
Loading polymer transformers... (2.4s)
Building pavel_dvorak... (0.5s)
[Warning from polymer (Linter) on widget|lib/components/carousel.html]:
lib/components/carousel.html:16:7: definition for Polymer element with tag name
"swap-widget" not found.
[Warning from polymer (Linter) on pavel_dvorak|web/index.html]:
web/index.html:15:1: Named entity expected. Got none.
[Warning from polymer (Linter) on pavel_dvorak|web/index.html]:
web/index.html:59:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (Linter) on pavel_dvorak|web/index.html]:
web/index.html:74:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (Linter) on pavel_dvorak|web/index.html]:
web/index.html:89:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (InlineCodeExtractor) on pavel_dvorak|web/index.html]:
web/index.html:15:1: Named entity expected. Got none.
[Warning from polymer (InlineCodeExtractor) on pavel_dvorak|web/index.html]:
web/index.html:59:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (InlineCodeExtractor) on pavel_dvorak|web/index.html]:
web/index.html:74:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (InlineCodeExtractor) on pavel_dvorak|web/index.html]:
web/index.html:89:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ImportInliner) on pavel_dvorak|web/index.html]:
web/index.html:15:1: Named entity expected. Got none.
[Warning from polymer (ImportInliner) on pavel_dvorak|web/index.html]:
web/index.html:59:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ImportInliner) on pavel_dvorak|web/index.html]:
web/index.html:74:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ImportInliner) on pavel_dvorak|web/index.html]:
web/index.html:89:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ScriptCompactor) on pavel_dvorak|web/index.html]:
web/index.html:86:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ScriptCompactor) on pavel_dvorak|web/index.html]:
web/index.html:101:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (ScriptCompactor) on pavel_dvorak|web/index.html]:
web/index.html:116:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (PolyfillInjector) on pavel_dvorak|web/index.html]:
web/index.html:86:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (PolyfillInjector) on pavel_dvorak|web/index.html]:
web/index.html:101:1: Unexpected end tag (lineargradient). Ignored.
[Warning from polymer (PolyfillInjector) on pavel_dvorak|web/index.html]:
web/index.html:116:1: Unexpected end tag (lineargradient). Ignored.
[Info from Dart2JS]:
Compiling pavel_dvorak|web/index.dart...
[Warning from Dart2JS]:
web\index.dart:131:1:
No method named 'hide' in class 'DialogElement'.
heslo.hide();
^^^^^^^^^^^^
[Warning from Dart2JS]:
web\index.dart:
103 methods retained for use by dart:mirrors out of 2722 total methods (4%).
[Info from Dart2JS on pavel_dvorak|web/index.dart]:
packages\polymer\polymer.dart:50:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.dart]:
packages\observe\src\observable.dart:16:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.dart]:
packages\observe\src\path_observer.dart:10:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.dart]:
packages\polymer_expressions\eval.dart:12:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.dart]:
packages\polymer_expressions\src\mirrors.dart:11:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.dart]:
packages\polymer\deserialize.dart:8:1:
Import of 'dart:mirrors'.
import 'dart:mirrors' show TypeMirror;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:29.032661 to compile pavel_dvorak|web/index.dart.
[Info from Dart2JS]:
Compiling pavel_dvorak|web/index.html_bootstrap.dart...
[Warning from Dart2JS on pavel_dvorak|web/index.html_bootstrap.dart]:
web\index.dart:131:1:
No method named 'hide' in class 'DialogElement'.
heslo.hide();
^^^^^^^^^^^^
[Warning from Dart2JS]:
web\index.html_bootstrap.dart:
102 methods retained for use by dart:mirrors out of 2841 total methods (4%).
[Info from Dart2JS on pavel_dvorak|web/index.html_bootstrap.dart]:
packages\polymer\polymer.dart:50:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.html_bootstrap.dart]:
packages\observe\src\observable.dart:16:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.html_bootstrap.dart]:
packages\observe\src\path_observer.dart:10:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.html_bootstrap.dart]:
packages\polymer_expressions\eval.dart:12:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.html_bootstrap.dart]:
packages\polymer_expressions\src\mirrors.dart:11:1:
Import of 'dart:mirrors'.
import 'dart:mirrors';
^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS on pavel_dvorak|web/index.html_bootstrap.dart]:
packages\polymer\deserialize.dart:8:1:
Import of 'dart:mirrors'.
import 'dart:mirrors' show TypeMirror;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[Info from Dart2JS]:
Took 0:00:16.017917 to compile pavel_dvorak|web/index.html_bootstrap.dart.
Built 51 files to "build".
C:\Users\Pavel\Downloads\pavel-dvorak>

This issue has been moved to dart-lang/polymer-dart#172.

I think this issue is not closed. I've just made (dart 10.0.1 + polymer 16.3+3) a polymer component with an svg inside and I have warnings:
<polymer-element name="svg-element-editor">
    <template>
    <style>

        :host {
            position: relative;
        }

        /**
                       Gradient definitions need to be registered
                       on dart side (can't figure out why for now, just live with it)
                   **/

        .node_red {
            stroke: black;
            fill: url("#gradred")
        }

        .node_green {
            stroke: black;
            fill: url("#gradgreen")
        }
    </style>
    <div layout horizontal fit>
        <svg flex id="myStage">
            <!--

            Polymer will throw stupid warning if we put this here,
            we have to do it programmatically (sigh) from dart

            <defs>
                <lineargradient x1="0" y1="0" x2="0" y2="100%" id="gradred2">
                    <stop offset="0%" stop-color="orange" stop-opacity="1"></stop>
                    <stop offset="100%" stop-color="orange" stop-opacity="0"></stop>
                </lineargradient>
            </defs>
            -->
        </svg>
    </div>
 </template>
</polymer-element>

correct - this is just tracked in https://github.com/dart-lang/polymer-dart/issues/172 - the closed status here is just to avoid duplication and make sure we only track this in one place.
Cheers!

never mind - I just noticed that it indeed had the closed status there. Thanks for filing it again.

You are welcome. Thank you for the good work!
Il giorno ven 12 giu 2015 20:09 sigmundch<EMAIL_ADDRESS>ha
scritto:

never mind - I just noticed that it indeed had the closed status there.
Thanks for filing it again.
—
Reply to this email directly or view it on GitHub
https://github.com/dart-lang/sdk/issues/18484#issuecomment-111577621.


unix:///run/supervisord.sock refused connection

run supervisorctl return unix:///run/supervisord.sock refused connection

Issue fixed in the last commit, supervisorctl working fine now. Thanks for reporting.


Stack Mapping Fails (V2 Transformer Migration)

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?
npm install -g @aws-amplify/cli
If applicable, what version of Node.js are you using?
v17.1.0
Amplify CLI Version
8.1.0
What operating system are you using?
AWS LINUX
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
Modified transform.conf.json
{
  "StackMapping": {
     "ItemclassificationResolver": "ConnectionStack2",
     "ItemlocationResolver": "ConnectionStack2",
     "ItemmaterialResolver": "ConnectionStack2",
     "ItemoperatingUnitResolver": "ConnectionStack2",
     "ItempackageResolver": "ConnectionStack2"
  }
}

Amplify Categories
api
Amplify Commands
push
Describe the bug
Trying to migrate existing database to the V2 transformer and the ConnectionStack.json exceeds 500 resources.
So modifying the transform.conf.json file to split into multiple ConnectionStacks.
I compiled the schema without any StackMapping first and extracted a list of 427 resources to put in the transform.conf.json file. I put them all in ConnectionStack2 as shown (partially below) - but when I compiled it comes back with the error that there are more than 500 resources in ConnectionStack2.
  "StackMapping":{
    "UomscaleResolver": "ConnectionStack2",
    "ScaleuomResolver": "ConnectionStack2",
    "ItemplantResolver": "ConnectionStack2",
    "PartbrandResolver": "ConnectionStack2",
    "PhotoitemResolver": "ConnectionStack2"
   }

So I spread the resources across 6 additional Connection Stacks and that compiled fine - but when I push I get the following error.
Circular dependency between resources: [CustomResourcesjson, ConnectionStack6, ConnectionStack2, ConnectionStack3, ConnectionStack4, ConnectionStack5]
The Custom Resources is attached - there are no custom resources.
CustomResources.zip
Alternately, if I then change up the StackMapping to get beyond the error above, namely by reducing the numbers of records in StackMapping or changing how they are mapped I can get beyond the above circular error - but then I'll get the following error saying it failed...
CREATE_FAILED      AssetVisitseriesReferenceResolver     AWS::AppSync::Resolver Tue May 10 2022 23:18:22 GMT+0000 (Coordinated Universal Time) Only one resolver is allowed per field. (Service: AWSAppSync; Status Code: 400; Error Code: BadRequestException; Request ID: 8cf3287a-6301-4222-874c-6f42cfbcf62c; Proxy: null)
Expected behavior
Expect it to work as per V1 where I put any resource from the original ConnectionStack.json into the StackMapping table and that resource moves to the separate json file. This is not the case as evidenced by my addition of 423 resources exceeds the 500 limit in the ConnectionStack2.json
Reproduction steps
See above
GraphQL schema(s)

# Put schemas below this line

Log output

# Put your logs below this line

Additional information
No response

This issue #9762 is very similar and lots of people in this thread were reporting the same issue.
https://github.com/aws-amplify/amplify-cli/issues/9762#issuecomment-1040895122
https://github.com/aws-amplify/amplify-cli/issues/9762#issuecomment-1104357396

Hi @edwardfoyle - you mentioned this in your comment https://github.com/aws-amplify/amplify-cli/issues/9762#issuecomment-1040555591 - but I've tried for quite some time and there seems to be no way to get this working.
In V1 if I put 200 resources in StackMapping to go to say ConnectionStack2 then there are exactly 200 resources placed in ConnectionStack2 - but V2 is doing something substantially different with StackMapping. For example above, I put 427 into StackMapping - but it generates more than 500 resources into ConnectionStack2.
Something seems to be really messed up with the way StackMapping is generating the stacks. For example, if you split the same resource up between different stacks you can get different failure results.
If you follow the instructions it just doesn't work.
Once again, this is another show stopper from moving to V2.

Here is an example - there are 100 entries in the StackMapping for ConnectionStack2 and the compile generates 227 resources.  Its adding all the functions in the stack in addition to the records I entered.

Hi @josefaidt - just wanted to follow up on this one. The documentation (https://docs.amplify.aws/cli/graphql/override/#place-appsync-resolvers-in-custom-named-stacks) for this does not appear to be accurate.


Can't edit styles in Chrome

Just curious, is this avoidable?

I can't edit any JSS styles because they are greyed out for some reason.

Yes, this happens, when  .insertRule API is used, also you don't see the css rules in the head. I was thinking to add a fix for dev environment as this is only a problem during development.

Created a specific issue for this https://github.com/cssinjs/jss/issues/491


Wrong title of module view shown while loading module

Tested on 23.3 branch
Steps to reproduce

In compose click on admin panel button
Go to Modules and click on any module
See the title is Create namespace while the module is being loaded

Video with reproduction steps

Tested and confirming that this looks good. Moving the card to Done.


ScanManifest.json doesn't contain the result of poetry.lock and *.spdx.json

I try to find some components in poetry.lock and *.spdx.json by component detection and  component detection has  found 74 components in the file, but it seems to  haven't  output  to  ScanManifest_xxx.json. I fount the  same problem  in *.spdx.json.
poetry.lock file  : https://sourcegraph.com/github.com/cloud-custodian/cloud-custodian/-/blob/poetry.lock

--DetectorArgs Poetry=EnableIfDefaultOff,Vcpkg=EnableIfDefaultOff
This works fine by adding the above arguments.


Initialization for a style guide

Would recommend having a way of initializing the library once by passing a config object and then the same Flashbar object be used. When you pass the config object, it creates an immutable version of a Flashbar which gets cloned every time you try to customize it further.
This basically allows someone to initialize the Flashbar once based on their own style guide and then keep reusing that configuration.
Varun

This makes sense. Devs who would want to use the same style guide multiple times can build something called a FlashbarConfig once and reuse it to create multiple Flashbar instances.
Or this problem can also be solved by exposing a new clone() API, that lets you clone an existing Flashbar instance and build a completely new one with the existing configs.

Clone will require you to hold a copy of an existing Flashbar instance until you need to recreate it. Best to create a new one everytime using a config.

Yes, makes sense. Will prioritize this for the upcoming release.


vmap runtime (on GPU) is not constant when using jax.config.update("jax_enable_x64", True)

Discussed in https://github.com/google/jax/discussions/7990

Originally posted by kx-au September 23, 2021
Hi all,
When I run the code below without config.update("jax_enable_x64", True), i.e. using 32-bit number, I see parallel performance -- running a batch of 1000 test_fn  using vmap takes the same time as 1 chain.
However, when I use 64-bit number, I see an increase in the runtime. The increase is not much, e.g. 1000 chains takes about twice as long as 1 chain. Nevertheless, I do not understand why this is the case. I reproduced the same result in Google Colab, this is the exact printout (this is running the code AFTER the first run, to account for compilation time):
1 parallel batches takes 0.127 seconds.
101 parallel batches takes 0.135 seconds.
201 parallel batches takes 0.147 seconds.
301 parallel batches takes 0.158 seconds.
401 parallel batches takes 0.159 seconds.
501 parallel batches takes 0.171 seconds.
601 parallel batches takes 0.195 seconds.
701 parallel batches takes 0.207 seconds.
801 parallel batches takes 0.212 seconds.
901 parallel batches takes 0.231 seconds.
1001 parallel batches takes 0.242 seconds.
Here is my code.
from jax.config import config
config.update("jax_enable_x64", True)
config.update('jax_platform_name', 'gpu')
import jax.numpy as jnp
import jax
import time

print(jax.lib.xla_bridge.get_backend().platform) # check that we are using GPU

key = jax.random.PRNGKey(420)

@jax.jit
def test_fn(x):
  '''run sigmoid for many times'''
  out = jax.lax.fori_loop(
      lower=1,
      upper=10000,
      body_fun=lambda _, x: jax.nn.sigmoid(x) + 1e-1,
      init_val=x)
  return out

test_fn_parallel = jax.vmap(test_fn, in_axes=(0,))

for n in range(1,1002,100): # number of processes
    subkey, key = jax.random.split(key)
    x = jax.random.normal(subkey,(n,100)) # randoml input
    t1 = time.time()
    out = test_fn_parallel(x)
    t2 = time.time()
    print(f'{n} parallel batches takes {t2-t1:.3f} seconds.')

Sidenote: Using only 32-bit number, I also observe the same 'less-than-parallel' performance when I vmap over functions (MCMC chains via lax.scan) that involve large matrix multiplications, neural networks etc. The exact same MCMC implementation yields parallel performance when sampling a 100-dimensional Gaussian, which requires no more than jnp.sum and its jax.grad gradient. Could complex operations also ruin parallelism?

Hi - thanks for the question! A couple things:

when running micro-benchmarks like this, it is important to use .block_until_ready() to account for JAX's Asynchronous Dispatch. Otherwise, you're likely measuring dispatch time rather than computation time.
your question is based on the assumption that vmap creates parallelized code: this is incorrect. vmap creates vectorized code. On GPU, XLA may execute parts of your program in parallel, but that is unrelated to whether it is expressed using vmap. However fori_loop will always be executed sequentially.
It is expected that GPU runtimes for 64-bit computations will be quite a bit slower than for similar 32-bit computations, with the size of the performance impact dependent on details of the GPU hardware.

Hope that helps!

Hi, thanks for the comprehensive response!

when running micro-benchmarks like this, it is important to use .block_until_ready() to account for JAX's Asynchronous Dispatch. Otherwise, you're likely measuring dispatch time rather than computation time.

Yes, I've since added .block_until_ready() or print the output etc to make sure the output is computed. The same results persists.

your question is based on the assumption that vmap creates parallelized code: this is incorrect. vmap creates vectorized code. On GPU, XLA may execute parts of your program in parallel, but that is unrelated to whether it is expressed using vmap. However fori_loop will always be executed sequentially.

My bad, I am conflating vectorized code and parallelism. That said, my rough understanding is that vmap vectorizes the code which allows GPU to then take advantage of its vectorized nature to run in parallel. Within each of these individual 'processes', the fori_loop remain sequential. Would this be correct? Indeed, whether or not we get O(1) runtime (parallel) depends if the GPU capability and the problem size etc. In the 32-bit number case, as well as other simple experiments, I do observe O(1) runtime when I use vmap over an input dimension of size N, where N varies from 1 to 10^3 or more.

It is expected that GPU runtimes for 64-bit computations will be quite a bit slower than for similar 32-bit computations, with the size of the performance impact dependent on details of the GPU hardware.

Yes, I've ran a few more tests since and I think this could be the real reason. I've rerun the same experiment at a finer scale, where N varies from 1 to 500 at steps of 10. The different colors are re-runs. X-axis = N, Y-axis = runtime.

My best guess is that the GPU did run actually some 200 copies in parallel before it is saturated, then it has to do some housekeeping before it can run the next 200 copies and so on. At the large scale presented in the original post, this manifests as a linear trend.
For 32-bit computations, the runtime in fact also starts to increase beyond some 5000 copies. My inference is that the GPU is saturated in the same way, just that it happens much later for the 32-bit case. (I remain unclear about why the increase is linear and not in steps like the above picture.)

In any case, my best guess is that the observed difference in runtime the 32-bit vs 64-bit code is due to saturation of the GPU.


Add dense input styles to the Angular theme

Describe the desired behavior
Add dense input styles to the Angular themes so we don't need an abundance of styles to achieve something similar to the Forms and Validation 'In a list" example. (This should be able to be done in a similar way that the chip styles are implemented)
https://stackblitz.com/github/pxblue/angular-design-patterns?file=src%2Fapp%2Fpages%2Fforms-and-validation%2Fin-a-list%2Fin-a-list.component.ts
Describe the current behavior
Dense mode does not exist.
Is this request related to a current issue?
No
Additional Context

Transferred from JIRA; Requested by Green Motion
Julien Von Oetinger<EMAIL_ADDRESS>might have a working & encapsulated style that you can borrow.

Not planning to work on this issue unless some adopter team come up with this requirement.


[rocBLAS] Fix issues with rocBLAS 4.0.0

Description
rocBLAS 4.0.0 removed support for the legacy BLAS inplace trmm, so calls to trmm cause a compilation error. The old functionality is provided by just duplicating the last two arguments of trmm (see also here).
To fix this, I am defining a macro ROCBLAS_NO_LEGACY_TRMM depending on the rocBLAS version which is then used in an #ifdef to decide which version of the function to call.
I also had to change slightly the way the path to librocblas.so is constructed in FindrocBLAS.cmake. I'm not sure if this is also related to the rocBLAS version or if this is a general issue on some systems, so I can also put that in a separated PR if you prefer.
Checklist
All Submissions

[ ] Do all unit tests pass locally? Attach a log.
I don't have an AMD gpu to test, I'm just assessing the state of compiling oneMKL with AdaptiveCpp to see if #307 needs any updates and can the maybe be merged.
[x] Have you formatted the code using clang-format?

@nilsfriess Thanks for the PR. I think this needs to be tested. You can contact me or infra team to access AMD GPUs.

Thank you for the PR, we have recently removed the Findroc*.cmake files in https://github.com/oneapi-src/oneMKL/pull/490 which should avoid the issues with ROCBLAS_LIB_PATH. Can you rebase your PR with the tip of develop?


feat: igloo HTTP JsonRPC Framework

HTTP Methods - explorer
Account Info

getAccountInfo: Returns all information associated with the account of provided Pubkey
getMultipleAccounts: Returns account information for a list of public keys

Transaction History

getSignaturesForAddress: Returns a list of signatures for transactions involving a specific address
getTransaction: Returns information about a particular transaction

Transaction

sendTransaction: Submits a signed transaction to the cluster for processing

Block Info

getBlock: Returns identity and transaction information about a confirmed block
getBlocks: Returns a list of confirmed blocks between two slots

Slot Info

getSlot: Returns the slot that has reached the [given or default commitment level](https://solana.com/docs/rpc#configuring-state-commitment)

Token Info

getTokenAccountBalance: Returns the token balance of a token account
getTokenAccountsByDelegate: Returns all SPL token accounts by approved delegate
getTokenAccountsByOwner: Returns all SPL token accounts by token address and owner
getTokenLargestAccounts: Returns the 20 largest accounts of a particular SPL Token
getTokenSupply: Returns the total supply of an SPL Token

Cluster Info

getClusterNodes: Returns information about all the nodes participating in the cluster
getVoteAccounts: Returns the account info of the current vote accounts

Environment Info

getEpochInfo: Returns information about the current epoch
getGenesisHash: Returns the genesis hash

Monitoring

getHealth: Returns the current health of the node. A healthy node is one that is within HEALTH_CHECK_SLOT_DISTANCE slots of the latest cluster confirmed slot.

Stub methods for retrieving Account Info, Transaction History, Block Info, and Slot Info
block generation
We can assume that Transactions are executed in batches, with the first batch having both Slot and Block set to 0, and each subsequent batch incrementing these values
ref: https://github.com/soonlabs/igloo/issues/22
Implement a Robust Standard Transaction Executor
Batch Transaction Processing: Enable execution of multiple transactions simultaneously
Automated Block Height Management
Accounts Info
Obtained from BankWrapper and Bank
Transaction History
Igloo needs to implement write_transaction_status_batch, assemble EncodedTransactionWithStatusMeta and write it to Blockstore (Rocksdb)

Assemble EncodedTransactionWithStatusMeta
A JSON format response for a transaction, transferring SOL from Alice to Bob
{
  "slot": 279956924,
  "transaction": {
    "transaction": {
      "signatures": [
        "5LSMipi9UFCJnMMJUYDCJKMtW5io9rJvxkxJxFcTHr9AmC3wgTGAUe571ebsGu6tWstzhyrZDRUnqBhSe4mVMuvP"
      ],
      "message": {
        "header": {
          "num_required_signatures": 1,
          "num_readonly_signed_accounts": 0,
          "num_readonly_unsigned_accounts": 1
        },
        "account_keys": [
          "5K4KLyoqBwS58sWjuJvhnuu794us4XGjTcXSTDUjwmJ2",
          "93Mto7Rdgs5anS1QeqHCrynxoSzmEeBaxb4V8QGfZSvH",
          "11111111111111111111111111111111"
        ],
        "recent_blockhash": "5w1hduKLySSDpL4sZWxZREAxz14DeEF2xSMJVbjEVD8x",
        "instructions": [
          {
            "program_id_index": 2,
            "accounts": [0, 1],
            "data": "3Bxs3zzLZLuLQEYX",
            "stack_height": null
          }
        ],
        "address_table_lookups": null
      }
    },
    "meta": {
      "err": null,
      "status": "Ok(())",
      "fee": 5000,
      "pre_balances": [156656299827848, 0, 1],
      "post_balances": [156655299822848,<PHONE_NUMBER>, 1],
      "inner_instructions": [],
      "log_messages": [
        "Program<PHONE_NUMBER>1111111111111111111111 invoke [1]",
        "Program<PHONE_NUMBER>1111111111111111111111 success"
      ],
      "pre_token_balances": [],
      "post_token_balances": [],
      "rewards": [],
      "loaded_addresses": {
        "writable": [],
        "readonly": []
      },
      "return_data": "Skip",
      "compute_units_consumed": 150
    },
    "version": null
  },
  "block_time":<PHONE_NUMBER>
}

EncodedTransactionWithStatusMeta is a struct containing transaction status metadata, which includes information about the transaction's signature, message, status, and metadata.
UiTransactionStatusMeta is the type of the meta field in EncodedTransactionWithStatusMeta, and it contains metadata about the transaction status, such as the number of confirmations, execution time, and execution result of the transaction.
In simple terms, EncodedTransactionWithStatusMeta is a complete transaction status struct, while UiTransactionStatusMeta is a part of it that contains the metadata of the transaction status.
Where the banks-server outputs the transaction result
banks-server/src/banks_server.rs
async fn process_transaction_with_metadata_and_context(
    self,
    _: Context,
    transaction: VersionedTransaction,
) -> BanksTransactionResultWithMetadata {
    let bank = self.bank_forks.read().unwrap().working_bank();
    match bank.process_transaction_with_metadata(transaction) {
        Err(error) => BanksTransactionResultWithMetadata {
            result: Err(error),
            metadata: None,
        },
        Ok(details) => BanksTransactionResultWithMetadata {
            result: details.status,
            metadata: Some(TransactionMetadata {
                compute_units_consumed: details.executed_units,
                log_messages: details.log_messages.unwrap_or_default(),
                return_data: details.return_data,
            }),
        },
    }
}

TransactionExecutionDetails
&r0 = Executed {
    details: TransactionExecutionDetails {
        status: Ok(
            (),
        ),
        log_messages: None,
        inner_instructions: None,
        fee_details: FeeDetails {
            transaction_fee: 5000,
            prioritization_fee: 0,
            remove_rounding_in_fee_calculation: true,
        },
        return_data: None,
        executed_units: 150,
        accounts_data_len_delta: 0,
    },
    programs_modified_by_tx: {},
}

TransactionLoadResult
LoadedTransaction {
        accounts: [
            (
                AvfAPtoCuo8jCC73X9DQyGBTFEMH7t2p2cXqKLonJwz,
                Account {
                    lamports: 7995000,
                    data.len: 0,
                    owner:<PHONE_NUMBER>1111111111111111111111,
                    executable: false,
                    rent_epoch:<PHONE_NUMBER>3709551615,
                },
            ),
            (
                9Z7dtxs9HLTkMovQ1FW3ZL7q8JxQuEo3NHuZmR5Pwsjr,
                Account {
                    lamports: 12000000,
                    data.len: 0,
                    owner:<PHONE_NUMBER>1111111111111111111111,
                    executable: false,
                    rent_epoch:<PHONE_NUMBER>3709551615,
                },
            ),
            (
<PHONE_NUMBER>1111111111111111111111,
                Account {
                    lamports: 0,
                    data.len: 0,
                    owner: NativeLoader1111111111111111111111111111111,
                    executable: true,
                    rent_epoch: 0,
                },
            ),
        ],
        program_indices: [
            [
                2,
            ],
        ],
        fee_details: FeeDetails {
            transaction_fee: 5000,
            prioritization_fee: 0,
            remove_rounding_in_fee_calculation: true,
        },
        rollback_accounts: FeePayerOnly {
            fee_payer_account: Account {
                lamports: 9995000,
                data.len: 0,
                owner:<PHONE_NUMBER>1111111111111111111111,
                executable: false,
                rent_epoch: 0,
            },
        },
        compute_budget_limits: ComputeBudgetLimits {
            updated_heap_bytes: 32768,
            compute_unit_limit: 200000,
            compute_unit_price: 0,
            loaded_accounts_bytes: 67108864,
        },
        rent: 0,
        rent_debits: RentDebits(
            {},
        ),
        loaded_accounts_data_size: 14,
    }

~/solana/agave/svm/src/account_loader.rs
#[derive(PartialEq, Eq, Debug)]
pub enum TransactionLoadResult {
    /// All transaction accounts were loaded successfully
    Loaded(LoadedTransaction),
    /// Some transaction accounts needed for execution were unable to be loaded
    /// but the fee payer and any nonce account needed for fee collection were
    /// loaded successfully
    FeesOnly(FeesOnlyTransaction),
    /// Some transaction accounts needed for fee collection were unable to be
    /// loaded
    NotLoaded(TransactionError),
}

#[derive(PartialEq, Eq, Debug, Clone)]
#[cfg_attr(feature = "dev-context-only-utils", derive(Default))]
pub struct LoadedTransaction {
    pub accounts: Vec<TransactionAccount>,
    pub program_indices: TransactionProgramIndices,
    pub fee_details: FeeDetails,
    pub rollback_accounts: RollbackAccounts,
    pub compute_budget_limits: ComputeBudgetLimits,
    pub rent: TransactionRent,
    pub rent_debits: RentDebits,
    pub loaded_accounts_data_size: u32,
}

TransactionAccount: solana_sdk::transaction_context
TransactionProgramIndices: Vec<Vec<IndexOfAccount>> → solana_sdk::transaction_context::IndexOfAccount
fee_details: solana_sdk::fee::FeeDetails
rollback_accounts: solana_sdk::account::AccountSharedData
compute_budget_limits: solana_compute_budget::compute_budget_processor::ComputeBudgetLimits
rent: u64
rent_debits:solana_sdk::rent_debits::RentDebits

Solana RPC returns EncodedConfirmedTransactionWithStatusMeta based on the Signature, which contains UiTransaction and UiTransactionStatusMeta
The SVM has split UiTransactionStatusMeta into TransactionExecutionResult and TransactionResults
What we need to do is reassemble the structures that SVM has split back into EncodedTransactionWithStatusMeta

For the json-rpc server part, keep the types as compatible as possible with Solana's raw types
Just rewrite to keep code simple and easy to read.


feat(notifications): [INFRA-419] make code deploy notifications configurable

Goal
Add flexibility around CodeDeploy notifications sent to our #log-backend-deploys slack channel.
Tickets:

INFRA-419

annoying that semantic-release bot is unverified... I recommend undoing the merge commit and rebasing to main


[ENH] - Force the trailing slash when using jupyter server proxy

Feature description
More info: https://github.com/nebari-dev/nebari/issues/2273, https://github.com/nebari-dev/nebari-docs/issues/240#issuecomment-2029745067
I see that if a process (panel, r-shiny, etc.) returns a relative path e.g. jquery-3.6.0/jquery.min.js then you must use a trailing slash when accessing the process through jupyter-server-proxy.  e.g<EMAIL_ADDRESS>instead of<EMAIL_ADDRESS> The trailing slash is important.
Otherwise, you get the issue described in https://github.com/nebari-dev/nebari/issues/2273.
Anything else?
No response

At any rate it seems like jupyter_server_proxy should always put a slash after .../proxy/<port>

In the case of the fastapi server below.  Navigating to http://localhost:8888/proxy/8000/ redirects you to http://localhost:8888/proxy/8000/docs (correct). while navigating to http://localhost:8888/proxy/8000 redirects you to http://localhost:8888/proxy/docs (404).
# https://stackoverflow.com/questions/70219200/python-fastapi-base-path-control
import os
from fastapi import APIRouter, FastAPI
from fastapi.responses import RedirectResponse

import uvicorn

app = FastAPI()

base_url = "/proxy/8000"
# prefix_router = APIRouter(prefix=base_url)

@app.get("{path:path}")
async def read_path(path: str):
    print(f'path: {path}')
    if path == '/':
        # redirect to /docs
        return RedirectResponse(f"docs", status_code=302)
    else:
        return {"path": path}

if __name__ == "__main__":
    uvicorn.run(app, host="<IP_ADDRESS>", port=8000, root_path=base_url)

Thanks Vini, I'll work on some docs as part of https://github.com/nebari-dev/nebari-docs/issues/240#issuecomment-2029745067


Clean all events while deleting DeletedDatabase

May be we need to clean all events of original database and DeletedDatabase when we are deleting DeletedDatabase.

We don't have to do this. Kube will gc old events after some time.


Add KoaJs Slack Community badge

I don't see any reason of adding link to unknown community channel via unknown service. closing it for now.

Trying to build a community goto place for devs to talk koajs stuff.
On Tue, Aug 28, 2018, 13:06 Dmytro Zelenetskyi<EMAIL_ADDRESS>wrote:

I don't see any reason of adding link to unknown community channel via
unknown service. closing it for now.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/zemd/node-security-voters/pull/2#issuecomment-416722390,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFsmSw_OKxyjB5-vzBTXnpzTRfwAC3HFks5uVaKvgaJpZM4WQP7L
.


Add stylesheets block

Make it clearer what to override to change/add stylesheets, or add meta elements.
Follows API we agreed in 9th Aug technical & architecture decisions.

Ah, drat, this should probably go in the changelog...


Update READMEs and breaking change docs

Cleaned up release README
Added READMEs for more releases
Cleaned up breaking change docs - moved ID from title to comment at end
Added tool to generate breaking change README
Generated a README with the tool

The changes to Breaking Changes documentation looks good. I'll update our BreakingChanges parser to get the information from the comment section.


NUMPAD keys do not operate globally with pass dispatcher

Version: hyprland-0.23.0beta-2
I have a binding in OBS to start and stop recording with NUMPAD 0, along with other bindings on the other NUMPAD keys
My pass bind for start and stop is setup as such:
bind = ,KP_0,pass,^(com.obsproject.Studio)$
Whilst focused on the OBS window the binding works as expected, but when focus is on another window it does not operate. The same behavior occurs regardless of which of the NUMPAD numbers I use.
Swapping the bind to another key such as F1 produces the expected behavior of a global hotkey.

isn't it KP0?

wev reports it as KP_0 not KP0, KP_0 seems to be the only form that works, unsure why there's a discrepancy. But that isn't the issue I'm seeing, the key is binding to OBS just fine but will only perform the action when the window is in focus, if I changed the binding to F1 or anything other than a NUMPAD number it works globally.

Try binding the pass dispatcher by a keycode. Maybe hyprland can't pick it up for some reason. Blame xkb.
I should probably make some check to see if a keysym is valid or something, but xkb is a pain to work with tbh.

I don't know if I'm missing something but keycode binding doesn't seem to work full stop, even just copying the example from the wiki of:
bind=SUPER,code:28,exec,alacritty
To have Super + T to launch the application doesn't do anything

look in the top left and you'll notice you're on the -git wiki but are running 0.23.0
version selector -> 0.23.0
for the issue: just drop the code:

I see, that was my bad. This problem has become weirder, wev reports the keycode as 90, which doesn't work, but using the keycode of 82 I can see in that screenshot you posted gives me the same result as using KP_0 like before, where it only works whilst I'm focused on the window.
I'm coming to the conclusion that NUMPADs might be a nightmare

I dumped my keymap (pl) and got this:

you can run watch -n 0.1 "cat /tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/hyprland.log | grep "triggered" | tail -n 40" and look whether you pressing KP0 sends a new log saying "keybind triggered, calling dispatcher (...)"
If it does, then something might be wrong on OBS's side. Generally tbh a lot seems to be, when I tried it back in the day anything with mods would not be registered. Just OBS.

wev reports the keycode as 90, which doesn't work, but using the keycode of 82

don't worry, it's cuz libinput codes are -8 from xkbcommon codes. Use whatever wev tells you.

Using KP_0 or code 82 nothing shows up in the log, but I can start/stop recoding on OBS only when focused on the window
Using 90 the code that wev reports NUMPAD 0 being produces this:
[LOG] Keybind triggered, calling dispatcher (0, , 0)
But nothing occurs in the application itself.

which means that hyprland should be passing it onto OBS. Maybe OBS again doesn't like it for some reason.
Can you try passing numpad 0 to like a text editor, terminal or something and see if it types in it?

It seems to be typing in my terminal just fine

welp means OBS is back at it with sucky keybinds

I can work around it for and just use the F keys which do work as expected

I'll close this as it's just another obs issue


[oracle]oracle cdc supports synchronizing oracle slave nodes

Need to assign before GRANT CREATE TABLE TO flinkuser2;
GRANT ALTER ANY TABLE TO flinkuser2;
GRANT CREATE SEQUENCE TO flinkuser2; three permissions. But doing so has flaws

It cannot be realized in the Oracle slave library cdc synchronization, because the slave library cannot write data. Therefore, the cdc data of the oracle slave library cannot be synchronized
There is no need to create and write the LOG_MINING_FLUSH table when using flink cdc, and there is also sdn related information in the checkpoint.

I have removed the creation and use of the LOG_MINING_FLUSH table here, because I think that using flink cdc does not need to record sdn in the LOG_MINING_FLUSH table

Thanks @waywtdcc for opening this PR, but could you open an issue to describe the feature before open a PR？

https://github.com/ververica/flink-cdc-connectors/issues/1574

2.3支持Oracle 从库同步了吗


[Bug] YAML consistency check fails with NPE

Action
Bump this library to 0.34.0.
Expected
Works as on 0.33.0.
Actual
https://github.com/krzema12/github-workflows-kt/actions/runs/3833136209/jobs/6524254495#logs
java.lang.NullPointerException: Parameter specified as non-null is null: method Check_if_wrappers_up_to_date_main.<init>, parameter <this>
	at Check_if_wrappers_up_to_date_main.<init>(check-if-wrappers-up-to-date.main.kts)

Workaround, if exists
Unknown yet.
Library version
v0.34.0

Related: https://youtrack.jetbrains.com/issue/KT-52227


Cookbook fails package install on amazon linux with Chef 13

Expected Behavior
Should install sensu
Current Behavior
Fails with:
RuntimeError
------------
Unsupported Linux platform family amazon
     Cookbook Trace:
     ---------------
       /tmp/kitchen/cache/cookbooks/sensu/recipes/_linux.rb:63:in `from_file'
       /tmp/kitchen/cache/cookbooks/sensu/recipes/default.rb:34:in `from_file'
       /tmp/kitchen/cache/cookbooks/kamaji/recipes/sensu.rb:1:in `from_file'
       /tmp/kitchen/cache/cookbooks/kamaji/recipes/default.rb:27:in `from_file'

Possible Solution

Steps to Reproduce (for bugs)
Run default recipe using Chef 13+ on amazon linux
Your Environment

Version of this cookbook used: master
Version of Sensu used:
Version of Chef used: 13.0.118
Operating System and version (e.g. CentOS 7, Ubuntu 14.04): Amazon Linux 09.2016
Link to your project:

It looks like amazon linux is not listed in the list of platfoms supported yet: https://github.com/sensu/sensu-chef#platforms
Taking a look at the code its being raised here: https://github.com/sensu/sensu-chef/blob/develop/recipes/_linux.rb#L69-L70 because there is no case statement for amazon, we might be able to just add amazon to rhel and fedora otherwise it needs it's own case with its own logic.

Has anyone seen any updates on this?

@jeremysmitherman @mixtli  I can fork and add the cases to the existing statement and let you test, if it's more effort than that right now I do not have much bandwidth.

@majormoses @jeremysmitherman I had previously committed a fix for this issue but forgot to open the PR. See #567. Note that even with the change in #567, installation on Amazon Linux is still broken as described in #560. A proposed fix for that specific issue is open in #565.

https://github.com/majormoses/sensu-chef/tree/feature/support-amazon-linux

@cwjohnston ok, cool I was gonna test that. Sounds like you first need to work out the repo side.


Publish to zenodo

[x] Create an entry in zenodo.
[ ] Setup the zenodraft action.
[x] Setup the github hook and include the secrets (API)
[x] Create .zenodo.json: can be form CITATION.CFF using cffinit

@SCiarella I think we can close this issue


Replace AJAX with REST?

I was wondering, is it possible (or should we) replace all AJAX request with REST requests?  Can jQuery easily access REST instead of AJAX?
If every AJAX call would be changed to REST and these REST commands are documented, then this would mean that the whole OIDplus system could be automatized?  (This is also already possible using "Automated AJAX Requests", however this solution is pretty lame because it is 0% documented, and it's just "look at the code and figure out which parameters to send")

It seems to work: https://stackoverflow.com/questions/2153917/how-to-send-a-put-delete-request-in-jquery
However, would it be really good to switch completely to REST? The problem is that we want very high compatibility with all web servers. But with Apache2 you must make sure that .htaccess is correctly configured to all REST call. For SQL Server you need to allow verbs "DELETE", "PUT", etc.  For nginx you probably also need to so SOMETHING.
So, OIDplus might NOT work "out of the box". But running "out of the box" is very very important for us.

Hello Daniel,

you must make sure that .htaccess is correctly configured to all REST call.
For instances without mod_rewrite you can build/parse the REQUEST_QUERY for routes like /index.php/api/rest-path/...
by putting the index.php in the API base path.

For instances without mod_rewrite you can build/parse the REQUEST_QUERY for routes like /index.php/api/rest-path/... by putting the index.php in the API base path.

Thanks for this hint!
Does /index.php/xxx really always work, with every Apache configuration? What about nginx? I will also try if it works on Microsoft IIS when I am at my other computer.

Update:  /index.php/xxx works with Microsoft IIS.
Remaining question is if nginx does also accept this.


Install Istio 1.6.2 for Stackdriver Sandbox

#WHAT: Installs Istio version 1.6 onto the Stackdriver Sandbox cluster during provisioning script. Bash script is run through terraform resource where 1) Istio 1.6.2 will be downloaded and installed and 2) services will be redeployed so that Istio sidecar envoy will take effect.
#WHY: We want to enable Istio as the service mesh to provide valuable metrics to Cloud Monitoring.
#HOW: Created bash script to download the proper version of Istio and manage the installation. istio_operator.yaml contains the Operator file which dictates the parts of Istio that are configured.
#TESTING: Makefile passes.
Addresses Issue #50

We also need to update the CI with installing istio step

We need to update the CI with installing istio

Do you think that should be worked on as a separate PR? I don't want this one to end up blocked for too long, and I don't think this work necessarily depends on a CI upgrade

We need to update the CI with installing istio

Do you think that should be worked on as a separate PR? I don't want this one to end up blocked for too long, and I don't think this work necessarily depends on a CI upgrade
We might have to do some planning if we want to add Istio to the CI system. We currently spin up a fresh local cluster each time. If we and an Istio installation step, that may add 2-10 minutes to each run (I haven't tested). If it makes the tests too slow, we may want to consider spinning up persistent clusters on GKE instead.
I think these decisions probably go beyond the scope of this PR

Sounds good. The Istio installation should only take ~ 2 minutes from my experience running it. I've held off on adding it to the CI for now, but I addressed all the previous todos.

Hmm, I'm still seeing a couple issues when I run it on my GCP account:

It doesn't give me a load generator url (it says" Load generator web interface: [not found]")
the cluster is unreachable when the scripts end. It says "The cluster is being updated" on GCP, and kubectl commands say "the connection to the server was refused"
when the cluster does eventualy spin up, the cartservice is in a crashloop. It looks like it's having trouble talking to redis. I wasn't seeing this last time. I noticed you deleted some of the contents of the istio-manifests directiory, any specific reason?
you might want to change the getExternalIp function of install.sh to use the istio url instead of the loadgenerator

Thanks Dan. I've tried to address these as best I can. I've put responses to these issues.

I think the load generator issue is separate from this PR - running both with and without Istio (occasionally) produces the load generator as being unavailable.
I've slept at the end of istio install and increased the sleep at the end of deploying the services to give more time for it to come up. At the end of the script the External IP is available for me now.
Cartservice is no longer in a crashloop for me. I replaced the istio-manifests since it was recommended to utilize the subset for the newer version of Istio we are using.
Changed :)

Please let me know if this is working better.

A couple more comments:

We need to increase the size of the cluster now that we've added istio. We spin up 5 by default, but we need at least 6 to hold everything. We usually recommend at least 8 vCPUs for Istio. I think a lot of flakiness will go away if we start with a large enough cluster
try to avoid sleep statements whenever possible. Do you know which resources we need to wait on before proceeding? Is it possible to do a kubectl wait or ping a host before moving on to the next step?  If you can tell me which resources need to stabalize, I can try to help you pin down how to check against them. It's also possible fixing point 1 will remove the need for the long sleeps though

A couple more comments:

We need to increase the size of the cluster now that we've added istio. We spin up 5 by default, but we need at least 6 to hold everything. We usually recommend at least 8 vCPUs for Istio. I think a lot of flakiness will go away if we start with a large enough cluster
try to avoid sleep statements whenever possible. Do you know which resources we need to wait on before proceeding? Is it possible to do a kubectl wait or ping a host before moving on to the next step?  If you can tell me which resources need to stabalize, I can try to help you pin down how to check against them. It's also possible fixing point 1 will remove the need for the long sleeps though

Sounds good. I"ll move the number of nodes to 8.
I inserted a sleep statements after applying the istio manifests. I think it helps the Istio configuration apply the manifests properly before moving to deploy. I'm not 100% certain, but I did notice the crash loop issue disappeared when I did this.

I updated the nodes to be 7 since the loadgenerator needs 1 for itself. This removed the need for the additional sleep.

Try replacing that sleep block I commented on above with:
        kubectl wait --for=condition=available --timeout=600s deployment/adservice
        kubectl wait --for=condition=available --timeout=600s deployment/cartservice
        kubectl wait --for=condition=available --timeout=600s deployment/checkoutservice
        kubectl wait --for=condition=available --timeout=600s deployment/currencyservice
        kubectl wait --for=condition=available --timeout=600s deployment/emailservice
        kubectl wait --for=condition=available --timeout=600s deployment/frontend
        kubectl wait --for=condition=available --timeout=600s deployment/paymentservice
        kubectl wait --for=condition=available --timeout=600s deployment/productcatalogservice
        kubectl wait --for=condition=available --timeout=600s deployment/recommendationse

That worked for me, and fixed all loadgenerator flakiness. After that, I think it should be good!

Try replacing that sleep block I commented on above with:
        kubectl wait --for=condition=available --timeout=600s deployment/adservice
        kubectl wait --for=condition=available --timeout=600s deployment/cartservice
        kubectl wait --for=condition=available --timeout=600s deployment/checkoutservice
        kubectl wait --for=condition=available --timeout=600s deployment/currencyservice
        kubectl wait --for=condition=available --timeout=600s deployment/emailservice
        kubectl wait --for=condition=available --timeout=600s deployment/frontend
        kubectl wait --for=condition=available --timeout=600s deployment/paymentservice
        kubectl wait --for=condition=available --timeout=600s deployment/productcatalogservice
        kubectl wait --for=condition=available --timeout=600s deployment/recommendationse

That worked for me, and fixed all loadgenerator flakiness. After that, I think it should be good!

Thanks! This fixed the flakiness and got rid of those sleep commands! Thanks for the help!! :)


Reduce InsertAttrRuns CPU usage

Summary of the Pull Request
Reduces CPU usage in ATTR_ROW::InsertAttrRuns.
References
#806

PR Checklist

[X] Closes #806
[X] CLA signed. If not, go over here and sign the CLA
[ ] Tests added/passed
[ ] Requires documentation to be updated
[ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan.

Detailed Description of the Pull Request / Additional comments
I myself have experienced the slow cursor movement described in #806 . I found one hotspot is in ATTR_ROW::InsertAttrRuns. It is called many times during screen redrawing. All those vector initializing and copying consumes lots of CPU cycles.
The idea is simple: exit as quickly as possible. The original author has already done this optimization when _list.size() is 1 or 2. I took a little further and aggresive way.
I added quick exit on these following condition

Insert single color that is the same as the left color:

AAAAABBBBBBBCCC
     ^
AAAAAABBBBBBCCC

Insert single color that is the same as surrouding ones

AAAAABBBBBBBCCC
       ^
AAAAABBBBBBBCCC

I didn't change the documentation cuz I wanna hear some feedback from the team before moving on.

Validation Steps Performed
Open .vimrc with vim and see for youself. It's not really "buttery smooth" but it it whole lot better. The CPU usage is dropped by about 30%.

Hey there, thanks for working on this! The engineer who knows the most about this (read: the original author), @miniksa, is unfortunately going to be away for a couple business days. Just wanted to let you know that this is on our radar, but feedback may be slow.

@DHowett-MSFT Thanks for the heads up. I'll just dig a liittle deeper into this. Cheers for a better terminal 🍺

/azp run

You will probably need to merge in master to get the CI pipeline to work again. Sorry about that!

@skyline75489, I love the idea and adding the two new cases.
I'd just want you to:

Update the comments in and around the method to very verbosely describe how the method is working and what the cases that it is looking for are
Add tests for your new cases to AttrRowTests in the Host.Tests.Unit library.

Thanks!

@miniksa Glad to hear it from you.
I've checked AttrRowTests and I think that this PR is already covered by TestInsertAttrRunsSingle, if I'm not mistaken. This PR does not break the tests, though. And I'm not sure what I could do now with the tests.

Come to think about it, this PR doesn't really add new cases. It simply broaden the original optimization to make it work when _list.size() is larger than 2. What used to work will still work. What used to be slower is now faster.

Houston, we got a problem. Can someone call /azp to rerun this?

/azp run

If that x64 one doesn't get unstuck with this run, we'll force override it when we have two sign-offs.


Add namespace label filter when fetching alerting rules

This PR adds a middleware function that adds namespace label filter when querying alerting rules. This filter contains the list of namespaces that the user has access to, thus returning only the rules that are in those namespaces.
This PR depends on grafana/loki/pull/9128

Replaced by #578


Adjust CI to run a subset of validation if client.tsp is the only file changed

Need the ability to limit the Ci checks that are done when only the client.tsp is changed.  This file does not affect the service at all and therefore shouldn't need all of the breaking change and api stewardship checks that happen when a service specification is changed.
Alternatively we could manage this file in the language independent azure-sdk repository, but that adds yet another repository involved when trying to generate our sdks from typespec.

@m-nash and I chatted, and I think we agreed that this client.tsp file should remain in the specs repo. He brought up the fact that currently the PR checks in the spec PRs are not in great shape and that can cause risk and delay in updating these SDK only changes. Right now, we are still in the process of getting cadl/typespec correctly supported in the PR validation pipelines and so things are definitely bumpy currently. We are actively working to improve on this process. Once we have the process working smoother, we can look at optimizations to the process but the hope is that doesn't end up being necessary.
So, for now we don't plan any specific CI subset but we can revisit as work begins and we find places that don't end-up adding value.

@weshaggard I understand your priorities, and I have no problem with that, but I wouldn't close this issue until we have the new system and confirmed it matches our expectations convey by this issue. I see Github issues as requirement for tooling, so I'd like to keep it open.

The reason I closed this issue is there isn't anything specifically actionable. I don't mind keeping it open but I wouldn't really assign it to anyone because we don't know what any of this would look like at this point or if there is anything to do at all. My suggestion would be to close this and to open specific requests for pruning in the future if and when you hit things.

This is an old work item that appears in my "to triage" board as it is unassigned. Given this looks like TypeSpec, I am assigning @mikeharder to decide what to do about it.


Create template file with all necessary functions to write a test

This file can be stored in test/k8sT/test-template.go which contains all skelaton of what a test should have. for example: a before all, a context, etc. Potentially it would be something like

package k8sTest

import (
	"fmt"

	. "github.com/cilium/cilium/test/ginkgo-ext"
	"github.com/cilium/cilium/test/helpers"

	. "github.com/onsi/gomega"
)

var _ = Describe("K8sTestTemplate", func() {

	var (
		kubectl *helpers.Kubectl
	)

	BeforeAll(func() {
		kubectl = helpers.CreateKubectl(helpers.K8s1VMName(), logger)

		_ = kubectl.Apply(helpers.DNSDeployment())

		// Deploy the etcd operator
		err := kubectl.DeployETCDOperator()
		Expect(err).To(BeNil(), "Unable to deploy etcd operator")

		err = kubectl.CiliumInstall(helpers.CiliumDefaultDSPatch, helpers.CiliumConfigMapPatch)
		Expect(err).To(BeNil(), "Cilium cannot be installed")

		ExpectCiliumReady(kubectl)
		By("Waiting for all etcd-operator pods are ready")
		ExpectETCDOperatorReady(kubectl)
	})

	AfterFailed(func() {
		kubectl.CiliumReport(helpers.KubeSystemNamespace,
			"cilium endpoint list")
	})

	JustAfterEach(func() {
		kubectl.ValidateNoErrorsOnLogs(CurrentGinkgoTestDescription().Duration)
	})

	AfterEach(func() {
		ExpectAllPodsTerminated(kubectl)
	})
	It("checks cilium-health status between nodes", func() {
		// WRITE YOUR TEST HERE
	}

Why this is needed? I'm not agree with this at all. If we need a template to write a test we're doing something bad

@eloycoto the istio test for example doesn't deploy etcdoperator https://github.com/cilium/cilium/blob/master/test/k8sT/istio.go#L89
By having a default where developers could look at it and copy-paste before creating a new test would make it easier to avoid these mistakes.

The problem will happens TBH, the day that the Istio was added ETCD operator was not in there, so developer will have the same problem.

The problem will happens TBH, the day that the Istio was added ETCD operator was not in there, so developer will have the same problem.

That happens will all code. Kube-dns is also missing so it could have been avoided as well. This will still add value for developers to make it less difficult to write new tests.

the istio test for example doesn't deploy etcdoperator

@aanm fix for that is coming in #5869 FYI

@ianvernon it's already fixed


Fix the quantized table order by float value for easy reading

This PR is to fix the quantized table order for better reading and understanding in How to Quantize Neural Networks with TensorFlow.
Before fix:

QuantizedFloat
0-10.0
25530.0
12810.0

After fix:

QuantizedFloat
0-10.0
12810.0
25530.0

Nagging Assignee @benoitsteiner: It has been 14 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@suharshs Could you pls take a look?

Nagging Reviewer @suharshs: It has been 14 days with no activity and the awaiting review label was assigned. Can you please take a look?

Nagging Reviewer @suharshs: It has been 29 days with no activity and the awaiting review label was assigned. Can you please take a look?

Nagging Reviewer @suharshs: It has been 45 days with no activity and the awaiting review label was assigned. Can you please take a look?


Is this a bug?

Describe the Bug
use my dicom web api , but the image default window is errror.
Steps to Reproduce

open the url:
https://viewer.ohif.org/viewer/dicomjson?url=https://yyx.red/DicomWebViewerWebApi/apiOhifViewerV3/studiesMeta/1.2.345.6.7<IP_ADDRESS>.2013004790.7700.1715847467.1

The current behavior
the default Window is right.
The expected behavior
the default Window is error:

OS
windows 10
Node version
20
Browser
chrome

Can you share the dicom files only?


add 0.7.0 to changelog

@elwayman02 I was able to generate this by running:

yarn run lerna-changelog --tag-from 0.6.0

I think yarn run lerna-changelog isn't working because it needs to be run before the new release is made

I tried running it both before and after the release was made :(


Completed lab03

Last step merging the develop branch with the master branch in team repo.

Last step merging the develop branch with the master branch in team repo.

Not merging to the team repo!


Dev

Hi, thanks for the pull-request. It would be nice if you can also add an image of your task to the readme file and add a log message at the end of the readme file. After that I will merge your codes into the main branch. It looks fun!


Add git authentication methods to match import command

Checklist

[x] I've run bundle exec rspec from the root directory to see all new and existing tests pass
[x] I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
[x] I've read the Contribution Guidelines
[x] I've updated the documentation if necessary.

Unfortunately two tests are failing for reasons I don't understand - possibly fastlane is caching the auth credentials somewhere?
Failed examples:
rspec ./fastlane/spec/actions_specs/import_from_git_spec.rb:162 # Fastlane Fastlane::FastFile import_from_git with caching works with new tags
rspec ./fastlane/spec/actions_specs/import_from_git_spec.rb:200 # Fastlane Fastlane::FastFile import_from_git with caching works with branch

Motivation and Context
Similar to https://github.com/fastlane/fastlane/pull/18202 but for fastlane match import. I've been attempting to upload new certs, keys and provisioning profiles using basic authorization but that's not possible because the git_basic_authorization parameter is not available when using match import
Description
Added the git_private_key, git_basic_authorization and git_bearer_authorization parameters to the match import storage client
Testing Steps
Use fastlane match import with the --git-basic-authorization parameter set

@googlebot I signed it!


Colored indication for project versions inside ProjectManager.

Recreated this PR to work from a separate branch. Addressing #25497.

For reference, here's what this PR currently looks like:

Issue: the paths for my projects are cut off by these notifications.
One has the word "project" and one doesn't, it should probably be consistent.
Or, even better, it might be more useful to display specific versions and have project.godot contain exact Godot versions. For newer Godot projects this can be always explicit ("3.1.2" etc), and for older projects where the only version info is "config_version=3" it could just display "3.0.x" as the version etc.

maybe notification can be on a line above instead of same as path

Closing for now as it can't be merged as is. I also think that showing version numbers as suggested in #25497 would be more useful than a generic "Old version".


Android device back button exits app

When you build this project and upload it to Monaca the Android back button always exits the app when pressed. My understanding is that the default behaviour should be that the back button should pop the current page if there are more than 1 page in the stack, otherwise it should exit the app.
If you go from "Home" to "Dialogs" and press the back button the app exits, shouldn't it go back to "Home" instead?
Any workarounds for this?

@jacedh1 This is just sample app for browsers so it is not including cordova.js (is 404 in browsers). Without that file, it won't be able to fire device back buttons. Simply add <script src="cordova.js"></script> in your index.html and it will work. If you are using Monaca, you can add <script src="loader.js"></script> instead and it will also include cordova.js.

@frandiox Thank you! I had a feeling it was something simple like that!
I had to change the src to "./components/loader.js" but it works like a charm now. Feels like it improved performance too.


Unable to read from io.StringIO

$ python
Python 3.8.5 (default, Jul 28 2020, 12:59:40)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import io
>>> buf = io.StringIO('hello world')
>>> buf.seek(0)
0
>>> import smart_open
>>> smart_open.open(buf).read()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.8/codecs.py", line 500, in read
    data = self.bytebuffer + newdata
TypeError: can't concat str to bytes

version 4.0.1

I briefly looked into this because one of the tests dealing with it failed.
If you want to support this I think the only way is to explicitly check for StringIO and return it unmodified from open(). Also raise an error if mode='b' or if newline is specified because those can't be supported. encoding and errors can be ignored because no encoding actually takes place with StringIO.

I briefly looked into this because one of the tests dealing with it failed.
If you want to support this I think the only way is to explicitly check for StringIO and return it unmodified from open(). Also raise an error if mode='b' or if newline is specified because those can't be supported. encoding and errors can be ignored because no encoding actually takes place with StringIO.

I don't like the idea of an explicit check. It's too narrow.
How about a fin.peek(0) to see what's in the actual stream? If it's text, we can't do anything other than return it as is.

I don't like the idea of an explicit check. It's too narrow.
How about a fin.peek(0) to see what's in the actual stream? If it's text, we can't do anything other than return it as is.

I don't think StringIO has a peek method. Even if it did, other's would rarely implement it. You would have to do a read followed by rewinding with seek which limits you to random access files.
In general I'm not sure accepting file objects even makes sense. Why would you call smart_open or even the built in open if you already have a file object? I can see the point of having StringIO/BytesIO work for being able to mock something in memory but beyond that I'm not convinced.
Supporting StringIO also breaks the concept of smart_open always treating the underlying file as a byte stream which complicates things and may set you up for quite a bit of maintenance pain in the future.

I don't think StringIO has a peek method. Even if it did, other's would rarely implement it. You would have to do a read followed by rewinding with seek which limits you to random access files.
In general I'm not sure accepting file objects even makes sense. Why would you call smart_open or even the built in open if you already have a file object? I can see the point of having StringIO/BytesIO work for being able to mock something in memory but beyond that I'm not convinced.
Supporting StringIO also breaks the concept of smart_open always treating the underlying file as a byte stream which complicates things and may set you up for quite a bit of maintenance pain in the future.

@markopy You make valid points.

In general I'm not sure accepting file objects even makes sense. Why would you call smart_open or even the built in open if you already have a file object?

@piskvorky WDYT? What was the motivation of allowing smart_open to accept a file object as input? It breaks symmetry with the built-in function.
>>> open(open('setup.py'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper
>>>

Perhaps we should do exactly as the built-in option, and accept the above three classes as inputs exclusively?

@markopy You make valid points.

In general I'm not sure accepting file objects even makes sense. Why would you call smart_open or even the built in open if you already have a file object?

@piskvorky WDYT? What was the motivation of allowing smart_open to accept a file object as input? It breaks symmetry with the built-in function.
>>> open(open('setup.py'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: expected str, bytes or os.PathLike object, not _io.TextIOWrapper
>>>

Perhaps we should do exactly as the built-in option, and accept the above three classes as inputs exclusively?

I'm not sure, would have to dig through the history. I like @markopy 's argument, makes sense to keep smart_open's mission clean and contained.

I'm not sure, would have to dig through the history. I like @markopy 's argument, makes sense to keep smart_open's mission clean and contained.

Just one thing to add: For complete consistency with built in open you also need to accept integer file descriptors as pointed out in #528.

Just one thing to add: For complete consistency with built in open you also need to accept integer file descriptors as pointed out in #528.

I found this: https://github.com/RaRe-Technologies/smart_open/pull/32. @gojomo what was your motivation there, do you remember?

I found this: https://github.com/RaRe-Technologies/smart_open/pull/32. @gojomo what was your motivation there, do you remember?

I can't recall the motivation. I vaguely think some bit of example code or downstream code in Gensim may have needed this behavior, and at the time I may have thought that even Python's open() worked this same way. There might have been a request via another issue or forum.
Given my minimal comment & your rapid review & integration, we'd probably talked about it somewhere else, but I'm not sure where.
If we try removing the passthrough case & running all smart_open & gensim tests, maybe we'll find something that breaks?

I can't recall the motivation. I vaguely think some bit of example code or downstream code in Gensim may have needed this behavior, and at the time I may have thought that even Python's open() worked this same way. There might have been a request via another issue or forum.
Given my minimal comment & your rapid review & integration, we'd probably talked about it somewhere else, but I'm not sure where.
If we try removing the passthrough case & running all smart_open & gensim tests, maybe we'll find something that breaks?

Are you interested in investigating this further @markopy ?

Are you interested in investigating this further @markopy ?

The change from #32 now resides in _open_binary_stream  so it implicitly assumes the file is opened in binary mode. In that context failing for StringIO or anything else that returns something other than bytes on read makes sense.
There are a whole bunch of tests explicitly for SmartOpenFileObjTest as well as some using BytesIO to test other things. There is also a test for this use case:
        Does our detection of the `name` attribute work with wrapped open()-ed streams?

        We `open()` a file with ".bz2" extension, pass the file object to `smart_open()` and check that
        we read decompressed data. This behavior is driven by detecting the `name` attribute in
        `_open_binary_stream()`.

I find support for this somewhat questionable but I don't have time to investigate why this might exist and whether to remove it again makes sense.
The easiest thing to do is to keep the current support for handling binary file objects but not extend it to text streams like StringIO.

The change from #32 now resides in _open_binary_stream  so it implicitly assumes the file is opened in binary mode. In that context failing for StringIO or anything else that returns something other than bytes on read makes sense.
There are a whole bunch of tests explicitly for SmartOpenFileObjTest as well as some using BytesIO to test other things. There is also a test for this use case:
        Does our detection of the `name` attribute work with wrapped open()-ed streams?

        We `open()` a file with ".bz2" extension, pass the file object to `smart_open()` and check that
        we read decompressed data. This behavior is driven by detecting the `name` attribute in
        `_open_binary_stream()`.

I find support for this somewhat questionable but I don't have time to investigate why this might exist and whether to remove it again makes sense.
The easiest thing to do is to keep the current support for handling binary file objects but not extend it to text streams like StringIO.

@piskvorky Removing support for open-ing a buffer (as opposed to a string) seems to have no effect on gensim tests.
What do you think about removing this functionality?

@piskvorky Removing support for open-ing a buffer (as opposed to a string) seems to have no effect on gensim tests.
What do you think about removing this functionality?

I have no chips on the table – if gensim (and i guess gensim-data) continue to work, let's axe it.

I have no chips on the table – if gensim (and i guess gensim-data) continue to work, let's axe it.

Yes, I think it does, even though it doesn't seem like people use this particular feature much.

Yes, I think it does, even though it doesn't seem like people use this particular feature much.


Capturing arbitrary AST nodes in nested macros

The AST nodes that can be passed from an outer macro to nested macros are rather limited:

A verbatim or escaped macro expression has no direct access to outer macro variables.
Outer macro variables must be interpolated and evaluated inside some escaped macro expression. This reinterpretation changes the type of the AST node, even when no interpolation should be needed.

This is best illustrated below:
macro foo1(x)
  {% p x.class_name %}
  macro bar1
    \{% p {{ x }}.class_name %}
  end
end

macro foo2(x)
  {% p x.class_name %}
  macro bar2
    \{% x = {{ x }} %}
    {% verbatim do %}
      {% p x.class_name %}
    {% end %}
  end
end

foo1(Int32) # => "Path"
bar1        # => "TypeNode"
foo2(Int32) # => "Path"
bar2        # => "TypeNode"

foo1(if true; 1; end) # Error: expecting token '%}', not 'end'
foo2(if true; 1; end) # => "If"
bar2                  # => "NumberLiteral"

foo1(while true; 1; end) # Error: trailing `while` is not supported
foo2(while true; 1; end) # Error: can't execute While in a macro

I propose allowing verbatim to take any number of macro variables as named arguments. Those variables then become available inside the nested macro:
macro foo3(x)
  {% p x.class_name %}
  macro bar3
    {% verbatim(x: x) do %}
      {% p x.class_name %}
    {% end %}
  end
end

foo3(Int32) # => "Path"
bar3        # => "Path"

foo3(if true; 1; end) # => "If"
bar3                  # => "If"

foo3(while true; 1; end) # => "While"
bar3                     # => "While"

Here bar3 should contain some internal quote expression node that refers to the outer x, more specifically the x variable or parameter in the outermost active macro definition. Should this expression be publicly available, we could also rewrite foo1 as follows (the quote expression's string representation is intentionally invalid, like <Program>, since the nested macro cannot be used without an outer context anyway):
macro foo4(x)
  {% p x.class_name %}
  macro bar4
    \{% <quote x: x> %}
    \{% p x.class_name %}
  end
end

This quoting ideally produces a clone of x, repositioned at the verbatim or quote, so that inner mutations cannot affect the outer macro or other nested macros inside foo. Quotes are only meaningful inside a macro definition, never in isolation, so they are forbidden in e.g. top-level {% begin %} expressions. The named arguments offer a chance to rename the macro variables, and also signal to the user that the outer and inner variables are not truly shared.
I personally prefer only the verbatim option because it makes the scope of the quoted AST nodes more explicit.

A perhaps more generic approach is to simply allow a quote macro method that returns its argument as an AST node, uninterpreted. With that we could write:
macro foo5(x)
  macro bar5
    \{% x = quote({{ x }}) %}
    \{% p x.class_name %}
  end
end

This interpolation of x naturally produces a clone, and implies such a method would make sense even when nested macros aren't involved:
{% Int32.class_name %}        # => "TypeNode"
{% quote(Int32).class_name %} # => "Path"

{% (1 + 2).class_name %}        # => NumberLiteral
{% quote(1 + 2).class_name %}   # => Call
{% quote((1 + 2)).class_name %} # => Expressions

The drawback is Crystal now has to be able to parse virtually anything inside quote, possibly entire type definitions or libs, which may have their own nested or inline macros. Even more generic is to expose the parser completely:
\{% x = parse({{ x.stringify }}) %}

This has its own disadvantage: special nodes like @top_level have no syntactically valid Crystal representations, so they will break parse immediately.

The behaviour you describe with verbatim receiving variables to quote looks actually pretty similar to macro yield (if it's completely implemented, https://github.com/crystal-lang/crystal/issues/11183).


Remove outdated sentence from StreamIDTooLowError docstring

Since 33ff6559ede1756a5df08c62686c2c9194846092, StreamIDTooLowError no longer a subclass of ValueError.

Thank you so much! :sparkles: :cake: :sparkles:


Revert "refine location comparison when pre-loading package (#7002)"

I've verified that the reverted commit removes required packages from Package.resolved in certain dependency graphs.
This reverts commit 1491d340eb995aa3f5c0950e4587f64014522683.
# Conflicts:
#	Sources/Workspace/Workspace+Manifests.swift
#	Sources/Workspace/Workspace.swift

Resolves rdar://117381924.

@swift-ci test

fix forward alternative: https://github.com/apple/swift-package-manager/pull/7034

@swift-ci test windows


Offset of a user space virtual address is ignored

I call the function "axidma_oneway_transfer()" from the lib in my application and I wanted to add an offset to the buffer.
I have 2 threads. 1 thread who reads the data from the FPGA and another thread who process the data.
To make sure that the processed data are not overridden, I wanted to add an offset to the allocated buffer.
First I read to buf, then to buf + offset, then to buf + 2*offset and so on.
For example:
char* buf = (char*)axidma_malloc(axidma_dev, 100);
axidma_oneway_transfer(axidma_dev, rx_chans->data[0], buf + 10, 10, true);
But the data are always written to the base address of buf and not buf + offset (in the example: buf + 10).
Is this the desired behavior?

Yep, that's definitely a bug in the driver. I forgot to add in the offset from the base address that you pass in with the function. I should have fix up fairly quickly.

That's great to hear. Thank you.

Ok, I just pushed a change that should fix it. Can you let me know if that does the trick? I unfortunately don't have a test setup to verify the change.

No, it does not work. You add the offset only in the second case to the return addresse.
I have a issue with your commit "Changed the include for send_sig_info. "
I will test it intensive and give you the changes with a pull request.

Ahh crap, that's what I get for making a quick change like that. I'll look over the PR.


Reflection Probe: Fix Z inversion in right handed system

See https://forum.babylonjs.com/t/reflection-probe-for-refractions-behaving-like-reflections-when-scene-userighthandedsystem/39633/6

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

Snapshot stored with reference name:
refs/pull/13704/merge
Test environment:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13704/merge/index.html
To test a playground add it to the URL, for example:
https://babylonsnapshots.z22.web.core.windows.net/refs/pull/13704/merge/index.html#WGZLGJ#4600
Links to test babylon tools with this snapshot:
https://playground.babylonjs.com/?snapshot=refs/pull/13704/merge
https://sandbox.babylonjs.com/?snapshot=refs/pull/13704/merge
https://gui.babylonjs.com/?snapshot=refs/pull/13704/merge
https://nme.babylonjs.com/?snapshot=refs/pull/13704/merge
To test the snapshot in the playground with a playground ID add it after the snapshot query string:
https://playground.babylonjs.com/?snapshot=refs/pull/13704/merge#BCU1XR#0


Mark/fix terrain

@tyle8552 this cleans up a bad layer which I don't believe was really needed to demo the functionality.

@mbcoder This needs to merge into the dev branch. Closing this to move to another PR.


luau: 0.590 -> 0.591

Diff: https://github.com/Roblox/luau/compare/0.590...0.591
Changelog: https://github.com/Roblox/luau/releases/tag/0.591
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[x] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 250143 run on x86_64-linux 1

1 package built:

luau


Update aws-java-sdk-core to 1.12.321

Updates com.amazonaws:aws-java-sdk-core from 1.12.319 to 1.12.321.
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.amazonaws", artifactId = "aws-java-sdk-core" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "@monthly" },
  dependency = { groupId = "com.amazonaws", artifactId = "aws-java-sdk-core" }
}]

labels: library-update, early-semver-patch, semver-spec-patch, commit-count:1

Superseded by #117.


Fix pkg GitHub field

package.jsonのGitHubのレポジトリ名を変更

Coverage remained the same at 99.858% when pulling 51afcfa95fa11b1bf4b6312bfbb58036d49f7db3 on fix-pkg-github-field into ea8c3301fcd726f34748983a5406fa49a1e9e3b3 on master.