Screen tearing and input delay

I made changes to the example given in the library although I'm facing a lot of tearing and input lag issues. I have attached a video as well that you can check it out.
In the draw function I changed the way bytes were written to the video buffer, although that doesn't seem to improve anything.
use anyhow::{Context, Result};
use minifb::{Key, Window, WindowOptions};
use tokio::{self, net::TcpStream};
use tracing::Level;
use vnc::{PixelFormat, Rect, VncConnector, VncEvent, X11Event};

struct CanvasUtils {
    window: Window,
    video: Vec<u32>,
    width: u32,
    height: u32,
}

impl CanvasUtils {
    fn new() -> Result<Self> {
        Ok(Self {
            window: Window::new(
                "mstsc-rs Remote Desktop in Rust",
                800_usize,
                600_usize,
                WindowOptions::default(),
            )
            .with_context(|| "Unable to create window".to_string())?,
            video: vec![],
            width: 800,
            height: 600,
        })
    }

    fn init(&mut self, width: u32, height: u32) -> Result<()> {
        let mut window = Window::new(
            "mstsc-rs Remote Desktop in Rust",
            width as usize,
            height as usize,
            WindowOptions::default(),
        )
        .with_context(|| "Unable to create window")?;
        window.limit_update_rate(Some(std::time::Duration::from_micros(16600)));
        self.window = window;
        self.width = width;
        self.height = height;
        self.video.resize(height as usize * width as usize, 0);
        Ok(())
    }

    fn draw(&mut self, rect: Rect, data: Vec<u8>) -> Result<()> {
        println!("width: {} height: {}", rect.width, rect.height);

        let bytes_per_pixel = 4;
        let grouped_pix: Vec<_> = data.chunks_exact(bytes_per_pixel).collect();
        let converted_data = grouped_pix
            .iter()
            .map(|x| u32::from_le_bytes(x[0..bytes_per_pixel].try_into().unwrap()) & 0x00_ff_ff_ff)
            .collect::<Vec<_>>();

        for y in 0..rect.height as usize {
            let start = (rect.y as usize + y) * self.width as usize + rect.x as usize;
            let converted_slice =
                &converted_data[y * rect.width as usize..(y + 1) * rect.width as usize];

            self.video[start..start + rect.width as usize].copy_from_slice(&converted_slice);
        }

        Ok(())
    }

    fn flush(&mut self) -> Result<()> {
        self.window
            .update_with_buffer(&self.video, self.width as usize, self.height as usize)
            .with_context(|| "Unable to update screen buffer")?;
        Ok(())
    }

    fn copy(&mut self, dst: Rect, src: Rect) -> Result<()> {
        println!("Copy");
        let mut tmp = vec![0; src.width as usize * src.height as usize];
        let mut tmp_idx = 0;
        for y in 0..src.height as usize {
            let mut s_idx = (src.y as usize + y) * self.width as usize + src.x as usize;
            for _ in 0..src.width {
                tmp[tmp_idx] = self.video[s_idx];
                tmp_idx += 1;
                s_idx += 1;
            }
        }
        tmp_idx = 0;
        for y in 0..src.height as usize {
            let mut d_idx = (dst.y as usize + y) * self.width as usize + dst.x as usize;
            for _ in 0..src.width {
                self.video[d_idx] = tmp[tmp_idx];
                tmp_idx += 1;
                d_idx += 1;
            }
        }
        Ok(())
    }

    fn close(&self) {}

    fn test(&mut self) {
        self.init(1920, 1080);
    }

    fn hande_vnc_event(&mut self, event: VncEvent) -> Result<()> {
        match event {
            VncEvent::SetResolution(screen) => {
                tracing::info!("Resize {:?}", screen);
                self.init(screen.width as u32, screen.height as u32)?
            }
            VncEvent::RawImage(rect, data) => {
                self.draw(rect, data)?;
            }
            VncEvent::Bell => {
                tracing::warn!("Bell event got, but ignore it");
            }
            VncEvent::SetPixelFormat(_) => unreachable!(),
            VncEvent::Copy(dst, src) => {
                self.copy(dst, src)?;
            }
            VncEvent::JpegImage(_rect, _data) => {
                tracing::warn!("Jpeg event got, but ignore it");
            }
            VncEvent::SetCursor(rect, data) => {
                if rect.width != 0 {
                    self.draw(rect, data)?;
                }
            }
            VncEvent::Text(string) => {
                tracing::info!("Got clipboard message {}", string);
            }
            _ => tracing::error!("{:?}", event),
        }
        Ok(())
    }
}

#[tokio::main]
async fn main() -> Result<()> {
    // Create tracing subscriber
    #[cfg(debug_assertions)]
    let subscriber = tracing_subscriber::fmt()
        .pretty()
        .with_max_level(Level::TRACE)
        .finish();

    #[cfg(not(debug_assertions))]
    let subscriber = tracing_subscriber::fmt()
        .pretty()
        .with_max_level(Level::INFO)
        .finish();

    tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed");

    let tcp = TcpStream::connect("<IP_ADDRESS>:5901").await?;
    let vnc = VncConnector::new(tcp)
        .set_auth_method(async move { Ok("123456".to_string()) })
        .add_encoding(vnc::VncEncoding::Tight)
        .add_encoding(vnc::VncEncoding::Zrle)
        .add_encoding(vnc::VncEncoding::CopyRect)
        .add_encoding(vnc::VncEncoding::Raw)
        .allow_shared(true)
        .set_pixel_format(PixelFormat::bgra())
        .build()?
        .try_start()
        .await?
        .finish()?;

    let mut canvas = CanvasUtils::new()?;
    // canvas.test();
    let mut now = std::time::Instant::now();
    let mut pressed_keys = Vec::<u32>::new();

    loop {
        let mut events = Vec::<X11Event>::new();

        match vnc.poll_event().await {
            Ok(Some(e)) => {
                let _ = canvas.hande_vnc_event(e);
            }
            Ok(None) => (),
            Err(e) => {
                tracing::error!("{}", e.to_string());
                break;
            }
        }

        if now.elapsed().as_millis() > 16 {
            canvas
                .window
                .get_keys_pressed(minifb::KeyRepeat::No)
                .iter()
                .for_each(|key| {
                    let converted_key = convert_key_to_u32(*key);

                    if !pressed_keys.contains(&converted_key) {
                        println!("Key pressed: {:?}", key);
                        pressed_keys.push(converted_key);
                        events.push(X11Event::KeyEvent((converted_key, true).into()))
                    }
                });

            canvas.window.get_keys_released().iter().for_each(|key| {
                let converted_key = convert_key_to_u32(*key);

                if pressed_keys.contains(&converted_key) {
                    println!("Key released: {:?}", key);
                    pressed_keys.retain(|&x| x != converted_key);
                    events.push(X11Event::KeyEvent((convert_key_to_u32(*key), false).into()))
                }
            });

            let mut x = 0;
            let mut y = 0;

            canvas
                .window
                .get_mouse_pos(minifb::MouseMode::Clamp)
                .map(|mouse| {
                    // println!("Mouse position: x {} y {}", mouse.0 as u16, mouse.1 as u16);
                    x = mouse.0 as u16;
                    y = mouse.1 as u16;
                });

            // canvas.window.get_scroll_wheel().map(|scroll| {
            //     println!("scrolling - x {} y {}", scroll.0, scroll.1);
            // });

            let left_down = canvas.window.get_mouse_down(minifb::MouseButton::Left);
            // println!("is left down? {}", left_down);

            let right_down = canvas.window.get_mouse_down(minifb::MouseButton::Right);
            // println!("is right down? {}", right_down);

            let middle_down = canvas.window.get_mouse_down(minifb::MouseButton::Middle);
            // println!("is middle down? {}", middle_down);

            let mut mask: u8 = 0;

            if left_down {
                mask |= 1;
            }

            if middle_down {
                mask |= 1 << 1
            }

            if right_down {
                mask |= 1 << 2
            }

            events.push(X11Event::PointerEvent((x, y, mask).into()));

            // Add code for receiver of input events
            for event in events {
                let _ = vnc.input(event).await;
            }

            let _ = canvas.flush();
            let _ = vnc.input(X11Event::Refresh).await;
            now = std::time::Instant::now();
        }
    }
    canvas.close();
    let _ = vnc.close().await;
    Ok(())
}

https://github.com/HsuJv/vnc-rs/assets/42912342/1554196d-9a83-4a72-a701-7a093ea95b99

Hi @Advait1306
I'll be available about one day later
Will have a look at this issue then
BRs

Hi @Advait1306 ,
Serval steps to improve the streaming quality:

Run with the release build
Remove the println!("width: {} height: {}", rect.width, rect.height); in CanvasUtils::draw method
change the render interval from 16ms to 1ms
If possible, use some structs like MouseUtil and KeyUtil to record the status of mouse & keys, and only send event when it was changed.

Hope that will be of help to you
BRs

A simple example about the MouseUtil:
Note that it's also recommended to use one thread to handle input events and one thread to handle output events
But the code could be more complex so I didn't implement it.
use anyhow::{Context, Result};
use minifb::{Key, Window, WindowOptions};
use tokio::{self, net::TcpStream};
use tracing::Level;
use vnc::{PixelFormat, Rect, VncConnector, VncEvent, X11Event};

struct CanvasUtils {
    window: Window,
    video: Vec<u32>,
    width: u32,
    height: u32,
}

impl CanvasUtils {
    fn new() -> Result<Self> {
        Ok(Self {
            window: Window::new(
                "mstsc-rs Remote Desktop in Rust",
                800_usize,
                600_usize,
                WindowOptions::default(),
            )
            .with_context(|| "Unable to create window".to_string())?,
            video: vec![],
            width: 800,
            height: 600,
        })
    }

    fn init(&mut self, width: u32, height: u32) -> Result<()> {
        let mut window = Window::new(
            "mstsc-rs Remote Desktop in Rust",
            width as usize,
            height as usize,
            WindowOptions::default(),
        )
        .with_context(|| "Unable to create window")?;
        window.limit_update_rate(Some(std::time::Duration::from_micros(16600)));
        self.window = window;
        self.width = width;
        self.height = height;
        self.video.resize(height as usize * width as usize, 0);
        Ok(())
    }

    fn draw(&mut self, rect: Rect, data: Vec<u8>) -> Result<()> {
        // println!("width: {} height: {}", rect.width, rect.height);

        let bytes_per_pixel = 4;
        let grouped_pix: Vec<_> = data.chunks_exact(bytes_per_pixel).collect();
        let converted_data = grouped_pix
            .iter()
            .map(|x| u32::from_le_bytes(x[0..bytes_per_pixel].try_into().unwrap()) & 0x00_ff_ff_ff)
            .collect::<Vec<_>>();

        for y in 0..rect.height as usize {
            let start = (rect.y as usize + y) * self.width as usize + rect.x as usize;
            let converted_slice =
                &converted_data[y * rect.width as usize..(y + 1) * rect.width as usize];

            self.video[start..start + rect.width as usize].copy_from_slice(&converted_slice);
        }

        Ok(())
    }

    fn flush(&mut self) -> Result<()> {
        self.window
            .update_with_buffer(&self.video, self.width as usize, self.height as usize)
            .with_context(|| "Unable to update screen buffer")?;
        Ok(())
    }

