3D Graphics and Graphics UI

At the momment,the following can be achieved
1 Replace a 3D unit model with a 2d image plane (e.g counters)
2 Replace any of the static models on the map except railways with another 3D mesh.(e.g forts ,naval bases,train stations)
3 Create an 3D object that can be displayed in a certain province which can be enabled or disabled via events and decisions.(Paradox intially was to use this on the Effier Tower in Paris and the Big Ben in UK,however it was canceled.I think it could be used to display nuclear attacks on the map)
The syntax is set_province_flag = [object name]
Do you need 3d graphics for NWO？If you do,list all the requirements and I will then provide necessary 3d models as well as textures.
But it would take some time.

yf22 if you could work on the graphics it would be absolutely fantastic!

Unit: current 3d models are ww1:ish, please replace them.
Map 3d models: The mod could do well with some modernization. In particular the city model.
I see forts as air bases.
Current city models are really not good..

Dynamic objects: It is a great ide. We could add set_province_flag =.. in the nuclear war events, and with timer remove it. Unless you have the models second priority.

Keeping the Prime Directive of historic realism in mind, you have totally free hand on graphics in NWO.
:+1:

The problem is that I cannot modify any animated object like units without a game crash.So I replaced them with counters in my own mod（which is still a 3d mesh from ck2 with modified texture）
Do you want to maintain their current appearance or replace them with 2d graphic？
ps:Besides the units,all the other requirements is possible.

Start with 2. and 3. And we will get back to 1. To me iconified land units are ok, like in hoi2.

Will use this issue to address some other 2D graphics complaints that has been raised by some users.

Any progress on the 3D Graphics and Graphics UI #345?

No feedback. Closing issue. Please reopen if you intend to work on it.


[website] Sync MUI X table feature

Add "master detail" and "row grouping" as developed on the pricing page
https://deploy-preview-30913--material-ui.netlify.app/pricing/
It's the same as https://github.com/mui/mui-x/pull/3877 but since we duplicate the content, we have to update both locations.

I have noticed that we have an issues with our anchor links. Take:

It points to https://mui.com/components/data-grid/rows/#row-sorting ❌

I'm fixing it. Do we have some tools to detect broken links?

I'm fixing it.

@alexfauquette Great, mind that others might be broken too in this table.

Do we have some tools to detect broken links?

I recall we chatted a bit about this problem with @flaviendelangle on a similar instance of a regression. Unfortunately, no, we have no tools to detect broken anchor links. We have ahrefs that crawl all the pages every Friday, but it only reports SEO issues, 301, 404, nothing on anchor links. Maybe such a tool exists 🤔. At least, working on reducing the vertical scrollbar of the pages reduces the scale of this problem.

mind that others might be broken too in this table.

@oliviertassinari Effectively, some other links to x-team doc were broken. Now, that's corrected

@alexfauquette Great, thanks!


Stop using forms to edit multiple entries

Editing multiple entries in the current setup is not a scalable solution:

Using forms currently requires all entries to be commited at the point of save which is not great. It is unnecessarily taxing on both backend and the UI experience.
Unnecessary writes are great from data integrity perspective in a multi user environment
In general only content related to a single entry should be edited at a time in order to maintain consistency
Editing multiple entries will require a server side lock on a lot of resources

Instead:

Edit only one entry at a time
Example entries: Post, Author, Tag, Theme

This has been fixed in current master.


zap init enabling auto updates bug

zap init reveals a bunch of configurations that can be changed
upon enabling auto updates, it throws the following error
? Do you want to enable auto-update? Yes
2022/10/06 20:58:15 Probably not launched by systemd (please file an issue if this is wrong)
2022/10/06 20:58:15 /etc/systemd/user/zapd.service does not exist
2022/10/06 20:58:15 Creating ~/.config/systemd/user/zapd.service
[INFO]  2022/10/06 20:58:15 Restarting via systemd...

and proceeds to not display the other settings.
The above problem occurs only when enabling it. Disabling it lets it take its normal course.

Fixed by #97


direct message

Hi!
Is there way to send direct message from one client to another ?
Thank you for advice!

