profile
viewpoint

Yuri6037/Action-FakeTTY 6

FakeTTY GitHub Action

Yuri6037/BLINUX-BLISUX-RootHack 1

Root hack for BLINUX/BLISUX (Epitech crappy version of OpenSUSE), working under HP EliteBook 840 G3 (School year 2016-2017)

Yuri6037/GFPGAN 1

GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.

Yuri6037/TSCM_Starfall 1

TSCM Starfall stuff

Yuri6037/AncientAddinMod 0

Minecraft Forge 1.7.10 Mod.

Yuri6037/Audio-driven-TalkingFace-HeadPose 0

Code for "Audio-driven Talking Face Video Generation with Learning-based Personalized Head Pose"

Yuri6037/AutoDesktop 0

GUI tool to help create desktop entries

Yuri6037/better-pop 0

Make PopOS better/usable as a daily Linux distribution

push eventYuri6037/SAN

Yuri Edward

commit sha cfcb6308beb1c8f5c13916b5d20914f5694e071a

Fixed broken loss

view details

push time in 5 days

push eventYuri6037/SAN

Yuri Edward

commit sha 936a91436b521d93bd89ff9edd6a5ddf5e851e74

Force get_max_region_size to int because python is now defective Somehow it decided it should be float when I'm clearly using ints.

view details

push time in 6 days

push eventYuri6037/GFPGAN

Yuri Edward

commit sha fe5bf838b4d8d0be0e97ffcc02fb70cfc92347c1

Added required version.py

view details

push time in 6 days

push eventYuri6037/SAN

Yuri Edward

commit sha c06ea9c202be766e2b348198ec2f2bf5ac1ba2c9

Added control for epochs + setup for finetuning

view details

push time in 6 days

issue commentintellij-rust/intellij-rust

Fail with maud html template engine

Just tried now that I have a bit a spare time and apart from heating up a bit the CPU when opening the IDE it didn't do much the false error is still here.

Yuri6037

comment created time in a month

issue openedintellij-rust/intellij-rust

Fail with maud html template engine

<!-- Hello and thank you for the issue! If you would like to report a bug, we have added some points below that you can fill out. Consider using "Help | Create New Issue" action that fills out all necessary information automatically. Feel free to remove all the irrelevant text to request a new feature. -->

Environment

  • IntelliJ Rust plugin version: 0.4.161.4292-212
  • Rust toolchain version: rustc 1.56.1 (59eed8a2a 2021-11-01)
  • IDE name and version: CLion 2021.2.2
  • Operating system: Pop!_OS 21.04 (Ubuntu derivative)

Problem description

False E0308 (expected Markup found ())

Steps to reproduce

In your Cargo.toml put maud = "0.23.0" in [dependencies] section.

use maud::{html, Markup};

fn html() -> Markup
{
    html! {
        div .msg {

        }
    }
}

You can test by cargo build and you'll see it builds fine, so this is only IDEA failing to build it.

created time in a month

issue openedoli-obk/cargo_metadata

Unflexible Message::parse_stream

You Message::parse_stream takes a BufRead which is highly unflexible especially when you're trying to parse in-memory data: for example, I need to parse data from an in memory Vec. This fails because slices don't implement BufRead, please consider lowering the rquirement to a Read instead of BufRead as currently I have to create a dummy hacky struct in order to parse from memory.

created time in a month

issue commentrustsec/rustsec

Problems to install `cargo-audit`, it throws seg-fault

I've just come across the same issue running a custom docker image based on alpine.

I've also got similar issues in the past trying to run my crates which attempts to dynamically link against some system libs under aarch64 PMOS (Postmarket OS). It turned out somehow rust musl targets don't play nicely with dynamic linking out of the box because rust assumes that musl targets are static. To fix the problem I've added a configuration option to force rust to dynamically link.

carlosb1

comment created time in a month

issue openedserde-rs/serde

Deserializing structs and enums

I'm writing a deserializer for a custom format. I got the basic types and a partial deserialize_any, however there are a few parts I can't deserialize: enums and structs.

For enums the problem is very simple: the VariantAccess trait doesn't give any way to return the enum variant index back to the caller so the caller knows what variant it is.

For structs the problem is a bit more complicated: there are no traits to deserialize structs and looking at the doc example, the only thing I can find is treating structs as maps however this is impossible in my format as all struct keys must be strings and the format does not store the actual names it stores hashes instead. I couldn't find anything in the doc which allows the caller to call into my deserializer with a pattern like deserialize_struct_field(name_of_field, expected_type). The caller must provide what field name it wants and what is the expected type of the field.

created time in a month

issue commentrust-lang/rust

Possible performance loss with f32 arithmetic

The question then becomes why is rustc forcing an i96 as return type?

Yuri6037

comment created time in a month

push eventYuri6037/GFPGAN

Yuri Edward