    fn copy(&mut self, dst: Rect, src: Rect) -> Result<()> {
        println!("Copy");
        let mut tmp = vec![0; src.width as usize * src.height as usize];
        let mut tmp_idx = 0;
        for y in 0..src.height as usize {
            let mut s_idx = (src.y as usize + y) * self.width as usize + src.x as usize;
            for _ in 0..src.width {
                tmp[tmp_idx] = self.video[s_idx];
                tmp_idx += 1;
                s_idx += 1;
            }
        }
        tmp_idx = 0;
        for y in 0..src.height as usize {
            let mut d_idx = (dst.y as usize + y) * self.width as usize + dst.x as usize;
            for _ in 0..src.width {
                self.video[d_idx] = tmp[tmp_idx];
                tmp_idx += 1;
                d_idx += 1;
            }
        }
        Ok(())
    }

    fn close(&self) {}

    fn test(&mut self) {
        self.init(1920, 1080);
    }

    fn hande_vnc_event(&mut self, event: VncEvent) -> Result<()> {
        match event {
            VncEvent::SetResolution(screen) => {
                tracing::info!("Resize {:?}", screen);
                self.init(screen.width as u32, screen.height as u32)?
            }
            VncEvent::RawImage(rect, data) => {
                self.draw(rect, data)?;
            }
            VncEvent::Bell => {
                tracing::warn!("Bell event got, but ignore it");
            }
            VncEvent::SetPixelFormat(_) => unreachable!(),
            VncEvent::Copy(dst, src) => {
                self.copy(dst, src)?;
            }
            VncEvent::JpegImage(_rect, _data) => {
                tracing::warn!("Jpeg event got, but ignore it");
            }
            VncEvent::SetCursor(rect, data) => {
                if rect.width != 0 {
                    self.draw(rect, data)?;
                }
            }
            VncEvent::Text(string) => {
                tracing::info!("Got clipboard message {}", string);
            }
            _ => tracing::error!("{:?}", event),
        }
        Ok(())
    }
}

struct MouseUtil {
    pub mask: u8,
    pub x: u16,
    pub y: u16,
}

impl MouseUtil {
    fn new() -> Self {
        Self {
            mask: 0,
            x: 0,
            y: 0,
        }
    }

    fn changed(&mut self, window: &Window) -> bool {
        let mut x = 0;
        let mut y = 0;

        window.get_mouse_pos(minifb::MouseMode::Clamp).map(|mouse| {
            // println!("Mouse position: x {} y {}", mouse.0 as u16, mouse.1 as u16);
            x = mouse.0 as u16;
            y = mouse.1 as u16;
        });

        // canvas.window.get_scroll_wheel().map(|scroll| {
        //     println!("scrolling - x {} y {}", scroll.0, scroll.1);
        // });

        let left_down = window.get_mouse_down(minifb::MouseButton::Left);
        // println!("is left down? {}", left_down);

        let right_down = window.get_mouse_down(minifb::MouseButton::Right);
        // println!("is right down? {}", right_down);

        let middle_down = window.get_mouse_down(minifb::MouseButton::Middle);
        // println!("is middle down? {}", middle_down);

        let mut mask: u8 = 0;

        if left_down {
            mask |= 1;
        }

        if middle_down {
            mask |= 1 << 1
        }

        if right_down {
            mask |= 1 << 2
        }

        if (self.x, self.y, self.mask) != (x, y, mask) {
            (self.x, self.y, self.mask) = (x, y, mask);
            true
        } else {
            false
        }
    }
}

#[tokio::main]
async fn main() -> Result<()> {
    // Create tracing subscriber
    #[cfg(debug_assertions)]
    let subscriber = tracing_subscriber::fmt()
        .pretty()
        .with_max_level(Level::ERROR)
        .finish();

    #[cfg(not(debug_assertions))]
    let subscriber = tracing_subscriber::fmt()
        .pretty()
        .with_max_level(Level::INFO)
        .finish();

    tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed");

    let tcp = TcpStream::connect("<IP_ADDRESS>:5900").await?;
    let vnc = VncConnector::new(tcp)
        .set_auth_method(async move { Ok("123456".to_string()) })
        .add_encoding(vnc::VncEncoding::Tight)
        .add_encoding(vnc::VncEncoding::Zrle)
        .add_encoding(vnc::VncEncoding::CopyRect)
        .add_encoding(vnc::VncEncoding::Raw)
        .allow_shared(true)
        .set_pixel_format(PixelFormat::bgra())
        .build()?
        .try_start()
        .await?
        .finish()?;

    let mut canvas = CanvasUtils::new()?;
    let mut mouse = MouseUtil::new();
    // canvas.test();
    let mut now = std::time::Instant::now();
    let mut pressed_keys = Vec::<u32>::new();

    loop {
        let mut events = Vec::<X11Event>::new();

        match vnc.poll_event().await {
            Ok(Some(e)) => {
                let _ = canvas.hande_vnc_event(e);
            }
            Ok(None) => (),
            Err(e) => {
                tracing::error!("{}", e.to_string());
                break;
            }
        }

        // canvas
        //     .window
        //     .get_keys_pressed(minifb::KeyRepeat::No)
        //     .iter()
        //     .for_each(|key| {
        //         let converted_key = convert_key_to_u32(*key);

        //         if !pressed_keys.contains(&converted_key) {
        //             println!("Key pressed: {:?}", key);
        //             pressed_keys.push(converted_key);
        //             events.push(X11Event::KeyEvent((converted_key, true).into()))
        //         }
        //     });

        // canvas.window.get_keys_released().iter().for_each(|key| {
        //     let converted_key = convert_key_to_u32(*key);

        //     if pressed_keys.contains(&converted_key) {
        //         println!("Key released: {:?}", key);
        //         pressed_keys.retain(|&x| x != converted_key);
        //         events.push(X11Event::KeyEvent((convert_key_to_u32(*key), false).into()))
        //     }
        // });

        if mouse.changed(&canvas.window) {
            let _ = vnc
                .input(X11Event::PointerEvent(
                    (mouse.x, mouse.y, mouse.mask).into(),
                ))
                .await;
        }

        if now.elapsed().as_millis() > 16 {
            // Add code for receiver of input events

            let _ = canvas.flush();
            let _ = vnc.input(X11Event::Refresh).await;
            now = std::time::Instant::now();
        }
    }
    canvas.close();
    let _ = vnc.close().await;
    Ok(())
}

Hey thank you so much for these improvements. I'll look into implementing these over the weekend and getting back to you with the results.

Hey sorry for the late updates, I finally transferred the keyboard and button press events to another thread & that improved the performance a lot.
Is there a way for me to set the quality of output?

I guess you want to change the resolution of the vnc client?
If so, the answer shall be no way. The resolution is unilaterally announced by the vnc server. You can use some command vncserver :1 -geometry 1920*1080 to get have a 1080p output or vncserver :1 -geometry 4096*2160 to have a 4k output.
BRs.

So when I use noVnc for my client I get an option to set qualityLevel.
This is the description of that property:

Is an int in range [0-9] controlling the desired JPEG quality. Value 0 implies low quality and 9 implies high quality. Default value is 6.

What could be the equivalent in this library?

Nope, actually from my pov it seems this option only affects the "JPEG" encoding which we currently don't support.
Note that we are now only supporting Raw, Trle, Zrle, Tight encodings.
Maybe I can later add the support of JPEG encoding.
BRs

Okay got it, I was looking for that option. I'll try implementing it myself and raise a PR. If I have any doubts I'll create an issue and we can continue the conversation there.
Any links to documentation that can help me?

Well, it might be not so difficult if you want to have a try.