@ab4drinkadvisor If you use channels, you can send a message "directly" between clients (the message will pass through the server but you don't have to write any serverside code to handle this).
To subscribe to a new channel:
// Client-side code
// Assume the current user's username is bob123
var userChannel = socket.subscribe('channel_of_bob123');
userChannel.watch(function (data) {
// Handle the data published to the 'channel_of_bob13' channel by other users
});

Then if another user wants to send a message to bob, they can just call:
// Client-side code
// Note that the second argument can be any valid JSON object/type
// you don't need to have a from or message field...
socket.publish('channel_of_bob123', {from: 'alice456', message: 'Hi bob!'});

Thank you!
But is there another way?
Because if I use your solution, i have to create private channel for each user.
It is not good for performance.
Is there some function like in Socket.io
io.sockets.socket(savedSocketId).emit(...)

@ab4drinkadvisor SC is quite efficient at dealing with channels. It's OK to have hundreds of channels per client.

You can use middleware to restrict which users are allowed to subscribe to what channels (for access control). See section on middleware at the bottom of this page: http://socketcluster.io/#!/docs/api-scserver


python311Packages.jupyter-events: 0.7.0 -> 0.9.0

Diff: https://github.com/jupyter/jupyter_events/compare/refs/tags/v0.7.0...v0.9.0
Changelog: https://github.com/jupyter/jupyter_events/releases/tag/v0.9.0
Description of changes

Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[x] sandbox = true

[x] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

Priorities
Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 268988 at f9ae83ee run on aarch64-darwin 1

16 packages marked as broken and skipped:

python310Packages.batchspawner
python310Packages.dockerspawner
python310Packages.jupyter-contrib-nbextensions
python310Packages.jupyterhub
python310Packages.jupyterhub-ldapauthenticator
python310Packages.jupyterhub-systemdspawner
python310Packages.jupyterhub-tmpauthenticator
python310Packages.oauthenticator
python311Packages.batchspawner
python311Packages.dockerspawner
python311Packages.jupyter-contrib-nbextensions
python311Packages.jupyterhub
python311Packages.jupyterhub-ldapauthenticator
python311Packages.jupyterhub-systemdspawner
python311Packages.jupyterhub-tmpauthenticator
python311Packages.oauthenticator

22 packages failed to build:

python310Packages.bqplot
python310Packages.bqscales
python310Packages.einops
python310Packages.k-diffusion
python310Packages.layoutparser
python310Packages.mkdocs-jupyter
python310Packages.pdfplumber
python310Packages.phik
python310Packages.rotary-embedding-torch
python310Packages.tsfresh
python310Packages.xarray-einstats
python311Packages.bqplot
python311Packages.bqscales
python311Packages.einops
python311Packages.k-diffusion
python311Packages.layoutparser
python311Packages.mkdocs-jupyter
python311Packages.pdfplumber
python311Packages.phik
python311Packages.rotary-embedding-torch
python311Packages.tsfresh
python311Packages.xarray-einstats

65 packages built successfully:

ihaskell
jupyter
jupyter-all
nbqa
python310Packages.ansible-kernel
python310Packages.experiment-utilities
python310Packages.ipytablewidgets
python310Packages.jupyter
python310Packages.jupyter-collaboration
python310Packages.jupyter-contrib-core
python310Packages.jupyter-events
python310Packages.jupyter-lsp
python310Packages.jupyter-nbextensions-configurator
python310Packages.jupyter-server
python310Packages.jupyter-server-fileid
python310Packages.jupyter-server-mathjax
python310Packages.jupyterlab
python310Packages.jupyterlab-git
python310Packages.jupyterlab-lsp
python310Packages.jupyterlab-server
python310Packages.jupytext
python310Packages.nbclassic
python310Packages.nbdev
python310Packages.nbdime
python310Packages.nikola
python310Packages.nix-kernel
python310Packages.notebook
python310Packages.notebook-shim
python310Packages.notedown
python310Packages.pydeck
python310Packages.pymoo
python310Packages.qgrid
python310Packages.streamlit
python310Packages.vega
python311Packages.ansible-kernel
python311Packages.experiment-utilities
python311Packages.ipytablewidgets
python311Packages.jupyter
python311Packages.jupyter-collaboration
python311Packages.jupyter-contrib-core
python311Packages.jupyter-events
python311Packages.jupyter-lsp
python311Packages.jupyter-nbextensions-configurator
python311Packages.jupyter-server
python311Packages.jupyter-server-fileid
python311Packages.jupyter-server-mathjax
python311Packages.jupyterlab
python311Packages.jupyterlab-git
python311Packages.jupyterlab-lsp
python311Packages.jupyterlab-server
python311Packages.jupytext
python311Packages.nbclassic
python311Packages.nbdev
python311Packages.nbdime
python311Packages.nikola
python311Packages.nix-kernel
python311Packages.notebook
python311Packages.notebook-shim
python311Packages.notedown
python311Packages.pydeck
python311Packages.pymoo
python311Packages.qgrid
streamlit (python311Packages.streamlit)
python311Packages.vega
quarto


[WP5] ERA5 diagnostics - zonal average

Describe the solution you'd like
Dear Mattia,
with this notebook
zonal_mean.zip
I'm trying to reproduce figures 2 and 3 of this document
C3S_D511.4.1b1_202006_SPQB_Temperature (upper air)_ERA5_T.pdf
A couple of comments and requests.

The Download data and transform seems to work correctly and it's now in the cache so it runs quickly. However, the first computation was quite slow and I was receiving warnings indicating the need for renaming the longitude dimension. The data is in the cache so it should run smoothly. However, I had to define a simple trasnformation function zonal_mean  and problably this is not done properly so it slows down everythig. The computation of the zonal mean is a basic operation and it might be considered appropriate for the diagnostic package.
I have a problem in the section Compute monthly climatology in zonal regions.  I need to compute a weighted average over a certain zonal region and then group it by month to compute the monthly climatology. This doesn't seems to work with the methods associated to xarray objects (I did a quick search on this) so I have tried to apply the weights directly to the variable in the DataArray and the select the region I want to focus on. I get a reasonable pattern (compare the last figure in the notebook with Figure 3 in the document), but the values are not correct and although I'm expecting that xarray interprets the name of dimensions when multiplying xr objects, I might have used the wrong syntax. Can you help with that?

Cheers
Sandro

Hi @sandrocalmanti,

The first computation was quite slow

If it's reasonably slow, I think that's OK. But if you think that it gets really too slow, we can try to play a bit more with chunking (e.g., we can use larger time chunks to reduce I/O).

I was receiving warnings indicating the need for renaming the longitude dimension

Don't worry about the warnings for now, they're triggered by the harmoniser developed by ECMWF (I've already reported it to Eddy, the warnings will eventually disappear).

However, I had to define a simple trasnformation function zonal_mean and problably this is not done properly so it slows down everythig.

Good point, I'll add a zonal mean function. Your function looks OK to me. My only comment is that you lost all attributes, so things like units and long names are not displayed in the plot. For example, you can use xr.set_options or ds.mean("longitude", keep_attrs=True)

I have a problem in the section Compute monthly climatology in zonal regions.

In principle, you could use our diagnostics.spatial_weighted_mean here. But you can NOT at the moment because by default we also use longitude to compute weights (see here). I'm going to add an option to ignore longitude, so you'll be able to do this: diagnostics.spatial_weighted_mean(ds, use_lon=False).
In the meantime, if you want to play with xarray's weighted objects, this is how you could do it:
import calendar

with xr.set_options(keep_attrs=True):
    ds_monthly = ds.groupby("time.month").mean()
    ds_sel = ds_monthly.sel(latitude=slice(90, 60))
    weights = np.cos(np.deg2rad(ds_monthly["latitude"]))
    ds_weighted = ds_sel.weighted(weights).mean("latitude")

ds_weighted["level"].attrs.update({"long_name": "Level", "units": "hPa"})
ds_weighted["t"].plot.contourf(
    x="month",
    yscale="log",
    levels=range(180, 301, 15),
    yincrease=False,
    figsize=(10, 10),
    cmap="YlOrRd",
    cbar_kwargs={"orientation": "horizontal"},
)
yticks = [1000, 500, 100, 10, 1]
plt.yticks(yticks, yticks)
plt.xticks(range(1, 13), list(calendar.month_abbr)[1:])
plt.xlabel(None)
plt.title("ERA5 temperature on pressure levels [60°N - 90°N]")

I'll add a template for this use case and will let you know when it's ready!

I'll close this when I add the template

Hi @sandrocalmanti,
I've been giving some thoughts to this, and I think it's better if you define yourself a function to compute and cache zonal mean. The reason is that it's a very simple operation that does not require weighting, therefore it's better if users understand and learn how to do this (it's also a good example to show how to implement custom cached functions).
I've updated the template, so it now computes and caches the zonal mean first, then the spatial weighted means.
I'm closing this, but feel free to re-open if you think it's better to implement the zonal_mean in c3s_eqc_automatic_quality_control.


Fixed invocations of startGoRoutine

Added a boolean that is set to false for the executable (so check
in startGoRoutine() is compiled-out) but to true when running
server tests. This will allow capturing possible errors when
code is added and a developer incorrectly calls startGoRoutine()
with a receiver (myObj.myFunc) instead of an anonymous function
(func() { myObj.myFunc() }).
Resolves #960

Coverage increased (+0.1%) to 90.496% when pulling ba9dfa7c0f7c5423667e2b98dc7800b636318d65 on fix_start_go_routine_calls into b1d0ec10c6bff24e2ad840600910ec6a8610cf6b on master.


Question about "Can...." traits

How do these work? For example:
extern crate telegram_bot;

use telegram_bot::CanSendMessage;

fn main() {

    let b = 12345;

    b.text("Random message");
}

This gives me the following error:
error: no method named `text` found for type `{integer}` in the current scope
 --> src/main.rs:9:7
  |
9 |     b.text("Random message");
  |       ^^^^
  |
  = note: the method `text` exists but the following trait bounds were not satisfied: `&{integer} : std::convert::Into<telegram_bot::ChatId>`

I'm new to rust so I apologise if this is basic stuff.

Hi, you are doing right, but there was a bug. I believe it fixed now.


Swift 3 support

Closes #21.
Closes #22.
Closes #23.
Closes #30.
Closes #32.

@LordNali You can generate the Xcode project file with swift package generate-xcodeproj.

Okay - should have thought of that (but haven´t used SPM yet).

@LordNali No worries. I'll update the README to include this information.

Okay, now I got a problem with Carthage: It needs a shared Xcode-Project to build your Framework.
The Problem is known: https://github.com/Carthage/Carthage/issues/1226
For now I manually create the necessary MessagePack project.


macros: support overrides in the properties macro

Fixes https://github.com/gtk-rs/gtk-rs-core/issues/946

CC @ranfdev


FLAC false positive.

API returns that there is FLAC present, yet it redirects to MP3.
This could be because of the streaming plan, it is unknown why.

6c4b948d6b77721c545058524227d5fcbd23c48d

the problem still exists，for example this album https://music.bugs.co.kr/album/17543598?wl_ref=list_ab_03_ab

I fail to see any error in this album.
For me this album is completely FLAC as shown on the webpage.
If you're experiencing any error with this one then post the traceback alongside the version you're using.

PS C:\Users\so_nu\Desktop> rsack -b -u "https://music.bugs.co.kr/album/17543598?wl_ref=list_ab_03_ab"
2022-09-12 08:34:24.399 | INFO     | rsack.clients.bugs:auth:29 - Login Successful
2022-09-12 08:34:24.401 | INFO     | rsack.bugs:__init__:25 - Threads: 1
2022-09-12 08:34:24.836 | INFO     | rsack.bugs:_album:60 - Album: Real Love
2022-09-12 08:34:24.851 | DEBUG    | rsack.bugs:_album_path:81 - Creating C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love
2022-09-12 08:34:25.395 | INFO     | rsack.bugs:_download_cover:179 - Cover artwork downloaded.
2022-09-12 08:34:25.397 | INFO     | rsack.bugs:_download:100 - Track: Real Love
2022-09-12 08:34:28.287 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\1. Real Love.mp3
2022-09-12 08:34:28.303 | INFO     | rsack.bugs:_download:100 - Track: Drip
2022-09-12 08:34:30.757 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\2. Drip.mp3
2022-09-12 08:34:30.763 | INFO     | rsack.bugs:_download:100 - Track: Eden
2022-09-12 08:34:34.340 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\3. Eden.mp3
2022-09-12 08:34:34.346 | INFO     | rsack.bugs:_download:100 - Track: Replay
2022-09-12 08:34:36.708 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\4. Replay.mp3
2022-09-12 08:34:36.714 | INFO     | rsack.bugs:_download:100 - Track: Parachute
2022-09-12 08:34:38.900 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\5. Parachute.mp3
2022-09-12 08:34:38.906 | INFO     | rsack.bugs:_download:100 - Track: Kiss & Fix
2022-09-12 08:34:41.557 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\6. Kiss & Fix.mp3
2022-09-12 08:34:41.564 | INFO     | rsack.bugs:_download:100 - Track: Blink
2022-09-12 08:34:44.067 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\7. Blink.mp3
2022-09-12 08:34:44.074 | INFO     | rsack.bugs:_download:100 - Track: Dear Rose
2022-09-12 08:34:47.268 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\8. Dear Rose.mp3
2022-09-12 08:34:47.274 | INFO     | rsack.bugs:_download:100 - Track: Sailing Heart (항해)
2022-09-12 08:34:50.525 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\9. Sailing Heart (항해).mp3
2022-09-12 08:34:50.543 | INFO     | rsack.bugs:_download:100 - Track: Real Love (Inst.)
2022-09-12 08:34:53.125 | DEBUG    | rsack.bugs:_tag:226 - Writing tags to C:\Users\so_nu\Desktop\오마이걸(OH MY GIRL) - Real Love\10. Real Love (Inst.).mp3

I recorded two videos, one was successfully downloaded in flac format and the other was downloaded in mp3 format， I tried uploading these videos to youtube, but after uploading, the quality of the video is reduced and the video becomes blurry, so I have to upload them to google cloud drive, you can download them locally for viewing
https://drive.google.com/drive/folders/1tuDCJehyRIGwoSsIwWMq5Fa6WY7L1X7r?usp=sharing

I don't think this is a false positive issue since I could download the content fine.
It's possibly due to your streaming plan.
I have University work to do over the next 24 hours so I can't work on this much right now. If this is a pressing issue for you and you want it solved ASAP you can contact me on Discord : Slyyxp#3040.
Otherwise I will get to this issue once my work is over and done with.

Don't worry. Do your work first

While you're waiting I need this information:
Urls' that work.
Url's that don't work.
Your streaming plan.

you can contact me on Discord : Slyyxp#3040

Sorry , I can't seem to find you on discord. May I trouble you to add me : SNY#6177

Locking this issue as I am confident false positives are handled properly.

the problem still exists，for example this album https://music.bugs.co.kr/album/17543598?wl_ref=list_ab_03_ab

This is an unrelated issue caused by inssuficient streaming plan.


[PATCH] Prevent opening start menu when config is open

When in game and the patch config menu is open, the user can press start to open the start menu underneath. This is just awkward.
It's also worth considering disabling in game input altogether when the config menu is open.

Fixed to prevent in game input and close the config menu when the start button is hit again.


Unspecced 'sender' field on presence events in /sync

The /sync spec claims:

The presence property is of type Presence
The Presence type has an events property that contains an array of Event-type items
The Event type has content and type fields

However, in practice, the presence events also contain a sender field, which is not accounted for in the spec:
// ...
	"presence": {
		"events": [{
			"type": "m.presence",
			"sender": "@redacted1:example.com",
			"content": {
				"presence": "offline",
				"last_active_ago": 55595
			}
		}, {
			"type": "m.presence",
			"sender": "@redacted2:example.com",
			"content": {
				"presence": "offline",
				"last_active_ago": 38143
			}
		},
// ...

This sender property is specified for the to_device events, but that has no relation to presence.

Similarly, the Ephemeral type has an events property of type [Event], but in the example given, the ephemeral event has a room_id field.  (I haven't checked if the example matches what synapse sends.)
It looks like we either need to split Event into Ephemeral Event, Account Data Event, and Presence Event, or make room_id and sender optional fields in Event.  Splitting into three types is probably the clearer way to do it, although it make the spec longer.

@uhoreg Looking at #2681 as well, I feel like maybe the spec would benefit from generally restructuring its documentation around event formats. Specify each format as a distinct format (Room Event, State Event, Ephemeral Event, Presence Event, Account Data Event, Stripped Event, Device Event, ...) and then clearly identify which are subtypes of which others, and therefore may appear anywhere the more generic type is expected.
The list of and relation between these types could then probably be captured in a single tree, like so:
Event
|- Ephemeral Event
|- Device Event
|- Account Data Event
|- Presence Event
|- Room Event
|  `- State Event
`- Stripped Event

(Note that I'm not sure whether that tree is actually correct, it's just to illustrate the idea.)
I think that even when dedicating a section to all different event types and splitting out Event into 3 distinct types, we could still end up with a shorter spec in the end - by removing the current inline definitions of State Event and Room Event in the /sync endpoint, and making those hyperlinks to the "Event types" section instead (which would be a more generic version of the current "9.1 Types of room events" section).
That would reduce duplication and also make sure that someone looking at the /sync documentation will be presented with the more general information about how different event types relate to each other, which is currently a rough spot.
Thoughts?

To motivate my reasoning for the above suggestion of "centralized type definitions" a little further, since I just realized that it might not be obvious to everyone:
Currently, the situation is that type definitions are somewhat spread throughout the spec. Assuming there are roughly two demographics of implementors, those who implement the spec partially for a specific usecase and those who implement it fully, that means:

Partial implementors: can implement a specific bit of the spec directly from its section of the spec, without navigating further.
Full implementors: need to dig around in the specification a lot to cobble together all the different types, and form a coherent model of the full API's types.

With centralized type definitions, this would change to:

Partial implementors: can implement a specific bit of the spec from its section of the spec and by following the type definition hyperlinks.
Full implementors: can linearly read the type definitions and build a mental model out of them, without having to dig through the spec for that.

In other words, it would introduce slightly more navigation for partial implementors, but significantly reduce work (and implementation error potential) for full implementors.

As an author of a client application and library that aspire to implement the whole spec - a Full Implementor, as you called it - I still very much appreciate that I don't need to jump across the spec in the search of centralised definitions (I have to do it at cppreference.com, so I can compare - and not that I like it). However, I used to (and continue to) spend quite a bit of time looking into the source, that is the formal API definitions and event schemas. These are mostly normalised and only have a very small bit of duplication. Reading OpenAPI definitions directly is not hard, and definitely gives a very good sense of how Matrix data structures relate to each other. My personal take on this was to further automatically generate C++ code from the OpenAPI definitions so that I could have all of them ready for use right in my IDE; but I recognise that very few would go that far.

With that said, the event type hierarchy you described above would certainly be a worthwhile addition to the spec; the current hierarchy is lacking, and the fact that we don't formally define, e.g., ephemeral events as first-class citizens next to, e.g., state events has been a matter of confusion before.


Extension causes high cpu load

Issue Type: Performance
Extension Name: jshint
Extension Version: 0.10.20
OS Version: Linux x64 4.4.0-140-generic
VSCode version: 1.30.0

:warning: Make sure to attach this file from your home-directory: /home/zengyu/dbaeumer.jshint-unresponsive.cpuprofile.txt :warning:
Find more details here: https://github.com/Microsoft/vscode/wiki/Explain:-extension-causes-high-cpu-load

Hi @universezy, can you please attach the file /home/zengyu/dbaeumer.jshint-unresponsive.cpuprofile.txt?


chore: test commit

PR Type
Enhancement

Description

Modified the logging level in src/main.rs from info to warn when no importer configuration is present.
This change enhances the visibility of the missing importer configuration, potentially alerting developers to an important system setup issue.
The modification helps in distinguishing between normal operation and a possible misconfiguration that might require attention.

Changes walkthrough 📝
Relevant filesEnhancement

main.rsUpgrade log level for missing importer config

src/main.rs
Changed log level from info to warn for the message "no importer config, skipping importer"

+1/-1

💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

/benchmark

/benchmark

Benchmark completed with run ID: bench-1562179507

Benchmark completed with run ID: bench-975880380

Benchmark completed with run ID: bench-3430700097

Benchmark completed with run ID: bench-330732149

Benchmark completed with run ID: bench-1638180952

Benchmark completed with run ID: bench-3211258764

Benchmark completed with run ID: bench-1398449421

Benchmark completed with run ID: bench-710525519

Benchmark completed with run ID: bench-2683395598

/benchmark

Benchmark completed with run ID: bench-1459600125

Benchmark completed with run ID: bench-898337448

Benchmark completed with run ID: bench-1873939721

Benchmark completed with run ID: bench-3031270125

Benchmark:
RPS Stats: Max: 951.00, Min: 239.00, Avg: 501.28, StdDev: 140.50
TPS Stats: Max: 991.00, Min: 729.00, Avg: 860.42, StdDev: 45.39

Benchmark:
RPS Stats: No RPS data
TPS Stats: No TPS data

Benchmark:
RPS Stats: Max: 1017.00, Min: 809.00, Avg: 897.80, StdDev: 35.06
TPS Stats: Max: 980.00, Min: 854.00, Avg: 897.43, StdDev: 22.09
File Path: pull-requests/pr-1846/pr1846_chore-bench-test_0331115_bench-2042496654


Write using Telegraf Service

Is it possible to send data from PHP via Telegraf service, instead of writing directly in InfluxDB? It could increase performance by multiple times

Any ideas?

You can write to Telegraf, but why should this increase performance?

@andig
Telegraf service is running on the same machine, but InfluxDB is running on another machine, right? So, I want to avoid network overhead

Telegraf service is running on the same machine, but InfluxDB is running on another machine, right?

yes

So, I want to avoid network overhead

You mean by using Telegraf for batching writes if your client is not capable to do that?

You mean by using Telegraf for batching writes if your client is not capable to do that?

I do not want to use blocking network requests from my PHP app. Even batch requests, because I think it is better to write in locally running Telegraf service via socket or some other protocol.

See https://www.influxdata.com/blog/influxdb-2-migration-path-instrumentation/ for how to use input listener/ influxdb output. I have not tested if this really improves performance.


Switch to gradle container

Introduce new parameters to allow java to override some default behavior

@chriswk what do you think about this? Having these exceptions to the default behaviour seems to be a good idea for flexibility, but the fact that the java container requires them worries me a bit

Merging with the other one because even if we decide to revert the docker image change for Java SDK, this PR adds flexibility that might be useful for other SDKs


[Errno 104] Connection reset by peer

I received a lot of disconnections from few servers with same error:
here is a extra data:

"message": "failed to receive on socket: [Errno 104] Connection reset by peer",
"path": "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py",

Also i run locally the client and looked at logs and get:

[WinError 10054] An existing connection was forcibly closed by the remote host
[code:4] Could not publish message
MqttError('Disconnected during message iteration')

Thanks for the effort. :+1:
Still, without:

Anything that ties this issue directly to asyncio-mqtt, or,
A code example that reliably reproduces the issue

I can't justify to spend time on it. Sorry about that.
If you manage to produce either 1 or 2, I'll be happy to look into it. Before that, I (as an asyncio-mqtt maintainer) don't have the resources for a bug hunt that might turn out to not be asyncio-mqtt related.


fix: Key already been added on JSRuntimeInvocationDictionary.

Pull request description
When running our test project I encountered concurrency issues on the JSRuntimeInvocationDictionary. The proposed change is to make the backing Dictionary a ConcurrentDictionary to make it more threadsafe.
See stacktrace:
  Error Message:
   System.ArgumentException : An item with the same key has already been added. Key: some_key
  Stack Trace:
     at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at Bunit.JSRuntimeInvocationDictionary.RegisterInvocation(JSRuntimeInvocation invocation) in /_/src/bunit.web/JSInterop/JSRuntimeInvocationDictionary.cs:line 66
   at Bunit.BunitJSInterop.RegisterInvocation(JSRuntimeInvocation invocation) in /_/src/bunit.web/JSInterop/BunitJSInterop.cs:line 94
   at Bunit.BunitJSInterop.HandleInvocation[TValue](JSRuntimeInvocation invocation) in /_/src/bunit.web/JSInterop/BunitJSInterop.cs:line 70
   at Bunit.JSInterop.Implementation.JSRuntimeExtensions.HandleInvokeAsync[TValue](BunitJSInterop jSInterop, String identifier, Object[] args) in /_/src/bunit.web/JSInterop/Implementation/JSRuntimeExtensions.cs:line 14
   at Bunit.JSInterop.BunitJSRuntime.InvokeAsync[TValue](String identifier, Object[] args) in /_/src/bunit.web/JSInterop/Implementation/BunitJSRuntime.cs:line 23
   at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
....
....
   at Bunit.Rendering.TestRenderer.AssertNoUnhandledExceptions() in /_/src/bunit.core/Rendering/TestRenderer.cs:line 346
   at Bunit.Rendering.TestRenderer.Render[TResult](RenderFragment renderFragment, Func`2 activator) in /_/src/bunit.core/Rendering/TestRenderer.cs:line 232
   at Bunit.Rendering.TestRenderer.RenderFragment(RenderFragment renderFragment) in /_/src/bunit.core/Rendering/TestRenderer.cs:line 54
   at Bunit.Extensions.TestContextBaseRenderExtensions.RenderInsideRenderTree(TestContextBase testContext, RenderFragment renderFragment) in /_/src/bunit.core/Extensions/TestContextBaseRenderExtensions.cs:line 45
   at Bunit.Extensions.TestContextBaseRenderExtensions.RenderInsideRenderTree[TComponent](TestContextBase testContext, RenderFragment renderFragment) in /_/src/bunit.core/Extensions/TestContextBaseRenderExtensions.cs:line 25
   at Bunit.TestContext.Render[TComponent](RenderFragment renderFragment) in /_/src/bunit.web/TestContext.cs:line 69
   at Bunit.TestContext.RenderComponent[TComponent](ComponentParameter[] parameters) in /_/src/bunit.web/TestContext.cs:line 39
....

PR meta checklist

[X] Pull request is targeted at main branch for code
or targeted at stable branch for documentation that is live on bunit.dev.
[X] Pull request is linked to all related issues, if any.
[X] I have read the CONTRIBUTING.md document.

Code PR specific checklist

[X] My code follows the code style of this project and AspNetCore coding guidelines.
[ ] My change requires a change to the documentation.

[ ] I have updated the documentation accordingly.

[ ] I have updated the appropriate sub section in the CHANGELOG.md.
[X] I have added, updated or removed tests to according to my changes.

[X] All tests passed.

Hey @MarcelRoozekrans
thanks for providing a Pull Request. May I ask which bUnit version did you run and encountered the error?
There were some recent fixes addressing some concurrency issue with bUnit 1.9.
A small input from my side. Normally the Blazor renderer tries to be as synchronous as possible. So it seems there is an issue between the thread of Blazor and the test runner. That said the ConcurrentDictionary might just "cloak" the real issue.
By any chance do you have a reproduceable test at hand? I would like to understand the circumstances a bit better.

@linkdotnet indeed we are not using latest version of the package. I'll update the package to the latest version to see if the issue is gone.
The issue is only occuring in our devops pipeline on local dev machine no issue.
Adding to the issue i have multiple different stacktraces leading back to this dict not being thread safe.
Here is an other example:
Error Message:
System.Collections.Generic.KeyNotFoundException : The given key 'some_key' was not present in the dictionary.
Stack Trace:
  at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Bunit.JSRuntimeInvocationDictionary.RegisterInvocation(JSRuntimeInvocation invocation) in /_/src/bunit.web/JSInterop/JSRuntimeInvocationDictionary.cs:line 69
at Bunit.JSRuntimeInvocationHandlerBase`1.HandleAsync(JSRuntimeInvocation invocation) in /_/src/bunit.web/JSInterop/InvocationHandlers/JSRuntimeInvocationHandlerBase{TResult}.cs:line 87
at Bunit.BunitJSInterop.TryHandlePlannedInvocation[TValue](JSRuntimeInvocation invocation) in /_/src/bunit.web/JSInterop/BunitJSInterop.cs:line 81
at Bunit.BunitJSInterop.HandleInvocation[TValue](JSRuntimeInvocation invocation) in /_/src/bunit.web/JSInterop/BunitJSInterop.cs:line 71
at Bunit.JSInterop.Implementation.JSRuntimeExtensions.HandleInvokeAsync[TValue](BunitJSInterop jSInterop, String identifier, Object[] args) in /_/src/bunit.web/JSInterop/Implementation/JSRuntimeExtensions.cs:line 14
at Bunit.JSInterop.BunitJSRuntime.InvokeAsync[TValue](String identifier, Object[] args) in /_/src/bunit.web/JSInterop/Implementation/BunitJSRuntime.cs:line 23
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
....
....
at Bunit.Rendering.TestRenderer.AssertNoUnhandledExceptions() in /_/src/bunit.core/Rendering/TestRenderer.cs:line 346
at Bunit.Rendering.TestRenderer.Render[TResult](RenderFragment renderFragment, Func`2 activator) in /_/src/bunit.core/Rendering/TestRenderer.cs:line 232
at Bunit.Rendering.TestRenderer.RenderFragment(RenderFragment renderFragment) in /_/src/bunit.core/Rendering/TestRenderer.cs:line 54
at Bunit.Extensions.TestContextBaseRenderExtensions.RenderInsideRenderTree(TestContextBase testContext, RenderFragment renderFragment) in /_/src/bunit.core/Extensions/TestContextBaseRenderExtensions.cs:line 45
at Bunit.Extensions.TestContextBaseRenderExtensions.RenderInsideRenderTree[TComponent](TestContextBase testContext, RenderFragment renderFragment) in /_/src/bunit.core/Extensions/TestContextBaseRenderExtensions.cs:line 25
at Bunit.TestContext.Render[TComponent](RenderFragment renderFragment) in /_/src/bunit.web/TestContext.cs:line 69
at Bunit.TestContext.RenderComponent[TComponent](ComponentParameter[] parameters) in /_/src/bunit.web/TestContext.cs:line 39
....

@linkdotnet indeed we are not using latest version of the package. I'll update the package to the latest version to see if the issue is gone.

Thanks for reporting back. Would be intersting to know whether or not the latest version fixes the issue.
How often do you see issue on CI/CD? Can you "reproduce" this with every commit?
And did you try it with your local version and the thread safe dictionary?
If the issue persists in the new version I still think we have to check for the root cause.

How often do you see issue on CI/CD? Can you "reproduce" this with every commit? And did you try it with your local version and the thread safe dictionary?

Local version does not have it to only seems to happen in de pipeline and then even its a not consistent error, making the pipeline feel flacky, and retry is imminent to get a green build.
Some background information on the failing parts of the code is what we have a WPF application and we "message" the WPF application from blazor via js as interop. We use JsRuntime.InvokeVoidAsync extensively in nearly all cases without a wait construction making it fire and forget.

Thank you for your efforts on this @MarcelRoozekrans. It would be really great if you can share the test you have that causes this. It could help us better understand the underlying issue and perhaps discover other places that have similar problems, or perhaps find an alternative solution.
To reproduce locally, you might be able to trigger this by running your tests in a loop. Take a look at this script in the bUnit test folder: https://github.com/bUnit-dev/bUnit/blob/main/tests/run-tests.ps1

@egil and @linkdotnet after updating to latest version we have not seen the concurrency issues since. I think we can close this PR as it is not needed anymore.

Thank you for checking up on this and getting back to us.


How to set html format to markdow?

Hi al!
I using simplemde-markdown-editor for may project. I saved text as a html and save to database.
var content = simplemde.options.previewRender(simplemde.value());

When edit content, I want convert html to markdown. Please help me!

This is not the job of SimpleMDE. You may want to look at other projects or ask this question on Stack Overflow.

Convert HTML to Markdown
https://domchristie.github.io/to-markdown/

không biết bác đã làm được chưa?


Allow to straighten a selection of ways (rather than only one segment)

In my area, people have been adding lots of turn restrictions. This causes long ways to be fragmented and they cannot be merged, because of those relations. Consequently the use of the "Straignten" (the S key) function is now very limited. What would be very useful I think it is allow to use the S key on a selection. The user select a few ways and if they are connected then allow the use of the S key. In this case ID would align all the nodes, but keep the way's fragments separated. Should be easy I think, it is just lining up a bunch of points based on the coordinate of the last and first point in the selection. This would be very useful to tidy-up streets and that all crooked yet should be in a straight line.

Oh yeah, I would love this feature too.  This is being tracked already on #2058

Do you know if the is a plan to implement ?

Do you know if the is a plan to implement ?

No plan - go for it!
If nobody else does, I'll do it some day when I have some free time.


Smaller conf logo

Shouldn't we wait for other logo submissions first? :o)
If no one objects by the morning (10am UTC) let's do this.


Interface with bike speed sensor

Figure out whatever is necessary to not fry the board (resistors to restrict voltage, maybe tune some capacitors). Also, consider how to attach/detach. Do I have room for spring clips? Or should I use mini-deans?

http://www.atmel.com/images/doc2508.pdf - 2x1Mohm resistors will show close to the full voltage, but the internal diodes will clamp the value.
Experimentally, I had issues with that exact setup. My wires generated enough noise to register values. I replaced the 1M resistors with 330k and added 3rd 330k resistor as a pull-down.


[HELP/QUESTION]

Your Question/Help Request
I need to modify --env values assigned on creation.
For example, I need to modify NO_PROXY values once k3d cluster has been created.
I've realized I miswrote these values after some days working on k3d cluster, and I need to change them.
Information for Helpers
What did you do?

How was the cluster created?

$ k3d create --name k3d --workers 2 --enable-registry \
     --env HTTP_PROXY=http://<proxy-ip>:<proxy-port> \
     --env HTTPS_PROXY=http://<proxy-ip>:<proxy-port> \
     --env NO_PROXY=.localhost,<IP_ADDRESS>,<IP_ADDRESS>,.local \
     --publish 80:80 --publish 443:443

Which OS & Architecture?
$ uname -a
Linux psgd 5.3.0-51-generic #44~18.04.2-Ubuntu SMP Thu Apr 23 14:27:18 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Which version of k3d?

k3d version v1.7.0

Which version of docker?

On docker side you cannot update the environment variables that have been passed to docker create/run afterwards. However, you can do a docker exec -it k3d-k3d-<NODE> sh and update the environment variables inside the running node container as you would do it on your machine.

Closing due to inactivity. Feel free to reopen if there's more to discuss :+1:


Add link to MEV Watch

Add link to MEV Watch

We should include credits to Labrys next to that link similar to the other links.

Done :)


Remove BlueSocket dependency

I put together a simple (less than 150 line) replacement for BlueSocket for use in Proof of Concepts and Unit Tests that's much easier to understand (since it only needs to do IPv4 TCP server-side bound to all IP addresses on the host).  This will let @tanner0101 (and anyone else who needs to) use the repo without needing to mess with any dependencies.
Note that there are features that BlueSocket had that this doesn't support (like listening only to one network interface and leaving other ones alone).  I largely consider that a feature. If there are specific things that people need/want, I'll be happy to discuss implementing them in the simpler model.
This PR also enables the ability to change the API for this repo from using (NS)Data to using DispatchData as discussed in #37 - specifically the following part of the conversation:

Part of this is because BlueSocket (that I really want to replace with something much simpler) explicitly reads/writes all socket data in NSData format.

That should be a non-reason. I think very few people care what BlueSocket does. Just drop it and use something else.

Obviously, if we're going to change the HTTP API to use DispatchData, we need to discuss it, so that's not included here. This just makes it possible.
This (hopefully) resolves the root problem with #25 and removes the confusing (but unfortunately expected) errors discussed here: https://lists.swift.org/pipermail/swift-server-dev/Week-of-Mon-20170529/000537.html

+1 to the big picture, a few comments inline.

@ianpartridge I don't see comments in line?

Er, they vanished. Weird. I'll go through again...

Ugh @tanner0101  - I pushed a patch to address Ian's comments, and now yours show as outdated and my inline replies aren't appearing above. I wasn't ignoring you. I'm replying both here and inline.

the reason I had been avoiding throwing if shutdown(2) fails is because it shouldn't be an error if shutdownAndClose gets called on an already-closed-and-invalidated socket. Does that seem reasonable?
Oh, wow. I love the touchup of SOCK_STREAM. @ianpartridge, is it okay with you if I mimic https://github.com/vapor/vapor/blob/beta/Sources/TCP/Utilties/Utilities.swift#L32 ?
So with getaddrinfo() you don't have to break out #if OS() there? Is that right?
My concern here is to make sure that we can't get deadlocks. I've had a situation in testing where a read pushed a chunk of data into the pipeline, and it called something that wanted to write, but the write couldn't happen until the read completed, and so it all hung (this was on a future implementation in the context of SSL where OpenSSL's need to keep global state forces a lock around read/write). Maybe I'm just being paranoid. What do you think?

-Carl

@carlbrown as this touches quite a few files, is this ready to merge as-is with the SOCK_STREAM etc. constants added later? (so it doesn't block changes to the rest of the codebase)

Ok - I'm going to merge this as-is for now, and we can move further work to another PR.


adding custom method override for proxy hosts

This is in reference to #52 - it's eyeballed, though, and I may have missed something. I am not setup to test this outside of the packaged docker container at this very moment.

From a quick look this looks good to me as well but I will try to run this locally this weekend to test it.

Any chances of getting this released soon ?

Sorry for the delay, did some quick testing and this seems fine. Thanks for your work.


how to make thead content sticky also pagination content?

Follow this,
https://codepen.io/anon/pen/qbLaMb?editors=1010
A quick hint is fix-head


Update direct-routing-protocols-sip.md

small correction per https://datatracker.ietf.org/doc/html/rfc3261#page-183. 180 Ringing not 180 Trying.

@JohanFreelancer9 Copy editing is needed for this PR. Thanks.


Add GitHub Bots to Open-Horizon Repositories

We need to have project-specific bots later (Especially for Go, Python, and JS-based projects) to track code quality, builds and all. Please have a look and let me know what you think. You can also add more bot integrations that we can have right here.
This issue would be used to track the integration of GitHub Bots across Open-Horizon repositories.
1 . Stale Bot  Integration

Closes Issues and Pull Requests if not attended to in a specified period of time
Maintains the overall sanctity of the issues and Pull Requests tab.
Keeps a check on spam/unnecessary Issues and PRs.

2 . Greet Bot Integration

Greet First Time Contributors

3 . Request - Info Integration

Request for the information if the issues/PR Content body is empty
Help us in Spam / invalid issues and PRs

We can also add many bots i have more specific bots and i can also add in the future
What is the idea cc @joewxboy  ?

@Ayush7614 This is great stuff!  Let me think about it.  There's still a lot I'm learning about GHAs.
Let me know (PM on chat server or email me) if you'd like to have a call (Facetime or Zoom or Skype or Google Meet or whatever) to discuss.

@Ayush7614 This is great stuff! Let me think about it. There's still a lot I'm learning about GHAs.
Let me know (PM on chat server or email me) if you'd like to have a call (Facetime or Zoom or Skype or Google Meet or whatever) to discuss.

Thanku @joewxboy Sure I am doing text on server to you and one thing is that should i start working on these

@Ayush7614 are you still working on this?

I'm not a fan of StaleBot.  Just because an issue is old does not mean it should be closed.
The others are nice to have, but somewhat unnecessary.  I could be convinced if there is valid case.  Open to suggestions.
I added ImgBot yesterday to squash image sizes.  That will prove to be helpful.

We've deployed several bots now, I think this can safely be closed.  Please comment here if I missed anything.


[Feature Request] Ability to add buttons to URL Bar

The related Mod/Theme: SuperURLBar
Your Enhancement Suggestion/Feature Request
This Zen Mod already has the ability to remove icons from the URL Bar, but it would be nice for it to also add the ability to place icons inside of the URL Bar that otherwise couldn't be.
For example, I commonly use the addon ToS;DR as well as uBlock Origin, and for both of these but especially the former I feel like it fits to have their icons placed inside the URL bar - on the far right side of it or the far left side of it, respectively. This allows uBlock Origin to then exist next to the shield icon, and ToS;DR to provide more info on the website too (past versions of the extension could be placed in the URL Bar without custom CSS, but this was unfortunately removed). I have traditionally used the following CSS code to achieve this - with it, any button placed directly right of the URL Bar will be moved inside it. Credit for the code goes to this old CSS theme.
#urlbar {padding-inline-end: calc(17px + 2 * var(--urlbar-icon-padding));}
#urlbar-container+.chromeclass-toolbar-additional{
margin-inline-start: calc(0px - 19px - 2 * var(--urlbar-icon-padding) - var(--urlbar-margin-inline)) !important;
position: relative;
--toolbarbutton-inner-padding: var(--urlbar-icon-padding);
--toolbarbutton-hover-background: var(--urlbar-box-hover-bgcolor);}

To clarify, this is of course not just for these two specific addons I use - they work for any button that the user can move the location of. It may be possible to edit this to do the same thing but with the left side of the URL bar as well, I've never worked out how to do it myself, admittedly.
I admit this CSS may be extremely niche, and others besides me might not have a use for it, but on the off-chance you think it would fit your mod (thank you so much for your constant work on it) I thought I would submit it as a request, especially as I have the code already. I find it makes the top bar feel cleaner somehow, which fits nicely with the purpose of your amazing mod.

Hey, first of all thx for the kind words.
I really liked your idea and implemented it as an option in the mod. It will be publicly available as soon as the pull request linked above is merged :)
Thx a lot for the suggestion and the code! (i only adjusted the code a bit so that the moved button doesn't overlay with the bookmark star button)


Move pytest dependencies from main to dev

The pytest dependencies can cause unnecessary versioning conflicts and typically aren't needed for a production release

Realized this will require a bit more than just these changes

https://github.com/kevinheavey/anchorpy/issues/62


Use of Bismark output for imputation

Hi Gaetan,
CpG-transformer is a great tool. I have been analyzing single-cell BSC data (from NMT-seq) and would like to impute some of the missing CpGs. However, I am unable to figure out a way to use cpg-transformer on bismark output file. I tried FastatoTable function on raw data to prepare input files but it gets complicated for paired-end sequencing.
Could you please suggest a way by which I could use the output from bismark as input to cpg-transformer? If not, could you please suggest how to use the imputed output from raw data in Bismark?

Hi, thanks for your interest in using CpG Transformer!
I am not a specialist in using Bismark, but I think you should be able to get a single CpG methylation file for every cell. (Look for the "Bismark methylation extractor" steps here).
Then, from these Bismark output files, you should try to construct a tab-separated file that looks like this. Where every row indicates a CpG Site, and every column with -1s, 0s, and 1s indicates a cell. This will require some manual programming, as I am not sure an automated script (from bismark to this tsv format) is a good choice as users may have wildly different experimental settings and needs.
Once you have this script, you can use our provided functions EncodeFromTsv.py to encode the methylation calls and EncodeGenome.py to encode the genome to NumPy formats for input to the model.
Let me know if this answers your questions!

Thank you Gaetan for the solution.


Median of Two sorted Array in Java

💥 Proposal

I want to add solution of Median of Two Sorted Array In Java
Problem Link - https://leetcode.com/problems/median-of-two-sorted-arrays/

Have you read the Contributing Guidelines on Pull Requests?
yes

/assign


Curriculum update needed on DOM_manipulation_and_events.md

The Odin's file, DOM_manipulation_and_events.md is updated. Please update the Kampus' file, checkout file here DOM_manipulation_and_events.md
Latest commits:

Update link fragments (additions: 1, deletions: 1) on Feb 8 2024, 13:00 UTC
update dom heading (additions: 1, deletions: 1) on Feb 6 2024, 02:24 UTC
resolve lint error (additions: 1, deletions: 1) on Feb 3 2024, 17:00 UTC
remove blannk lines (additions: 0, deletions: 3) on Feb 3 2024, 16:32 UTC
remove hard tabs (additions: 1, deletions: 1) on Feb 3 2024, 16:28 UTC
add blank line after heading (additions: 1, deletions: 0) on Feb 3 2024, 16:15 UTC
resolve md lints (additions: 3, deletions: 0) on Feb 3 2024, 16:09 UTC
Remove extra spaces (additions: 0, deletions: 3) on Feb 3 2024, 15:33 UTC
Add Lazy numbering in lists (additions: 2, deletions: 2) on Feb 3 2024, 15:21 UTC
update nested lists (additions: 3, deletions: 3) on Feb 3 2024, 15:21 UTC
update single spaces (additions: 6, deletions: 6) on Feb 3 2024, 15:19 UTC
Merge pull request #26989 from Mclilzee/remove-words-foundations (additions: 4, deletions: 4) on Jan 12 2024, 13:18 UTC

Dublicated issue


pull request for e2e test at 01/15/2017 11:15:14

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Make "Applies To" section in .NET API documentation individual per overload

Is your feature request related to a problem? Please describe.
I'm always frustrated when I try to see when a certain overload was added because there is no easy way to obtain that information.
Describe the solution you'd like
The "Applies To" information should be per overload instead of per method or type name.
Describe alternatives you've considered

Check the version of that documentation page for each .NET Core, .NET Framework and .NET Standard version to see which ones have the overload we're looking for and which ones don't;
Open Visual Studio, create a project with multi-targeting for all versions we want to check and then pick the highest version and look at the tooltip to see availability of that overload (and this doesn't always work).

Additional context
An example of this would be trying to find out when string.IndexOf(Char, StringComparison) became available, since the docs page say the entire page is applicable to:

.NET Framework ≥ 1.1
.NET Standard
.NET Core

However if you check that page for any .NET Framework versions or .NET Core versions lower than 2.1 or .NET Standard versions lower than 2.1, you'll see that overload doesn't exist because it was added on .NET Core 2.1 and .NET Standard 2.1.

This issue was moved to dotnet/dotnet-api-docs#5017


ci: use erc7730 from PyPI instead of internal repository

see LedgerHQ/python-erc7730#57

Hello 👋
Feedback with @AEnguerrand :
on master.yaml we suggest to keep the pull from JFrog
run: jf pip install erc7730
but change
run: jf pipc --global --repo-resolve=virtual-pypi-prod-green
to
run: jf pipc --global --repo-resolve=ossproxy-pypi-proxy-pypiorg
and on the workflow pull_request.yaml, indeed, we should pull directly from PyPI 🙏

@amanone @AEnguerrand it does not work from forks, that's why we are switching to PyPI, see https://github.com/LedgerHQ/clear-signing-erc7730-registry/actions/runs/11184089433/job/31094107439?pr=18

@amanone @AEnguerrand it does not work from forks, that's why we are switching to PyPI, see https://github.com/LedgerHQ/clear-signing-erc7730-registry/actions/runs/11184089433/job/31094107439?pr=18

Yes, on the workflow running for PE, definitely don't use JFrog. But for the workflow master, running only on the master branch, you can use JFrog (and modify it); I think it's not going to break in this case. It will be beneficial to have the JFrog Xray security check.

@AEnguerrand If you fork the repo, you may want to have the master workflow working on your fork. I could see this happening easily with third parties managing multiple descriptors before submitting a big PR to us. Also, pull requests and master won't source the library from the same location, so might lead to weird behaviour if release fails to deploy to PyPI or JFrog. So I will put back if you want, but otherwise I would prefer to keep it simple

reverted master workflow because it can't work on a fork anyway, due to using ledger runners


Dynamically poplulated selection field breaks after dialog conversion from coral ui 2 to coral ui 3

After performing the dialog conversion, the datasource node gets removed due to which the dynamic selection field breaks after conversion.

Do you have the original coral2 widget node that you are trying to convert?

Dialog conversion is being removed in v2.0.


Error "2 input names specified, please check usage" while saving video file in desired path

Dear @isonic1 ,
First of all thank you very much for this solution, this is extremely useful.
I am using Flick version: 0.4.4
I followed your examples example 1 and example 2 but while executing the stop command i am getting this error and it doesn't get copied into the target location.
mkdir: 'sdcard/flick': File exists
Stopping Recorder!!!
Error - 2 input names specified, please check usage
error: No such file or directory @ rb_file_s_rename - (/Users/navneet/.flick/ZX1G42BKJT/Login screen static text check - English.mp4, /path/to/target/location/Login screen static text check - English.mp4). Use --trace to view backtrace
Saving to /path/to/target/location/Login screen static text check - English.mp4

Check the location sdcard/flick in your mobile device using command adb shelll and delete all files if there are any.
Call start and stop command sequentially, try restarting if you can't get out of the loop.


set maxBounds to prevent panning too far away from the sweet park action

Good idea!

:deciduous_tree:
@wilsaj I added you as a contributor. Merge this branch whenever you feel comfortable with it.


How to set a sane SMTP Helo

⚠ Please verify that this question has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

📝 Describe your problem
For SMTP connections, the app uses the bogous HELO <IP_ADDRESS>, not the hostname.
How can the SMTP Helo be set, or set to the hostname?
📝 Error Message(s) or Log
EHLO [<IP_ADDRESS>]

🐻 Uptime-Kuma Version
1.23.3
💻 Operating System and Arch
Debian 10 amd64
🌐 Browser
Firefox
🖥 Deployment Environment

Runtime: Docker 20.10.17
Database:
Filesystem used to store the database on:
number of monitors:

When you are refering to bogous HELO you are refering to the smtp extention discovery mechanism.
See https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol#Extension_discovery_mechanism:

Clients learn a server's supported options by using the EHLO greeting, as exemplified below, instead of the original HELO. Clients fall back to HELO only if the server does not support EHLO greeting.[24]
Modern clients may use the ESMTP extension keyword SIZE to query the server for the maximum message size that will be accepted. Older clients and servers may try to transfer excessively sized messages that will be rejected after consuming network resources, including connect time to network links that is paid by the minute.[25]
Users can manually determine in advance the maximum size accepted by ESMTP servers. The client replaces the HELO command with the EHLO command.

=> this is neither configurable, nor should it as far as I can tell.
=> I am going to close this as resolved. We can reopen if this is actually an issue and not just smtp working as intended ^^
As for this issue, please take the time to write proper issues (include the configuration, what you tried, where you got the log message from (this does not look like one produced by us), ...)

In the SMTP standards the HELO/EHLO are used for sending the own hostname.
You can read that also on the page you have linked:

The client initiates its dialog by responding with a HELO command identifying itself in the command's parameter with its FQDN (or an address literal if none is available). (rfc5321-21)

Btw, verifying the HELO name (e.g. comparing with reverse record) is part of anti-spam measures.

where you got the log message from (this does not look like one produced by us

This is an excerpt of the SMTP connection. There were no entries in /app/data/error.log

The name parameter should be set to the hostname of the machine by default according to nodemailer
See https://nodemailer.com/smtp/#connection-options
We currently don't set this parameter.
I currently don't have the time (exams) to propose a PR with the needed testing (attach screenshots) that this works. The primary base url of the uptime kuma can be gotten via await setting("primaryBaseURL").
Our contribution guide is here: https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md
The relevant configuration is here: https://github.com/louislam/uptime-kuma/blob/56aa81e337043d4efa76c46dd7dc8320c9688398/server/notification-providers/smtp.js#L15-L22

Thanks, I will have a look!

Maybe I can help to clarify this "issue".
@sebix You are talking about outgoing connection to send email notifications right ? You are correct an email server should have proper hostname configuration, sending an appropriate HELO/EHLO corresponding to that hostname and having a PTR record that points it's IP to that host. Then you can start communicating with the rest of the world. However, I don't think it is within the scope of Uptime Kuma to act as an email server but just as a "client". Hence we use authenticated SMTP to have our (remote) SMTP server accepting the mail from us and forward it on where ever needed (he is the "mail server" not us on the app side). So the helo to there doesn't matter very much.
You could compare with your local Thunderbird or whatever mail client sending via same SMTP server to which you authenticate. If you have a local MTA - as I do - it is still the same really.  Other discussion about that here #2793 .
In any case, and IMHO, you should not seek to have the node server behind UK to send email directly to the outside world but either really via an authenticated SMTP of yours or your local MTA which should be configured to the outside world. This is not the role of an/any app.
Does this help clarify a bit?


Improvements to the Generator

After a discussion (quite a while ago) with @dougwilson I've been thinking about how we could improve the boilerplate generator for express. The generator itself hasn't really gone through an overhaul since it was converted from a short script that concat'd a bunch of source together and outputted some files into a nice set of templates with improvements to the file structure.
With some large changes to the generator I think we can make express a lot better as a starting point for building your own tailored framework. Right now the choices you have for the generated code are fairly shallow. I think we can expand these choices to include what a lot of people are using express for. The changes are fairly large though.
Here is what I am thinking:

A preference file, allowing you to configure every aspect of the generated code. Here is an example
A set of templates that you can modify to generate code in your exact style.
The executable would take the preferences and templates as input and output an Express app.

Obviously there are a lot of specifics missing and the example preference file is fairly magic looking. So before I go much further with the idea I wanted to test the waters to see if this idea had any merit. Also there might be other ideas / projects underway that do this?

So there is a lot of questions/ideas here, but my main thoughts is yes, this module is pretty bare-bones and really doesn't provide enough value, i.m.o.

@dougwilson What if we started with:
Input
A preference file - using a format that supports comments.
var $ = exports

// Use Resourceful routing?
$.ROUTING_STYLE = 'resource' // resource.index = function
// ROUTING_STYLE = 'plain' // app.get('/foo')

// What templating engine?
$.TEMPLATING = 'jade'
// TEMPLATING = 'dustjs-linkedin'
// TEMPLATING = 'ejs'

// What css engine?
$.CSS_ENGINE = 'plain css'
// CSS_ENGINE = 'less'
// CSS_ENGINE = 'stylus'
// CSS_ENGINE = 'compass'

// Does this app need to interact with a database or orm?
$.ORM = true
$.ORM_LIB = 'juggler'
// ORM_LIB = 'waterline'
// ORM_LIB = 'sequelize'

// Validation
$.VALIDATION_LIB = 'anchor'
// VALIDATION_LIB = 'juggler'
// VALIDATION_LIB = 'joi'
// VALIDATION_LIB = 'validation.js'

Source code templates - like what we have now but user customizable/overridable.
Output
Almost exactly like we have now, but with more features:

example validation
ORM usage example
resource routing (using express-resource)

I am open to whatever, in the end :) Anything would be an improvement to this module at this point, lol.

Just wanted to ping an idea in here about potentially exposing alternative templating engines and possibly using React as a first-class templating flag.
Currently the generator supports jade, hbs, hogan, and ejs. With a library such as consolidate would it be possible to expose more templating engines? Even potentially just removing the flags as a whole and providing a manifest .expressrc file to configure the templating?

@cameronroe if you are gonna ask for React, I am gonna advocate for Vue, not only is it much simpler than React but also has a huge community, ever-growing might I add


Caching Prisma queries

Hello, I have a feature request. Is it possible to cache specific fields of the schema when querying the Prisma server, similar to what is currently possible via apollo for http response caching say providing directives in the schema so that in the resolvers calling the Prisma server via Prisma client would actually skip the Database query and instead hit the cache?

I had the same problem and as mentioned by lee byron in graphQL.js branch; about directives and extensions which are not implemented in apollo cache, the AST is only a js object (https://github.com/graphql/graphql-js/issues/1262#issuecomment-368110891) I ended with change the AST and add the directives to it.
I see this as a temporarily workaround until most graphql libraries will using extensions and not custom directives.
Here is my file:
import {directiveInternal} from '../@custom_types/directives';

export const addDirectives = function(schema, directives){
    //directives.Queries.push({name: 'myProfile', directive: { name: 'cacheControl', arguments: [{name: 'maxAge', value: '100', kind: kindValue.IntValue},{name: 'scope', value: 'PRIVATE', kind: kindValue.EnumValue}]}});
    //directives.Fields.push({name: 'coins', type: 'MyProfile', directive: { name: 'cacheControl', arguments: [{name: 'maxAge', value: '100', kind: kindValue.IntValue},{name: 'scope', value: 'PRIVATE', kind: kindValue.EnumValue}]}});

    if(directives.Queries.length > 0) {
        directives.Queries.forEach(element => {
            let directive = buildAst(element);
            schema.getQueryType().getFields()[element.name].astNode = {directives: [directive]};
        })
    }
    if(directives.Fields.length > 0){
        directives.Fields.forEach(element => {
            let directive = buildAst(element);
            schema.getType(element.type).getFields()[element.name].astNode = {directives: [directive]}
        })
    }

    if(directives.Types.length > 0){
        directives.Types.forEach(element => {
            let directive = buildAst(element);
            schema.getType(element.name).astNode = {directives: [directive]}
        })
    }

    return schema;
}

function buildAst(element){
    let directive: directiveInternal = {arguments: []};

    if(element.directive.name === 'cacheControl'){
        directive.kind = 'Directive';
        directive.name = {kind: 'Name', value: 'cacheControl', loc: {start: 0, end: 0}};
        directive.loc = {start: 0, end: 0};
        if(element.directive.arguments.length > 0){
            element.directive.arguments.forEach(argument => {
                directive.arguments.push(
                    {
                        kind: 'Argument',
                        name: {
                            kind: 'Name',
                            value: argument.name,
                            loc: {start: 0, end: 0}
                        },
                        value: {kind: argument.kind, value: argument.value, loc:{ start: 0, end: 0}},
                        loc: {start: 0, end: 0}
                    });
            })
        }
    }
    return directive;
}

After building baseSchema with nexus, I added permission from graphqlshield and as last step manipulate the AST.
let schema = applyMiddleware(baseSchema, permissions);
schema = addDirectives(schema, directives);


Global CRA uninstall: npm uninstall -g create-react-app

Since create-react-app 3.3.0 it's not longer recommended to use a global installation of CRA.
However, after following the recommended way, uninstalling CRA globally and using npm,I ran into the following problem for my new React project:
A template was not provided. This is likely because you're using an outdated version of create-react-app.
It seems like CRA wasn't properly uninstalled. I had to do the following:
After uninstalling it with npm uninstall -g create-react-app, check whether you still have it "installed" with which create-react-app on your command line. If it returns something (e.g. /usr/local/bin/create-react-app), then do a rm -rf /usr/local/bin/create-react-app to delete manually.
Afterward, I was able to use npx create-react-app my-app with the latest version of CRA where I would have the default template for the src/ folder.

Just left this issue here for other folks searching it.

Thanks! Fixed the issue for me.

which: no create-react-app in (/c/Users/dell/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/dell/bin:/c/Program Files/Dell/DW WLAN Card:/c/Program Files (x86)/Intel/iCLS Client:/c/Program Files/Intel/iCLS Client:/c/Program Files (x86)/Python38-32/Scripts:/c/Program Files (x86)/Python38-32:/c/Program Files/Java/jdk-13.0.1/bin:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files/nodejs:/c/Users/dell/AppData/Local/Programs/Python/Python38-32/Scripts:/c/Users/dell/AppData/Local/Programs/Python/Python38-32:/c/Users/dell/AppData/Local/GitHubDesktop/bin:/c/Users/dell/AppData/Local/Programs/Microsoft VS Code/bin:/c/Users/dell/AppData/Roaming/npm:/usr/bin/vendor_perl:/usr/bin/core_perl)

Is it completely removed now or? I'm new to all these, so.

Thank you!

Oh thanks a lot that fix the issue !

Fixed it for me too! Thanks! 👍🏾

Oh god, you saved me, I was wondering if it something with my computer using nvm for multiple node versions.. and it was so simple. Thanks!

Thanks! It was very helpful!

super helpful, thanks!

hmmm in my machine it's worked with yarn, but not with npx.
So I tried this with npx and it's worked:
npx<EMAIL_ADDRESS>your-project-name
or
npx create-react-app@latest your-project-name
node : 10.16.3
npx : 6.9.0
npm : 6.9.0

hmmm in my machine it's worked with yarn, but not with npx.
So I tried this with npx and it's worked:
npx<EMAIL_ADDRESS>your-project-name
or
npx create-react-app@latest your-project-name
node : 10.16.3
npx : 6.9.0
npm : 6.9.0

npx create-react-app@latest your-project-name --use-npm

Fixed my same problem.thanks a lot

Thank you! I was starting to go crazy haha


Small example idea - Where to put

Hi.
I have a small game idea with which move, phased move, superposition (maybe, interference) could be tested: A kind of gamified quantum version of the riddle "Fox and the holes".
If I implement it, should it be part of the library? Maybe under an examples directory?
Regards,
Máté

This is great Máté! Do you want to put this in a //unitary/unitary/examples/ directory as part of your PR?


gpt-4o added to available models

Upgraded OpenAI package to 1.24.0
Added gpt-4o as available models
Added model pack based on gpt-4o

Thanks @kmhari! This is now included in 1.0.0


Messages with retain only persist once

While testing #42 as a fix for #37, I found an unrelated issue with message retention and persistence.  Using only mosquitto_pub/sub for testing, the first time you publish with retain, it will save to DB. (server.go: retainMessage q=1)
The second time you publish with the same topic, server.go, retainMessage is q=0 and doesn't save.  Therefore, it must not be saving what it originally reads in.  Not sure if this applies to other persistent data.  Example:
package main

import (
	"bufio"
	"flag"
	"fmt"
	"log"
	"os"
	"time"

	mqtt "github.com/mochi-co/mqtt/server"
	"github.com/mochi-co/mqtt/server/listeners"
	"github.com/mochi-co/mqtt/server/listeners/auth"
	"github.com/mochi-co/mqtt/server/persistence/bolt"
	"go.etcd.io/bbolt"
)

func main() {

	runNumber := flag.Int("run", 1, "number of times we've run")
	flag.Parse()

	server := mqtt.New()
	tcp := listeners.NewTCP("t1", ":1883")
	server.AddListener(tcp, &listeners.Config{Auth: new(auth.Allow)})

	err := server.AddStore(bolt.New("mochi-test.db", &bbolt.Options{
		Timeout: 500 * time.Millisecond,
	}))
	if err != nil {
		log.Fatal(err)

	}

	server.Serve()
	fmt.Printf("Server is running\n\n")

	if *runNumber == 1 {
		fmt.Printf("Send a message to broker with retain flag:\n")
		fmt.Printf("\nmosquitto_pub -r -t \"test/persist\" -m \"I Persist\" \n")
		fmt.Printf("\nPress ENTER to exit, then re-run with -run=2 flag")
		bufio.NewReader(os.Stdin).ReadBytes('\n')
		os.Exit(0)
	} else if *runNumber == 2 {
		fmt.Printf("This is the second run and message has been loaded from DB\n")
		fmt.Printf("Test that you can retrieve the message by running\n")
		fmt.Printf("\nmosquitto_sub -C 1 -t \"test/persist\"\n")

		fmt.Printf("\nThen press ENTER after you've confirmed you received the message\n")
		bufio.NewReader(os.Stdin).ReadBytes('\n')

		// Second run, (s *Server) retainMessage will not save in DB
		fmt.Printf("\nPublish the same message again with:\n")
		fmt.Printf("\nmosquitto_pub -r -t \"test/persist\" -m \"I persist\" \n\n")

		fmt.Printf("When complete, hit ENTER to exit and re-run with: -run=3 flag\n")
		bufio.NewReader(os.Stdin).ReadBytes('\n')
		os.Exit(0)

	} else {
		fmt.Printf("This is our third run. You should be able to get the message\n")
		fmt.Printf("by subscribing, but it doesn't work\n")
		fmt.Printf("\nmosquitto_sub -C 1 -t \"test/persist\"\n\n")

		fmt.Printf("Press ENTER to exit.


Integ tests nm mainloop

tests, nm.testlib: Introduce mainloop_run decorator
Start using the decorator in the nm.bond_test integration module.

Dependent on #347

Coverage increased (+0.2%) to 69.155% when pulling 81aa1dbb2822a26f711083068ba0e0e9c8f10437 on EdDev:integ-tests-nm-mainloop into a1b4b9c5f51ac095f09bab675da5a9c6e4b86368 on nmstate:master.


Clicking refresh does not doing anything

The plugin is looking great! I am excited to start using it. I already have SD 1.5 so I followed the youtube tutorial and everything installed fine. The cats load and I added the URL of SD but when I click refresh 'A' remains red. P is green. Not sure what the issue is. I even removed / from the URL.

@zaramal did you check this comment?
https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin/issues/43#issuecomment-1369720783
if the letter A is red it means the proxy server couldn't connect to automatic1111.
Double check that you have --api and make sure you have the endpoints exposed in http://<IP_ADDRESS>:7860/docs
as for the trailing "/" bug, it's not an issue anymore.

I have --api "set COMMANDLINE_ARGS=--vae-path "models\VAE\vae-ft-mse-840000-ema-pruned.pt"--api --xformers"


Display indentation settings in use?

Hey there!
Is it possible to display the indentation settings that are currently in use, similarly to how e.g. Sublime Text does it in the lower right corner? I'm using editorconfigs and they differ from repo to repo, so I would like to have lightline display something like "Spaces: 2" (for two spaces indentation) or "Tab size: 4" (for tab indentation that's 4 spaces wide) on the right side, next to where it displays the format and charset.
From what I understood the relevant vim settings are the following:

tabstop
sThe width of a hard tabstop measured in "spaces" -- effectively the (maximum) width of an actual tab character.
shiftwidth
The size of an "indent". It's also measured in spaces, so if your code base indents with tab characters then you want shiftwidth to equal the number of tab characters times tabstop. This is also used by things like the =, > and < commands.
softtabstop
Setting this to a non-zero value other than tabstop will make the tab key (in insert mode) insert a combination of spaces (and possibly tabs) to simulate tab stops at this width.
expandtab
Enabling this will make the tab key (in insert mode) insert spaces instead of tab characters. This also affects the behavior of the retab command.
smarttab
Enabling this will make the tab key (in insert mode) insert spaces or tabs to go to the next indent of the next tabstop when the cursor is at the beginning of a line (i.e. the only preceding characters are whitespace)

What would be the proper way to display these settings in lightline in a format similar to the one mentioned above?
Thank you!

You have reached to the options you need, what is the problem here? Can you paste your config that didn't work?

@itchyny I am not certain how I would make lightline display these options. I assume it would require writing a component_function which reads these variables and returns the proper string output. Is this the way to do it?

Here's example using component which is slightly faster,
let g:lightline = {
      \ 'active': {
      \   'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'indent', 'fileformat', 'fileencoding', 'filetype' ] ]
      \ },
      \ 'component': {
      \   'indent': '%{&expandtab?"Spaces":"Tab size"}:%{&expandtab?&shiftwidth:&tabstop}',
      \ },
      \ }

or function component which is more flexible.
let g:lightline = {
      \ 'active': {
      \   'right': [ [ 'lineinfo' ], [ 'percent' ], [ 'indent', 'fileformat', 'fileencoding', 'filetype' ] ]
      \ },
      \ 'component_function': {
      \   'indent': 'LightlineIndent',
      \ },
      \ }

function! LightlineIndent() abort
  return (&expandtab ? "Spaces" : "Tab size") . ':' . (&expandtab ? &shiftwidth : &tabstop)
endfunction

Thank you very much for that! Just tested the first solution and it works very well, no need for the function then! :-)


[Bug]: torch.onnx.export on loaded PatchcoreModel model throws "IndexError: Dimension out of range (expected to be in range of [-1, 0], but got -2)" error.

Describe the bug
I am still facing the issue described in #1331 . However, I am directly using torch.onnx.export on loaded PatchcoreModel model. As a result, self.memory_bank is not being initialized which results in this error inside euclidean_dist.
Dataset
Other (please specify in the text field below)
Model
PatchCore
Steps to reproduce the behavior
Execute following code after anomalib installation:
"""Utilities for optimization and OpenVINO conversion."""

# Copyright (C) 2022-2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import logging
from enum import Enum

import torch
from torch import nn
from torchvision.transforms.v2 import CenterCrop, Compose, Resize, Transform

from anomalib.data.transforms import ExportableCenterCrop

logger = logging.getLogger("anomalib")

class ExportType(str, Enum):
    """Model export type.

    Examples:
        >>> from anomalib.deploy import ExportType
        >>> ExportType.ONNX
        'onnx'
        >>> ExportType.OPENVINO
        'openvino'
        >>> ExportType.TORCH
        'torch'
    """

    ONNX = "onnx"
    OPENVINO = "openvino"
    TORCH = "torch"

class CompressionType(str, Enum):
    """Model compression type when exporting to OpenVINO.

    Examples:
        >>> from anomalib.deploy import CompressionType
        >>> CompressionType.INT8_PTQ
        'int8_ptq'
    """

    FP16 = "fp16"
    """
    Weight compression (FP16)
    All weights are converted to FP16.
    """
    INT8 = "int8"
    """
    Weight compression (INT8)
    All weights are quantized to INT8, but are dequantized to floating point before inference.
    """
    INT8_PTQ = "int8_ptq"
    """
    Full integer post-training quantization (INT8)
    All weights and operations are quantized to INT8. Inference is done in INT8 precision.
    """

class InferenceModel(nn.Module):
    """Inference model for export.

    The InferenceModel is used to wrap the model and transform for exporting to torch and ONNX/OpenVINO.

    Args:
        model (nn.Module): Model to export.
        transform (Transform): Input transform for the model.
        disable_antialias (bool, optional): Disable antialiasing in the Resize transforms of the given transform. This
            is needed for ONNX/OpenVINO export, as antialiasing is not supported in the ONNX opset.
    """

    def __init__(self, model: nn.Module, transform: Transform, disable_antialias: bool = False) -> None:
        super().__init__()
        self.model = model
        self.transform = transform
        self.convert_center_crop()
        if disable_antialias:
            self.disable_antialias()

    def forward(self, batch: torch.Tensor) -> torch.Tensor | tuple[torch.Tensor, torch.Tensor]:
        """Transform the input batch and pass it through the model."""
        batch = self.transform(batch)
        return self.model(batch)

    def disable_antialias(self) -> None:
        """Disable antialiasing in the Resize transforms of the given transform.

        This is needed for ONNX/OpenVINO export, as antialiasing is not supported in the ONNX opset.
        """
        if isinstance(self.transform, Resize):
            self.transform.antialias = False
        if isinstance(self.transform, Compose):
            for transform in self.transform.transforms:
                if isinstance(transform, Resize):
                    transform.antialias = False

    def convert_center_crop(self) -> None:
        """Convert CenterCrop to ExportableCenterCrop for ONNX export.

        The original CenterCrop transform is not supported in ONNX export. This method replaces the CenterCrop to
        ExportableCenterCrop, which is supported in ONNX export. For more details, see the implementation of
        ExportableCenterCrop.
        """
        if isinstance(self.transform, CenterCrop):
            self.transform = ExportableCenterCrop(size=self.transform.size)
        elif isinstance(self.transform, Compose):
            transforms = self.transform.transforms
            for index in range(len(transforms)):
                if isinstance(transforms[index], CenterCrop):
                    transforms[index] = ExportableCenterCrop(size=transforms[index].size)

# Replace with the appropriate input size for your model
dummy_input = torch.randn(1, 3, 256, 256)  # Example for an image classification model

from pathlib import Path
from anomalib.models import EfficientAd, Padim, Patchcore, UnknownModelError, get_model
model = get_model("Patchcore", backbone="wide_resnet50_2")

# Ensure the model is in evaluation mode
model.eval()

onnx_path = "model.onnx"
torch.onnx.export(model=model, args=dummy_input, f=onnx_path,
                  input_names=['input'], output_names=['output'])

print(f"Model has been exported to {onnx_path}")

OS information
OS information:

OS: Ubuntu 20.04
Python version: 3.10.12
Anomalib version: 1.1.0
PyTorch version: 2.3.0+cu121
CUDA/cuDNN version: 12.4

Expected behavior
Model should be exported in ONNX format.
Screenshots
No response
Pip/GitHub
pip
What version/branch did you use?
1.1.0
Configuration YAML
N/A

Logs
Exception has occurred: IndexError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
Dimension out of range (expected to be in range of [-1, 0], but got -2)

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Could you share more of the error trace please. I'm not sure if this is Onnx related but this issue might happens if your input is not 4D. I think it should be [B, C, H, W], so even if it's just a single image it should be [1, 3, H, W]. Or it might be related to anomaly maps that should be [1, H, W] not [H, W] if I recall correctly.

@blaz-r This issue can be reproduced by running the code snippet I have provided above. If you look at the code, I am passing a dummy input to the export method in (B, C, H, W) format:
dummy_input = torch.randn(1, 3, 256, 256)

Ah okay, I thought that this was the export code for a trained model. Upon closer inspection I now see where the problem is. Patchcore relies on the memory bank that is built during training. In the code above, the model is not trained at all and with this memory bank is empty, leading to issues.
I believe you can export the model directly with your code, but for it to work you'll need to train the model beforehand. Refer to training guide on how to do that.

Thanks for the quick replies! I have a trained "model.pt" as well which after loading looks like following
{'model': InferenceModel(
(model): PatchcoreModel() .....
}
Can you suggest me the correct way to load it? Because when I export it, I get this error instead:

I am not sure what the issue could be here, but I'd recommend you export the model with anomalib directly:
anomalib export --model Patchcore --export_mode onnx --ckpt_path <PATH_TO_CHECKPOINT> --input_size "[256,256]"
For more help about exporting you can use anomalib CLI like this:
anomalib export -h
I do think we'll need to expand the docs on this one though. @ashwinvaidya17 am I missing something or is there no docs on this currently?

I tried anomalib export -h after full installation of anomalib, but it couldn't recognize the export command. Moreover I tried to use export method in anomalib.engine, but it fails to load the model checkpoint due to some version conflict.

That is unusual, the anomalib export -h works fine on my side. I'm not sure how the engine export works directly though, but judging by the docstring it's mostly intended to be used with CLI, although it looks like it could work from code as well.