text:
error: the trait bound <Inner>: Deref is not satisfied

When I do #[derive(Deref)] struct Col(RGB<f32>); why am I getting

error: the trait bound rgb::RGB<f32>: Deref is not satisfied ?

Using this RGB type: https://crates.io/crates/rgb

Can you provide a script that I can use to reproduce the issue? I was unable to reproduce using the latest versions of derive_deref and rgb using the following script:
#[macro_use]
extern crate derive_deref;
extern crate rgb;

#[derive(Deref)]
pub struct Col(rgb::RGB<f32>);

It's a huge project..
Btw, it actually says lazy_static::Deref, any idea why?

error: the trait bound rgb::RGB<f32>: lazy_static::Deref is not satisfied
error: the trait lazy_static::Deref is not implemented for rgb::RGB<f32>

#[derive(Deref, Copy, Clone)]
pub struct Col(pub RGB<f32>);

Huh. That's... Odd. I legitimately have no clue where that could be coming from. This derive is explicitly always qualifying as ::std::ops::Deref, and there are no bound added to that impl (other than any where clause that is on the actual struct).
Maybe try running it through cargo expand, and see if using the generated impl gives a more specific error?

            pub struct Col(pub RGB<f32>);
            impl ::std::ops::Deref for Col {
                type
                Target
                =
                <RGB<f32> as ::std::ops::Deref>::Target;
                #[inline]
                fn deref(&self) -> &Self::Target {
                    <RGB<f32> as ::std::ops::Deref>::deref(&self.0)
                }
            }

Hm, no idea why it confuses it with lazy_static::Deref..

Btw, it is working on another type in the same project!
#[derive(Deref, Clone)]
pub struct Voices(pub Vec<MidiPitch>);

authors: Boscop sgrif


text:
do you need to put decoder.dropout at testing time?

Hi. I've realized that you've removed the line of code: decoder.dropout(h) at testing time. At inference, the dropout behaves differently (gets scaled to account for the loss in training). However, you are not informing the network of any dropout at testing time, so how should it supposed to be scaled? Because when you are removing the decoder.dropout, you are getting the unscaled values. They yield different results. Have a look at the code below:
import torch
import torch.nn as nn

x = torch.randn(4,4)
drop = nn.Dropout(0.5)
model = nn.Linear(4,6)
model.train()
model(drop(x))

model.eval()
d = model(drop(x))
n = model(x)
print(d == n)

This gives a matrix of 0s (all False).

Thanks!

@sgrvinod may you please answer?

Hi, sorry, I haven't had to chance to reply to many issues.
As I understand it, what you're asking is, when Dropout is applied during training with a probability p to keep a value, then we must scale the values by a factor of p during inference/testing because 1 - p of the values are no longer being dropped out. So, since I'm not using the Dropout layer during inference, the network doesn't know to scale values by p. Am I right in understanding your question?
In PyTorch, however, the Dropout layer is structured such that the scaling is applied during training and not during inference. So the not-dropped values during training are scaled by a factor of 1 / p, instead of scaling all the values during inference by a factor of p. This is convenient because the scaling is applied when Dropout is actually applied (i.e. during training), and not when Dropout is not applied (i.e. during inference), and therefore we don't need to worry about it at test time.
In your code, the Dropout layer drop is not actually a part of model, so regardless of whether model is in train() or eval() mode, drop is still in train() mode. So, what drop is doing to x is that it is dropping half the values (p = 0.5), and multiplying the not-dropped values by 1 / 0.5, i.e. doubling them. So drop(x) and x have no equal elements, which is why model(drop(x)) and model(x) have no equal elements.
You can test the behaviour of the PyTorch Dropout in train() and eval() modes:
drop = nn.Dropout(0.5)
x = torch.randn(1, 5)
print(x)

drop.train()  # unnecessary because it's already in train mode, since it's the default
dropped_train = drop(x)
print(dropped_train)  # dropout in train() scales the not-dropped values by 2 (= 1 / 0.5)
print(dropped_train == 2 * x)  # 1s where values weren't dropped

drop.eval()
dropped_eval = drop(x)
print(dropped_eval)  # dropout in eval() mode has no effect
print(dropped_eval == x)  # all 1s

Similarly,
x = torch.randn(1, 5)
model = nn.Sequential(*[nn.Linear(5, 5), nn.Dropout(0.5)])

model.train()
train_result = model(x)

model.eval()
eval_result = model(x)

print(train_result == 2 * eval_result)  # 1s where values weren't dropped

Hope this answers your question. If I misunderstood, let me know.

Thank you for your great answer! I completetly forgot that PyTorch uses inverted dropout (which leaves the values of testing time unchanged). Thanks a lot for the examples as well!

source: gharchive/issue

authors: homelifes sgrvinod

license: MIT

license_type: permissive

license_source: github-api


text:
Ordering of button script

the "remove true line" should be at the end of the button code block,  otherwise it doesnt remove the whole button and the lines coming after it remain unremoved.
It should be:
name Time Tracker
type command
action Super Simple Time Tracker: Insert Time Tracker
color blue
**remove true**

Not:
name Time Tracker
type command
action Super Simple Time Tracker: Insert Time Tracker
**remove true**
color blue

can't replicate

repo: shabegom/buttons

license: Unlicense


text:
Can't use it with trubo pack vite project

Keep getting this error, i am using tsconfig from vite docs (default one)
This is my repo: https://github.com/Parthvsquare/brook
I works with nextjs

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

authors: Parthvsquare shadcn

repo: shadcn-ui/ui