Adding related encodings Jpeg, JpegQuality0, JpegQuality1.....JpegQuality10toenum VncEncoding` (in main/src/config.rs), referring https://github.com/novnc/noVNC/blob/master/core/encodings.js
Adding a jpeg.rs under the codec fold, referring raw.rs
Implement the Decoder structure and functions, referring https://github.com/novnc/noVNC/blob/master/core/decoders/jpeg.js
Add the JpegDecoder to asycn_vnc_read_loop method in file src/client/connection.rs
Add APIs such as SetJpegQuality6 to call add_encoding(vnc::VncEncoding::JpegQuality6) just like what we do when we add other encodings.

If any questions, please feel free to ask.
BRs.

And there's one thing that I'm not sure about: The uncompressed image data in JPEG encoding may be should be rendered in a different way compared with the other encodings.
All other encodings have the uncompressed data represent a sequence of 32-bit pixels but the JPEG encoding perhaps represents a jpeg picture, which may need further configuration on the client side.
You may test whether VncEvent::JpegImage or VncEvent::RawData should be used when generate output events.


Error Variables are invalid JSON.

I am trying to use mutation but withour variables.
import {GraphQLClient, gql} from 'graphql-request';
const endpoint = "http://localhost:3000/admin/";
const graphQLClient = new GraphQLClient(endpoint, {
    headers: {
      "Authorization": `bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI1ZjkyYzljMzJlNzk2NjA0OTg1NmVlYmEiLCJlbWFpbCI6ImthbW9sYWphbmkxQGdtYWlsLmNvbSIsImZ1bGxuYW1lIjoiS2FteWFyIFNhcmJheiIsImlhdCI6MTYwNTk3NTY0OCwiZXhwIjoxNjA2NTgwNDQ4fQ.5b81_z6eCgbhTCMDeu9Sz1rR7raXRnoF3oSVz-TyTxs`,
    },
  })
const query = gql`
    mutation {
        registerSupplier(input: {name: "hello world", email<EMAIL_ADDRESS>address: "100m behind the behind", location: [22, 22],  phone_numbers: ["11111111111", "1111111111111"]}){
            success
            message
        }
    }
  `;

  try {
    const data = await graphQLClient.request(endpoint, query)
    console.log(JSON.stringify(data, undefined, 2))
  } catch (error) {
    console.error(error)
  }

Then error in the console:
browser-ponyfill.js:517 POST http://localhost:3000/admin/ 400 (Bad Request)
(anonymous) @ browser-ponyfill.js:517
fetch @ browser-ponyfill.js:454
(anonymous) @ index.js:161
step @ index.js:63
(anonymous) @ index.js:44
(anonymous) @ index.js:38
__awaiter @ index.js:34
GraphQLClient.request @ index.js:152
test @ config.js:20
formSubmit @ Suppliers.svelte:27
(anonymous) @ index.mjs:238
config.js:23 Error: [object Object]: {"response":{"errors":[{"message":{"message":"Variables are invalid JSON."},"status":400}],"status":400},"request":{"query":"http://localhost:3000/admin/","variables":"\n    mutation {\n        registerSupplier(input: {name: \"hello world\", email<EMAIL_ADDRESS>address: \"100m behind the behind\", location: [22, 22],  phone_numbers: [\"11111111111\", \"1111111111111\"]}){\n            success\n            message\n        }\n    }\n  "}}
    at GraphQLClient.<anonymous> (index.js:172)
    at step (index.js:63)
    at Object.next (index.js:44)
    at fulfilled (index.js:35)

I don't want to use variables in mutation. i was looking for an example in the documentation of it but i didn't find one.

I passes the endpoint twice this made the error.


chore(deps): update gcs-resumable-upload to ^3.6.0

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

[ ] Make sure to open an issue as a bug/issue before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
[ ] Ensure the tests and linter pass
[ ] Code coverage does not decrease (if any source code was changed)
[ ] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

@shaffeeullah that should be fine, with the semantic versioning the new version should get picked up on any new npm install. This can wait to ship with the next release.


upgrade procfs

https://github.com/eminence/procfs/releases
$ cargo upgrade procfs
docs-rs:
    Upgrading procfs v0.7 -> v0.12.0

For the review:

I don't know procfs good enough to know if the breaking changes affect us, that would need to be checked or tested.
Since I didn't try the build on linux I might have missed something. A test-build locally is perhaps useful to see if the updated lockfile is correct.
The actual build itself is tested in CI

r? @Nemo157

The only breaking behavioural change looks to be changing the unit for cputime (which we're not using), the rest appear to be API changes that would fail to compile. I'm running a local build just in case though.

Build looks fine, it got the same free memory reading 👍


[AutoDiff] Fix SILGen JVP/VJP thunking bug.

SILGen JVP/VJP thunks for methods now always perform self reordering.
Add leak checking test.
Previously, self reordering was not performed if actual JVP/VJP type
matched expected JVP/VJP type, which is incorrect.
Gardening included:

Change SILFunction *SILGenFunction::getOrCreateAutoDiffLinearMapThunk to
ManagedValue SILGenFunction::getThunkedAutoDiffLinearMap. The new helper
is more ergonomic and directly returns thunked values.
Use ad-hoc _vtable_entry_thunk suffix for JVP/VJP vtable entry thunks.
Add todo comments for TF-685: principled AD thunk mangling.

Resolves TF-698.

Reproducer:
struct TF_698 : Differentiable & AdditiveArithmetic {
  var x: Float
  init(_ x: Float) {
    self.x = x
  }

  @differentiable(jvp: jvpMultiplied, vjp: vjpMultiplied)
  func multiplied(with other: Self) -> Self {
    return Self(x: x * other.x)
  }

  // Helper function to shorten JVP/VJP definitions.
  static func *(lhs: Self, rhs: Self) -> Self {
    return lhs.multiplied(with: rhs)
  }

  func jvpMultiplied(with other: Self) -> (Self, (Self, Self) -> Self) {
    return (multiplied(with: other), { dself, dother in
      self * dother + other * dself
    })
  }

  func vjpMultiplied(with other: Self) -> (Self, (Self) -> (Self, Self)) {
    return (multiplied(with: other), { v in
      (v * other, v * self)
    })
  }
}
let v = TF_698(1)
print(pullback(at: TF_698(3), TF_698(10)) { x, y in x.multiplied(with: y) }(v))
// Before:           (TF_698(3), TF_698(10))
// After (expected): (TF_698(10), TF_698(3))

Fixes derivatives of Tensor.concatenated(with:) and Tensor.++: https://github.com/tensorflow/swift-apis/pull/403

@swift-ci Please test tensorflow

@swift-ci Please test tensorflow

@swift-ci Please test tensorflow

@swift-ci Please test tensorflow

The leak checking tests you added are valid, but they are almost never effective for the thunks you added. They do not test whether you leaked any partial_apply’s. You can either convert all of these thunks to use ownership (which should be relatively easy), or manually test these cases before you merge. Making these thunks use ownership is a must in the short term.

I have a WIP patch to enable ownership in SILGen thunks. Is it okay for this patch land first to resolve TF-698?

Yep, resolving correctness is more important. Could you please run a few manual memory tests through Instruments before merging?

Yep, resolving correctness is more important. Could you please run a few manual memory tests through Instruments before merging?

I'm AFK now but I can use Instruments to test leaks in a few hours. (I understand the need to test partial_apply leaks, like in https://github.com/apple/swift/pull/26384, and why the current tests are ineffective.)

My patch enabling ownership for AD linear map thunks is ready for review.
I'll merge this PR first (fixing correctness but not leaks) to separate orthogonal changes.


Fix typos in README.md

Thanks for sharing your efforts to nixify Jetpack SDK. It's a great work! This pull request just fixes a couple of typos in the README.md.

Thank you for the typo fixes!


[caf] update to 0.18.6

Fix #24304 #24321
Update [caf] version to 0.18.6
Note: no feature need to test.

Delete the wrong branch.


Unable to unpack tuple of numpy arrays in nopython mode

I'm using numba 0.38.0 on elementaryOS 0.4.1 Loki.
I'm running into nopython frontend errors when trying to read the contents of a tuple of numpy arrays where the arrays seem to be of different types. The error message is:
The minimally reproducible code (sorry I can't make it any simpler). The gist of it is that I make 3 np.arrays using the same for loop, then another np.array, then put them all together into a tuple. 3 arrays are of type array(float64, 2d, C) whereas the odd one out is array(float64, 2d, F)
import numpy as np
from numba import jit
import scipy.stats
import itertools

covariance=np.array([[0.4, 0.2, 0], [0.2, 0.6, -0.3],
    [0, -0.3, 0.4]])

def MVNposterior(covariance,draws):
    dim=len(covariance)
    zscores=scipy.stats.norm.ppf(np.array(range(1,draws+1))/(draws+1))
    zscores_unskilled=scipy.stats.norm.ppf(np.array(range(1,draws))/(draws))
    base_draws=np.matrix.transpose(np.matrix(list(\
        itertools.product(zscores,repeat=(dim-1)))))
    meanterm=np.zeros((dim+1,dim),dtype=np.float64)
    covariance=np.matrix(covariance)
    covar=np.zeros((dim+1,dim,dim),dtype=np.float64)
    skilled_shocks=np.zeros((dim,draws**(dim-1),dim),dtype=np.float64)

    # x is the sector we observe
    for x in range(dim):
        # permute so that observed sector is in [1,1] slot in matrix
        permute=np.identity(dim)
        permute[0,0]=0
        permute[x,x]=0
        permute[x,0]=1
        permute[0,x]=1
        # calculate posterior matrices, and generate output
        permutecovar=np.matmul(np.matmul(permute,covariance),\
            np.matrix.transpose(permute))
        sigmax=permutecovar[0,0]
        sigmayx=permutecovar[1:dim,0]
        sigmaxy=permutecovar[0,1:dim]
        sigmay=permutecovar[1:dim,1:dim]
        posteriorcovar=sigmay-np.matmul(sigmayx,sigmaxy)/sigmax
        lmat=np.linalg.cholesky(posteriorcovar)
        meanout=np.append(0,np.asarray(sigmaxy/sigmax))
        meanout[0]=meanout[x]
        meanout[x]=0
        finalcovar=np.insert(posteriorcovar,0,np.array([0]*(dim-1)),0)
        finalcovar=np.insert(finalcovar,0,np.array([0]*dim),1)
        finalcovar=np.matmul(np.matmul(permute,finalcovar),\
            np.matrix.transpose(permute))
        meanterm[x+1]=meanout
        covar[x+1]=finalcovar
        shock_draws=np.insert(np.matmul(lmat,base_draws),0,\
            np.array([0]*base_draws.shape[1]),0)
        skilled_shocks[x]=np.array(
            np.matrix.transpose(np.matmul(permute,shock_draws)),
            dtype=np.float64)

    # add in case of home production (no posterior):
    meanterm[0]=np.zeros(dim)
    covar[0]=covariance
    lmat=np.linalg.cholesky(covariance)
    baseDrawsHP=np.matrix.transpose(np.matrix(list(
        itertools.product(zscores_unskilled,repeat=(dim)))))
    hp_shocks=np.array(np.matrix.transpose(np.matmul(
        lmat,baseDrawsHP)),dtype=np.float64)
    return tuple([skilled_shocks,hp_shocks])

# run list of posteriors to integrate wages over
(skilled_shocks,hp_shocks)=MVNposterior(skilled_covar,3)
skilled_shocks_list=[x for x in skilled_shocks]
sim_wage_shocks=tuple([hp_shocks]+skilled_shocks_list)

@jit(nopython=True)
def extract(tup,idx):
    return tup[idx]

extract(sim_wage_shocks,1)

---------------------------------------------------------------------------
TypingError                               Traceback (most recent call last)
<ipython-input-61-a2f4ad58234a> in <module>()
     67     return tup[idx]
     68
---> 69 extract(sim_wage_shocks,1)

~/anaconda3/lib/python3.6/site-packages/numba/dispatcher.py in _compile_for_args(self, *args, **kws)
    342                 raise e
    343             else:
--> 344                 reraise(type(e), e, None)
    345         except errors.UnsupportedError as e:
    346             # Something unsupported is present in the user code, add help info

~/anaconda3/lib/python3.6/site-packages/numba/six.py in reraise(tp, value, tb)
    656             value = tp()
    657         if value.__traceback__ is not tb:
--> 658             raise value.with_traceback(tb)
    659         raise value
    660

TypingError: Failed at nopython (nopython frontend)
Invalid usage of getitem with parameters ((array(float64, 2d, F), array(float64, 2d, C), array(float64, 2d, C), array(float64, 2d, C)), int64)
 * parameterized
[1] During: typing of intrinsic-call at <ipython-input-61-a2f4ad58234a> (67)

File "<ipython-input-61-a2f4ad58234a>", line 67:
def extract(tup,idx):
    return tup[idx]
    ^

Indeed, sim_wage_shocks seems to be a vanilla tuple of 2D arrays: if I run sim_wage_shocks:
(array([[-0.27241586, -0.44077813, -0.01928689],
        [-0.27241586, -0.44077813,  0.38477113],
        [-0.27241586,  0.16836226, -0.38477113],
        [-0.27241586,  0.16836226,  0.01928689],
        [ 0.27241586, -0.16836226, -0.01928689],
        [ 0.27241586, -0.16836226,  0.38477113],
        [ 0.27241586,  0.44077813, -0.38477113],
        [ 0.27241586,  0.44077813,  0.01928689]]),
 array([[ 0.        , -0.47693628, -0.03020197],
        [ 0.        , -0.47693628,  0.28616177],
        [ 0.        , -0.47693628,  0.6025255 ],
        [ 0.        ,  0.        , -0.31636374],
        [ 0.        ,  0.        ,  0.        ],
        [ 0.        ,  0.        ,  0.31636374],
        [ 0.        ,  0.47693628, -0.6025255 ],
        [ 0.        ,  0.47693628, -0.28616177],
        [ 0.        ,  0.47693628,  0.03020197]]),
 array([[-0.38941684,  0.        , -0.43318879],
        [-0.38941684,  0.        , -0.11682505],
        [-0.38941684,  0.        ,  0.19953868],
        [ 0.        ,  0.        , -0.31636374],
        [ 0.        ,  0.        ,  0.        ],
        [ 0.        ,  0.        ,  0.31636374],
        [ 0.38941684,  0.        , -0.19953868],
        [ 0.38941684,  0.        ,  0.11682505],
        [ 0.38941684,  0.        ,  0.43318879]]),
 array([[-0.58559281, -0.41303893,  0.        ],
        [-0.22028743, -0.41303893,  0.        ],
        [ 0.14501795, -0.41303893,  0.        ],
        [-0.36530538,  0.        ,  0.        ],
        [ 0.        ,  0.        ,  0.        ],
        [ 0.36530538,  0.        ,  0.        ],
        [-0.14501795,  0.41303893,  0.        ],
        [ 0.22028743,  0.41303893,  0.        ],
        [ 0.58559281,  0.41303893,  0.        ]]))

although running numba.typeof(sim_wage_shocks[i]) gives array(float64, 2d, F) for i=0 but array(float64, 2d, C) for i=1,2,3.
Lastly, for some reason, if I run MVNposterior with the second argument = 2 (which should just generate smaller arrays), the first entry is no longer of type array(float64, 2d, F) but rather  array(float64, 2d, C) and as a result I get no errors.
I would like to know what's causing this issue and how I should go about resolving it (e.g. by making all the arrays the same type).

Thanks for the report. In the code above this change needs to be made to make it run, swap:
(skilled_shocks,hp_shocks)=MVNposterior(skilled_covar,3)

for
(skilled_shocks,hp_shocks)=MVNposterior(covariance,3)

A minimal working reproducer for the issue is:
@jit(nopython=True)
def extract(tup,idx):
    return tup[idx]

Carr = np.arange(12).reshape(3, 4)
Farr = np.asfortranarray(Carr)

tup = (Carr, Farr)
extract(tup, 1)

The behaviour you are seeing is because the C/F ordering of an array makes them be considered as different types, the net result being that the typing system sees a tuple(Carray, Farray) as a Tuple type whereas a tuple(Carray, Carray) or a tuple(Farray, Farray) will be seen as a UniTuple type (homogeneous Tuple). This all matters because all the variable types must be determined at compile time. Returning __getitem__ from a Tuple type is ambiguous in that it returns something depending on the contents of the tuple at run time, i.e. it is value dependent. In contrast, if the returned item is a __getitem__ from a UniTuple it is known at compile time what type will be returned (as it is homogeneous) and so compilation succeeds.
To make sure you can return the __getitem__ on a tuple, the contents of the tuple must be all of the same type, this can be achieved in the sample code by rewriting sim_wage_shocks as:
sim_wage_shocks= tuple([np.array(x, copy=False, order='C') for x in sim_wage_shocks])

which switches all the arrays to 'C' order without copying unless needed.


React hooks

Thinking to reimplement the view () so that to write useStore() instead of wrapping

See this repository：https://github.com/react-kit/hodux

It is not possible to reduce the API and omit view without having hodux like selectors and we prefer to keep the current API. We will ship changes to play nicer with the hooks API in the next release though.

The package is moved to @risingstack/react-easy-state from v6.2.0. Please move to that package for the new useEffect alternative.


chore(package): add git repo

this information is exposed, amongst in other places, on npmjs.com and on yarnpkg.com

Awesome!


Hermes update for autoscale test

Profiling interval become configurable in runtime.
Hermes writes fewer logs.
Fixed bug with getting UTC timestamp for profile log.

I'm going to move Hermes configuration to zookeeper in separate PR.

Codacy issue is fixed in https://github.com/AppScale/appscale/pull/2484 .

https://ocd.appscale.com:8080/job/Daily Build/3503/


Possible port fo GNOME Shell

I have been using your theme on my ubuntu with unity for some time, and I love it so much, but now I'm using the ubuntuGNOME and I still want your theme ):
Can I expect a Flatabulous port to GNOME Shell?
 Your appreciation means a lot to me. I think, this theme should work with ubuntuGNOME as well. I'll try to make a port specifically for ubuntuGNOME version as well.
Cheers :beers:

I'm working on it and I've successfully changed the buttons and not the theme looks like:
![Gnome]
(https://i.imgur.com/lxoo7TM.png)
But as you can see the top bar is light so I wanted to ask: maybe you know how to change its color?


[12-10-2022]: Test for new CI

Which task do you want to work on?
Test for new CI

Test for new CI

[ ] Task 1
[ ] Task 2
[ ] Task 3
[ ] Task 4
[ ] Task 5
[ ] Task 6
[ ] Unlisted Task

Expected behaviour

[ ] Lorem ipsum dolor sit amet, consectetur adipiscing.
[ ] Lorem ipsum dolor sit amet, consectetur adipiscing.

Actual behaviour

[ ] Lorem ipsum dolor sit amet, consectetur adipiscing.
[ ] Lorem ipsum dolor sit amet, consectetur adipiscing.

What needs to be done?

[ ] Lorem ipsum dolor sit amet, consectetur adipiscing.
[ ] Lorem ipsum dolor sit amet, consectetur adipiscing.

Who want to work on this issue?

The CI worked!


Cluster scope for config/v1 node CRD

Node CRD added in openshift/api#1107 should be made cluster scoped instead of namespace scoped since the enhancement proposals [1] [2] also intends to make cluster level changes.
[1] https://github.com/openshift/enhancements/blob/master/enhancements/worker-latency-profile/worker-latency-profile.md#proposal
[2] https://github.com/openshift/enhancements/blob/master/enhancements/machine-config/mco-cgroupsv2-support.md#api-extensions
Signed-off-by: Swarup Ghosh<EMAIL_ADDRESS>

/cc @harche @sairameshv

/cc @soltysh @deads2k

/lgtm

/cc @rphillips

Also, due to this line being present, though CRD yaml for now contains scope: Namespaced https://github.com/openshift/api/blob/1d1610eb722f617ce726dd21194097a72a24848b/config/v1/types_node.go#L6 I think the corresponding openshift/client-go clientset node is also not working as expected. Get/List/etc. client seems to be namespace scoped, producing errors at runtime node.config.openshift.io NotFound.
We used the following last time to generate the CRD yaml from the types_node.go directly which created a namespace scoped CRD.
make ensure-controller-gen
_output/tools/bin/controller-gen-v0.7.0 object paths=./config/v1 +output:artifacts:config=./config/v1 crd webhook

So I added this line to instruct kubebuilder to generate a Cluster scoped CRD this time:
https://github.com/openshift/api/blob/1d1610eb722f617ce726dd21194097a72a24848b/config/v1/types_node.go#L13
Any better tooling available to generate CRDs for new resource might help.

/label px-approved
/label docs-approved
/label qe-approved

/hold

/remove-hold
@deads2k Can you PTAL? I added status as a subresource in the crd yaml.

/lgtm

Looks like this broke the e2e-upgrade job when vendored in cluster-config-operator:
E0405 11:32:50.139004       1 task.go:112] error running apply for customresourcedefinition "nodes.config.openshift.io" (51 of 787): CustomResourceDefinition.apiextensions.k8s.io "nodes.config.openshift.io" is invalid: spec.scope: Invalid value: "Cluster": field is immutable


Need callback

There should be a callback option also.

Need call back function for on change/input event. Or is there other ways to trigger this event when the value changes on the input field?

For both.


zsh sourcing /etc/profile.d/*

https://bugzilla.redhat.com/show_bug.cgi?id=92132

Ian Macdonald 2003-06-03 03:53:57 UTC
I gave a workaround in my bug report, but the fix is equally obvious. Add the
following line to /etc/zshrc:
. /etc/profile

Confirmed that this works

The file was /etc/zsh/zshrc on my Ubuntu 18.04 laptops

Also incorporating https://unix.stackexchange.com/questions/14895/duplicate-entries-in-path-a-problem into the files in /etc/profile.d/

Closed per https://github.com/iancleary/personal-ansible/pull/64 successful merge


E117: Unknown function: strwidth

Hi,
Older version 7.2 does not have this function.
Could you remove the use of this function for maximum compatibility?
Thanks

I can't since there's no alternative in 7.2. It only provides len() but that gets me the bytes of a character and not the number of cells it takes.
The function is used in the cowsay implementation which is used by default. You can work around it by disabling it:
let g:startify_custom_header = []

If the workaround above works for you and there's no other function breaking under 7.2, I'll hardcode this:
diff --git i/autoload/startify.vim w/autoload/startify.vim
index 23ecdd0..0327cfc 100644
--- i/autoload/startify.vim
+++ w/autoload/startify.vim
@@ -64,7 +64,7 @@ function! startify#insane_in_the_membrane(on_vimenter) abort
   " Must be global so that it can be read by syntax/startify.vim.
   let g:startify_header = exists('g:startify_custom_header')
         \ ? s:set_custom_section(g:startify_custom_header)
-        \ : startify#fortune#cowsay()
+        \ : (exists('*strwidth') ? startify#fortune#cowsay() : [])
   if !empty(g:startify_header)
     let g:startify_header += ['']  " add blank line
   endif

yeah, it works fine. As long as no error reports. Thank you!


Type: Configurationsassociate

Looks like Configurationsassociate should be Configurations associate in this page

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 9a1b882a-bd6d-4cc4-3cda-c7738f7f0991
Version Independent ID: d6f7a689-007a-dc95-c585-44cd1f75caae
Content: Code policy REST API for Azure DevOps Services - Azure DevOps Services REST API
Content Source: docs-ref-conceptual/5.0/policy/index.md
Service: vsts
Product: devops
GitHub Login: @wnjenkin
Microsoft Alias: elbatk

@gauravsaralMs thanks for your feedback. We'll get this issue resolved


Parameterize Font

https://github.com/rukai/vulkano-text/blob/d425ced70d6804ac220c7e0d31932595f83d7a54/src/lib.rs#L64
Adopting this as my first contrib to vulkano.  There's some RFC's kicking about to get better includes of files.
They just wanted manpages:
https://github.com/rust-lang/cargo/issues/2729
Wound up proposing other files
https://github.com/rust-lang/rfcs/pull/2376
And are.... working on it?  I don't understand their process yet
https://github.com/rust-lang/crates-io-cargo-teams/issues/14
In any case, since we probably don't want DejaVu shipping in binaries, I think it's safe to remove it from the lib and toss it in somewhere else, parameterizing on a file or other already-read data structure.

Did some work on Vulkano-glyph and decided not to work on this repo


SharpDX.DXGI fails on GetDisplayModeList for second monitor (E_FAIL/Unspecified error)

I have two display. My main one on the right (1920x1080) and my second one on the left (). When calling GetDisplayModeList for the second, this code fails with
{HRESULT: [0x80004005], Module: [General], ApiCode: [E_FAIL/Unspecified error], Message: Unspecified error

   at SharpDX.Result.CheckError()
   at SharpDX.DXGI.Output.GetDisplayModeList(Format enumFormat, Int32 flags, Int32& numModesRef, ModeDescription[] descRef)
   at SharpDX.DXGI.Output.GetDisplayModeList(Format format, DisplayModeEnumerationFlags flags)
   at sharpdxgitest.Form1..ctor() in D:\Dev\sharpdxgitest\sharpdxgitest\Form1.cs:line 25
   at sharpdxgitest.Program.Main() in D:\Dev\sharpdxgitest\sharpdxgitest\Program.cs:line 19
   at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

Factory1 a = new Factory1();
for (int i = 0; i < a.Adapters.Length; ++i)
{
  for (int j = 0; j < a.Adapters[i].Outputs.Length; ++j)
  {
    var outputs = a.Adapters[i].Outputs[j];
    ModeDescription[] displayModeList = outputs.GetDisplayModeList(Format.R8G8B8A8_UNorm_SRgb, DisplayModeEnumerationFlags.Interlaced);
  }
}

Unless proven otherwise, unlikely a SharpDX issue but a behavior of the underlying DXGI api. You can try to replicate this with a simple C++ program.

Ah, yeah, seems it's a dxgi fail :/ Wasn't aware that was the Window's APIs name so I thought it was a SharpDX thing still


Setting a value on a selectField

OK, I've read the readme, so I know that defaultValue won't work but I can't set a value on the selectField even using the value prop:

<Field
  name={`service_${index}`}
  component={SelectField}
  hintText="Select a service"
  value={0} // <-- here
  children={serviceOptions}
/>

Is that expected behaviour?
(serviceOptions look like:)
const serviceOptions = services.map(serviceOption => (
    <MenuItem
      key={serviceOption.id}
      value={serviceOption.id} // <-- first one will be 0
      primaryText={serviceOption.name}
      style={{
        textAlign: 'left',
      }}
    />
  ));

I thought that if the value on the SelectField matched a value on a MenuItem, then it would select that item? Am I wrong about that??
Thanks

Redux form has a special way of handling controlled component's initial state. You must use the reduxForm HOC's initialValues field instead.
reduxForm({
    name: 'myForm',
    initialValues: {
        'service_1': 0
    }
})(MyFormComponent)


how to import  import /billing from the billing-api

In https://serverless-stack.com/chapters/share-an-api-endpoint-between-services.html#Limitations.
how to import exist path in new service?
Project a: '/a'
How to use '/a/b' in Project b?

We are transition this repo to https://github.com/sst/v2 and are closing this issue for now. If it is still relevant please reopen it there - sorry for the trouble


Fix bug preventing orgs loading on register page

Recent updates to the DB have made the is_other field on the Orgs table mandatory.
Previously, it was loading null values. This PR updates this to load false values instead.
Fixes #1809
Changes proposed in this PR:

Load orgs where is_other is false, instead of null

Should help with #1804


Second parameter of insertBefore should accept null

According to MDN, the second parameter of insertBefore is not optional (which is was fixed in #95), but it can accept null. Under strictNullChecks this is currently not allowed, this PR fixes that.

Hi @ivogabe, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

:+1:


injected.ts - check shimDisconnect before requestPermissions

Following https://github.com/wevm/wagmi/issues/3603
Description
shimDisconnect should be considered before showing prompt for selecting account
Additional Information
Before submitting this issue, please make sure you do the following.

[x] Read the contributing guide
[ ] Added documentation related to the changes made.
[ ] Added or updated tests (and snapshots) related to the changes made.

From my understanding there is only one-line change? Also not sure what to do with changeset..

I tested it on SanR.app codebase, no bugs encountered.

@tmm any chance for this to be reviewed / merged / released?

I donated $200 in hope this will be prioritized https://explorer.zksync.io/address/0x4557B18E779944BFE9d78A672452331C186a9f48
https://explorer.zksync.io/tx/0x495e573050afd1fe07cf5b0e0ad5ecc8f745a129f6c5c19c20e16b6f205f778d

So I believe the way to resolve is 1) merge this PR 2) fix the bug I described here: https://github.com/wevm/wagmi/pull/3608#discussion_r1511539660

@jxom please let me know if you want me to PR 2nd option I provided above


Added support for http_client,extra_headers and extra_query in openai

This PR contains changes to support custom HTTP client, default headers and default queries in using OpenAITextGenerator.
Why is this change required
We want to pass custom headers to our internal proxy layer which is built on top of AzureOpenAI for our internal audit and metrics. Currently this is not supported on llmx and subsequently, not available via lida. This change attempts to add support for a custom http_client along with additional default_headers and default_query parameters.
How is this tested
We have done an internal testing with our proxy layer. Sample code:
headers = {"X-Custom-Header": "Custom-Val"}
client = httpx.Client(headers=headers)

llm_inst = llm(provider="openai",  api_type="azure", azure_endpoint="https://openaiproxy.prod.walmart.com",
               api_key=api_key, api_version="2024-02-01", model="gpt-35-turbo", http_client=client)
config = TextGenerationConfig(n=1, temperature=0.2, max_tokens=100)

msgs = [
    {"role": "system", "content": "You are a helpful assistant that can explain concepts clearly to a 6 year old child."},
    {"role": "user", "content": "What is  gravity?"}
]
response = llm_inst.generate(messages=msgs, config=config)

@victordibia Can we move forward with this?

@victordibia  Can we merge these changes?


Enabling minio add-on fails to find .kubectl-minio

Summary
I am attempting to install the minio addon but each time the install fails during the kubectl-minio download/install. The stdout can be seen below.
Additionally, I have tried installing minio with krew but this doesn't help.
❯ sudo microk8s enable minio -c 20Gi
Infer repository core for addon minio
Infer repository core for addon dns
Addon core/dns is already enabled
Infer repository core for addon hostpath-storage
Addon core/hostpath-storage is already enabled
Download kubectl-minio
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Warning: Failed to create the file
Warning: /var/snap/microk8s/common/plugins/.kubectl-minio: No such file or
Warning: directory
  0 36.8M    0 16375    0     0  36551      0  0:17:36 --:--:--  0:17:36 36551
curl: (23) Failed writing body (0 != 16375)

What Should Happen Instead?
Minio should install successfully.
Reproduction Steps

sudo microk8s enable minio -c 20Gi

Introspection Report
inspection-report-20230329_130658.tar.gz
Can you suggest a fix?
Manually creating the directory solved the problem so I would guess its as simple as doing a directory exists check and creating. Does require sudo though in the event that users are doing an unprivileged microk8s so warning about that would be valuable.
Workaround
sudo mkdir -p /var/snap/microk8s/common/plugins/
sudo microk8s enable minio

Are you interested in contributing with a fix?
Maybe? Would need pointed in the right direction but, I certainly wouldn't mind being able to say I contributed to microk8s 😁

@ktsakalozos microk8s status shows that the minio add-on I am using is from the core repo.
However, I did at one point have an issue where I wasn't able to update my core repo and ran microk8s addons repo add core https://github.com/canonical/microk8s-core-addons --force which maybe that caused it to pull newer addons than 1.24 supported?


New command: Upgrade installed Teams app for a specified user

Usage
m365 teams user app upgrade
Description
Upgrade an app in the personal scope of the specified user
Options

Option
Description

--id [id]
The unique id of the app instance installed for the user. Specify either id or name.

--name [name]
Name of the app instance installed for the user. Specify either id or name.

--userId [userId]
The ID of the user to uninstall the app for. Specify userId or userName but not both.

--userName [userName]
The UPN of the user to uninstall the app for. Specify userId or userName but not both.

Examples
Upgrade an app by name for the specified user using its UPN.
m365 teams user app upgrade --name HelloWorld --userName<EMAIL_ADDRESS>
Upgrade an app by name for the specified user using its id.
m365 teams user app upgrade --name HelloWorld --userId 2609af39-7775-4f94-a3dc-0dd67657e900

Upgrade an app by id for the specified user using its UPN.
m365 teams user app upgrade --id YzUyN2E0NzAtYTg4Mi00ODFjLTk4MWMtZWU2ZWZhYmE4NWM3IyM0ZDFlYTA0Ny1mMTk2LTQ1MGQtYjJlOS0wZDI4NTViYTA1YTY= --userName<EMAIL_ADDRESS>
Upgrade an app by id for the specified user using its id.
m365 teams user app upgrade --id YzUyN2E0NzAtYTg4Mi00ODFjLTk4MWMtZWU2ZWZhYmE4NWM3IyM0ZDFlYTA0Ny1mMTk2LTQ1MGQtYjJlOS0wZDI4NTViYTA1YTY= --userId 2609af39-7775-4f94-a3dc-0dd67657e900

Default properties
No response
Additional Info
teamsAppInstallation in personal scope: upgrade

I would like to work on this one? Can you assign me?

Hi @milanholemans / @garrytrinder ,
I am trying to work on this issue but not able to connect my personal microsoft account via m365 login. For the school account I don't have permissions. Is there any way I can connect account so that I can test the commands?

hi @Rachit1313,
The easiest way to get started is to:

sign up for (free) developer M365 tenant (E5 license) 👉 https://developer.microsoft.com/en-us/microsoft-365/dev-program
after that, you may follow our guide login 👉 https://pnp.github.io/cli-microsoft365/user-guide/connecting-microsoft-365 to your newly created dev tenant.

hi @Rachit1313,
The easiest way to get started is to:

sign up for (free) developer M365 tenant (E5 license) 👉 https://developer.microsoft.com/en-us/microsoft-365/dev-program

after that, you may follow our guide login 👉 https://pnp.github.io/cli-microsoft365/user-guide/connecting-microsoft-365 to your newly created dev tenant.

Thank you for the confirmation @Adam-it . The logic for the command is ready. I will be creating the test cases and would make a PR within 24 hours after checking the command.

Thank you for the confirmation @Adam-it . The logic for the command is ready. I will be creating the test cases and would make a PR within 24 hours after checking the command.

No rush 👍. Thanks for the update

Resetting due to lack of response

Can I work on this?


Task: Create Universal Stablecoin Token List

Context
A priority for Universal is first-class stablecoin support.
Scope
Create a new tokenlist that tracks canonical stablecoins and stablecoin derivatives on the major L2s.
The new token list should be added to the universal-data package.
Initial Stablecoins:

USDC
USDT
USDS
DAI
PYUSD
LUSD
GUSD

Initial Chains:

Ethereum (1)
OP Mainnet (10)
Base (8453)
Arbitrum (42161)

[ ] USDC
[ ] USDT
[ ] USDS
[ ] DAI
[ ] PYUSD
[ ] LUSD
[ ] GUSD


Convert genFile() to use a high-resolution, 1-period lookup table

File Generation
Implemented a high-resolution 1-period lookup table, which allows:

Reduced memory usage
Higher fidelity

High resolution lookup table reduces distortion
Default size of lookup table is 8192 samples
For best sound, do not set the size any lower than 2048

Note
I tried a 1/4 period lookup table, but in practice the performance was worse.
Housekeeping

Removed unnecessary comments. Leave comments for whole blocks or tricky lines of code.
Renamed some variables.
Implemented some style guidelines, according to the cpplint linter; ignored the line length policy.

I left some comments in your file for some things that should be fixed before this is ready to merge.
First off, this is not suitable to merge because it doesn't compile on Linux systems (please see my comments about C99).
Next, this doesn't seem to generate the correct tone. It sounds too low to me. Please compare it against the master branch.
On the bright side, it seems to generate the file much faster, which is good.

Can't listen to it right now, but it looks like the frequency spectrums don't match. Could you take a look into this? Not sure which is a cleaner sound.

I think this needs to wait until #3 is resolved (I have pending PR #4 to resolve this).

@freitagbr Try merging/rebasing this off master. Then we can try out the testing framework.

So I just checked it. It now passes all tests. Pulling the file up in Audacity doesn't make it look any more accurate than the master branch. And the benchmarks seem roughly the same.
The memory savings don't seem significant, since the bulk of memory is in the file buffer, not the lookup table. Correct me if I'm wrong.

@freitagbr Do you think this has significant improvements over the previous version?

I think there are performance improvements, but they're insignificant given our powerful hardware. It might be more worth working on a sine-generator that is mathematically correct instead of lookup-table based.

One idea that I had would be a lookup table that has a finer resolution (up to 4x). Might not be faster, but it might give more accurate results. Something to consider if we're trying to reduce distortion and still have fairly good performance.

@freitagbr is this worth pursuing?


Fixed typeof being used to detect an array

Hello softwarespot, you have added a function isClass in the pull request, but I don't have defined that function and in the pull there isn't a place where is defined, I think I'm missing something.

I could have amended it before you closed it.


Beckn energy interface

Project
Beckn Energy Interface
Changes
Weekly Updates: Updated Week 1,2  and 3

@Sudheesh2609  Add the link to PR raised in week 2

LGTM!

@GeekGawd  I have not raised any PR in week 2 (14-07-2023)
But I have mentioned PR in week 3. So I added the link there accordingly.
Please let me know if anything needs to be changed.
Thank you.

@GeekGawd I have not raised any PR in week 2 (14-07-2023) But I have mentioned PR in week 3. So I added the link there accordingly. Please let me know if anything needs to be changed. Thank you.

I mean to say in the learning section

BeckN Protocol: you can add short description about each like what new did you learn about them.

Also, kindly remove checkmarks from Learnings section don't really need them there

@GeekGawd I have not raised any PR in week 2 (14-07-2023) But I have mentioned PR in week 3. So I added the link there accordingly. Please let me know if anything needs to be changed. Thank you.

I mean to say in the learning section

BeckN Protocol: you can add short description about each like what new did you learn about them.

Also, kindly remove checkmarks from Learnings section don't really need them there

I have changed the learnings section in all weeks.
Please review once. Thank you.

LGTM! Thank You! @Sudheesh2609


To Do Management web client is not working anymore

When I start the web client with npm run start or npm run start:mock, it will display the following error message:
[0] /home/thesse/todo-management-tool/client/node_modules/@web/dev-server-rollup/node_modules/whatwg-url/lib/encoding.js:2
[0] const utf8Encoder = new TextEncoder();
[0]                     ^
[0]
[0] ReferenceError: TextEncoder is not defined
[0]     at Object.<anonymous> (/home/thesse/todo-management-tool/client/node_modules/@web/dev-server-rollup/node_modules/whatwg-url/lib/encoding.js:2:21)
[0]     at Module._compile (internal/modules/cjs/loader.js:778:30)
[0]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
[0]     at Module.load (internal/modules/cjs/loader.js:653:32)
[0]     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
[0]     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[0]     at Module.require (internal/modules/cjs/loader.js:692:17)
[0]     at require (internal/modules/cjs/helpers.js:25:18)
[0]     at Object.<anonymous> (/home/thesse/todo-management-tool/client/node_modules/@web/dev-server-rollup/node_modules/whatwg-url/lib/url-state-machine.js:5:34)
[0]     at Module._compile (internal/modules/cjs/loader.js:778:30)

This was working fine before commit 9ed624b3afc967af888844378807071c977df9c6.

Did you run a npm install , after pulling the latest commit?

Yes, I did.
Gesendet: Dienstag, 01. Februar 2022 um 09:20 Uhr
Von: "Veith Zäch" @.>
An: "theNorstroem/todo-management-tool" @.>
Cc: "Thomas Hesse" @.>, "Author" @.>
Betreff: Re: [theNorstroem/todo-management-tool] To Do Management web client is not working anymore (Issue #5)

Did you run a npm install , after pulling the latest commit?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you authored the thread.Message ID: @.***>

I can not reproduce the error. I use node --version => v16.4.2
@thesse1 which node version do you use?

Your "problem" looks exactly like this one: https://github.com/Automattic/mongoose/issues/10713

@thesse1
I did a completely fresh install.
node --version v17.2.0 npm --version 8.1.4
npm run start:mock

It works without any problem. Please provide a repository where I can reproduce the error.


Dockerfile lint

Hi, @tomav
@lukasmartinelli has created a good tool -  http://hadolint.lukasmartinelli.ch
It shows some errors. Look, when you have time.

Mainly COPY vs ADD. Most should be fixed easily.
Not sure for:

user root switch
fixed version
provide my email address 😄

For better illustration:
docker run --rm -i lukasmartinelli/hadolint < Dockerfile
/dev/stdin:2 DL3012 Provide an email adress or URL as maintainer
/dev/stdin:5 DL3008 Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
/dev/stdin:48 SC2016 Expressions don't expand in single quotes, use double quotes for that.
/dev/stdin:49 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:50 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:59 SC2046 Quote this to prevent word splitting.
/dev/stdin:62 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:63 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:73 DL3002 Do not switch to root USER
/dev/stdin:77 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:78 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:81 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:82 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:85 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:89 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:107 DL3020 Use COPY instead of ADD for files and folders
/dev/stdin:109 DL3020 Use COPY instead of ADD for files and folders


Feature planning: first class Python support

This is a tracking item for First Class Python Support. We'll be tracking the requirements and issues for first class Python support via this item. Feel free to leave comments about features/design patterns.
The Functions team and the Microsoft Python team have engaged in a partnership to investigate first class Python support for Azure Functions runtime.
Function format
TBD
Data Type formats
TBD
Version & Package management
TBD
Testing/CI
TBD
Change log
5/5 - Chris - Add basic list of feature areas

Support a requirements.txt file and runtime specification for specifying Python 2 or 3.

I would take it further than "2 or 3" and make it be by major.minor version.

The first step may be to publish some Python-specific documentation and examples.
For the benefit of anyone else trying to do HTTP Functions with Python right now, here's some basic example code I threw together: https://github.com/anthonyeden/Azure-Functions-Python-HTTP-Example/

Add python examples for the Azure Functions DocumentDB bindings: https://azure.microsoft.com/en-us/documentation/articles/functions-bindings-documentdb/

Azure ML Studio currently let you publish Python and R webservices, which work in a similar way as Azure Functions. It would be great if Python in Azure Functions came installed with the Anaconda bundle. That would allow for a simpler integration between Azure ML and Azure Functions.

Support 64-bit Python.

Note that short term, it's possible to use a custom Python version using these steps: https://github.com/Azure/azure-webjobs-sdk-script/wiki/Using-a-custom-version-of-Python

Solution above is not working anymore. I tried every step but in the end as long as you run inside home\site directory, you will always end up with Python 2.7.8.
Also why Python is so slow? It can takes up to 20s only at importing additional library. I tried virtual env and uploading full directory and running it from C# running cmd: "python.exe parameter".
These should be instant, and yet is so long.

I just retested that technique and it works fine. Did you make sure to expand the zip as you dropped it in D:\home\site\tools?
The better perf will come with the first class support that this thread is tracking. No ETA, but we will get there.

I am sorry for writing wrong. I tried Python 2.7.13 which have no embeddabled version.
Simply used zipped python with my site-packages.
Is there a way to use latest python 2.7.* with some libraries like pandas, xmltodict, numpy and so on... ?

See https://blogs.msdn.microsoft.com/pythonengineering/2016/08/04/upgrading-python-on-azure-app-service/ on how to upgrade Python.

Is there any special step for functions? I managed to install python through site extension gallery, but how can i bind it to functions? Basicly how to translate Configuring Your Site from guide above to functions :). Sorry maybe its a simple dummy question.

Unfortunately for Functions I don't know.

@rawlukMike the instructions I liked to shoudl work for any Python version. If you drop Python in the Tools folder it should get picked up because it's on the path.

Yep my bad. I used my python folder packed, but forgot msi installer puts python27.dll in system. Did not included it in library. When I used unpacked but not installed msi it works fine. Sorry for troubles.

Coping fully working Python 2.7.13 to the \home\site\tools is not working.
It worked for 3.x for some reason.
@davidebbo You said that site\tools is in the PATH however Kudu show otherwise. It says '\site\deployments\tools' is in the path.
I unzip python in \home\site\deployments\tools (This one is IN PATH).
After that running in KUDU example: \home\python.exe -V started showing new one.
So it should work right?
Except its not.
I made simple Python function:
import sys
print(sys.version)
And it results with 2.7.8. With Python 2.7.13 installed in site\deployments\tools and being visible in Kudu as "primary".
So two questions here :).
1.Why even though KUDU is seeing Python from Path (actually there are two line in PATH pointing to python exe now : D:\home\site\deployments\tools, and D:\Python27), Functions still call old one?
2. Why coping Python 3.5 to D:\home\site\tools is working the first place since this one is not in PATH.

@rawlukMike site\tools is what's on the path for Functions execution. Kudu uses a different one which is for deployment tools, and is not on the path in the Functions runtime. Anyway, glad it's working for you now!

As nice as the portal UI is, I think there ought to be a hard requirement/user story that a Mac/Linux developer should only need to git push source code to the service to get a function going, and libraries be deployed either via Kudu (which is tedious and quirky, but passable) or automatically upon detection of the function config files and a requirements.txt.
I'm also not very keen on the current environment variable approach, since it limits the kinds of data functions have readily available.
There ought to be an import context from azure.functions (or similar) to abstract that away and provide a nicer way to deal with inputs and outputs, somewhat like the current JS API.

I am running into extreme slowness when trying to run the Azure Batch Shipyard python-based CLI. A single call using the subprocess takes 2min30 which in turns brings my Function to timeout after 5min because I require two calls to do my orchestration. Any reasons why it is so dog slow to use Python on Azure Function? Is there a way I could make it faster?
Right now I do a subprocess call to the Python35 executable installed via the extension on the kudu platform.

Hmmm. My experience with wsgi apps on App Service has been very good (even before the new Python extensions came out) so I suppose there'a a penalty involved with forking a subprocess for whatever reason (maybe loading/startup time?).
Just a thought: can you output a log with some timestamps down to the millisecond? That might help figure out where the delay is.

I switched to the hosted plan and it became much more manageable ~5 seconds per subprocess call.
A simple subprocess call to a 'hello world' python script took between 2-7s.

Ah, right. But it's still a penalty. Can you figure out the split between startup time and your code execution? And if you're using 3.5, have you considered coroutines? (if they fit your problem, that is)

sorry slightly off-topic, but what are currently a first-class citizen on Azure?
Just from a short Google search, I'm guessing:
.Net
Node.js
Java
Docker
Linux
Windows (assuming)
is anything else a first-class citizen?

@quangv this issue is not the appropriate forum for such a general question. Please keep this issue focus on Python. Thanks!

Looking forward to Python support in VS Tools for Azure Functions and of course for Python templates in the Azure portal. Thanks!

Hey, could you provide some sample code for python using a blob storage trigger of a specific file and performing some operations on the content (say a simple textfile/xml/json) and return a new/updated version of the file back to the storageblob?

I used the portal for testing the sample code.

I think an update is in order here - I need visibility on when/how this is coming along...

An update would be much appreciated. It has been over a hear since this thread was started. Will Python ever be a first class language for Azure functions?

There has been a significant amount of work done in the language extensibility feature we're introducing in 2.0 (the next version of the Azure Functions runtime). And although that work is not Python specific (hence the lack of updates here) it is a foundational component that will enable the Python support with the model we have planned for the next iteration.
We don't currently have dates for that, we'll keep this issue updated as things progress.

@fabiocav Is the "experimental" Python support that's visible in the Azure Portal today based on the 2.0 runtime?

@LarsKemmann No. In fact its based on an implementation that we do not intend to port to 2.0 because it will never perform well. So you'll notice if you make a function app and switch its version to beta (i.e. 2.0) and then go to make a new function, the python templates disappear (along with a bunch of others).

The links under "Samples" in the opening post are not working

hi can you support requests module inside functions?
Hi azure function is not recognising the requests module . pasted the error and code please suggest the fix
exception:
File "D:\home\site\wwwroot\test\run.py", line 1, in
import requests
ImportError: No module named requests
.
python code:
import requests
import timeit
import datetime
def run_gomupload():
try:
 start_time = timeit.default_timer()
 cdate =datetime.datetime.now()
 print('Cell Start Time: '+ str(cdate))

 # code you want to evaluate
 elapsed = timeit.default_timer() - start_time

 cdate=datetime.datetime.now()

 print('\nCell End Time: '+ str(cdate))

 print('Cell Run Duration: '+ str(elapsed))
 # Clean up resources. This includes the container and the temp files
 #os.remove(full_path_to_file)

except Exception as e:
print(e)

@BhaskarDasari - please post your question to stack overflow, msdn forum, or as a separate issue in https://github.com/Azure/azure-functions-python-worker - thanks!

Closing thread as the discussion has moved to the repo here - https://github.com/Azure/azure-functions-python-worker/issues


Some dropdowns are not persistent

Godot version:

Godot 4.0 bc30df8
OS/device including version:

Linux 80x86 64bit, GTX 1660 super and RTX 2060 (main one). Drivers 450.80
Issue description:

Some dropdown elements in the GUI are not persistent. Releasing the mouse click will let them disappear. This has only been tested in single window mode.
Steps to reproduce:
Open any project and try to export. The dropdown to select the architectures is one of the few being affected.
Minimal reproduction project:
No need for a specific project.

This happens with pretty much all OptionButtons in Linux

Can confirm, I'm also having this issue on Windows 10.

Can confirm, I'm also having this issue on Windows 10.

Duplicate https://github.com/godotengine/godot/issues/40227?


Hover over shortcut tooltip - is it working ?

Hi,
There's a tooltip appearing over my Taskbar Group when I add it to the task bar.
However, the release notes (v<IP_ADDRESS>) seem to suggest I should also be seeing tooltips when hovering over the individual shortcuts themselves (inside the group). They aren't happening, so I don't understand the purpose of being able to edit them.
Could something have happened to my Windows 11 configuration ? I've "re-installed" v<IP_ADDRESS> but still got the same issue.
Suggestions ?
Thanks.

I downloaded TaskbarGroups v<IP_ADDRESS> today on Feb 10, 2023 for Windows 10. I wanted to use this program, but unfortunately I could not. I tested the program out by adding 11 shortcuts. Each shortcut was to a Ren'Py Visual Novel game. And every shortcut had the same icon. When I pinned the taskbar group to the taskbar, I was sad to see that I could not distinguish any of the 11 shortcuts from each other because there was no tool tip to tell me the shortcut name. The only workaround I can see for this is to create custom icons for each shortcut but that's too much work and headache. Hopefully a future version of this program will have shortcut program names on tooltips when you hover over the shortcuts.

Yes, Hower Over App Icon Is the Killer Feature, and Without this is very difficult to use this application


Failure to load data in Github Application

Filed on behalf of a user from a JIRA bug logged via the  NR1 platform feedback widget.
Issue
I seem to have been able to make it past the GitHub app configuration (by refreshing on the prior error page I got), but now when I select "GitHub Repo" from the more views section in the left nav, I get a flash of content that's rapidly replaced with "Oops! Something went wrong."
expected
my linked Github repo data loads in the application

Another bit of feedback from the user: I just went through the flow to set up the GitHub integration (via the "add app" functionality. The flow is extremely unintuitive. I still managed to make it through to the end, only to be show "404 - Nerdlet "[guid].github" not found

I can't provide more details on the steps to repro, because the UI doesn't let me do it again! It's now stuck with the broken integration. I can't turn it off to try re-configuring. Here's the app in question: https://one.newrelic.com/launcher/nr1-core.explorer?pane=eyJuZXJkbGV0SWQiOiJhcG0tbmVyZGxldHMub3ZlcnZpZXciLCJlbnRpdHlJZCI6Ik16RXdNRE00Tm54QlVFMThRVkJRVEVsRFFWUkpUMDU4TVRRM01UQTBPREU0TlEifQ==&sidebars[0]=eyJuZXJkbGV0SWQiOiJucjEtY29yZS5hY3Rpb25zIiwiZW50aXR5SWQiOiJNekV3TURNNE5ueEJVRTE4UVZCUVRFbERRVlJKVDA1OE1UUTNNVEEwT0RFNE5RIiwic2VsZWN0ZWROZXJkbGV0Ijp7Im5lcmRsZXRJZCI6ImFwbS1uZXJkbGV0cy5vdmVydmlldyJ9fQ==&platform[accountId]=3100386&platform[timeRange][duration]=1800000
And I'm attaching a screen cap of what happens.
https://user-images.githubusercontent.com/78820602/111805172-08d76700-888e-11eb-98c6-a0c17ae80722.mov

@brent-yearone Thanks for the additional details here. Our team is taking a look at this problem you reported.

Updated the app via the catalog manager: https://github.com/newrelic/nr1-github/commit/86eb78c37b24b239f7c31b1d373c0859271ccda9

This is better, but the integration is still broken. I'm not sure exactly why. I've attached another screencast so you can see what's going on.
The weird thing is that the repo's page doesn't load on the first try in Github, but just going into the browser address bar and hitting enter makes it work. :shrug:
Screen Recording 2021-03-24 at 8.26.05 AM.mov.zip

Thanks @brent-yearone we'll continue to take a look at this issue.

hey @brent-yearone, can you check the permissions on the github token you're using? i was able to recreate the errors on contributors and PRs by using a token with only public access. once i tried a token with repo access it was successful. the missing readme and wonky link are still questionable but maybe we can make some progress with the token permissions first

@LizBaker that did the trick! Thank you! Some better messaging on those errors in the UI might be nice -- especially since the fix on my end is so quick & easy. :)

@brent-yearone absolutely! I'll update the UI


refactor: Restyle router template

Before
Before (Dark)

After
After (Dark)

Replaces the copy/pasted getting started with Vite instructions ("Edit src/app.jsx and save to test HMR") with some resources to our docs and Vite's.
For projects with a router, a header is added so that users can more easily play with navigation & the useLocation hook from iso.

Lmk if there are any thoughts on the resources! I thought these 3 might be the most immediate/important, but maybe not. Can certainly add a few more too.


Consider using :rlimit instead of :timeout for deterministic timeouts.

Whether a proof fails or succeeds due to a timeout depends on the specific hardware being used to run the proof.
This means that proofs that times out on the CI server may work on our machines locally.
Or worse, may work on a laptop when plugged in to a power source but not otherwise, making debugging difficult.
Z3's :rlimit allows setting a "resource limit" in terms of various compute and memory resources used that is deterministic (for a particular version of z3). This would make debugging easier.
https://stackoverflow.com/questions/45457131/what-is-the-relation-between-options-rlimit-and-timeout/45458651#45458651

Thanks for the link! Unfortunately, it seems like rlimit terminates the solver process (timeout does not), so we would have to completely rewrite our interaction with the solver to take advantage of this.

I see, that makes sense. Thanks!

@ttuegel  It looks like :rlimit does not terminate the solver, at least on version 4.8.8 and 4.5.1
I looked through the Release notes and Issue tracker for Z3 but wasn't able to find any mentioning the possible regression you found. Even if there is a regression on some version I feel this is a valuable feature to have.
Test for 4.5.1:
(set-option :rlimit 30)

(push)
(assert (= (+ 2 2) 4))
(check-sat)

(pop) (push)
(assert (= (+ 2 2) 4))
(assert (= (+ 2 2) 4))
(assert (= (+ 2 2) 4))
(check-sat)
(get-info :reason-unknown)

(pop) (push)
(assert (= (+ 2 2) 4))
(check-sat)

$ z3 test.smt
sat
unknown
(:reason-unknown "(incomplete (theory arithmetic))")
sat```