commit sha d0e592c51b7aee6fdf642f934d931284f19c75cf

Added skip for bpx files

view details

push time in a month

push eventYuri6037/GFPGAN

Yuri Edward

commit sha b468872cb791a9b20475d58a4e731a246b4bdb0a

Added skip for bpx files

view details

push time in a month

push eventYuri6037/GFPGAN

Yuri Edward

commit sha 2ac0e2d10fb8c9d6b46301e6ab59b81325f07342

Added support for in-place upscaling

view details

push time in a month

issue openedrust-lang/rust

Possible performance loss with f32 arithmetic

I've tried, out of curiosity, a floating point arithmetic test and found quite a big difference between C++ and Rust.

The code used in rust

pub struct Stats
{
    x: f32,
    y: f32,
    z: f32
}

pub fn sum(a: &Stats, b: &Stats) -> Stats
{
    Stats {
        x: a.x + b.x,
        y: a.y + b.y,
        z: a.z + b.z
    }
}

The code used in C++

struct Stats
{
    float x;
    float y;
    float z;
};

Stats sum(const Stats &a, const Stats &b)
{
    return Stats {
        a.x + b.x,
        a.y + b.y,
        a.z + b.z
    };
}

Here is a link to a godbolt for side-by-side comparision of assembly output: https://godbolt.org/z/dqc4b74rv

created time in a month

issue openedAppImageCrafters/appimage-builder

Not working at all under Pop OS 21.04

Hi, I've just attempted to run appimage-builder on a Rust project which depends over 3 large system libs: libavcodec, libavformat and libswscale Log:

INFO:main:Running main script
INFO:main:Running apt deploy
INFO:apt:apt-get update
Get:1 http://ppa.launchpad.net/system76/pop/ubuntu hirsute InRelease [18.1 kB]
Ign:1 http://ppa.launchpad.net/system76/pop/ubuntu hirsute InRelease
Get:2 http://ppa.launchpad.net/system76/pop/ubuntu hirsute/main amd64 Packages [74.7 kB]
Fetched 92.8 kB in 1s (153 kB/s)   
Reading package lists... Done
W: GPG error: http://ppa.launchpad.net/system76/pop/ubuntu hirsute InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1E5F8BBC5BEB10AE
W: The repository 'http://ppa.launchpad.net/system76/pop/ubuntu hirsute InRelease' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Reading package lists... Done
Building dependency tree... Done
Package libgcc-s1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libkeyutils1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libselinux1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libbz2-1.0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package liblzma5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package zlib1g is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libexpat1 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libgpg-error0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