text:
Fix: fix chart display period (#4521)

What does this PR do??
This PR fixes the chart-area-interactive empty data for Last 7days/30days when dropdown is selected.
Replaced static data with function which will give dynamic data.
Fixed #4521
How Should this be tested?

Go to charts page.
Go to Area Chart-Interactive period.
Toggle between Last 30Days/7Days in dropdown

Screenshots:
Before Fix:

After Fix:

I think, you also need to run pnpm format:write , so that formatting matches the rest of the code

source: gharchive/pull-request


text:
Invalid Slang Code-Generation

Problem:
With the provided shader attached below, when compiled, the following is observed:

Slang will compile invalid HLSL.
static RWStructuredBuffer<int > test_val_0; is created and assigned to nothing.

Slang will compile invalid SPIR-V.

error: line 24: In Logical addressing, variables may not allocate a pointer type
  %test_val = OpVariable %_ptr_Private__ptr_StorageBuffer_RWStructuredBuffer Private

Slang will ASSERT when compiling GLSL.
ASSERT while attempting to emit IRHLSLStructuredBufferTypeBase, which is invalid for GLSL targets.

Expected:
if this the repro-shader is an incorrect use-case: Slang warns/errors without creating invalid code-gen.
if this the repro-shader is a correct use-case: Slang should compile the code correctly.
To Repro:

Compile the shader below 3 times, 1 for each target: -target glsl -entry computeMain -stage compute myTestShader.slang and -target hlsl -entry computeMain -stage compute myTestShader.slang and -target spirv -entry computeMain -stage compute myTestShader.slang

// myTestShader.slang
struct Test {
    RWStructuredBuffer<int> val;
    __subscript(int x, int y)->int
    {
        get { return val[x * 3 + y]; }
        set { val[x * 3 + y] = newValue; }
    }
}
Test test;

[shader("compute")]
[numthreads(32, 1, 1)]
void main(uint3 dispatchThreadID: SV_DispatchThreadID) {
    test[1,1] = 1;
}

We already have the logic in the compiler to say that if a global or entrypoint parameter is resource-typed, then we mark it as uniform.
We need to extend the logic to cover both resource-typed and structure-typed (with resource elements) parameters.

For structure-typed parameters, we should just make it an error if it contains resource fields.

authors: ArielG-NV csyonghe

repo: shader-slang/slang

license: mit

license_source: bigquery


text:
MT7621 (mipsel_24kc) run error

./v2ray-plugin_linux_mips: line 1: syntax error: unexpected "("

try: https://github.com/chenhw2/openwrt-v2ray-plugin/releases/tag/trunk

我安装 了这个包，但是用了后 透明代理无法运行，并且网都上不了了

Contributions are welcome.

authors: Mygod TienYow chenhw2 jsjhzw


text:
Connect the Subscribe and Get in Touch section with backend in SheHeroes-template

@hiashutoshsingh I have created the template, but the subscribe and Get in touch section of the web template is not connected with backend
kindly assign me this issue so i can do the required changes in web template under GSSOC'21

@shagun25  Kindly review the changes in the html file of zip folder----->
SheHeroes-template.zip
Here is the screenshot of firebase --->

@shagun25  Please check it once and should i make PR now?

@shagun25 Please check it once and should i make PR now?

@Ayushisood there's already firebase account made for sheheroes you can use that.

@shagun25 Please check it once and should i make PR now?

@Ayushisood there's already firebase account made for sheheroes you can use that.
provide your mail id will add you.

@shagun25
mail id : soodayushi239@gmail.com

@shagun25 Please check it once and should i make PR now?

@Ayushisood there's already firebase account made for sheheroes you can use that.
provide your mail id will add you.

@shagun25
mail id : soodayushi239@gmail.com

added.

@shagun25 Please check it once and should i make PR now?

@Ayushisood there's already firebase account made for sheheroes you can use that.
provide your mail id will add you.

@shagun25
mail id : soodayushi239@gmail.com

added.

@shagun25 Done the changes in the provided firebase account, please check it and also view the functionality of Html file provided in the zipped folder ->
SheHeroes-template.zip


text:
Requests made to Widevine licenses server proxy at playback time of offline stored content, despite persistent license storage is supported

Have you read the FAQ and checked for duplicate open issues?
Yes
If the problem is related to FairPlay, have you read the tutorial?
N/A, I am only using Widevine.
What version of Shaka Player are you using?
Latest version 4.7.6
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from main?
Yes
Are you using the demo app or your own custom app?
Custom app, based on CastLabs's electron release (read below)
If custom app, can you reproduce the issue using our demo app?
N/A
What browser and OS are you using?
Windows, Chrome 120.0.6099.199 in VPM-signed Electron 28.1.3
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A
What are the manifest and license server URIs?
Manifest URI : https://boutique-arte-streams.lab.arte.tv/origin/HLS_139940_0-VOF-cenc.ism/stream.mpd
License server URI : https://widevine-dash.ezdrm.com/proxy?username=s-oualid%40artefrance.fr&contentId=HDS_139940_0-VOF&PX-BASEDC
What configuration are you using?  What is the output of player.getConfiguration()?
See below...
What did you do?
I've created a prototype of offline player for protected (by Widevine DRM) videos.
I make use of Shaka-Player (latest version 4.7.6), the DRM provider EZDRM and a special release of Electron made by CastLabs, called ECS. Electron for Content Security (ECS) is a fork of Electron created by castLabs to facilitate the use of Google's Widevine Content Decryption Module (CDM) for DRM-enabled playback within Electron, including support for Verified Media Path (VMP) and persistent license storage. It is intended to be used as a drop-in replacement for stock Electron and currently has full support for Windows and macOS platforms, with partial support for Linux (which lacks support for persistent licenses due to VMP limitations on the platform).
Note that I am using Windows.
Since the video content I want to play is production content, I am not using Widevine UAT servers accepting development clients, consequently I have to VMP-sign my electron binary for production, using CastLabs's Cloud-based EVS service :
python3 -m castlabs_evs.vmp sign-pkg --persistent node_modules/electron/dist/

The electron.exe is correctly signed :
Signing: node_modules/electron/dist\electron.exe
 - Verifying existing VMP signature
 - Signature invalid: Certificate is valid for development only
 - Verifying matching VMP signature in cache
 - Signature is valid [persistent, 2368 days of validity], use cached signature

I can also check that with the following command :
python3 -m castlabs_evs.vmp verify-pkg --persistent node_modules/electron/dist/

Verifying signature for: node_modules/electron/dist\electron.exe
 - Signature is valid [persistent, 2368 days of validity]

To download offline content, here is basically my shaka-player setup :
    const GOOGLE_WIDEVINE_KEY_SYSTEM = 'com.widevine.alpha';

    const { drm } = await shaka.Player.probeSupport();
    const arePersistentLicensesSupported = drm[GOOGLE_WIDEVINE_KEY_SYSTEM]?.persistentState ?? false;
    logInfo(`Persistent licenses are ${arePersistentLicensesSupported ? 'supported' : 'not supported'}`);

    player.configure({
        drm: {
            logLicenseExchange: true, // TODO: change value depending on build mode.
            preferredKeySystems: [GOOGLE_WIDEVINE_KEY_SYSTEM],
            // True to configure drm to try playback with given persistent session ids
            // before requesting a license. Also prevents the session removal at playback stop,
            // as-to be able to re-use it later :
            persistentSessionOnlinePlayback: arePersistentLicensesSupported,
            advanced: {
                [GOOGLE_WIDEVINE_KEY_SYSTEM]: {
                    videoRobustness: 'SW_SECURE_CRYPTO',
                    audioRobustness: 'SW_SECURE_CRYPTO',
                    // True if the application requires the key system to support persistent state,
                    // e.g., for persistent license storage :
                    persistentStateRequired: arePersistentLicensesSupported
                }
            },
            servers: {
                [GOOGLE_WIDEVINE_KEY_SYSTEM]: getLicenseServerUrl(username, video)
            }
        },
        offline: {
            usePersistentLicense: arePersistentLicensesSupported,
            progressCallback,
            trackSelectionCallback
        }
    });

Then I use storage.store API from shaka-player to download the contents... Everything is OK, two POST requests are made to EZDRM's widevine license server proxy, and both are successfum (HTTP code 200 returned)
Creating new persistent-license session
shaka-player-ui.js?v=8001658b:2116 EME init data: type= cenc data= AAAAVHBzc2gAAAAA7e-LqXnWSs6jyCfc1R0h7QAAADQIARIQqZxKFTq9VH6BOWGMTUmCYhoIbW92aWRvbmUiEMyRd5Wf9b9NiYMUxq-hK58qAlNE
shaka-player-ui.js?v=8001658b:2116 EME license request ...
shaka-player-ui.js?v=8001658b:2116 EME license response ...
shaka-player-ui.js?v=8001658b:2116 EME license request ...
shaka-player-ui.js?v=8001658b:2116 EME license response ...

Here is the content in the IndexDB shaka_offline_db database manifest_v5 table :
drmInfo:
    audioRobustness: "SW SECURE CRYPTO"
    distinctiveIdentifierRequired: false
    ▼initData: Array(0)
        length: 0
    keyIds: Set(1)
        ▼[[Entries]]
        ▼0: "a99c4a153abd547e8139618c4d498262"
            value: "a99c4a153abd547e8139618c4d498262"
        size: 1
    keysystem: "com.widevine.alpha"
    licenseServerUri: "https://widevine-dash.ezdrm.com/proxy?username=xyz%40artefrance.fr&contentId=HDS_139940_0-VOF&PX-BASEDC"
    persistentStateRequired: true
    ▾ serverCertificate: Uint8Array(0)
        buffer: ArrayBuffer(0)
        bytetength: 0
        byteoffset: 0
        length: 0
        Symbol(Symbol.toStringTag): "Uint8Array"
    serverCertificateUri: ""
    sessionType: "persistent-license"
    videoRobustness: "SW SECURE CRYPTO"
duration: 730.090666
expiration: Infinity
isIncomplete: false
originalManifesturi: "https://boutique-arte-streams.lab.arte.tv/origin/HLS_139940_0-VOF-cenc.ism/stream.mpd"
sequenceMode: false
▼sessionIds: Array(0)
    length: 0
size: 57083255
streams: Array(2)
    : {id: 3, originalid: 'audio=192000', groupId: null, primary: true, type: 'audio', } 1: (id: 5, originalld: 'video-424000', groupId: null, primary: true, type: 'video', )
    length: 2
type: "DASH"

What did you expect to happen?
Now, once the download is complete, I go offline and I attempt to play the downloaded contents. I would expect no HTTP requests to be made to EZDRM's widevine licenses server proxy
I would expect playback of offline content not to require any network connection, since I have set usePersistentLicense to true and persistent license storage is supported by my VPM-signed ECS...
What actually happened?
Two requests (probably because drm.retryParameters.maxAttempts is set to 2 ?) are made, which obvisouly fails since there is no network connectivity....
Consequently, the playback of the video when offline does not work...
What could cause shaka-player to request once again license at playback time ? I can't find the reason why... (tell me if you need additional details !)
Additional observations
What I have also observed (Idk if this can be of any help ?) is that in the IndexDB "shaka_offline_db" database, the session-ids table is empty... I don't know if this is normal or not ? Where is the persistent license stored ?

@loicraux can you try to download the content in the demo over Chrome and see the results? Thanks!

Also try not to set drm.advanced[WIDEVINE].persistentStateRequired and see the results

@loicraux can you try to download the content in the demo over Chrome and see the results? Thanks!

I have the same results when trying to download the content in the Shaka Player demo over Chrome on Windows :
Manifest URL is : https://boutique-arte-streams.lab.arte.tv/origin/HLS_139940_0-VOF-cenc.ism/stream.mpd
Custom License Server URL is : https://widevine-dash.ezdrm.com/proxy?username=artevod_s-oualid%40artefrance.fr&contentId=HDS_139940_0-VOF&pX=BA5EDC
Extra config is :
{
  "drm": {
    "preferredKeySystems": ["com.widevine.alpha"],
    "persistentSessionOnlinePlayback": true,
    "advanced": {
      "com.widevine.alpha": {
        "videoRobustness": "SW_SECURE_CRYPTO",
        "audioRobustness": "SW_SECURE_CRYPTO",
        "persistentStateRequired": true
      }
    }
  },
  "offline": {
    "usePersistentLicense": true
  }
}

In Chrome on Windows, I click on the download button, content is downloaded OK, but when I hit the play button, I observe the same : Two requests are made to the EZDRM licenses server proxy .... ?
Note : I observe the same if drm.advanced[WIDEVINE].persistentStateRequired is not set. I also observe the same if drm.persistentSessionOnlinePlayback is not set. And the same with an extra config as simple as :
{
  "offline": {
    "usePersistentLicense": true
  }
}

Also try not to set drm.advanced[WIDEVINE].persistentStateRequired and see the results

This makes no changes. Two requests are still made at playback time.

I have found an error in the code, I will upload a fix soon. Thanks!

I have found an error in the code, I will upload a fix soon. Thanks!

Thanks for the analysis & PR !

authors: avelad loicraux

repo: shaka-project/shaka-player


text:
🛑 Shakedown Social - Uploads is down

In 5ff9d8e, Shakedown Social - Uploads (https://files.shakedown.social/accounts/avatars/109/357/389/718/265/462/original/dd80d2c95e48cfd2.jpeg) was down:

HTTP code: 403
Response time: 283 ms

Resolved: Shakedown Social - Uploads is back up in bb65c4b.

repo: shakedown-social/upptime


text:
🛑 Shakedown Social - Uploads is down

In 58e4ff8, Shakedown Social - Uploads (https://files.shakedown.social/accounts/avatars/109/357/389/718/265/462/original/dd80d2c95e48cfd2.jpeg) was down:

HTTP code: 403
Response time: 749 ms

Resolved: Shakedown Social - Uploads is back up in 9aae52d.


text:
🛑 Shakedown Social - Uploads is down

In 721ab01, Shakedown Social - Uploads (https://files.shakedown.social/accounts/avatars/109/357/389/718/265/462/original/dd80d2c95e48cfd2.jpeg) was down:

HTTP code: 403
Response time: 568 ms

Resolved: Shakedown Social - Uploads is back up in 4960ff3.


text:
🛑 Shakedown Social - Uploads is down

In 92dd615, Shakedown Social - Uploads (https://files.shakedown.social/accounts/avatars/109/357/389/718/265/462/original/dd80d2c95e48cfd2.jpeg) was down:

HTTP code: 403
Response time: 505 ms

Resolved: Shakedown Social - Uploads is back up in 0fb95fc.


text:
"Settings sync" screen appears

"Settings sync" screen appears on every time I start vscode.
I already removed your plugin but it still appears.
I hate it.
How do i get rid of it?
Very annoying

@alkurop Can you make sure that you've properly removed the extension? This can't happen if you did.

I tried to uninstall it and the uninstall fails.  Same with disable. I ended up having to manually remove the extension.  On a mac you can run rm -rf ~/.vscode/extensions/shan.code-settings-sync-3.4.0.  Just make sure the version in the extension name matches what version is on your machine.

Yep, shows up every time I restart vscode.   :(

Is there no way to stop it from opening every time? I like Settings Sync and want to keep it but this screen opening every time I open VS Code is really irritating!

Yes, we are planning to fix this issue in next version.
Get Outlook for iOShttps://aka.ms/o0ukef

From: N U R O ™ notifications@github.com
Sent: Wednesday, July 17, 2019 7:54:41 PM
To: shanalikhan/code-settings-sync
Cc: Subscribed
Subject: Re: [shanalikhan/code-settings-sync] "Settings sync" screen appears (#963)
Is there no way to stop it from opening every time? I like Settings Sync and want to keep it but this screen opening every time I open VS Code is really irritating!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/shanalikhan/code-settings-sync/issues/963?email_source=notifications&email_token=ACC6HHCKU5G7IRLNHLM4F23P74XDDA5CNFSM4IEAVD62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2EPFQY#issuecomment-512291523, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACC6HHACESU7LCOGYEISVULP74XDDANCNFSM4IEAVD6Q.

Same for me. Very annoying for an otherwise excellent extension. Would be better if you could release a hotfix for this instead of planning a fix in the next version 😉

Until it's fixed, you should try this dirty hack...
Open ~/.vscode/extensions/shan.code-settings-sync-3.4.0/out/extension.js.
Search for:
OpenLandingPage=function()
It should look like this:
e.prototype.OpenLandingPage=function(){var e=this,t=this.webviews[0]
Add "return;" After the opening braces and before everything else:
e.prototype.OpenLandingPage=function(){return;var e=this,t=this.webviews[0]
This prevents the landing page from showing.

i have a different issue but even if i uninstall and also remove the extension from ~/.vscode/extensions/ when i install again, i dont get the regular setup procedure. is there some cache i dont know about?

Would be better if you could release a hotfix

We have found some other things to improve the Setup Guide and making the UX more better. Hold on we will release in next days. :)
thanks for patience, i'm getting alot of bad reviews and emails mentioning this thing only :smile:

i'm getting alot of bad reviews and emails mentioning this thing only

I'm not surprised.
This is why (if I were you) I'd release a hotfix to stop this bug and bad reviews happening, then make your improvements 😞

This is why (if I were you) I'd release a hotfix to stop this bug

There was a delay due to other issues during setup. We have improved the UX alot. It is fixed in v3.4.1. Let us know in case of query.

Upgraded to 3.4.1, yet still I get the Settings Sync screen.

U can disable it using the checkbox in the bottom right corner
Get Outlook for iOShttps://aka.ms/o0ukef

From: Daniel Reznicek notifications@github.com
Sent: Monday, July 22, 2019 11:57:13 PM
To: shanalikhan/code-settings-sync
Cc: Shan Khan; State change
Subject: Re: [shanalikhan/code-settings-sync] "Settings sync" screen appears (#963)
Upgraded to 3.4.1, yet still I get the Settings Sync screen.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/shanalikhan/code-settings-sync/issues/963?email_source=notifications&email_token=ACC6HHEP4YOVNZ6BFD62ILTQAX7ITA5CNFSM4IEAVD62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2Q2ODI#issuecomment-513910541, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACC6HHAHTXTJWQ4NAX2BQHLQAX7ITANCNFSM4IEAVD6Q.

Upgraded to v3.4.1, unchecked the checkbox bottom right still getting this welcome screen.  Am going to uninstall it 😞

unchecked the checkbox bottom right still getting this welcome screen

have you reset the settings? after unchecking it.
It should not appear once you uncheck the checkbox until you reset the settings.

This welcome screen is a really bad idea anyway, no idea why it should even be there. Extensions should be invisible in the background.  If I want to know more I can go to the extension and check out the home page

I don't know what you mean by "reset the settings".  I unchecked the box, quit and opened again. Then checked it, quit and opened again, then unchecked it, quit and opened again.  No matter what I did it kept appearing.  I've removed it now.  May reinstall at a later date if I need to sync between machines.

Okay, let me explain the steps.

Settings Sync UI will appear on startup automatically when you don't have Github token setup.
It will appear on upload/download when you have not configured Github token.
You can always disable the startup UI appearance while unchecking the Don't Show at Startup on the bottom right. It will disable startup appearance and will only show UI on upload/download ( when token not configured )
If you do the Sync: Reset Extension Settings it will reset the extension settings and will cause the UI to load once again on startup and you need to uncheck that box.

If you find other behaviour as intended, open issue for it, We will fix it.

Duplicate of #959

authors: NuroDev alkurop arnohovhannisyan bkbonner dreznicek emezav jameswilliamiii joecarney k1nghat shanalikhan

repo: shanalikhan/code-settings-sync


text:
Can't download pretrained models

Hi.
Looks like the pretrained models link is broken, could you check please.
Thanks.

Hi,
I've tried to open the link, everything looks fine here.
Could you plz elaborate on the problem, e.g., provide a screenshot?

Thanks for a help, I think maybe problem with my account:

Problem only with pretrained models, datasets and output downloads well.
This is from another browser:

I've created a new link
https://mailstsinghuaeducn-my.sharepoint.com/:f:/g/personal/liuxy21_mails_tsinghua_edu_cn/EkCTrRfHUZVEtD7eHwLkYSkBCTXlh9ekDteSzK6jM4oo-A?e=6TCh8y
Give it a try.

authors: bobsler shanice-l


text:
Getting rid of points between 'vertices' of polygons that simplify() doesn't always remove (possible alternative?)

This is kind of related to issue #939 that was previously marked invalid. And I wanted to highlight it a bit more with example pictures and also ask if there is any interest in having a similar feature implemented in Shapely?
So I find that sometimes the simplify() method with polygons doesn't remove points that lie along the edges between vertices which can lead me into a heuristic battle trying out different tolerance values with no success (and lead me to having a similar issue as in #939, of only wanting the 'obvious' corners).
One of the suggestions in that issue thread though was the use of some trig along with the exterior.coords attribute. So far I've found this approach really handy! And it has yet to fail me (by no means robust though, I've only been using it on simple, non-intersecting polygons)
Example
Here is an simple example with a hexagon with a bunch of points along the edges between vertices

Below is an attempt using the  simplify() method with preserve_topology = False
tolerance values: [1e-10, 0.1, 1, 10, 100] (left to right, respectively)

So in this example, either there was still a persistent point or too many points were removed (in the case of 100, it was completely removed). In some shapes, there could be a value between 1 and 10 which gives the correct shape as desired, but this leads me back to my previous point about getting into a heuristic battle. (and for this example however, there was no value between 1 and 10 which gave the 'right' result)
Repeated again, but with preserve_topology = True

Same deal as above
But with the suggested approach of using the exterior coordinates + trigonometry, I am able to get the ideal result

Code
so the basic idea is the function simplify_by_angle cycles through the coordinate sequence, constructs a vector of differences between sequential points, and then computes the angles between these vectors and eliminates anything to satisfy the degree tolerance (I use 1 degree here as an example, since I only just want to eliminate only points that lie on the straight edges between vertices).
import numpy as np
import shapely.geometry as sg

def get_angles(vec_1,vec_2):
    """
    return the angle, in degrees, between two vectors
    """

    dot = np.dot(vec_1, vec_2)
    det = np.cross(vec_1,vec_2)
    angle_in_rad = np.arctan2(det,dot)
    return np.degrees(angle_in_rad)

def simplify_by_angle(poly_in, deg_tol = 1):
    """
    try to remove persistent coordinate points that remain after
    simplify, convex hull, or something, etc. with some trig instead
    params:
    poly_in: shapely Polygon
    deg_tol: degree tolerance for comparison between successive vectors
    return: 'simplified' polygon

    """

    ext_poly_coords = poly_in.exterior.coords[:]
    vector_rep = np.diff(ext_poly_coords,axis = 0)
    angles_list = []
    for i in range(0,len(vector_rep) -1 ):
        angles_list.append(np.abs(get_angles(vector_rep[i],vector_rep[i+1])))

#   get mask satisfying tolerance
    thresh_vals_by_deg = np.where(np.array(angles_list) > deg_tol)

#   gotta be a better way to do this next part
#   sandwich betweens first and last points
    new_idx = [0] + (thresh_vals_by_deg[0] + 1).tolist() + [0]
    new_vertices = [ext_poly_coords[idx] for idx in new_idx]

    return sg.Polygon(new_vertices)

As mentioned I only tested it with Polygon types. In terms of efficiencies it could  use some work, as well as possibly removing the NumPy dependency?
by the way if anyone wanted to play around with the hexagon, here is a wkt of it
from shapely import wkt
test_hex_wkt = 'POLYGON ((30 10, 29.95 10.08660254037844, 28.7 12.25166604983954, 25.05 18.57365149746594, 24.6 19.35307436087194, 23.4 21.43153532995459, 20 27.32050807568877, 18.1 27.32050807568877, 16 27.32050807568877, 14.5 27.32050807568877, 11.3 27.32050807568877, 6.800000000000001 27.32050807568877, 3.552713678800501e-15 27.32050807568877, -4.999999999999998 18.66025403784439, -5.549999999999999 17.7076260936815, -7.749999999999999 13.89711431702998, -8.5 12.59807621135332, -9.100000000000001 11.55884572681199, -10 10, -7.650000000000001 5.929680602213139, -5.600000000000002 2.378976446696941, -3.550000000000004 -1.171727708819258, -3.000000000000004 -2.124355652982141, -0.6500000000000057 -6.194675050769005, -8.881784197001252e-15 -7.320508075688771, 6.499999999999991 -7.320508075688771, 9.19999999999999 -7.320508075688771, 9.69999999999999 -7.320508075688771, 11.49999999999999 -7.320508075688771, 14.19999999999999 -7.320508075688771, 20 -7.320508075688771, 23.3 -1.604740410711477, 23.65 -0.9985226280623696, 24.55 0.5603230987496204, 25.95 2.985194229346048, 27.15 5.063655198428702, 30 10))'
test_hex_poly = wkt.loads(test_hex_wkt)

Anyway, this became longer than I expected... so would something like this be of benefit to Shapely?
(also sorry, not sure if there's a better place to post Feature Requests like this?)
Shapely version
using version 1.7.1

@92kns Well done. This should be a new Feature for Shapely.

I just stumbled on this solution, so thank you for doing the hard work. I did find a few bugs to fix, though.

The initial for loop misses one of the angles.
By including [0] in new_idx, you're always including the first vertex, even if it should be removed.
This assumes the polygon has no holes. I dealt with this using an external loop.
Here's my version with those issues 1&2 corrected:

def simplify_by_angle(poly_in, deg_tol=1):
    '''Try to remove persistent coordinate points that remain after
    simplify, convex hull, or something, etc. with some trig instead

    poly_in: shapely Polygon
    deg_tol: degree tolerance for comparison between successive vectors
    '''
    ext_poly_coords = poly_in.exterior.coords[:]
    vector_rep = np.diff(ext_poly_coords, axis=0)
    num_vectors = len(vector_rep)
    angles_list = []
    for i in range(0, num_vectors):
        angles_list.append(np.abs(get_angles(vector_rep[i], vector_rep[(i + 1) % num_vectors])))

    #   get mask satisfying tolerance
    thresh_vals_by_deg = np.where(np.array(angles_list) > deg_tol)

    new_idx = list(thresh_vals_by_deg[0] + 1)
    new_vertices = [ext_poly_coords[idx] for idx in new_idx]

    return Polygon(new_vertices)

Again, nice work @92kns. I agree with adding this method to shapely.

Thank you  @khaidoan25  and @drStacky for the feedback! Gives me motivation to return to this issue 😄
@drStacky appreciate the debugging. I have yet to try your tweaks - do you have test polygon(s) available that you used in resolving 1&2?
regarding 3. Great catch, I never considered holes (or encountered them)  back when I made this. Do you treat the hole filled polygons as a decomposition of individual polygons and loop over each one in the aforementioned exterior loop? Or, how I am imagining it, you would have the holes exterior coordinates (or linear ring sequence may be a better term? it's been a while since i've used the terminology for all this) so effectively have a poly representation of each hole that you can 'simplify' in the loop
As for adding this to shapely - I am certainly re-interested now! I originally 'abandoned' this as there was no feedback for quite a while + at the time I didn't see a clear contributors guide. I can look into this more now though

Polygon([(0, 0), (1, 0), (0, 1), (-1, 0)]) addresses #2: simplify doesn't remove the unnecessary base point but simplify_by_angle does by not forcing index [0] to be kept.
By rotating the point to be removed to the end of the list (Polygon([(1, 0), (0, 1), (-1, 0), (0, 0)])), you get a case where just fixing the index line results in a crash:
ValueError: A LinearRing must have at least 3 coordinate tuples
because the resulting coordinates don't form a polygon due to a missed angle/point.
To deal with holes, I made polygons out of the shell and hole and simplified them separately. Here's the code:
shell = Polygon(poly.exterior.coords)
holes = [Polygon(ip.coords) for ip in poly.interiors]
simple_shell = simplify_by_angle(shell)
simple_holes = [simplify_by_angle(hole) for hole in holes]
simple_poly = simple_shell.difference(ops.unary_union(simple_holes))

in case you're wondering why I use the last line instead of just instantiating the Polygon class, e.g.
simple_poly = Polygon(shell=simple_shell, holes=simple_holes)

It's because I've run across rare cases with a newly simplified shell and holes, and one of the holes is not contained within the new shell. In this case, Polygon simply ignores the hole (a bug in my opinion, should at least raise a warning). Using difference guarantees the holes get cut out regardless.

Regarding adding this to Shapely: the shapely package mostly consists of bindings to operations/algorithms that are implement in the GEOS C++ library (there are some exceptions to this though, so there is some room for custom implementations). So I think before considering to add this as such to Shapely, it would be interesting to bring this up with the GEOS project to see to what extent they would be interested in different simplify algorithms.
Alternatively to adding it to shapely itself, this example could also be a very nice "cookbook"-like example that could live somewhere in the documentation.

@jorisvandenbossche Appreciate your input
I like the idea of a cookbook implementation!
It didn't occur to me check out GEOS. I will look into proposing that idea there and maybe report back if it pans out.
Thanks!

A relevant source for different simplify algorithms is JTS, which even has a handy "testbuilder" GUI to visually explore available methods. With this, I can see there are currently three available (source):

simplifyDP for the Douglas–Peucker algorithm using a distance threshold. This is the main "simplify" algorithm for GEOS and Shapely
simplifyTP similar to above, but for preserve_topology = True
simplifyVW for the Visvalingam–Whyatt algorithm using an area threshold, not available in Shapely or GEOS (but could be ported from Java->C++), PostGIS has ST_SimplifyVW (via liblwgeom)

Nevertheless, with the input example, I'm seeing the expected result with test_hex_poly.simplify(0.1), so there could have been an issue with your examples. All of JTS's simplify options also provide the expected result with a 0.1 threshold.

I must have missed your test_hex_poly on my original read, because going back and trying it with v1.8.2 works for me as expected, like @mwtoews says. However, Polygon([(0, 0), (1, 0), (0, 1), (-1, 0)]) still does not work, and I don't think it gets any simpler than this.
import matplotlib.pyplot as plt
from shapely.geometry import Polygon

test_poly = Polygon([(0, 0), (1, 0), (0, 1), (-1, 0)])
simp_poly = test_poly.simplify(0.1)

fig, ax = plt.subplots(1, 2, figsize=(6, 3))
ax[0].plot(*test_poly.exterior.coords.xy, c='b')
ax[0].scatter(*test_poly.exterior.coords.xy, c='c')
ax[1].plot(*simp_poly.exterior.coords.xy, c='b')
ax[1].scatter(*simp_poly.exterior.coords.xy, c='c')
plt.show()

Thanks for the feedback everyone. First off, I am embarrassed and must apologize. I also just checked the test_hex_poly now and it seems to be fine with simplify(). Upon further examination it looks like I mistakenly provided the data of a different one from the images.
if you compare the test_hex_poly as multipoint form
test_hex_wkt = 'POLYGON ((30 10, 29.95 10.08660254037844, 28.7 12.25166604983954, 25.05 18.57365149746594, 24.6 19.35307436087194, 23.4 21.43153532995459, 20 27.32050807568877, 18.1 27.32050807568877, 16 27.32050807568877, 14.5 27.32050807568877, 11.3 27.32050807568877, 6.800000000000001 27.32050807568877, 3.552713678800501e-15 27.32050807568877, -4.999999999999998 18.66025403784439, -5.549999999999999 17.7076260936815, -7.749999999999999 13.89711431702998, -8.5 12.59807621135332, -9.100000000000001 11.55884572681199, -10 10, -7.650000000000001 5.929680602213139, -5.600000000000002 2.378976446696941, -3.550000000000004 -1.171727708819258, -3.000000000000004 -2.124355652982141, -0.6500000000000057 -6.194675050769005, -8.881784197001252e-15 -7.320508075688771, 6.499999999999991 -7.320508075688771, 9.19999999999999 -7.320508075688771, 9.69999999999999 -7.320508075688771, 11.49999999999999 -7.320508075688771, 14.19999999999999 -7.320508075688771, 20 -7.320508075688771, 23.3 -1.604740410711477, 23.65 -0.9985226280623696, 24.55 0.5603230987496204, 25.95 2.985194229346048, 27.15 5.063655198428702, 30 10))'

you can see it differs slightly from the original post:

Sorry again! Unfortunately as this was nearly 1.5 years ago I likely don't have that original hexagon data saved anymore. I can spend a bit of time to see if I can (re)create a new one. If I am successful I'll update.
However, thank you @drStacky for providing a much, much simpler example with the triangle!
And thank you @mwtoews for the resource links

There are actually many other simplification methods, for instance see NRCan's Geo Simplification QGIS plugin, which has "Chordal Axis", "Reduce Bend" (#1360) and "Simplify (D Peuker+)" methods implemented in Python.

As for POLYGON ((0 0, 1 0, 0 1, -1 0, 0 0)), this example could have some improvement in GEOS/JTS, as the algorithm is sensitive on the closed coordinate. Shifting the linear ring so that the closed coordinate is on a corner changes things:
test_poly.normalize().simplify(0.1, preserve_topology=False)
# POLYGON ((-1 0, 0 1, 1 0, -1 0))

I might make some noise upstream on this, as the placement of the closed coordinate shouldn't make any difference to a LinearRing.

Hello @mwtoews @drStacky
I just made this one
test_hex_wkt = 'POLYGON ((25 13, 23.5 15.59807621135332, 21 19.92820323027551, 20.85 20.18801085141084, 19.4 22.69948452238571, 18.8 23.73871500692704, 17.5 25.99038105676658, 12.3 25.99038105676658, 11.7 25.99038105676658, 8 25.99038105676658, 6.4 25.99038105676658, 5.1 25.99038105676658, 2.500000000000004 25.99038105676658, 2.200000000000003 25.47076581449592, 1.600000000000003 24.43153532995459, -2.399999999999999 17.50333209967908, -3.149999999999999 16.20429399400243, -4.549999999999999 13.779422863406, -5 13, -4.300000000000001 11.78756443470179, -3.750000000000001 10.8349364905389, -0.3000000000000025 4.859361204426277, 0.6999999999999975 3.1273103968574, 0.9499999999999966 2.694297694965179, 2.499999999999993 0.009618943233423494, 2.599999999999993 0.009618943233423482, 6.499999999999993 0.00961894323342302, 9.199999999999992 0.009618943233422701, 12.99999999999999 0.00961894323342225, 13.29999999999999 0.009618943233422215, 17.5 0.009618943233421717, 18.25 1.30865704891008, 20.2 4.686156123669391, 21.7 7.284232335022707, 23 9.535898384862248, 23.6 10.57512886940357, 25 13))'

and was unable to use simplify to get the desired result, both with preserve topology True and False, and a range of tolerances. There would always be this one persistent point (bottom edge)

or it would remove the wrong vertex

This was using shapely 1.8.2

@mwtoews thanks for the simplify2 link!
Also, when you say this should be fixed upstream, are you referring to GEOS or JTS?
I was wondering if I should continue following up in the GEOS issue I had opened regarding this. I guess, I am unclear now if this proposed approach using interior angles is still useful (maybe even as a cookbook as previously suggested) or if it should/could be addressed by what you had mentioned (regarding taking into account the position of the closed coordinate)?

The upstream ticket seems to be https://github.com/locationtech/jts/issues/679 which appears to be a lowish priority for @dr-jts to handle. (Generally, fixes to JTS make their way to GEOS and shapely). Essentially SimplifyDP (and SimplifyTP) would need evaluate LinearRing geoms as rings, which shouldn't have a start/end coordinate dependency, which is what "simplify2" sort-of does. It seems normalize() is a decent work-around.
As for new simplify approaches and algorithms (e.g. an angle-based threshold), it's up to you to decide. My personal take is that there are already several simplify algorithms, which could be adapted and refined. And I would like to see more than two algorithms in shapely eventually.

Hello everyone just thought I'd consolidate some information into this comment.
GEOS
I followed up with the GEOS issue I had opened (https://github.com/libgeos/geos/issues/623). Looks like there's plans for taking another look at SimplifyDP, and apparently SimplifyVW does a much better job of removing the collinear points, and now there is a new issue open to port simplifyVW from JTS to GEOS (https://github.com/libgeos/geos/issues/635).
However I myself have not tried simplifyVW on my previous example
test_hex_wkt = 'POLYGON ((30 10, 29.95 10.08660254037844, 28.7 12.25166604983954, 25.05 18.57365149746594, 24.6 19.35307436087194, 23.4 21.43153532995459, 20 27.32050807568877, 18.1 27.32050807568877, 16 27.32050807568877, 14.5 27.32050807568877, 11.3 27.32050807568877, 6.800000000000001 27.32050807568877, 3.552713678800501e-15 27.32050807568877, -4.999999999999998 18.66025403784439, -5.549999999999999 17.7076260936815, -7.749999999999999 13.89711431702998, -8.5 12.59807621135332, -9.100000000000001 11.55884572681199, -10 10, -7.650000000000001 5.929680602213139, -5.600000000000002 2.378976446696941, -3.550000000000004 -1.171727708819258, -3.000000000000004 -2.124355652982141, -0.6500000000000057 -6.194675050769005, -8.881784197001252e-15 -7.320508075688771, 6.499999999999991 -7.320508075688771, 9.19999999999999 -7.320508075688771, 9.69999999999999 -7.320508075688771, 11.49999999999999 -7.320508075688771, 14.19999999999999 -7.320508075688771, 20 -7.320508075688771, 23.3 -1.604740410711477, 23.65 -0.9985226280623696, 24.55 0.5603230987496204, 25.95 2.985194229346048, 27.15 5.063655198428702, 30 10))'

or the example provided by @drStacky
Polygon([(0, 0), (1, 0), (0, 1), (-1, 0)])

(I have never used JTS so not sure as of right now how long it would take me to get setup and try this testbuilderGUI with the above examples + simplifyVW)
Shapely
I did find that normalize() helped a ton with both of the above examples. (if you'll notice when I originally opened this, I was using version 1.7, before normalize was added, I only came to know of it due to the discussion here - thanks!)
However I agree with @mwtoews comment:

Also normalize() will often correct the LinearRing the "right way" to get the expected result, but I don't see why this should be reliable.

Anyway, as for this issue (with the angle based threshold) I am not entirely sure how to proceed now. With simplifyVW eventually making its way and it potentially resolving these issues.

I could still do a 'cook book' type implementation in the docs like @jorisvandenbossche suggested

Or I could add the python implementation directly to the code

Or, of course, I could do nothing (if peoples opinions on this solution have now changed with the new information)

Thanks @DavyMorgan that's a good example that has no good explanation or workarounds, and is broken with JTS' simplifyDP and simplifyTP. However, simplifyVW yields the correct result:
POLYGON ((176 58, 176 93, 240 93, 240 80, 225.15264847028098 80, 225.15264847028098 53.022516610604455, 210.2289727054215 54.53377491590668, 211.74023101072373 69.45745068076619, 177.51125830530222 72.9236757648595, 176 58))

but as mentioned previously, this method is not part of GEOS (yet), therefore not part of shapely.

Thanks a lot! The simplify_by_angle function provided by @92kns and @drStacky actually works for this example, and I will use it as a workaround for now. :)

@DavyMorgan glad to hear the angle approach helps with your example!

why not use envelope method of Polygon object:
https://shapely.readthedocs.io/en/stable/manual.html#object.envelope

@AdrienGenilec The envelope is simply the axis-aligned bounding box of the polygon, which isn't what we're trying to accomplish with simplify. We usually want to remove redundant (nearly) colinear points while preserving the overall rough shape.

Envelope also removes extra points

@AdrienGenilec The envelope, in most cases, is a completely different shape.
Polygon([(1, 0), (2, 1), (1, 3), (0, 1), (1, 0)]).envelope.exterior.coords[:]
[(0.0, 0.0), (2.0, 0.0), (2.0, 3.0), (0.0, 3.0), (0.0, 0.0)]

This is (almost completely) fixed by https://github.com/libgeos/geos/pull/784 and https://github.com/libgeos/geos/pull/773
The current code still leaves one vertex that should be simplified.  Further work should fix this.

Here is my code, which is based on the above code. It worked for me without error for around 1000 quadrilaterals.
def collinear(p0, p1, p2, point_closeness_threshold = 1, angle_closeness_threshold = .3):
x1, y1 = p1[0] - p0[0], p1[1] - p0[1]
x2, y2 = p2[0] - p1[0], p2[1] - p1[1]
#check if points are close enough to be considered co-linear
if (abs(x1) < point_closeness_threshold and abs(y1) < point_closeness_threshold) or (abs(x2) < point_closeness_threshold and abs(y2) < point_closeness_threshold):
return True
m1 = y1/(x1+1e-12)
m2 = y2/(x2+1e-12)
delta_The = math.atan((m2-m1)/(1+m1*m2))
#check if the angle between the lines is low enough to be considered co-linear
return abs(delta_The) < filter_ang
def simplify_by_angle(poly_in):
coords = poly_in.exterior.coords[:]
#loop through every point, checking if it is colinear with its neighbors, and removing if it is
i=1
while i < len(coords)+1:
n = len(coords)
if collinear(coords[(i-1)%n],coords[i%n],coords[(i+1)%n]):
del coords[i%points_amt]
i-=1
i+=1
return coords

authors: 92kns AdrienGenilec DavyMorgan dr-jts drStacky gganeles jorisvandenbossche khaidoan25 mwtoews

repo: shapely/shapely


text:
maint-1.8 CI: upgrade GEOS 3.10.1 (2021-11-02) to 3.10.2 (2022-01-15)

Upgrade GEOS used in the CI for the maint-1.8 maintenance branch to 3.10.2 released 2022-01-15

CI outputs (including warnings) appear to be equivalent to the previous CI run for this branch.


text:
Add Yearn parsing logic

Description
We don't currently support detecting and parsing Yearn transactions.
Related issues
Addressing this ticket either unblocks or closes a number of existing issues:

https://github.com/shapeshift/web/issues/829
https://github.com/shapeshift/web/issues/786

Blocked by:

https://github.com/shapeshift/unchained/issues/236

Work to be done

Create a new parser for Yearn, that supports the full set of commonly used transaction types
Review and refactor logic and architecture in /parser/src/ethereum/index.ts

Resolved by https://github.com/shapeshift/unchained/pull/267 - I'll jump into web next and get it sorted on the front end.

repo: shapeshift/unchained


text:
Export multiple SVG files into one PDF

Hello,
is it possible to export multiple SVG files into ONE pdf ?
Thanks

Currently svg-exportJS exports one SVG at a time.  When exporting multiple SVGs into one PDF, you may have specific requirements as to the position and size of each SVG image in the resulting PDF.  So it would be best if you could use Javascript to combine your SVGs into one SVG with your desired positions/sizing, then export it to PDF using svg-exportJS.

authors: paopre sharonchoong

repo: sharonchoong/svg-exportJS


text:
Updated SharpGen to use CastXML and updated build system to use new (nuget-focused) project system.

Fixes #864, #863, #844, #699.
There is one issue in this branch that needs to be fixed: SharpGen has issues regenerating if a config file changes without rebuilding SharpGen.

That's really cool, it looks amazing! Hope to have some time this week-end to go through it and merge it asap, thanks for the hard work!

Maybe you could make usage of "System.Runtime.CompilerServices.Unsafe" and "System.Numerics.Vectors" and remove the InteropApp part, maybe I can submit PR too.

@amerkoleci  For unsafe, I would like to avoid any dependencies, specially for just getting things like sizeof. Same for System.Numerics.Vectors, as none of the SharpDX API are using it directly, only SharpDX.Mathematics is using it and it is completely optional.

@xoofx I've fixed the remaining issues with this PR (the SharpGen issue and NuGet artifact collection). This is ready for merge pending any review comments.
And rel to the dependencies: Definitely for a different PR if at all.  I feel that we should (over time) try to reduce the amount of assembly patching we have to do until we can hopefully remove SharpCli and simplify the build process (and switch to portable pdbs that work with the .NET Core debugger), and System.Runtime.CompilerServices.Unsafe would be great for that. It's also a really small library (the source is in one class that's basically a few methods wrapping IL instructions). And System.Numerics.Vectors is also something that we should integrate because it allows the JIT to generate SIMD instructions, which can give (sometimes needed) speed boosts depending on the application. We could easily integrate it into SharpDX.Mathematics only and not have it touch the rest of SharpDX to minimize the dependency chaining.

Indeed, at least replace usage with System.Runtime.CompilerServices.Unsafe would just benefit the project. Take look at this assimp .net port that replaced the Interop part with Unsafe one (https://github.com/mellinoe/assimp-net)

Thanks @jkoritzinsky I'm going to have a look.

Indeed, at least replace usage with System.Runtime.CompilerServices.Unsafe would just benefit the project.

I'm curious exactly which benefits you are thinking of?
The core reason of SharpCli is to patch calli instructions, which will not go away by switching to System.Runtime.CompilerServices.Unsafe, so it gives really little incentive to make this effort. It is not like SharpDX had lots of problems with this part, as it has barely changed in the past 6 years or the unsafe API would bring any substantial benefits. For the portable PDB, I haven't checked but Mono.Cecil might already support it, so it might just be a matter of updating SharpCli with the correct switches.
For Vectors, SharpDX.Mathematics is now considered as a legacy API and was just kept around to have the samples working. I don't recommend for a new project to rely on it and suggest to use directly System.Numerics.Vectors. Ideally, SharpDX.Mathematics should just be removed (As many APIs, including Direct3D11 or Direct3D12 has almost zero usage of vector APIs, it is up to your choice)

@jkoritzinsky FYI, I have started to work on it, but had a very busy week-end, hopefully should find some spare time by the end of this week.

@jkoritzinsky I have merged the branch but will revisit remaining issue later (the recompile on config changed)
Again, thanks a lot for this work!

@xoofx I actually fixed that issue before you reviewed!

Oh, cool, so I have nothing to do then, amazing! 😉

Hi Guys, first of all great job done @jkoritzinsky! I mentioned that rebuilding SharpDX in VS 2017 fails due to Rebuild target missing in SharpDXGen project. Not sure if that's an issue because Clean + Build are working fine but still good to have it IMHO.

Hey can you open an issue and tag me in it so I don't forget! I'll add that when I have a chance.

authors: amerkoleci bdachev jkoritzinsky xoofx

repo: sharpdx/SharpDX


text:
Can we have also a NL ttf version?

I have some problems when working with OTF on windows, can we have a no ligatures ttf version too?

I'll check on that. When I tried a few months ago, I had trouble tweaking the NL version. I did not try very hard, though.  I'll give it another look!

No-ligatures variant now included in release 2.002. Enjoy!

authors: chiniara sharpjs

repo: sharpjs/JetBrainsMonoSlashed


text:
[Snyk] Security upgrade nuxt from 3.0.0 to 3.1.0

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `npm` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

src/frontend/package.json
src/frontend/package-lock.json

Vulnerabilities that will be fixed
With an upgrade:

Severity
Priority Score (*)
Issue
Breaking Change
Exploit Maturity

626/1000  Why? Proof of Concept exploit, Has a fix available, CVSS 6.1
Cross-site Scripting (XSS) SNYK-JS-SERIALIZEJAVASCRIPT-6147607
No
Proof of Concept

(*) Note that the real score may have changed since the PR was raised.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Cross-site Scripting (XSS)

sacdas

sacca

ewfewf


text:
Adding docs/requirements.txt for readthedocs.

The rtd config will need to be updated to point to docs/requirements.txt instead of docs-requirements.txt.
I think/hope this should work.

This certainly looks about right. I'll merge, and we'll see what happens!

Argh, of course I cannot merge because master is a protected branch and this branch is out of date. Closed in favour of #913.

Hurray @jonparrott, this appears to have worked! Check out rtd for the fruits of your labour.

YAY! Thanks @Lukasa!
As I mentioned before, I'm happy to be a reviewer on docs changes and such going forward. :)

Sounds good to me!

authors: Lukasa jonparrott