This works on https://rise4fun.com/Z3 version 4.5.1

```(set-option :rlimit 9)

(push)
(assert (= (+ 2 2) 4))
(check-sat)

(pop) (push)
(assert (= (+ 2 2) 4))
(assert (= (/ 2 3) 0))
(check-sat)
(get-info :reason-unknown)

(pop) (push)
(assert (= (+ 2 2) 4))
(check-sat)

(get-info :version)```
```sat
unsat
(:reason-unknown "unknown")
sat
(:version "4.5.1 - build hashcode 5714f830b03208d8d47717d22963a4a8395d8364")```

I added the :rlimit option but didn't remove :timeout. Can this issue be closed?

I added the :rlimit option but didn't remove :timeout.


chore: update node-driver-registrar:v2.7.0, livenessprobe:v2.9.0

update node-driver-registrar:v2.7.0, livenessprobe:v2.9.0

Codecov Report

Merging #1125 (bb9155f) into master (5f5049e) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1125   +/-   ##
=======================================
  Coverage   56.39%   56.39%
=======================================
  Files          10       10
  Lines        1071     1071
=======================================
  Hits          604      604
  Misses        443      443
  Partials       24       24

/azp run pr-e2e-azure


v1.0.7

Adds the (--publisher|-p) flag to the search command
Fixes various bugs surrounding mirror selection
Massive refactor removing useless code & double usage of code, less prone to errors
Some speed up on search/download
Restructure GitHub Actions workflow