ERROR:root:"/usr/bin/apt-get install -y --no-install-recommends --download-only -o Debug::pkgAcquire=1 libbz2-1.0:amd64 libcom-err2:amd64 libexpat1:amd64 libgcc-s1:amd64 libgpg-error0:amd64 libkeyutils1:amd64 liblzma5:amd64 libpcre3:amd64 libselinux1:amd64 zlib1g:amd64" execution failed
ERROR:root:E: Package 'libbz2-1.0' has no installation candidate
ERROR:root:E: Unable to locate package libcom-err2:amd64
ERROR:root:E: Package 'libexpat1' has no installation candidate
ERROR:root:E: Package 'libgcc-s1' has no installation candidate
ERROR:root:E: Package 'libgpg-error0' has no installation candidate
ERROR:root:E: Package 'libkeyutils1' has no installation candidate
ERROR:root:E: Package 'liblzma5' has no installation candidate
ERROR:root:E: Unable to locate package libpcre3:amd64
ERROR:root:E: Package 'libselinux1' has no installation candidate
ERROR:root:E: Package 'zlib1g' has no installation candidate
Traceback (most recent call last):
  File "/tmp/.mount_appimaEEVoQX//usr/bin/appimage-builder", line 8, in <module>
    sys.exit(__main__())
  File "/tmp/.mount_appimaEEVoQX/usr/lib/python3.8/site-packages/appimagebuilder/__main__.py", line 58, in __main__
    invoker.execute(commands)
  File "/tmp/.mount_appimaEEVoQX/usr/lib/python3.8/site-packages/appimagebuilder/invoker.py", line 41, in execute
    command()
  File "/tmp/.mount_appimaEEVoQX/usr/lib/python3.8/site-packages/appimagebuilder/commands/apt_deploy.py", line 46, in __call__
    deployed_packages = apt_deploy.deploy(
  File "/tmp/.mount_appimaEEVoQX/usr/lib/python3.8/site-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 42, in deploy
    deploy_list = self._resolve_packages_to_deploy(
  File "/tmp/.mount_appimaEEVoQX/usr/lib/python3.8/site-packages/appimagebuilder/modules/deploy/apt/deploy.py", line 72, in _resolve_packages_to_deploy
    deploy_list = set(self.apt_venv.resolve_packages(include_patterns))
  File "/tmp/.mount_appimaEEVoQX/usr/lib/python3.8/site-packages/appimagebuilder/modules/deploy/apt/venv.py", line 183, in resolve_packages
    output = self._run_apt_get_install_download_only(packages_str)
  File "/tmp/.mount_appimaEEVoQX/usr/lib/python3.8/site-packages/appimagebuilder/modules/deploy/apt/venv.py", line 207, in _run_apt_get_install_download_only
    shell.assert_successful_result(command)
  File "/tmp/.mount_appimaEEVoQX/usr/lib/python3.8/site-packages/appimagebuilder/utils/shell.py", line 36, in assert_successful_result
    raise RuntimeError(
RuntimeError: "/usr/bin/apt-get install -y --no-install-recommends --download-only -o Debug::pkgAcquire=1 libbz2-1.0:amd64 libcom-err2:amd64 libexpat1:amd64 libgcc-s1:amd64 libgpg-error0:amd64 libkeyutils1:amd64 liblzma5:amd64 libpcre3:amd64 libselinux1:amd64 zlib1g:amd64" execution failed with code 100

created time in a month

issue commentrust-lang/rust

Consider re-tuning the lifetime elision rules for trait objects

If this proposition allows to do

pub type SectionDataType = dyn SectionData + 'static;

and use that type everywhere instead of typing the full type always, I'm in favor of that as it's indeed not always clear that it defaults to 'static and the proof is it doesn't do this for the example in #91292: if the 'static lifetime isn't explicitly written as part of the return type, the compiler infers a different lifetime which fails to compile.

scottmcm

comment created time in 2 months

issue commentrust-lang/rust

Lifetime mismatch with Option as_mut and map

With a limited lifetime, everything* above it has to have a lifetime or generic. E.g: If your container is a Vec, it can be Vec<SectionEntry<'a>>. The reason lifetimes cannot be 'forgotten' is that it could potentially be unsound.

  • Allocators are different the user keeps track of types, not the allocator.

Yeah I know and that's the problem, restricting dyn traits to have always generic lifetimes in my case renders them completely useless.

The original problem here is that if the return type of the function is explicitly dyn SectionData + 'static option map works but if not it fails whereas in the immutable case it works. It's disturbing to see this inconsistency.

Yuri6037

comment created time in 2 months

issue commentrust-lang/rust

Lifetime mismatch with Option as_mut and map

It isn't restricting the data behind the Box. What it is doing is lessening the requirements from 'static to 'a. Without an annotated lifetime in Box, Rust assumes you meant 'static, which unnecessarily restricts the allowed types.

With it, you can now use borrowed data in your dyn SectionData + 'a.

E.g:

struct SectionDataWithReference<'a>(&'a u8);
impl SectionData for SectionDataWithReference<'_> { ... }

let num = 5;
let mut entry = SectionEntry {
    data: Box::new(SectionDataWithReference(&num)),
};
let sm = SectionMut {
    entry: &mut entry,
};

I think you misunderstood my point with SectionEntry. SectionEntry cannot have a lifetime as it's what's stored in a container and passing the lifetime to the container itself is just increasing complexity of the API and has no benefit because the underlying trait in all cases will always be created in a Box not a lifetime based box.

Yuri6037

comment created time in 2 months

issue commentrust-lang/rust

Lifetime mismatch with Option as_mut and map

@Yuri6037

The lifetime can simply be propagated to the inner struct:

pub struct SectionEntry<'a> {
    data: Box<dyn SectionData + 'a>,
    // all the private fields you want
}

pub struct SectionMut<'a> {
    entry: &'a mut SectionEntry<'a>,
}

Why would I want to restrict my dyn trait to a specific lifetime; it shouldn't be.

Yuri6037

comment created time in 2 months

issue commentrust-lang/rust

Lifetime mismatch with Option as_mut and map

Here's another fix that works: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=7f61519b420c4725dcacddd9a80f69ee

Two steps to get there. First, since SectionMut is holding a lifetime-restricted reference, it'd be fine for the Box it's referencing to be non-'static:

pub struct SectionMut<'a> {
    data: &'a mut Option<Box<dyn SectionData + 'a>>,
}

Then in the impl, you don't want to tie the trait object's lifetime to the passed-in lifetime, but to the one on the impl:

impl<'a> SectionMut<'a> {
    pub fn open(&mut self) -> Option<&mut (dyn SectionData + 'a)> {

I'm more and more questioning whether the + 'static defaulting rules are worth it...

EDIT: Opened #91302 for that conversation.

That won't fix the case where the Box is inside of another structure like so:

pub struct SectionEntry
{
    data: Box<dyn SectionData>,
    /* some other private fields in here */
}
pub struct SectionMut<'a>
{
    entry: &'a mut SectionEntry
}
Yuri6037

comment created time in 2 months

issue openedrust-lang/rust

Lifetime mismatch with Option as_mut and map

Consider the following code:

use std::ops::DerefMut;
use std::ops::Deref;

pub trait SectionData: std::io::Read + std::io::Write + std::io::Seek {}

pub struct SectionMut<'a>
{
    data: &'a mut Option<Box<dyn SectionData>>,
}

impl<'a> SectionMut<'a>
{
    pub fn open(&mut self) -> Option<&mut dyn SectionData>
    {
        //self.data.as_mut().map(|v| v.deref_mut()) //Lifetime mismatch
        match &mut self.data { //Works
            Some(v) => Some(v.deref_mut()),
            None => None
        }
    }

    pub fn open1(&self) -> Option<&dyn SectionData>
    {
        self.data.as_ref().map(|v| v.deref()) //Works
    }
}

I find it strange that a match statement works but not the map function with as_mut. On the IRC a user found a way to fix it by replacing Option<&mut dyn SectionData> with Option<&mut dyn SectionData + 'static>. Which is also weird considering 'static is supposed to be implicit. What's also weird is this works perfectly with as_ref alone.

created time in 2 months

issue commentmegvii-model/HINet

ImportError

I've got the software to run on my RTX 3060 by moving main.py outside of the basicsr directory and by implementing image decomposition to avoid VRAM overload (my RTX only has 6Gb of VRAM).

On the remote machine according to some Python Matrix channel it's unfixable: the problem is because you've named the directory basicsr which conflicts with the module I have installed (also named basicsr).

Yuri6037

comment created time in 2 months

push eventYuri6037/GFPGAN

Yuri Edward

commit sha 66c98598d7375ee286dfa6da0f360ac2e74aca19

Added preliminary support to run multiple iterations of GFPGAN

view details

push time in 2 months

fork Yuri6037/GFPGAN

GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration.

fork in 2 months

issue openedmegvii-model/HINet

ImportError

Your network does not run on my research machine:

Traceback (most recent call last):
  File "basicsr/demo.py", line 10, in <module>
    from basicsr.models import create_model
ImportError: cannot import name 'create_model'

created time in 2 months

issue commentpop-os/pop

System freeze - NVIDIA

The problem happened again, this time I've just found a new method to trigger it:

  • Start laptop in hybrid mode,

  • Connect a bluetooth mouse (such as MS Precision Mouse or Apple Magic Mouse)

  • Connect external HDMI 4K display,

  • Configure computer to output 4K 60Hz and treat external display as extended,

  • Open audio configuration on laptop and set it to output to NVIDIA HDMI, play some sound to make sure the TV is actually outputting sound from laptop,

  • Apply and save settings, you should now have the TV showing a duplicate of your desktop,

  • Close laptop lid,

  • The TV screen will now bug as hell for maybe a few seconds, wait for it to stabilize,

  • After it stabilized mouse cursor will start moving smoothly again,

  • Re-open laptop lid,

  • Wait for both screens stabilize again (GNOME/Xorg moving windows from one screen to the other),

  • Disconnect HDMI cable (leaving all configuration as is), at this point the laptop should still work,

  • Immediatly close laptop lid,

  • 2 seconds later enjoy fan spinning as hell and dead black screen (NVIDIA has died again),

  • Force reboot computer (use the power button),

  • Once in gnome open a terminal and type sudo journalctl -r -b -1, read the log and enjoy NVIDIA Xid79 before NVIDIA "can't change power state from d3cold to d0 (config space inaccessible)"

Yuri6037

comment created time in 2 months

issue commentlinux-surface/linux-surface

Problems with dGPU on SB1: "The NVIDIA GPU installed in this system has fallen off the bus"

I have this power state problem randomly after an application has finished using the GPU and that another application is attempting to use it at the same time another one is finishing use. I'm pretty sure this is a race condition. My system is not a Surface Book 2 anymore and I'm using Pop OS. I have pretty much the same message on all hybrid laptops I have "can't change power state from d3cold to d0 (config space inaccessible)" followed by Xid79 "GPU has fallen off the bus". This does however not occur on systems running NVIDIA for display all the time, this only seem to occur in hybrid mode.

wiisportsresort

comment created time in 2 months

push eventYuri6037/SAN

Yuri Edward

commit sha 312e116f4c266b8199053b3021c8dcc191a52264

Fixed wrong data range in SSIM loss

view details

push time in 2 months

push eventYuri6037/SAN

Yuri Edward

commit sha 3d609145a77c905b174042a050b2b0c0527b4d1e

Swapped ms_ssim with ssim due to ms_ssim limitation on small images

view details

push time in 2 months

push eventYuri6037/SAN

Yuri Edward

commit sha 07605775fe54d2c56e96e090166223db21107570

Fixed wrong loss name

view details

push time in 2 months

more