Pull Request Test Coverage Report for Build 115714341

57 of 169 (33.73%)  changed or added relevant lines in 4 files are covered.
6 unchanged lines in 1 file lost coverage.
Overall coverage increased (+0.3%) to 31.103%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

cmd/libgen-cli/dbdumps.go
0
2
0.0%

cmd/libgen-cli/search.go
2
13
15.38%

libgen/download.go
36
74
48.65%

libgen/api.go
19
80
23.75%

Files with Coverage Reduction
New Missed Lines
%

libgen/download.go
6
55.33%

Totals

Change from base Build fce4674ce:
0.3%

Covered Lines:
330

Relevant Lines:
1061

💛  - Coveralls


The size of tensor a (2865) must match the size of tensor b (2500) at non-singleton dimension 1

audio duration: 02m01s

Hi @wujianqiangwjq we will need more context and information to help you.


Ensure we return a sorted listing when using a local client

This ensures that calls to list_files are returned sorted if a LocalFileSystem ObjectStore is used.
It's not clean for a few reasons:

We have to materialize the entire iter in order to sort it
We can't easily detect if we're local just by using type_of or similar. We have a foreign trait object that doesn't have an as_any on it, so we can force the reference into an Any which would allow us to use is, and we can't add an implementation of something like as_any because dyn ObjectStore isn't Sized. So this resorts to formating the object at creation (since ObjectStore requires Display) and checking if it starts with LocalFileSystem....

Adds a test that when using local client things come back sorted now. Without these changes the test failed.
I think we should merge (or something like it) and then also see about adding a list_sorted and list_with_offset_sorted to ObjectStore

@scovich : Should I base the PR https://github.com/delta-incubator/delta-kernel-rs/pull/322 on top of these changes? I think we are currently ignoring the directory_listing which is unsorted in S3. Can we proceed with the assumption that the listing iterators return sorted entries, and that any need for materialization required for non-sorted stores will be handled the same way as in this PR?

@nicklan -- what is left for this to be able to merge? Are we concerned about the approach? Worried it's somehow incorrect? Something else?

Sorry for the delay here! This this is ready now. I did some work to figure out if we need to do anything for non-local stores. As far as I can tell, aws, azure, and gcp all return sorted listings.

AWS: ListObjectsV2 states: "For general purpose buckets, ListObjectsV2 returns objects in lexicographical order based on their key names." (Directory buckets are out of scope for now)
Azure: Docs state here: "A listing operation returns an XML response that contains all or part of the requested list. The operation returns entities in alphabetical order."
GCP: The main doc doesn't indicate order, but this page does say: "This page shows you how to list the objects stored in your Cloud Storage buckets, which are ordered in the list lexicographically by name."

maybe we want to add the comment that you had about each cloud's storing as an actual code comment for posterity?

Good call, done

Filed https://github.com/delta-incubator/delta-kernel-rs/issues/410 to follow-up


Avail the feature to Tag specific Specialist card with color Code to respective Specialist required Patients.

As we click on the Patients Card, all admitted Patients are shown with Last updated details, Category, IP Days, Decision after the Consultation etc. Likewise there's a need to tag the Specific Specialist Card where that specialist Intervention is required to the Patients.
Suggested Change is Roughly edited and Shared Below for Understanding the mentioned request and for ref.

Also Suggesting few additional Specialization to be Incorporated into the dropdowns selections during data Entry by the user as follows:
General Medicine
Allergist/Immunologist
Anesthesiologist
Cardiologist
Cardiothoracic Surgeon
Dermatologist
Emergency Medicine Physician
Endocrinologist
Family Medicine Physician
Gastroenterologist
Geriatrician
Gynecologic Oncologist
Hematologist
Hepatologist
Infectious Disease Specialist
Intensivist/Critical Care Physician
Internist
Neonatologist
Nephrologist
Neurologist
Neurosurgeon
Obstetrician/Gynecologist (OB/GYN)
Oncologist
Ophthalmologist
Orthopedic Surgeon
Otolaryngologist (ENT)
Pain Management Specialist
Pathologist
Pediatrician
Pediatric Surgeon
Physiatrist (Physical Medicine and Rehabilitation)
Plastic Surgeon
Podiatrist
Preventive Medicine Specialist
Psychiatrist
Pulmonologist
Radiation Oncologist
Radiologist
Rheumatologist
Sleep Medicine Specialist
Sports Medicine Specialist
Thoracic Surgeon
Transplant Surgeon
Trauma Surgeon
Urologist
Vascular Surgeon

@gayann-au some doubts with the new skills
Is Family Medicine Physician and Family Physician the same skills?
And do we wish to rename the following?
Intensivist -> Intensivist/Critical Care Physician
Obstetrician and Gynecologist -> Obstetrician/Gynecologist (OB/GYN)
We already have Thoraco-Vascular Surgeon. Do we need to separate it into Thoracic Surgeon and Vascular Surgeon or treat them as new skills?
From the list you shared, I came up with the following new skills to be added

Allergist/Immunologist
Cardiothoracic Surgeon
Gynecologic Oncologist
Hepatologist
Internist
Neonatologist
Pain Management Specialist
Physiatrist (Physical Medicine and Rehabilitation)
Podiatrist
Preventive Medicine Specialist
Radiation Oncologist
Sleep Medicine Specialist
Thoracic Surgeon
Transplant Surgeon
Trauma Surgeon
Vascular Surgeon

Hope I didn't miss out something.

@skks1212
Is Family Medicine Physician and Family Physician the same skills?
No please keep it as Family Physician
Do we wish to rename the following already present skills?
Intensivist to Intensivist/Critical Care Physician - No
Obstetrician and Gynecologist to Obstetrician/Gynecologist (OB/GYN) - Yes
We already have Thoraco-Vascular Surgeon. Do we need to separate it into Thoracic Surgeon and Vascular Surgeon or treat them as new skills?
The new updated domains are
Cardio Thoracic Surgeon
Vascular Surgeon

@aparnacoronasafe need your inputs here

@skks1212 Can you specify what you need clarification on? It would be good to share the existing list of Skill as well. We can decide on what migrations are required as well.

@gigincg We need inputs regarding the new badge that is requested, as we currently just have an option to request for a specialist, but not what kind. So do we update that field to accommodate the skill of the requested physician, and should it allow for multiple skill requirements or just one?

@gayann-au Closing the issue, as the Backend changes have been made, this should be available in 2 weeks, in the next release


Adding the chapter about "components of reproducibility "

Purpose/implementation Section
What changes are being implemented in this Pull Request?
This chapter is a high level overview about what a reproducible analysis looks like. In the subsequent chapters we will get into the "nitty gritty" as well as go through practical steps of how to use the tools that aid in the aspects discussed at a 30k foot view here.

@carriewright11 Thanks for these comments. I found this chapter harder to write than I expected so I appreciated your work in helping get it to a better spot! See how you feel about it now!

will do!


Update Openai support to >= v1.0.0

Hi, I upgraded the oss-fuzz-gen project’s OpenAI SDK dependency from version 0.27.8 to version >=1.0.0, in line with OpenAI's official recommendations. This move is motivated by the significant enhancements introduced in version 1.0.0, which OpenAI details here.
Key improvements include:

A complete rewrite of the library for robustness and error resilience.
Introduction of explicit client instantiation, replacing the global default and offering more flexible SDK interaction.

After upgrading to v1.16.2 (the latest available), I tested the integration with my API key and confirmed full functionality. This upgrade aligns oss-fuzz-gen with current best practices and ensures compatibility with future developments in AI technologies.
Hope it helps.

On a quick skim this looks good, but let me run some experiments today and then I will approve.
Meanwhile can you fix the lint CI, please?

Hi, I have finished the fix.

Thanks @MarkLee131 and @mihaimaruseac !


Bug fix:  Show deleted icon when resource has been deleted

Nice fix :+1:

So I can add a new node to the Deleted node and then saving throws this error. Maybe we could disable or hide 'Add step and link' for deleted nodes?

So I can add a new node to the Deleted node and then saving throws this error. Maybe we could disable or hide Add step and link option for deleted nodes?

Good find. Let me look into that error message. The old UI allows us to add nodes to deleted nodes, so I'm going to try get that working.


Dunder main entry point

Allow for more entry points to test changes without needing to reinstall each time:

testing local changes without setup.py while current-working-directory is edb-terraform: python -m edbterraform
testing local code changes from any directory: python edbterraform/edb-terraform
system python package after setup.py: edb-terraform
system python module after setup.py: python -m edbterraform

Changes:

dunder main __main__.py added to handle entry point
setup.py entry_point points to edbterraform.__main__:main

Looks good to me


[Discussion] Handling json that doesn't encode the full object

@stiankroknes I've come up with a potential solution to the problem that the output of the DOT parser isn't necessarily complete objects since vis.js supports simplified form for some of it's parameters.
Example with tests in #29
The basic problem is that the default JsonConverter is expecting an json object and throws an exception when it gets something else.
The standard way around this to to write a custom JsonConverter<T> (which I did, see ArrowsJsonConverter in the PR)
However, we want the default converter when there is an object but to do something special when there isn't.
Proposed solution:
For types that have a simplified format (like Arrows and Font) create a class that derives from the proper object and knows how to construct a full object from the simplified form.
Then create a converter for the wrapper class (and when it detects the simplified form it constructs from that), otherwise it can get the default converter and use that to deserialize the full object.
In the branch the Arrows and Font classes are now the wrapper classes around ArrowsInternal and FontInternal.
I gave the wrapper classes the original names so when you are constructing the network in code it looks correct and you don't have to worry about the wrapper/internal versions unless you are deserializing from the simplified format.
I tried to add some high level checks where it looks for either a string or number token to convert from but this might be overkill and it should just take the string output and try and work with that.
Have a look and I'm happy to take any feedback, I feel like there are some ways to simplify it but my C# isn't quite good enough to know how to.

Thanks for investigating and the proposed solution. :thumbsup:
I like the way you solved the conditional type handling. The only concern I have is that xxxInner types will be part of the public API.
Probably possible to find some way around this.
When thinking more about this feature I wonder if the parsed network need to be returned back to Blazor component ?
Something like this would parse and render the parsed data.
 const network: Network = getNetworkById(element.id);

    const parsedData: any = parseDOTNetwork(dot);

    if (!parsedData) {
        console.warn('VisNetwork.Blazor: [parseDotNetwork] no parse result.');
    }

    var data = {
        nodes: parsedData.nodes,
        edges: parsedData.edges
    };
    network.setData(data);

    if (parsedData.options) {
        network.setOptions(parsedData.options);
    }

This way we avoid the serialization issues but not providing the same API as vis-network, may be ok.
If the parsed network data must be returned we can investigate the serialization strategy further.
Could we define an internal definition of the complete Network options using object type for conditional types/discriminated unions. Wonder if the conditionally type handling in WeatherForecast example would work.  The one with
public class WeatherForecast
{
    public object? Data { get; set; }
    public List<object>? DataList { get; set; }
}

Initial support for DOT parsing implemented in #30. Current implementation only parses and sets the data, no options returned.
Issue regarding serialization for options is still present.


feat(backend): make asset scale uint8 in admin API

Changes proposed in this pull request

adds UInt8 scalar to GraphQL schema and resolvers to make sure that asset scale is non-negative (and not too large)
(not needed for Open Payments API since the spec validation checks that asset scale UInt8)

Context

fixes #957

Checklist

[x] Related issues linked using fixes #number
[x] Tests added/updated
[ ] Documentation added
[x] Make sure that all checks pass

The linked issue('s title) suggests enforcing uint8 throughout backend.
I'm ok confining this pr to the admin api but maybe it either shouldn't close the issue or we should open a separate issue.

Where else do we need to enforce it? In the Open Payments API, it's enforced via the request/response validation.

Where else do we need to enforce it? In the Open Payments API, it's enforced via the request/response validation.

At least in postgres
https://github.com/interledger/rafiki/blob/52b6bbfe32f37ed05a62ca9fe0de2bdf702d0530/packages/backend/migrations/20210422194130_create_assets_table.js#L8

Where else do we need to enforce it? In the Open Payments API, it's enforced via the request/response validation.

At least in postgres

Good point


Problem on printing Invt. Shipment and Invt. Receipt

In pages 6567 Posted Invt. Receipt, 6569 Posted Invt. Receipts , 6570 Posted Invt. Shipment and 6572 Posted Invt. Shipments  there is a problem when using the button Print - the record was filtered by empty string.
Missing line in a code:
trigger OnAction()
begin
CurrPage.SetSelectionFilter(InvtShptHeader);
InvtShptHeader.PrintRecords(true);
end;
Should be:
trigger OnAction()
begin
InvtShptHeader := Rec;
CurrPage.SetSelectionFilter(InvtShptHeader);
InvtShptHeader.PrintRecords(true);
end;
(reference page 132 Posted Sales Invoice)

Thank you for reaching out. Your request could be reporting a product bug not related to the AL application extensibility. Please reach out to the relevant support channels:

For collaboration in preview or beta versions of AL Language in Visual Studio Code (aka ModernDev), use GitHub (https://github.com/microsoft/al).
For Microsoft partners, for versions already in general availability and supported, file requests through Microsoft Partnersource (https://mbs.microsoft.com/partnersource/).
For ISVs/VARs who have discovered a bug in a in preview or beta version, use MS Collaborate (https://docs.microsoft.com/en-us/collaborate/).
For Business Central customers who have issues or found bugs, please contact your Microsoft partner.
For the new features please submit a product suggestion on https://aka.ms/bcideas


[sl_SI] Created provider for Company

Companies in Slovenija always have a suffix. Also, "and" is translated to "in".

Thanks!