FixedResolutionViewport on the new CameraComponent API

Problem to solve
In the old camera API, we can use FixedResolutionViewport to set a virtual size.
camera.viewport = FixedResolutionViewport(Vector2(1280, 720));

In the new camera API we can use CameraComponent.withFixedResolution  that internally looks like:
CameraComponent(
      world: world,
      viewport: FixedAspectRatioViewport(aspectRatio: width / height)
        ..addAll(hudComponents ?? []),
      viewfinder: Viewfinder()..visibleGameSize = Vector2(width, height),
    )

Using CameraComponent.withFixedResolution will not make the viewport to a fixed resolution. It partially works because the camera.viewfinder.visibleWorldRect will always be fixed to the given width and height but camera.viewport.size is not fixed and, also, zoom is not working at all.

When using Forge2D in the old API I can have a  viewport with FixedResolutionViewport(Vector2(1280, 720)). I can add all the UI components to this viewport using PositionType.viewport.
For the Forge2D components, I will set a zoom of 100 to scale the world to a resolution of 12.8 * 7.2 to overcome Box2D speed and size limitations, and I can add all these components using the scaled values.
Here is a git repository with an example  of how I use the old FixedResolutionViewPort
https://github.com/Yayo-Arellano/flutter_games_compilation/blob/main/flutter_learn_flame/lib/my_game.dart#L31

I'd say the behaviour you are seeing is the correct one. The old camera system didn't really made any distinction between Viewport and Viewfinder, which has given a lot of the devs wrong idea about Viewport.
CameraComponent.withFixedResolution does not promise that the Viewport will be of constant size. Instead, it just makes sure that only the visibleGameSize world is rendered through the viewport. And to achieve this, the Vewfinder has to zoom in on the game world. Hope that explains why manually changing the zoom does not seem to be working. By setting a visibleGameSize on Viewfinder, you are essentially giving up the control over zoom.
If you really want the Viewport to be constant, you should use the FixedSizeViewport.

The behavior of CameraComponent.withFixedResolution is correct and works as expected, but neither FixedSizeViewport nor CameraComponent.withFixedResolutionis are a good replacement for FixedResolutionViewport because if the screen is too small, there is a chance that the viewport is cut off, or I cannot use the zoom, etc.
The advantage of FixedResolutionViewport is it allows us to work with virtual screen size while keeping the aspect ratio. What I mean is that we can always assume the viewport size is virtualWidth x virtualHeight, and if the screen is too small  it will add black bars to the top or bottom to keep the aspect ratio, and also I can apply zoom if needed.
Please look the following GIF. You can see that resizing the screen will keep the aspect ratio and will now cut off instead will add bars.

If I'm not wrong, that virtualWidth x virtualHeight will be visibleGameSize when using .withFixedResolution.
Is it possible for you to share a side by side comparison of the new and old system? I feel it should be possible to achieve the same behaviour with new APIs as well. But if it is not, we definitely need to fix something in Flame then.

I can share the side-by-side comparison later. To summarize the differences.
In the new API virtualWidth x virtualHeight will be visibleGameSize when using .withFixedResolution is correct. But only when adding components to the world. Like world. add(MyComponent()
But if I want to add UI elements to the viewport, for example, camera.viewport.add(FpsTextComponent(position: Vector2(0, 720))); then the component will not stay in the fixed position because the viewport does not have virtual size, instead, it will change size (while keeping the aspect ratio) and the components may get out of the screen.

But if I want to add UI elements to the viewport, for example, camera.viewport.add(FpsTextComponent(position: Vector2(0, 720))); then the component will not stay in the fixed position because the viewport does not have virtual size, instead, it will change size (while keeping the aspect ratio) and the components may get out of the screen.

I think you are confusing Viewfinder and Viewport 😅. If your game has a FixedAspectRatioViewport and you resize the window, the size of viewport is expected to change. Remember, viewport is just the area of your application window where the game will get rendered. To get the behaviour that you want for the UI components, you need to add them to the Viewfinder, because that is the component that is ensuring the fixed resolution (the virtualWidth x virtualHeight).

I created two videos. Please take a look.
The first one is using the legacy camera with FixedAspectRatioViewport. All the UI HUD elements are of type PositionType.viewport. You can see the HUI items are fixed to the screen and do not change the size when I increase or decrease the zoom.
The second one is using CameraComponent.withFixedResolution all the UI HUD elements (except the black background) are added to the viewfinder like  camera.viewfinder.add(fps) the game componens are added to the world like `world.add(gameComponent).
Some differences with the new camera:

The HUD items are not fixed to the screen when using camera.follow()
Zoom does not work. The workaround was to do camera.viewfinder.visibleGameSize = virtualSize * scale
"zooming in/out" will also scale the UI HUD components.

Google Drive Folder with videos

Basically, what I was able to achieve with the legacy FixedResolutionViewport:

A fixed virtual viewport size. For example, 1280 x 720. No matter the size of the Canvas (or screen)
Applying a zoom of 100 will affect the game, not the viewport. So the game size will become 1.28 x 7.20 the viewport still keep the original size.


Deal with memory leak caused by string and token

I let token lie on stack instead of heap, since I think we don't need token live too long.

The commit messages should append the memory leak comparisons between w/ and w/o this patch via valgrind.

The difference between this modification when Inputing this command,
valgrind --leak-check=full ./mzcc < sample/nqueen.c > sample/nqueen.s
Before modification:
==15301== 10,032 (24 direct, 10,008 indirect) bytes in 1 blocks are definitely lost in loss record 2,017 of 2,017
==15301==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15301==    by 0x404ED5: make_list (list.h:25)
==15301==    by 0x408626: read_toplevels (parser.c:1076)
==15301==    by 0x409DE6: main (main.c:9)
==15301==
==15301== LEAK SUMMARY:
==15301==    definitely lost: 81,536 bytes in 3,557 blocks
==15301==    indirectly lost: 75,680 bytes in 1,147 blocks
==15301==      possibly lost: 0 bytes in 0 blocks
==15301==    still reachable: 544 bytes in 20 blocks
==15301==         suppressed: 0 bytes in 0 blocks
==15301== ERROR SUMMARY: 1447 errors from 1447 contexts (suppressed: 0 from 0)
After modification:
==14594== 10,032 (24 direct, 10,008 indirect) bytes in 1 blocks are definitely lost in loss record 1,050 of 1,050
==14594==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14594==    by 0x4050AE: make_list (list.h:25)
==14594==    by 0x408A52: read_toplevels (parser.c:1072)
==14594==    by 0x40A209: main (main.c:9)
==14594==
==14594== LEAK SUMMARY:
==14594==    definitely lost: 71,344 bytes in 1,568 blocks
==14594==    indirectly lost: 17,064 bytes in 549 blocks
==14594==      possibly lost: 0 bytes in 0 blocks
==14594==    still reachable: 544 bytes in 20 blocks
==14594==         suppressed: 0 bytes in 0 blocks
==15445== ERROR SUMMARY: 778 errors from 778 contexts (suppressed: 0 from 0)

valgrind --leak-check=full ./mzcc < sample/nqueen.c > sample/nqueen.s
Before modification:
==15301== definitely lost: 81,536 bytes in 3,557 blocks
==15301== indirectly lost: 75,680 bytes in 1,147 blocks
After modification:
==14594== definitely lost: 71,344 bytes in 1,568 blocks
==14594== indirectly lost: 17,064 bytes in 549 blocks

The commit message was not accurate. This patch reduced memory leaks, but it still exists somewhere. We have to figure out the exact source.

I use the same trick, struct initialization, on list iterator and strings

Use git rebase -i to rework each git commit message to contain the summary of Valgrind report.


Disable timeline on ticket list

As per title, PR very simple but disable the timeline to simplify the interface

It is possible to over-ride templates in django by creating a new template in your project with the same name and making sure your template dirs are ordered properly. This gives you full control over the template's appearance. It is much cleaner to over-ride the template than to have endless options for customizing them. The disadvantage of over-riding the templates is that if context variables change, then your custom templates could break, but the maintenance burden of supporting a million SETTINGS is too great for this project.

It is possible to over-ride templates in django by creating a new template in your project with the same name and making sure your template dirs are ordered properly. This gives you full control over the template's appearance. It is much cleaner to over-ride the template than to have endless options for customizing them. The disadvantage of over-riding the templates is that if context variables change, then your custom templates could break, but the maintenance burden of supporting a million SETTINGS is too great for this project.

Yes I had the same doubt, it wasn't clear to me how a setting is defined, I mean when it is the case to enable a setting to change something.

A custom template could accomplish this same thing pretty easily, just copy the existing template and remove the stuff you don't want. We can create our own settings whenever it seems useful to do so. I don't mind a setting if it's a common request.

The main thing is that any new settings should be properly documented in the docs/ folder so that new users know how to use it and what it does. Could you add some documentation to this PR, @Mte90 ? Thanks!

I will update asap with the docs stuff :-)

Documentation updated :-)


While Image Upload it Crashed

Request to send body with image file
Traceback (most recent call last):
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/tools/console/master.py", line 281, in run
self.loop.run()
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 278, in run
self._run()
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 376, in _run
self.event_loop.run()
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 682, in run
self._loop()
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 719, in _loop
self._watch_filesfd
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/raw_display.py", line 393, in
event_loop, callback, self.get_available_raw_input())
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/raw_display.py", line 493, in parse_input
callback(processed, processed_codes)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 403, in _update
self.process_input(keys)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 503, in process_input
k = self._topmost_widget.keypress(self.screen_size, k)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/tools/console/window.py", line 84, in keypress
k = super().keypress(size, k)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/container.py", line 1128, in keypress
return self.body.keypress( (maxcol, remaining), key )
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/tools/console/flowlist.py", line 417, in keypress
return urwid.ListBox.keypress(self, size, key)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/listbox.py", line 985, in keypress
key = focus_widget.keypress((maxcol,),key)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/tools/console/flowlist.py", line 238, in keypress
self.master.view_flow(self.flow)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/tools/console/master.py", line 374, in view_flow
flowview.help_context
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/blinker/base.py", line 267, in send
for receiver in self.receivers_for(sender)]
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/blinker/base.py", line 267, in
for receiver in self.receivers_for(sender)]
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/mitmproxy/tools/console/master.py", line 141, in sig_push_view_state
self.loop.draw_screen()
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/main_loop.py", line 578, in draw_screen
canvas = self._topmost_widget.render(self.screen_size, focus=True)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/container.py", line 1083, in render
focus and self.focus_part == 'body')
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/decoration.py", line 225, in render
canv = self._original_widget.render(size, focus=focus)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/widget.py", line 1750, in render
canv = get_delegate(self).render(size, focus=focus)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/container.py", line 1083, in render
focus and self.focus_part == 'body')
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/listbox.py", line 485, in render
canvas = widget.render((maxcol,))
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/widget.py", line 141, in cached_render
canv = fn(self, size, focus=focus)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/widget.py", line 1007, in render
return apply_text_layout(text, attr, trans, maxcol)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/canvas.py", line 1313, in apply_text_layout
return TextCanvas(t, a, c, maxcol=maxcol)
File "/usr/local/Cellar/mitmproxy/2.0.2/libexec/lib/python3.6/site-packages/urwid/canvas.py", line 356, in init
raise CanvasError("Canvas text is wider than the maxcol specified \n%r\n%r\n%r"%(maxcol,widths,text))
urwid.canvas.CanvasError: Canvas text is wider than the maxcol specified

Thanks. Can you share the file that causes this?

I think this is fixed on git-master. Can you verify?
ref: #1796
On 21 Jul 2017 14:46, "Maximilian Hils"<EMAIL_ADDRESS>wrote:

Thanks. Can you share the file that causes this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/mitmproxy/mitmproxy/issues/2458#issuecomment-316950341,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AP-NzujZRiRMIHEJaj3HJnS63u-lJ_Maks5sQGxfgaJpZM4Oen-t
.


Parameterize AMI used in AWS VPC integration tests

High Level Description
This allows a client of test_util/test_aws_vpc.py to specify the AMI from which cluster nodes are launched.
Related Issues

DCOS_OSS-668 Parameterize AMI in AWS onprem test

Checklist for all PR's

[x] Included a test which will fail if code is reverted but test is not. If there is no test please explain here: This is a change to the test script API that CI will be using.
[x] Read the DC/OS contributing guidelines
[x] Followed relevant code rules Rules for Packages and Systemd

Checklist for component/package updates:
If you are changing components or packages in DC/OS (e.g. you are bumping the sha or ref of anything underneath packages), then in addition to the above please also include:

[ ] Change log from the last version integrated (this should be a link to commits for easy verification and review): example
[ ] Test Results: [link to CI job test results for component]
[ ] Code Coverage (if available): [link to code coverage report]

Here's an example build that overrides the AMI to CentOS 7.3: https://teamcity.mesosphere.io/viewLog.html?buildId=579791&buildTypeId=ClosedSource_Dcos_IntegrationTests_CloudIntegrationTests_DcosOssCcmIntegration_2&tab=buildResultsDiv

Ready for review @mellenburg @orsenthil.

That's an implementation detail that should hopefully be irrelevant to a client of the class. I went with this order because the if  statement felt a little more natural.


[Existing API Name] : Movie Database

Brief Description 🤓
it is a api which is giving all details about movies which are recently relesed or according to filter we will provide , also it is giving detail about TV shows
Provide reference!
TMDB api
Select the open source program you are contributing to
Other
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINES of this project.

Greetings @Yashgabani845🎀 ! , We are excited to have you dive into another issue with us!🚀
Your involvement in our project has been invaluable, and we're confident that your skills and insights will help us conquer this challenge😇.  Use command /gssoc24 to self assign the issue.  This issue represents an exciting opportunity for us to improve and enhance our project, and we are thrilled to have you on board.
We request you to follow CONTRIBUTING GUIDELINES.
Looking for your PR soon!
In case of any issues, you can contact us on Discord.❣

/gssoc24

Hey @Yashgabani845 ! I wanted to inform you that we have closed issue.Thank you for your understanding, and we look forward to your continued engagement with our repository🤗.
In case of any issues, you can contact us on Discord.
Thank you! ❣
Happy Coding! ✨
Will See you soon❣


TS2300: Duplicate identifier

Hi,
The next stop in my quest to transpile JHeaps is as follows:

[org.jsweet.transpiler.TypeScript2JavaScriptWithTscTranspiler] ../../.jsweet/candies/typings/META-INF/resources/typings/j4ts/0.5.0-SNAPSHOT/bundle.d.ts(414,9): error TS2300: Duplicate identifier 'LOCAL_VARIABLE'.

Running gradle in debug mode reveals the bellow command line for tsc.

/Users/zkuti/.jsweet-node_modules/bin/tsc --target ES6 --moduleResolution classic --experimentalDecorators --emitDecoratorMetadata --sourceMap --rootDir /Users/zkuti/projects-new/jheaps/target/ts --outDir /Users/zkuti/projects-new/jheaps/target/js .tsc-rootfile.ts org/jheaps/AddressableHeap.ts org/jheaps/tree/ReflectedFibonacciHeap.ts
....
org/jheaps/monotone/IntegerRadixAddressableHeap.ts org/jheaps/monotone/IntegerRadixHeap.ts org/jheaps/monotone/package-info.ts org/jheaps/monotone/DoubleRadixHeap.ts org/jheaps/package-info.ts org/jheaps/DoubleEndedHeap.ts org/jheaps/Constants.ts ../../.jsweet/candies/typings/META-INF/resources/typings/j4ts/0.5.0-SNAPSHOT/.tsc-rootfile.d.ts ../../.jsweet/candies/typings/META-INF/resources/typings/j4ts/0.5.0-SNAPSHOT/bundle.d.ts ../../.jsweet/candies/typings/src/typings/j4ts/0.3.1/.tsc-rootfile.d.ts ../../.jsweet/candies/typings/src/typings/j4ts/0.3.1/bundle.d.ts

It seems another (lower) version of j4ts has infiltrated.
The actual dependency section is:
dependencies {
   compile group: 'org.jsweet', name: 'jsweet-core', version:'6-SNAPSHOT'
   compile group: 'org.jsweet', name: 'jsweet-transpiler', version:'2.2.0-SNAPSHOT'
    compile ('org.jsweet:j4ts:0.5.0-SNAPSHOT')
}

Removing 0.5.0-SNAPSHOT all version gone away, so it seems it comes with 0.5.0 and indeed it can be found in the jar.
Can we have a clean 0.5.0 (or better 0.6.0) version?
Thanks.

[Ping]

Hello @tinca , I am sorry to answer this late but we have only a few time those days. We are working on a way of maintaining better the JSweet project since all maintainers only have a few time, but in the mean time, any help is welcome if you want to give a try, I will be glad to review any PR.

For your issue, in the mean time, please use the snapshot version.

The problem is with the current version available, e.g. 0.5.0.
Lacking skill and time to contribute, the only thing I could try was unpacking 0.5.0, throwing out references of 0.3.1 and repacking the stuff. This resolved the problem and took me to a lot of other errors, but that's a different story.


Iteration on 1-D arrays

Recently in array-api-strict, I accidentally disabled iteration on 1-D arrays. This broke a lot of code in SciPy. I've since reverted the change (array-api-strict disallows iteration on >1-D arrays but allows it for 1-D arrays).
There have been discussions in the past about now allowing iteration on arrays https://github.com/data-apis/array-api/issues/188. Disallowing it for higher dimensional arrays is probably fine, but it's unclear whether a library like array-api-strict should disallow it for 1-D arrays. The reason is that technically speaking, an array object that implements on the methods defined in the standard would allow iteration on 1-D arrays. This is because by default if __iter__ is not defined but __getitem__ is, Python defines iteration as a[0], a[1], etc.
Given how painful this can be for upstream code, I wonder if we should make it explicit in the standard that iteration is defined for 1-D arrays.
A possible counterargument is that the new unstack function can be used to iterate on an array of any dimension. unstack(x) is the same as iter(x) in the NumPy sense of iteration (it iterates the elements if x is 1-dimensional and along the first axis if it is n-dimensional).

FWIW, from an ideal perspecitive, I still think arr.iter(axis) or .iteraxis() would be the best API.  (Default could be 0 or None, or undefined here.)
Once you define __iter__, unstack actually really is always just the tuple(arr) one-liner.
Remmber, that the other argument was e.g. sympy, which doesn't use the list of list analogy and iterates all elements in its Matrix.  So the reason for that is, that conceptually there are other choices, and those choices may actually be better where it not for the fact that most users are indoctrinated to the list-of-list view of things.

Well my question here is specifically about the 1-D case. I don't think there is any ambiguity in that case, and based on the scipy changes, it seems to be much more common.

Are there examples besides SymPy of linear indexing in Python? I know Matlab does it, too, but I wonder why these matrix-centered implementations should govern what the array API does, given that NumPy, CuPy, PyTorch, JAX, tensorflow, and dask.array seem to agree.

I agree it would be useful to document whether 1-D iteration is supported, explicitly must raise, or is undefined. The most important data point is: do all libraries currently allow 1-D iteration? Would you be able to check @asmeurer?

for the fact that most users are indoctrinated to the list-of-list view of things.

For the record: I don't think this is true, and I don't know of data on how to prove/disprove it either way. There's a lot of users who will think about this as 2-D/3-D regular grids and can visualize it like that (also the case for me), which is much more intuitive for for example physicists than "list of lists".

which is much more intuitive for for example physicists

N-D is intuitive, but the question is what you think when you see for x in arr, and I think that is the list-of-list style of iteration.
And I have seen a lot of nested for loops over arrays even by users who work with NumPy quite a lot.
So yeah, it is intuitive for physicist.  But I still think when it comes down to it, even many of those who find N-D intuitive, will probably reach to the list-of-list analogy when they see a for loop.
(Rather than one where you might just iterate all elements because you see it as a collection of elements first, with an N-D structure second.)

PyTorch, jax.numpy, dask.array, and surprisingly even sparse all allow 1-D iteration. They all actually seem to just follow NumPy on n-D iteration (I didn't test CuPy but it's obviously the same as NumPy).

In case it matters, I tested TF last night and it also seems to follow NumPy on n-D iteration.
import tensorflow as tf
x = tf.constant([[1, 2, 3], [4, 5, 6]])
x[0]  # <tf.Tensor: shape=(3,), dtype=int32, numpy=array([1, 2, 3], dtype=int32)>
for row in x:
    print(row)
# tf.Tensor([1 2 3], shape=(3,), dtype=int32)
# tf.Tensor([4 5 6], shape=(3,), dtype=int32)

I didn't test MXNet since the project seems to have retired.

Fix at https://github.com/data-apis/array-api/pull/821


Retrieve remaining quota via API

Is it possible?

  from elevenlabs import User
  user = User.from_api()
  character_count = user.subscription.character_count
  character_limit = user.subscription.character_limit


Selecting alternate workspace renders Mutter icons and menus invisible

When logging in to novnc locally (or remotely via cloudsim), the user is initially presented with the option of selecting the Mutter Windows manager. Selecting Mutter brings up a graphical environment as expected:

However, clicking any of the virtual workspace icons in the lower menu causes all features to become invisible:

Some of the elements, such as the menu and calendar still work if you know where to click:

However, I don't see a way to restore the desktop without killing and restarting the Docker image (changing the icon set, theme or other appearance settings doesn't seem to help). An easy workaround for now is to either avoid clicking on these virtual spaces, or to select OpenBox instead of Mutter.

I'm hoping to get rid of the ambiguity. One or more of your selected dependencies is bringing in mutter. Openbox is the recommended one for this distro.

Fixed in 952ba04a924ead5e4e5a5f45f71c600126b70bfb


Kali rolling needed updated bootstrap

Thanks for submitting a patch!  I don't fully understand it though; MIRROR2 is supposed to be for security updates, but it's now a repo just for debootstrap?  Is it even a valid repo?
If you just need a newer version of debootstrap, that's configured in this file.


Can't resolve 'rxjs/rx'

Hi all,
after updating to angular-cli.beta.25 we get an error in ng2-responsive:
ERROR in ./~/ng2-responsive/config/config.js
Module not found: Error: Can't resolve 'rxjs/rx' in '.../node_modules/ng2-responsive/config'
 @ ./~/ng2-responsive/config/config.js 17:11-29
 @ ./~/ng2-responsive/config/index.js
 @ ./~/ng2-responsive/index.js
 @ ./src/app/app-device-detection.module.ts
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ multi main

is it something we can fix locally?

Bug reported. I fix it this afternoon. ; )
Thanks!

Fixed on 0.7.1.
Thanks!

That's great! Thank you


Allow for custom naming of Yamaha Receiver Zones

Description:
Support for renaming of Yamaha Receiver Zones.

Added the configuration option zone_names, which maps from the receivers name to a user supplied value, e.g. Zone_2 to Patio.
Added a test to cover the change, and previously untested options.

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#4320
Example entry for configuration.yaml (if applicable):
media_player:
  - platform: yamaha
    host: <IP_ADDRESS>
    source_ignore:
      - "AUX"
      - "HDMI6"
    source_names:
      HDMI1: "ChromeCast"
      AV4: "Vinyl"
    zone_ignore:
      - "Zone_2"
    # New configuration option
    zone_names:
      Main_Zone: "Family Room"

Hi @dfinlay,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

Anyway to kick off the CI build again?  It timed out, which I assume I may have caused by addressing the HoundCI issues before the build finished.


Building a basic python library

You can refer to this https://www.reddit.com/r/learnpython/comments/13ouob6/how_to_create_a_python_packagelibrary/?rdt=50001  for more clarity

What’s the library expected to do?

A library about what?

The library should be about quantitative finance methodology

Ok, I wanna work on this. Please assign this to me.

Hi, i would like to solve this issue, Could you please assign this issue to me?
Also, please specify which functions should be applied .
Thanks


G

Feature Request
Read the Notes and fill out the form.
Notes
Your issue will be closed if you violate any rule below.

You need to include a meaningful description of the feature (and e.g. a screenshot of the app)
Read the Docs.
You can delete this section after reading it.

Form
Put an [x] if you meet the condition, else leave [ ].

[ ] I've searched the Issues
[ ] I've read the basic concepts
[ ] I'm using the latest version

Description
A specific description of your feature, so it's understandable to anyone.
You can add pictures.
YOUR DESCRIPTION HERE

G

@Nerixyz  hi
how can i find a user info(first name last bio...) by id of user...
the username of user is unknow first


Add PROFILE.md

hey everyone. I'm making changes to this file. this defines the user better. I hope you like it.

i think this looking good +1


fix: support flutter 3

Closes #120

This is a semi-breaking change - as min. flutter version is upgraded to v3.0.0

Thanks !


Add data for response matching eval

Response matching eval needs Ground truth response also.
Changes to be done at: https://github.com/uptrain-ai/uptrain/blob/6bec0ea01ddb85d68e71d19d323cd19a34a64724/tests/test_builtins.py#L33

Solved by #565


Update jsoniter-scala-core, ... to 2.13.12

Updates

com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-core
com.github.plokhotnyuk.jsoniter-scala:jsoniter-scala-macros

from 2.13.10 to 2.13.12.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.github.plokhotnyuk.jsoniter-scala" } ]

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

Superseded by #408.


deis cli not publishing correctly

Even after PRs like #369 and #366, Travis is not uploading the deis v2 cli to Bintray. The illuminating output on the master CI build looks like this:
travis_fold:end:dpl.1
[Bintray Upload] Reading descriptor file: _scripts/ci/bintray-ci.json
[Bintray Upload] Creating version 'git-89c2f73'...
[Bintray Upload] Bintray response: 201 Created.
[Bintray Upload] Warning: Path: _dist/ does not exist.
[Bintray Upload] Publishing version 'git-89c2f73' of package 'deis'...
[Bintray Upload] Bintray response: 200 OK.

I rolled back https://github.com/deis/deis.io/pull/140 via https://github.com/deis/deis.io/pull/141 which provides potential users of deis v2 a working client.

Closed by #376


libheimdal: 7.7.0 -> 7.8.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/heimdal/heimdal/releases.
meta.description for libheimdal is: "An implementation of Kerberos 5 (and some more stuff)"
meta.homepage for libheimdal is: ""
meta.changelog for libheimdal is: ""
Updates performed

Version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 7.8.0 with grep in /nix/store/wgchrfjhrkbls7d4vp14624qa9969jpp-heimdal-7.8.0
found 7.8.0 in filename of file in /nix/store/wgchrfjhrkbls7d4vp14624qa9969jpp-heimdal-7.8.0

Rebuild report (if merged into master) (click to expand)

295 total rebuild path(s)

295 package rebuild(s)

First fifty rebuilds by attrpath
MIDIVisualizer
adapta-gtk-theme
almanah
appvm
arcanPackages.all-wrapped
arcanPackages.arcan
arcanPackages.arcan-wrapped
arcanPackages.cat9-wrapped
arcanPackages.durden-wrapped
arcanPackages.ffmpeg
arcanPackages.pipeworld-wrapped
arcanPackages.prio-wrapped
arcanPackages.xarcan
autofs5
bubblemail
calls
ceph
ceph-client
ceph-csi
ceph-dev
chatty
check_zfs
cinnamon.cinnamon-common
cinnamon.cinnamon-control-center
cinnamon.cinnamon-gsettings-overrides
cinnamon.cinnamon-screensaver
cinnamon.nemo
citrix_workspace
citrix_workspace_21_01_0
citrix_workspace_21_03_0
citrix_workspace_21_06_0
citrix_workspace_21_08_0
citrix_workspace_21_09_0
citrix_workspace_21_12_0
citrix_workspace_22_05_0
citrix_workspace_22_07_0
clementine
collectd
corrscope
diffoscope
docker-machine-kvm
docker-machine-kvm2
dropbox
dropbox-cli
easysnap
elementary-planner
empathy
endeavour
enum4linux
enum4linux-ng

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/wgchrfjhrkbls7d4vp14624qa9969jpp-heimdal-7.8.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A libheimdal https://github.com/r-ryantm/nixpkgs/archive/4fafe800bbd666681a913ffba4ac5b1bbb3a6555.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/wgchrfjhrkbls7d4vp14624qa9969jpp-heimdal-7.8.0
ls -la /nix/store/wgchrfjhrkbls7d4vp14624qa9969jpp-heimdal-7.8.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
nixpkgs-review took longer than 45m and timed out

Maintainer pings

I've added a skip for this.

#201705 should also fix this, no?


What do you do after installing?

I don't see any change to my file view, menubar, contextual dialog, or sidebar in ST3 on Yosemite. Could a brief summary or screenshot be added to the readme? Thank you.

use the following key combinations to see last commit message.
Mac: Default keybinding is Command+Shift+m
Linux/Windows: Default keybinding is Alt+Shift+m

Thank you.


Stash Serializer

Thanks @Nyan11, there is a problem with files encoding?
Is this Tonel v1?

Thanks @Nyan11, there is a problem with files encoding? Is this Tonel v1?

I have no idea ...

This is Tonel v3, please send a pr in Tonel v1.

See #17


Clarify BIG-IP objects created for ConfigMaps

// Title: Provide a short but descriptive summary of the issue.
// Do not include requests for development or report issues with code or products here.
This repository contains documentation only.
Bugs
Describe the bug in detail:

What doc are you reporting an issue with (provide URL)?
http://clouddocs.f5.com/containers/v2/kubernetes/kctlr-manage-bigip-objects.html

What information is inaccurate?

Is information missing?

Yes -- we need to clarify that the Controller enables L4 ingress to the cloud. The CC can help configure on the BIG-IP (from information from within the container environment) such things as:
-vips
-vs
-pools
-nodes
-pool members
-assign ssl/tcp profiles
-create ssl/tcp profiles
-health monitors (health monitor type and send string)
-traffic policies
-iApps (you may need to modify the config map)
ConfigMap "ingress":
-vip
-vs
--ssl profile
--health monitor
--tcp profile
-pool
-node
-pool members
Ingress resource:
-vs (wildcard or maybe vip)
--traffic policies
--ssl profile
--http profile
--tcp profile
-pool
-nodes
-pool members
Custom deployment (for something like LTM+ASM):

iApp --> this configures all the objects

Requests
Provide details regarding what you would like to see added to our documentation:
We should also consider touching on the difference between "ingress" and "Ingress".
Environment

[ ] Cloud Foundry
[x] Kubernetes
[ ] OpenShift
[ ] Mesos/Marathon)

Use Case
(i.e., what are you trying to do that you can't find documentation for?)

Provide an Upgrade section (already in progress, discussed offline).
Be sure to mention upgrades may cause service disruption. In cases where features are additive we do our best to prevent any disruption but some changes force destructive changes on the BIG-IP. When possible upgrades should be done in a rolling fashion on BIG-IP active/stand-by device groups.


setup react in ui folder

Setup React for the front end.
If you want to test just download, navigate to ui folder in commandline/POWERshell, then run
"npm init"
wait for installation, then
"npm run start"
Then localhost:8080 I believe.

Looking great! Got that green background!
Just to confirm I ran "npm install" not "npm init" to get the project working.

Also, would you be able to add a line in the .gitignore for the node modules folder? After that I'll merge it in.

Oh yeah, that thing.
I just did that to confirm css was working.
And I put a line down at the end of the current gitignore file for node
modules.
On Sun, Sep 1, 2019, 5:44 AM MorganW09<EMAIL_ADDRESS>wrote:

Also, would you be able to add a line in the .gitignore for the node
modules folder? After that I'll merge it in.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MorganW09/TinRoll/pull/24?email_source=notifications&email_token=AENGTMHJEUYIBTJ6UOJGVRDQHOMHDA5CNFSM4ISVQ4SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5T7QGI#issuecomment-526907417,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AENGTMBDDALRGDSMIBWB5GTQHOMHDANCNFSM4ISVQ4SA
.

Nevermind, git was tracking it. Now it is in there.
On Sun, Sep 1, 2019 at 7:33 AM Stefan Kenyon<EMAIL_ADDRESS>wrote:

Oh yeah, that thing.
I just did that to confirm css was working.
And I put a line down at the end of the current gitignore file for node
modules.
On Sun, Sep 1, 2019, 5:44 AM MorganW09<EMAIL_ADDRESS>wrote:

Also, would you be able to add a line in the .gitignore for the node
modules folder? After that I'll merge it in.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MorganW09/TinRoll/pull/24?email_source=notifications&email_token=AENGTMHJEUYIBTJ6UOJGVRDQHOMHDA5CNFSM4ISVQ4SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5T7QGI#issuecomment-526907417,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AENGTMBDDALRGDSMIBWB5GTQHOMHDANCNFSM4ISVQ4SA
.

Looks good, I've merged this in now. I'm going to create a dev branch today, and in the future lets target PRs to hit that branch instead of the master branch.
Thanks for getting the UI working! Looking forward to seeing where this goes.

So dev instead of me naming specific branches like 'setting up react'?
Also, what exactly are you wanting to get started first?
Are you trying to make a little question/answer quiz?
On Sun, Sep 1, 2019 at 1:22 PM MorganW09<EMAIL_ADDRESS>wrote:

Looks good, I've merged this in now. I'm going to create a dev branch
today, and in the future lets target PRs to hit that branch instead of the
master branch.
Thanks for getting the UI working! Looking forward to seeing where this
goes.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MorganW09/TinRoll/pull/24?email_source=notifications&email_token=AENGTMCVLGKDLCI3CFIGWJTQHQB5PA5CNFSM4ISVQ4SKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5UH6GA#issuecomment-526941976,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AENGTMHDYVXXMR4TAMSAL53QHQB5PANCNFSM4ISVQ4SA
.

So this PR was merged into the master branch, which is the only branch at the moment on this project.
But a better branching strategy would be to have a master branch and then a dev branch. Things that are a work in progress or haven't been tested well get merged into the dev branch. Then at some point we merge dev into master and have a "release".
That keeps the master branch cleaner and allows some separation between branches. Which on a small project isn't that important, but worth doing.
So I've created new api routes to both create and read questions. I thought that would probably be the best place to get started. I might try to get started on using github's project features to we can kind of track work.


Getting the GitHub ribbon on the ScorePage to respect the config.

Added gitHubRibbon property to the ScoreBoard component, read it from config and respect its value when showing the GitHub button on the ScoreBoard.
#1070

Looks like the unit tests are failing due to some assumptions on what the configuration object looks like in the default state. I'll look at this and refactor as required.


ECS: Markdown PHP Code Fixer implicitly requires closing tag

Hey, TomasVotruba and samsonasik
Thanks for the work you've done on this project, Absolutely love it!

While checking the README.md file on ghostwriter/coding-standard I was getting this error.
Command: vendor/bin/ecs check --clear-cache
[ERROR] System error: "syntax error, unexpected token "`""Run ECS with "--debug" option and post the report here: https://github.com/symplify/symplify/issues/new in
         /workspace/ghostwriter/coding-standard/README.md:34

Relevant  code from the README.md :
> ``` php
> <?php
>
> declare(strict_types=1);
>
> use Symplify\EasyCodingStandard\Config\ECSConfig;
>
> return static function (ECSConfig $ecsConfig): void {
>     $ecsConfig->import(__DIR__ . '/vendor/ghostwriter/coding-standard/ecs.php');
>     $ecsConfig->paths([__DIR__ . '/rector.php', __DIR__ . '/ecs.php', __DIR__ . '/src', __DIR__ . '/tests']);
>     $ecsConfig->skip([__DIR__ . '/vendor/*']);
> };
> ```

I was only able to resolve this issue by adding a closing PHP tag ?>.
 > ``` php
 > <?php
 >
 > declare(strict_types=1);
 >
 > use Symplify\EasyCodingStandard\Config\ECSConfig;
 >
 > return static function (ECSConfig $ecsConfig): void {
 >     $ecsConfig->import(__DIR__ . '/vendor/ghostwriter/coding-standard/ecs.php');
 >     $ecsConfig->paths([__DIR__ . '/rector.php', __DIR__ . '/ecs.php', __DIR__ . '/src', __DIR__ . '/tests']);
 >     $ecsConfig->skip([__DIR__ . '/vendor/*']);
 > };
+ > ?>
 > ```

I expected README to not be forced to include a closing tag.
I expected a better error message.

Hi @ghostwriter ,
thanks for reporting. This command was causing more issues and tried to solve a problem that was in php-parser printer, so I've decided to remove it.
Instead of trying to make the tool happy like in your case, it's better to handle the snippets manually or in the outputter.


Adding layout to layout (layception)

I want to some panels without headers inside one of my panels from my current layout. Is this achievable?
Just to summarize, I have layoutMain now and I want to add a headerless layout2 inside layoutMain->Panel1.

You could initialise the second layout and set the container item to that of a panel from your 1st layout.
myLayout.container = "#containerId"
There might be a way to do it with one instance using nested stacks.
Then again, there might be an even easier method

Ty for the answer. I'm trying to do something like you said but with no success.
Can you provide a simple example? I would be really grateful.

Ty for the answer. I'm trying to do something like you said but with no success.
Can you provide a simple example? I would be really grateful.
The ideal would be something like the nested stacks example. But I don't know how to disable headers in one of the stacks, since they both use the same config.

This was my idea - http://codepen.io/ButchMonkey/pen/PWeRNJ
However it looks like you cant have multiple instances of the layout inside itself.
The easiest way to hide the headers is to use css. In the config, give your nested panels an id and set their header to be hidden.

That's a pretty good ideia!
However, if I set the id in the config, the panel element doesn't hold that id in the HTML. If I  do document.getElementsbyId("myCreatedID") it shows nothing.

Ah yes, you could try
myLayout.root.getItemsById("myCreatedID")[0].parent.header.element.hide()

Yep, this does what I need. Thank you very much mate

I keep getting the following error when trying to nest golden layouts in angular 6. My code follows.
Any suggestions or other examples of nesting within angular components? Thanks very much.
Uncaught
push../node_modules/golden-layout/dist/goldenlayout.js.lm.errors.ConfigurationError {name: "Configuration Error", message: "Missing setting 'content' on top level of configuration", node: {…}}
Code:
`import {
Component, ComponentFactoryResolver, ViewChild, ViewContainerRef, ElementRef
} from '@angular/core';
import * as GoldenLayout from 'golden-layout';
@Component({
selector: 'golden-layout',
templateUrl: './gl.component.html',
styleUrls: ['./gl.component.css']
})
export class GLComponent {
myLayout: GoldenLayout;
innerLayout: GoldenLayout;
title = 'popout-ex';
config:any;
configInner:any;
myCont:any;
htmlElement: any;
@ViewChild('nested') el:ElementRef;

constructor(private viewContainer: ViewContainerRef,
  private componentFactoryResolver: ComponentFactoryResolver) {

  this.config = {
    content: [{
      type: 'row',
      content: [
        {
          type:'component',
          id:101,
          title: 'nested',
          componentName: 'nested',
        }
      ]
    }]
  };

  this.configInner = {
    content: [{
      type: 'row',
      content: [
        {
         type:'component',
          id:201,
          componentName: 'innerExample',
          componentState: { text: 'Nested Component 1' }
        }          ]
    }]
  };

}
ngOnInit() {

    this.myLayout = new GoldenLayout( this.config );

    this.myLayout.registerComponent( 'nested', function( container, state ){
      this.htmlElement = container.getElement();
      this.htmlElement.id = container._config.id;
      container.getElement().html( '

');
    });

    this.myLayout.init();

    this.myLayout.on('componentCreated', function (component) {
      var _component = component;

      // need to insert the inner layout after the main layout is opened.
      component.container.on('open', function (ev) {

        if(_component.config.id == "101"){

          var elem = document.getElementById("nested");
          var attrs = Array.prototype.slice.call(elem.attributes);

          this.innerLayout = new GoldenLayout( this.configInner, document.getElementById("nested"));

            console.log("registering innerExample component " + _component.config.id + "  " + document.getElementById("nested"));
            this.innerLayout.registerComponent( 'innerExample', function( container, state ){
                container.getElement().html( '
' + state.text + '
');
            });

            this.innerLayout.init();
        }

      });

    });

}

}`

Please open a new issue and provide a running example (you could try using https://codesandbox.io).


Could not start plugin

logger=plugin.loader t=2024-04-15T18:49:38.154681489Z level=error msg="Could not start plugin" pluginId=victorialogs-datasource err="Unrecognized remote plugin message:
This usually means
  the plugin was not compiled for this architecture,
  the plugin is missing dynamic-link libraries necessary to run,
  the plugin is not executable by this process due to file permissions, or
  the plugin failed to negotiate the initial go-plugin protocol handshake

Additional notes about plugin:
  Path: /var/lib/grafana/plugins/victorialogs-datasource/victorialogs_backend_plugin_linux_amd64
  Mode: -rwxr-xr-x
  Owner: 1000 [?] (current: 1000 [?])
  Group: 2000 [?] (current: 2000 [?])
  ELF architecture: EM_X86_64 (current architecture: amd64)
"

pod security context

}]
securityContext: {
	runAsUser:    1000
	runAsGroup:   3000
	runAsNonRoot: true
	fsGroup:      2000
	seccompProfile: type: v1.#SeccompProfileTypeRuntimeDefault
}

container security context
securityContext: {
	capabilities: drop: ["ALL"]
	readOnlyRootFilesystem:   true
	allowPrivilegeEscalation: false
}

I tried changing runAsGroup to 2000, but that didn't help.

Hi @uhthomas ! Can you share how you run it with the whole config?

Hi @dmitryk-dk, thank you for following up. This was unrelated to the plugin and because the Grafana container is set to use a read only root filesystem. As such, plugins fail to initialize correctly.
https://github.com/grafana/grafana/issues/20950
https://github.com/grafana/grafana-operator/issues/1034
Thanks for your help!


Free API alternative

Feature request
The ability to use https://github.com/ayaka14732/ChatGPTAPIFree to allow for free use of the tool.
Why?
I don't have a paid API key.
Alternatives
No response
Additional context
No response

Interesting request...
I don't think it will be a good idea to point to an unofficial reverse-proxy server like (e.g. https://github.com/ayaka14732/ChatGPTAPIFree - https://freechatgpt.chat) because it can be unstable or malicious, and this tool can send sensitive/proprietary data.
There may be a way to interact with the API without a paid key using https://github.com/transitive-bullshit/chatgpt-api, but looks like it relies on an unofficial server too:
https://github.com/transitive-bullshit/chatgpt-api/blob/acfaa50875f2aca9a7fa507883b60dfdfc2faaef/src/chatgpt-unofficial-proxy-api.ts#L39

Okay, that makes sense, I'm currently trying to set it up for myself with the ChatGPT AI free proxy but it makes sense not to have that be the default.

any updates? ticket got closed without resolution.

I just ended up paying for it. You might be able to self-host a LLM and proxy the requests to OpenAI back to your own machine.


[BUG] ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

Description
When running the Quick Start code I am finding this error
Expected Behavior
Analyze the dataset and provide a report
Actual Behavior
ValueError: The truth value of a DataFrame is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

please assign me the issue

I would like to contribute to solve the issue as well @Aanshika30

okayy go ahead @kooooshhhh
add as try-catch or exception handling, or any other method, making sure main functionality wont affect:


Windows ATSC detection and signal stats/modulation fixes

There are two Windows-specific fixes here:

ATSC Detection

When checking tuning spaces there was no code to deal with ATSC; it was only checking to see if a space was DVB-S/C/T compatible. So I've added/restructured the code to deal with this. In addition, to get it working it also needed the equivalent CreateLocatorATSC function adding.

Signal stats/modulation

I couldn't understand why other applications were able to show signal strength and quality but not tsduck. It turned out the problem was rather simple; the IID_IBDA_Topology GUID definition was apparently incorrect, so the code could never obtain all the nodes and thus couldn't search for the signal stats/modulation info ones.

Thanks a lot, I will look into it asap.

There are a couple of knock-on effects that you might want to consider.

signalLocked now also works, so you might want to re-enable the commented out code in tsscan that assumes true for Windows.

I think the actual range/meaning of signalStrength is not clearly defined and may vary from one hardware device to another. For me I'm seeing raw values of between 30-40. Using the calculation in tsTuner.cpp for Windows, this always converts to 100%. However, my signal quality is between about 55 and 70, which is border line for receiving reception. So I reckon for my card, the raw signal strength values might already be percentages. This will have implications for your tsscan code where it checks for minimum threshold values etc. Maybe you should just disable the use of strength when scanning on Windows, and just use signal quality?


Metrics Computing: DataFrame API

Design an API that help us support multiple DataFrame(polars,spark, pandas,etc) and convert them to the choosen processing engine native DataFrame API.

The initial objective was to support multiple Dataframe APIs and a single backend for the execution of the query but from a UX point of view it doesn't make sense because if a user is using a different execution engine to process their data we would be forcing that user to use two backends just to use our library. Additionally, to support conversion between i.e polars and DataFusion we would need that both implement substrait format which is not the case and given recent conversation(see issue 7404) in the polars project it seems not be planned for the near future, nor Apache Spark(stuck pr) or Apache Flink support this format yet.
One alternative idea is to support multiple backends along with the frontend, meaning that if the user uses polars we would express and compute the metrics in polars and the like for each query engine or tool. This would require more work but will provide a better UX to the end user and reduce the complexity of implementation.

This is an image of how it would look like,


Added a few translations. Hope this helps.

Thanks @raffa005! 👍
Welcome to the world of open-source. ❤


fixed escape string error and add test case

this is fix for #285

Codecov Report
Base: 100.00% // Head: 97.50% // Decreases project coverage by -2.49% :warning:

Coverage data is based on head (6f82d22) compared to base (8c27634).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff             @@
##            master     #290      +/-   ##
===========================================
- Coverage   100.00%   97.50%   -2.50%
===========================================
  Files           21       21
  Lines         2172     2168       -4
===========================================
- Hits          2172     2114      -58
- Misses           0       54      +54

Impacted Files
Coverage Δ

src/viztracer/patch.py
80.00% <0.00%> (-20.00%)
:arrow_down:

src/viztracer/util.py
94.28% <0.00%> (-5.72%)
:arrow_down:

src/viztracer/viztracer.py
95.18% <0.00%> (-4.82%)
:arrow_down:

src/viztracer/main.py
96.00% <0.00%> (-4.00%)
:arrow_down:

src/viztracer/code_monkey.py
97.94% <0.00%> (-2.06%)
:arrow_down:

src/viztracer/viewer.py
99.68% <0.00%> (-0.32%)
:arrow_down:

src/viztracer/cellmagic.py
100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

The overall code is good. I think it might be better to have a similar name to fprint* (like fprintjson) and put fptr as the first argument to make it a bit more unified. Maybe something like fprint_escape(FILE* fptr, const char* s).
The test is comprehensive and that's good. However, we normally try to test a feature as isolated as possible. Make the test simple and straightforward, so other people can understand the test and what it is trying to validation. Also it would be more robust, meaning it will less likely to be affected by other features.
In this case, multithreading is a good case, as thread names could potentially have any characters in it. The run function does not have to be this complicated with sleep, as we are only interested in the thread names. Maybe having 4 threads is not necessary either.
Magic comment is a cool and more fragile feature. I think we could simply do
tracer = get_tracer()
tracer.log_instant()

to avoid noises from potential magic comment issues. It's also more friendly to people who are not familiar with the magic comments.
Also, we probably do not need a separate file just for this test. I'd normally put this kind of test into test_regression.py, where all the regression tests are kept. You can find another file that you think suitable to put it in, but a new file is a bit too much.
You don't need to check stdout as the execution would fail if the fix was not in. expected_output_file is probably default to result.json? It's not a big deal to explicitly put it there (some of my tests do), but it's also okay to omit that.

So, a very important step to write regression test is to - make sure it FAILS without your changes. Normally we write a regression test first, make sure it fails, then fix the bug and see if the tests passes.
If you have done that then you probably will find that your test runs fine without your changes. The strings you are testing are \\\"(as an example), which is '\'and '"'. So this works fine with the current code as it would be a valid json.
Instead, we should test against \", which would be a single '"' without the fix and break the code.
I checked the code and as the exit_rountine runs in finalizers, the exceptions are caught. It's okay to use stdout to determine the result of the test.

I test it on the master branch, and it failed.

I write the srting like \\\" because there's string escape while writing the test code into cmdline_test.py file. And in cmdline_test.py, it would be \".
Here's cmdline_test.py that the code generated:
import threading
from viztracer import get_tracer, VizCounter, VizObject

def fib(n):
    if n < 2:
        return 1
    return fib(n - 1) + fib(n - 2)

class MyThread(threading.Thread):
    def run(self):
        fib(7)

tracer = get_tracer()

# test object event name escape with and without args
obj = VizObject(tracer, "test \\ \" \b \f \n \r \t")
obj.test = "test \\ \" \b \f \n \r \t"

# test counter event name escape with and without args
counter = VizCounter(tracer, "test \\ \" \b \f \n \r \t")
counter.test = 10

# test instant event name escape with and without args
tracer.log_instant("test \\ \" \b \f \n \r \t")
tracer.log_instant("test \\ \" \b \f \n \r \t", "test \\ \" \b \f \n \r \t")

# test thread name escape
test_thread = MyThread(name = "test \\ \" \b \f \n \r \t")
test_thread.start()
test_thread.join()

Ah, you are right. I directly copied the code into a new py file and tested. Yes it should be double escaped as it's in a big string.


OSPool Ganglia: lock the container to el8 to get a comptabile ganglia/php combo

Does EL9 work? Because if you use BASE_OS like so https://github.com/opensciencegrid/images/blob/main/opensciencegrid/cvmfs-nodeplugin/Dockerfile, you'll get OSG 23 + EL9 images and OSG 3.6 + EL7 images

No, el9 is the broken one. It ships with php8 which does not work with Ganglia.


Support for DepthToSpace operator

This change implements support for DepthToSpace operator. Only CRD mode is supported with this change.

Hello @sushanthr.
Thanks for your contribution! Could you fix linters errors?
Also, it would be nice to add more tests.

https://github.com/ENOT-AutoDL/onnx2torch/pull/169


🌐 Add Russian translation for docs/ru/docs/tutorial/dependencies/index.md

📝 Docs preview for commit 2863db6a98ac4f30fd3b256dd4f1124142f8e471 at: https://781805d4.fastapitiangolo.pages.dev

@Kludex Could you add lables for this PR, please

📝 Docs preview for commit ff27e72c98bfdf763ebbcb4c1a43c8c90638071f at: https://55204568.fastapitiangolo.pages.dev

As this PR had requested changes to be applied but has been inactive for a while, it's now going to be closed. But if there's anyone interested, feel free to create a new PR.


Upgrade

dependencies updated
1 new test case
should not break on upgrade (nonetheless, I do a major release)

A new inspection was created.

The inspection completed: No new issues


improve support to RBENV_ROOT for flexibility

This doesn't work when rbenv is installed somewhere other than $RBENV_ROOT. See #13

I'm not sure what problem this is solving. Can you describe the issue this is supposed to resolve?


environmentcredential is not supported in the browser while reading key-vault secret

I am trying to access key-vault secrets from Angular 9 app. I created Azure app service with , identity system assigned and created the managed identity. I am getting this error while accessing the secrets "environmentcredential is not supported in the browser". Please help.

@duttasantanu Hello, hello!
I'm sorry to say that the Key Vault service doesn't currently support browser authentication.
Besides that, the EnvironmentCredential authentication method is reserved to environments that support environment variables, like operative systems (Linux, OSX, Windows).
Please let me know if I can help with anything else! If not, feel free to close this issue.

Is any one of the credentials in DefaultAzureCredential supported in browser? If yes and I want to use DAC in browser, maybe it's better to have no-op for unsupported ones.

@jeremymeng
DefaultAzureCredential currently has the following sequence of credentials: EnvironmentCredential, ManagedIdentityCredential, AzureCliCredential and VisualStudioCodeCredential.
https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/src/credentials/defaultAzureCredential.ts#L43-L52
None of these work in the browser.

EnvironmentCredential
ManagedIdentityCredential
AzureCliCredential
VisualStudioCodeCredential

Also, the Key Vault service doesn't support browser authentication yet.
All of these credentials have proper errors when they fail, just like the one the user is describing: "environmentcredential is not supported in the browser".
When they run inside of the DefaultAzureCredential, these errors only bubble up if all of the credentials fail. They do appear in the logs depending on the verbosity of the logs. My main point being that if one of the credentials in the chain inside of DefaultAzureCredential pass, then no errors are reported, it just works. Granted, this is not the case for the browser, since none of these credentials are supported in the browser yet.

@sadasant @jeremymeng Thank you for explaining

So, using an angular application, I cannot access key vault? Are the samples mentioned in https://www.npmjs.com/package/@azure/identity work then?

Hi,
I was following along here:
https://docs.microsoft.com/en-us/javascript/api/overview/azure/keyvault-secrets-readme?view=azure-node-latest
This uses DefaultAzureCredential as well - if it isnt supported, why does this not say it right at the top in bright red text?
Further to @faraazhabeeb123 asking the question - I have a React TS app and I need to pull values from keyvault. Can someone on the team please provide some pointers and or advice on how to achieve this please?
Many thanks

Hello hello! I’ll be trying to help you both.
@faraazhabeeb123

So, using an angular application, I cannot access key vault?

That is correct. Key Vault is not available through browsers, but there are ways to retrieve Key Vault values and use them from browsers: you would need to retrieve them from the backend and then send them back to the web client.

Are the samples mentioned in https://www.npmjs.com/package/@azure/identity working then?

Those samples were using Key Vault some time ago by mistake; they’re now using Service Bus, which does have browser support.
@drfbwilliams

This uses DefaultAzureCredential as well - if it isn't supported, why does this not say it right at the top in bright red text?

I’ll make sure to send this feedback to the docs team. Thank you for your suggestion!

Further to @faraazhabeeb123 asking the question - I have a React TS app, and I need to pull values from key vault. Can someone on the team please provide some pointers and or advice on how to achieve this please?

Servers and desktop applications will be able to authenticate against Azure Key Vaults, so it is possible to have a server that would retrieve these values and send them to a web application. A NodeJS server with TypeScript retrieving those values could also expose an API used by a web page or single page application, and through that API, the server could send those values to the browser.
The server would:

Expose a public API.
Be responsible of retrieving or managing keys, secrets and certificates from Key Vault.

The web page would:

Access the server through the server’s public API.

Through the server’s API, the web page would be able to create, read, update or delete keys, secrets and/or certificates.
Does this help? Let me know if I can help with anything else.

Hi @sadasant - thanks for the response.
I have no issues with a server side API working some magic with KV - but to be honest, it defeats a lot of purpose if we are moving values back over the wire for a browser - pretty challenging to secure that data and in fact, a large number of big web applications are exposing api keys and passwords that way as well.
Absolutely we want to make sure the CD process is clean in terms of KV based environment variables, but we lose a lot of off server processing benefits if we have to move everything back to an API just to keep those credentials safe.
About the cleanest way I have found is to ask an API to get back a token for me from said services, and then transport that - even then, still allows for leakage.
I hope someone is working on a solution to this?
Thanks again.

 Please take a look. We would love to get your feedback on the approaches taken there.

@drfbwilliams Thank you for your answer. I would be particularly interesting on what you’re trying to achieve. Keep in mind the following: Even if the Key Vault we know was able to be used in browsers, users of the browser application would be able to inspect network calls and retrieve the values going in and out of their browsers. Do you mind describing what problem you’re trying to solve? We may have some suggestions!

@ramya-rao-a thanks for that response! I also went down a route to look at Azure API implementation (from React as @maorleger describes) it was a while ago, but I didn't quite get a result with a block along the path.
@sadasant - thanks for the response as well. I guess in most part, I have a very large solution in terms of backend infrastructure which is all supporting a React frontend sitting inside asp.net core 3.1 deployment - I have several high value service providers that I am calling and each requiring auth for tokens.
Rather than pulling directly from a server API, I am generally figuring out what is needed upfront.
Inside my startup in asp.net, I am calling KV for auth values and building Token objects to inject into my controllerss - then the razor page is rendered, pushing the Token values into hidden fields for fetching inside of React. That works to a degree and makes dev test pretty simple as well.
Certainly willing to guinea pig stuff it helps.
Cheers

@drfbwilliams, thank you! Give us some time to figure out an answer for you. Going forward, @maorleger will be the one to follow up.

@drfbwilliams what you're saying makes sense. Looking at the thread here I noticed that there are two issues we're conflating:

EnvironmentCredential not supported in the browser - I believe that was answered.
Key Vault client libraries (which take any of our credentials into the constructor, so not directly related to EnvironmentCredential) cannot be used in the browser.

The reason for (2) is because the Key Vault service does not support CORS natively. So regardless of credentials your requests to Key Vault would still unfortunately fail due to CORS.

Looking to read up on CORS? - see this MDN article
Interested in using Key Vault in the browser? Upvoting this feedback item would be great!

Without CORS support at the service level, you will unfortunately not be able to interact with Key Vault directly from the browser (neither via the client libraries or REST api) assuming the default browser settings (i.e. you have not explicitly disabled browser security). So what you want is something that sits in the middle for your React app to talk to that will support and have CORS correctly configured.
As mentioned above I have written a sample demonstrating pulling Key Vault secrets using Azure API management and you can review some of the interesting areas here:

README
ARM Template which deploys a Key Vault, an Azure API Management, a secret manager API endpoint, and the access policies needed to provide the right access between the Azure API Management and the Key Vault service.

You mentioned that you tried the API Management route but hit a few blockers - I am curious about those but also wonder if the ARM template, once deployed, can be used as a starting point to help you get unblocked.
Finally, I feel obligated to mention that anything going over the network to a browser or embedded into the page directly is of course a security risk. The browser is an insecure environment after all. There's always a risk that someone can take the Key Vault secret and reverse engineer the token values. Of course you probably account for that and have other security measures in place but I just wanted to mention this again 👍
Hope this helps!

@maorleger much appreciated - upvoted the item.

The browser is an insecure environment after all. There's always a risk that someone can take the Key Vault secret and reverse engineer the token values

From your last paragraph, absolutely. I remember getting blocked, and then having this moment where I said something very similar to myself, and so I stopped progressing as an inevitable moot result.
I also thought about the problem we are trying to solve here - getting back some auth values to then make another call to a service to get back a token, so we can then make another call.....
I'm almost at the mindset where this fits into a "just because we could, doesn't mean we should..." sort of place.
When considering the integrity of the KV path and the user context to access - creating or maintaining a hooded service makes the most sense.
I have been thinking of late about attempting to deploy a microservice and perhaps develop a sort of virtual 2FA with the system using SignalR back to client.
I don't know - perhaps I'm over thinking it - and its at this point in time when I stop, draw it out and consider if it is also over engineering to get a solution.
Thanks for all the information and pointers - I'm interested to see what the solution becomes.


AGP file

Hi,
I was wondering if RaGOO could generate an AGP file describing the location of each sequence after anchoring. I have tried each option but it doesn't seem that an AGP file can be generated. Could you please tell me if this is possible?

Hi there,
RaGOO comes with a script called make_agp.py just for this purpose. Hopefully, it is clear how to use it from the help message, but if it doesn't seem to be working, please let me know.
Thanks

hi there, i've tried to use make_agp.py but from the help message it's not clear to me how to use it. gap_size argument is probably 100 if i ran ragoo with default arguments before, right? but which files are the both files mentioned in the help message? first is the before-ragoo.fasta? second the after-ragoo.fasta? Sorry i do not have any background genome-sequencing, just running this programm as cumpouter scientist for a biologist friend ;)

Hi there,
RaGOO is no longer supported. You can use RagTag instead, which automatically outputs AGP files.
Thanks


[iOS] headers bug

Hello,
I am using the plugin to upload an image and it works perfectly in android, but in iOS i always get status code 422 and "Unprocessable entity".
Any idea?
var token = await SecureStorage.GetAsync(SecureStorageProperties.AuthToken);
                var uploadUrl = $"{ApiUrls.VLBaseUrl}{ApiUrls.VL.Images.Upload}";
                var uploadResponse = await CrossFileUploader.Current.UploadFileAsync(
                    uploadUrl,
                    new FilePathItem("image", filePath),
                    new Dictionary<string, string>()
                    {
                        {"Accept" , $"application/vnd.api+json, application/vnd.spinlister; v=7"},
                        {"Device-Kind" , Device.RuntimePlatform.ToLower()},
                        {"Auth-Token", token},
                    },
                    new Dictionary<string, string>()
                    {
                        { "holder-id", holderId.ToString() },
                        { "type", type },
                        { "extension", extension },
                    }
                );

I am using the latest version v1.4.0

After further investigation, it appears that the headers were not submitted correctly by the UploadFileAsync method.
Is there a bug in this on iOS?

@rdelrosario can you verify this?
the headers don't apply in iOS.

One more note, as i narrowed it down.
The header that is not sent correctly is "Accept".
I am sending
"Accept": "application/vnd.api+json, application/vnd.spinlister; v=7"
but what is received on the server is:
"Accept": "*/*"
Please help, anyone?


chore: move pytest config

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@c01c6c5). Click here to learn what that means.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@           Coverage Diff           @@
##             main     #110   +/-   ##
=======================================
  Coverage        ?   97.44%
=======================================
  Files           ?        5
  Lines           ?      235
  Branches        ?        0
=======================================
  Hits            ?      229
  Misses          ?        6
  Partials        ?        0

Impacted Files
Coverage Δ

src/images_upload_cli/util.py
100.00% <ø> (ø)


Run linux app after builded

Sorry everyone for my stupidity,
But what do I do after building the linux64 app?
I built the app for linux 64  with normal nw version 0.19.2.
Apparently everything is ok, I don't know how to run the app though.
You can see the generated files bellow.

Thanks in advance for the help.

Just use your terminal and go the current directory, run chmod +x ./panel_p2 and after that, ./panel_p2 which will run the application.

I have a question about Linux distribution, how can I package to delivery for my clients?
I need to pack of .deb?

This looks resolved. Closing.
@nathpaiva you could ship a ZIP, .deb like you said (although nw-builder doesn't handle that for you), publish your app to Linux package managers, etc.


Anyone who can help me fiix this Error drop your ICQ i will add you ready to pay

[17:02:28] [inf] enabled phishlet 'outlook'
[17:02:28] [inf] setting up certificates for phishlet 'outlook'...
[17:02:28] [war] failed to load certificate files for phishlet 'outlook', domain 'outlook.1948626.network': open /root/.evilginx/crt/outlook.1948626.network/outlook.crt: no such file or directory
[17:02:28] [inf] requesting SSL/TLS certificates from LetsEncrypt...
[17:02:28] [!!!] acme: Error 403 - urn:acme:error:unauthorized - Account creation on ACMEv1 is disabled. Please upgrade your ACME client to a version that supports ACMEv2 / RFC 8555. See https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430 for details.
[17:02:28] [inf] disabled phishlet 'outlook'
anyone who can help me config this am ready to pay

https://icq.im/673020237


Replies from matrix come through to discord from the bot user instead of the webhook-faked name/avatar

Describe the bug
Reply to a message on matrix, and on discord, the reply comes from the bot user, with the actual sender of the reply in the message text, followed by the message underneath that.
It looks like this:
<Matrix Bot>
sender
Message

Instead of like this:
<Sender>
Message

To Reproduce
Reply to a message on matrix, observe the bridged message in discord not appearing to come from the user that sent it, and instead coming from the bot user.
Expected behavior
I would expect replies to show as coming from the user that sent them, the same way that normal messages do.
Environment (please complete the following information):

OS: Debian 11
Matterbridge version: 1.24.0 65c7ac80

Additional context
[discord.mydiscord]
Token="<REDACTED>"
Server="337985133569114113"
RemoteNickFormat="{NICK}"
AutoWebhooks=true
PreserveThreading=true

[matrix.mymatrix]
Server="https://pintobyte.com:8448"
Login="@discord:pintobyte.com"
Password="<REDACTED>"

RemoteNickFormat="<{NICK}> "
NoHomeServerSuffix=true

[[gateway]]
name="gateway1"
enable=true

[[gateway.inout]]
account="discord.mydiscord"
channel="ID:442816774082134026"

[[gateway.inout]]
account="matrix.mymatrix"
channel="#9fans:pintobyte.com"

[[gateway]]
name="gateway2"
enable=true

[[gateway.inout]]
account="discord.mydiscord"
channel="ID:442816800120504331"

[[gateway.inout]]
account="matrix.mymatrix"
channel="#9fans9:pintobyte.com"

[[gateway]]
name="gateway3"
enable=true

[[gateway.inout]]
account="discord.mydiscord"
channel="ID:624290057389473832"

[[gateway.inout]]
account="matrix.mymatrix"
channel="#9fansinferno:pintobyte.com"

See https://github.com/42wim/matterbridge/issues/1558#issuecomment-1030713994


Memory leak during training with rllib probably because "Your env doesn't have a .spec.max_episode_steps attribute."

Hello, Thank you for the great simulation environment.
Recently, I've been trying to use rllib to train an agent with image obs. However, RAM usage consistently increases over training, eventually consuming all available memory (756GB) around the 20th epoch. And I received the warning below:
WARNING env.py:162 -- Your env doesn't have a .spec.max_episode_steps attribute. Your horizon will default to infinity, and your environment will not be reset.

So I guess rllib failed to close the env after collecting trajectories. Though I have already set horizon=800 in both metadrive env config and RLlib PPO config, the warning persists, along with the memory issue. I wonder if the memory issue is truly caused by the env not being closed. If so, how can i properly close the env during training? If not, is there other methods I can try to resolve this memory issue.
Here is most of my code including env_config and train_confing:
frame_size = (320, 240)
env_config=dict(
                map_config={BaseMap.GENERATE_TYPE: MapGenerateMethod.BIG_BLOCK_NUM,
                    BaseMap.GENERATE_CONFIG: 3},
                image_observation=True,
                use_render=False,
                image_on_cuda=False,
                sensors={
                    "rgb_camera": (RGBCamera, *frame_size), #w,h,c
                },
                vehicle_config={
                    "image_source": "rgb_camera",
                },
                stack_size = 1,
                discrete_action=False,
                horizon=800,
                random_spawn_lane_index=False,
                num_scenarios=1000,
                start_seed=0,
                traffic_density=0.2,
                accident_prob=0.2,
                log_level=50)
def env_creator3(env_config):
    env = MetaDriveEnv({"use_render": False, "image_observation": False,'horizon':10})
    env.reset()
    env.close()
    print("The bullet env is open and closed")
    return MyWrapper(MetaDriveEnv(env_config))

if __name__ == "__main__":
    register_env("metadrive", env_creator3)
    ModelCatalog.register_custom_model("my_model", CustomModel)

    train_config = dict(
        env = "metadrive",
        env_config = env_config,
        model = {
            "custom_model": "my_model",
        },
        # gpu
        _disable_preprocessor_api = True,
        num_learner_workers = 4,
        num_gpus_per_learner_worker = 1,
        num_gpus = 4,
        num_gpus_per_worker = 1,
        horizon = 1000,
        framework = "torch",
        # cpu
        num_rollout_workers = 4,
        num_cpus_per_worker = 8,
        num_cpus_for_local_worker = 4,
        num_envs_per_worker = 8,
        num_cpus_per_learner_worker = 1,
        remote_worker_envs = True,
        # training
        timesteps_per_iteration = 2000,
        rollout_fragment_length = 200,
        train_batch_size = 6400,
        sgd_minibatch_size=256,
        num_sgd_iter=10,
        lr=3e-4,
        **{"lambda": 0.95},
    )
    ray.init()
    algo = ppo.PPO(config=train_config)
    for i in tqdm(range(1000)):
        result = algo.train()

Through off-screen rendering, I found out that even though I set horizon=800, the MetaDrive Env won't stop after 800 steps and it also won't stop after it arrives dest. The simulation can always continue unless I set a break condition. So how can I make Metadrive know when to stop and reset?
test_env = env_creator3(env_config)
obs,info = test_env.reset(seed=seed)
for i in range(1200):
            action = algo.compute_single_action(obs)
            obs, r, tm, tc, info = test_env.step(action)
            o = obs['image'][..., :] * 255
            frame = o.astype('uint8')
            video_writer.write(frame)
            if info["arrive_dest"]:
                print("this scenario has {} steps".format(i))
                print("the max_step should be: ",info["max_step"])
                print("the horizon of the env is: ",test_env.config["horizon"])
                break

Hi, I guess there is something wrong in your MyWrapper. The following is my script that manages to stop the environment by setting horizon.
from metadrive.component.sensors.rgb_camera import RGBCamera
from metadrive.component.map.pg_map import MapGenerateMethod
from metadrive.component.map.pg_map import BaseMap
from metadrive.envs.metadrive_env import MetaDriveEnv

frame_size = (320, 240)
env_config=dict(
                map_config={BaseMap.GENERATE_TYPE: MapGenerateMethod.BIG_BLOCK_NUM,
                    BaseMap.GENERATE_CONFIG: 3},
                image_observation=True,
                use_render=False,
                image_on_cuda=False,
                sensors={
                    "rgb_camera": (RGBCamera, *frame_size), #w,h,c
                },
                vehicle_config={
                    "image_source": "rgb_camera",
                },
                stack_size = 1,
                discrete_action=False,
                horizon=800,
                random_spawn_lane_index=False,
                num_scenarios=1000,
                start_seed=0,
                traffic_density=0.2,
                accident_prob=0.2,
                log_level=50)

def env_creator3(env_config):
    env = MetaDriveEnv({"use_render": False, "image_observation": False,'horizon':10})
    env.reset()
    env.close()
    print("The bullet env is open and closed")
    return MetaDriveEnv(env_config)

test_env = env_creator3(env_config)
obs,info = test_env.reset(seed=0)
for i in range(1200):
    print(i)
    obs, r, tm, tc, info = test_env.step(test_env.action_space.sample())
    o = obs['image'][..., :] * 255
    frame = o.astype('uint8')
    if info["arrive_dest"] or tm or tc:
        print("this scenario has {} steps".format(i))
        print("the max_step should be: ",info["max_step"])
        print("the horizon of the env is: ",test_env.config["horizon"])
        break

Note that the max_step termination will only be indicated by truncate flag, which is a new required feature according to Gymnasium. If you wrapper is changing gymnasium style environment to gym-style one, you have to set done as True when truncate is True. Or you can use our official wrapper for converting the environemnt to gym-style env.

Sorry, I didn't see the content before the last code block. It seems you are following the Gymnasium API correctly. So what we can confirm now is that the environment can be terminated by setting horizon=xyz with truncate flag. For futher debugging the memory issue, there are some code examples in metadrive/tests/test_component/test_memory_leak***.py which you can use to familiar with the memory debugging tools. Then you can debug the environment with these tools to see if your environment keeps leaking RAM even if reset is called when the environment is terminated.

Thank you so much for the reply.
I tried the test_close_and_restart_metadrive_env function from metadrive/tests/test_component/test_memory_leak***.py and it works fine. Does it mean the memory leak is caused by env not reset?
Although we can break down the simulation by these conditions,
if info["arrive_dest"] or tm or tc:
     break

Is it possible that rllib doesn't use the tm or tc to reset the env?

Could you try this example? It shows that no memory leak happens in the environment with reset.
from metadrive.component.sensors.rgb_camera import RGBCamera
from metadrive.component.map.pg_map import MapGenerateMethod
import matplotlib.pyplot as plt
from metadrive.tests.test_functionality.test_memory_leak_engine import process_memory
from metadrive.component.map.pg_map import BaseMap
from metadrive.envs.metadrive_env import MetaDriveEnv

frame_size = (320, 240)
env_config = dict(
    map_config={BaseMap.GENERATE_TYPE: MapGenerateMethod.BIG_BLOCK_NUM,
                BaseMap.GENERATE_CONFIG: 3},
    image_observation=True,
    use_render=False,
    image_on_cuda=False,
    sensors={
        "rgb_camera": (RGBCamera, *frame_size),  # w,h,c
    },
    vehicle_config={
        "image_source": "rgb_camera",
    },
    stack_size=1,
    discrete_action=False,
    horizon=100,
    random_spawn_lane_index=False,
    num_scenarios=1000,
    start_seed=0,
    traffic_density=0.2,
    accident_prob=0.2,
    log_level=50)

def env_creator3(env_config):
    env = MetaDriveEnv({"use_render": False, "image_observation": False, 'horizon': 10})
    env.reset()
    env.close()
    print("The bullet env is open and closed")
    return MetaDriveEnv(env_config)

test_env = env_creator3(env_config)

plt.ion()  # Turn on interactive mode
fig, ax = plt.subplots()
memory_usage = []

while True:
    obs, info = test_env.reset(seed=0)

    memory = process_memory(to_mb=True)
    print(memory)
    memory_usage.append(memory)
    ax.clear()
    ax.plot(memory_usage)
    ax.set_xlabel('Step')
    ax.set_ylabel('Memory Usage')
    plt.pause(0.05)  # A short pause to update the plot

    for i in range(100):
        print(i)
        obs, r, tm, tc, info = test_env.step(test_env.action_space.sample())
        o = obs['image'][..., :] * 255
    assert tc, test_env.episode_step

If you only reset once, the memory leak won't happen as well. You can confirm this with the following code.
obs, info = test_env.reset(seed=0)
while True:
    memory = process_memory(to_mb=True)
    print(memory)
    memory_usage.append(memory)
    ax.clear()
    ax.plot(memory_usage)
    ax.set_xlabel('Step')
    ax.set_ylabel('Memory Usage')
    plt.pause(0.05)  # A short pause to update the plot

    for i in range(100):
        print(i)
        obs, r, tm, tc, info = test_env.step(test_env.action_space.sample())
        o = obs['image'][..., :] * 255
    assert tc, test_env.episode_step

Thanks. Yes, no memory leak happens even though env.close() is not called. So this is not likely MetaDrive's problem. But the memory would increase over time using PPO from RLLib
algo = ppo.PPO(config=train_config)
    for i in tqdm(range(1000)):
        result = algo.train()

Do you have any guess on the reason? It's fine If you are also not sure.

Ok, Thank you. I think the memory pressure will still increase over epochs but I could try a smaller batch size or a smaller camera.

I changed to stable baseline 3 which doesn't have any memory issue though i still don't understand why rllib trigger the memory leak

It is strange. Could you try upgrading rllib to a higher version? It should be easy and won't change the training script too much.

yes it is strange. Actually the version I'm using is the newest version


Use production mode

Whoops, should definitely make sure MST gets run in production mode.
Makes sense to also have some dev tests as well to make comparisons and verify that our prod/dev changes actually make sense

Closing this out - we are using the Webpack mode argument, which you can see here. Should be all good.


-ShowDetails(Brief) no output : Verbose mode : Unable to run non-macos tests. Why ?

HI,
Using a MacOS with PowerShell installed
> pwsh -v
> PowerShell 7.3.3`

Followed Wiki to install framework without downloading and with all atomics techniques
PS /Users/toto> IEX (IWR 'https://raw.githubusercontent.com/redcanaryco/invoke-atomicredteam/master/install-atomicredteam.ps1' -UseBasicParsing);
Install-AtomicRedTeam -getAtomics -Force
PS /Users/toto> echo $profile
/Users/toto/.config/powershell/Microsoft.PowerShell_profile.ps1
PS /Users/toto> cat $profile
Import-Module "/Users/toto/AtomicRedTeam/invoke-atomicredteam/Invoke-AtomicRedTeam.psm1" -Force
$PSDefaultParameterValues = @{"Invoke-AtomicTest:PathToAtomicsFolder"="/Users/toto/AtomicRedTeam/atomics"}

Everything seems to be fine and I can invoke help Invoke-AtomicTest successfully
Unfortunately, when asking for ShowDetails or ShowDetailsBrief, I have an empty output
PS /Users/toto> Invoke-AtomicTest T1036 -ShowDetailsBrief
PathToAtomicsFolder = /Users/toto/AtomicRedTeam/atomics

PS /Users/toto>
PS /Users/toto> Invoke-AtomicTest T1036 -ShowDetails
PathToAtomicsFolder = /Users/toto/AtomicRedTeam/atomics

PS /Users/toto>

With the verbose mode, my understanding is that it does not want to run because the test is not targeting MacOS.
But I just want to see the Details. Not to run it
PS /Users/toto> Invoke-AtomicTest T1036 -ShowDetailsBrief -v
VERBOSE: Attempting to run Atomic Techniques
PathToAtomicsFolder = /Users/toto/AtomicRedTeam/atomics

VERBOSE: Removing the imported "Write-ExecutionLog" function.
VERBOSE: Removing the imported "Stop-ExecutionLog" function.
VERBOSE: Removing the imported "Start-ExecutionLog" function.
VERBOSE: Loading module from path '/Users/toto/AtomicRedTeam/invoke-atomicredteam/Public/Default-ExecutionLogger.psm1'.
VERBOSE: Exporting function 'Start-ExecutionLog'.
VERBOSE: Exporting function 'Write-ExecutionLog'.
VERBOSE: Exporting function 'Stop-ExecutionLog'.
VERBOSE: Importing function 'Start-ExecutionLog'.
VERBOSE: Importing function 'Stop-ExecutionLog'.
VERBOSE: Importing function 'Write-ExecutionLog'.
VERBOSE: Using Logger: Default-ExecutionLogger
VERBOSE: All logging commands found
VERBOSE: Determining tests for target platform
VERBOSE: Unable to run non-macos tests
VERBOSE: Determining tests for target platform
VERBOSE: Unable to run non-macos tests
PS /Users/toto>

Thanks in advance for your help

New -anyOS flag added to meet this need as described here. thx!


SmileID callback url empty

Story: https://app.shortcut.com/smileid/story/xxx
Summary
SmileID callback url is empty
Screenshot
If applicable (e.g. UI changes), add screenshots to help explain your work.

@donpaul120 Thank you for this PR
The CI was failing, and I had not realized you put a fix for this issue. I had it on my draft PR which is ready to get merged in. I will close this, and do a release that should fix the issue for you
🙇🏽


Setup multiple instances

Tests will be addressed in https://github.com/NEAR-DevHub/neardevhub-treasury-dashboard/pull/43


Sample for STM32 (HAL)

Hello,
For past few days, I am struggling with implementation on our STM32L0xx-based board. Can you please post some sample how to process data from the sensor using HAL libraries from ST ?
Thank you.

@olirehacek I'm curious if you got it working and if so, would you provide us with a working sample (pull-request welcome)?

Hi. I am out of the office until Tuesday. Hopefully, I can get it running by the end of the week - i will post some results by then.

@olirehacek Did you find some time to test again?

Hello there,
I have got this sensor in the past few days, and I'm trying to get it implemented with STM32F030R8 discovery board using USART.
Firstly I've tried to get the Serial ID with the given SHDLC driver, transmission buffer is correct while receiving sensor is not responding with any data byte.
Any help is appreciated.

Firstly I've tried to get the Serial ID with the given SHDLC driver, transmission buffer is correct while receiving sensor is not responding with any data byte.

Can you verify with a logic analyzer or oscilloscope what is happening on the bus?

Below is my rx and tx functions.

The implementation doesn't look quit correct, see my comments:
    uint8_t tx_data = *tx_buff++;
    USART2->TDR = tx_data;
    // Here you should probably wait for the date to get transmitted, or does USART_ClearITPendingBit do that?
    USART_ClearITPendingBit(USART2,USART_ISR_TC);

The IRQHandler will just override rx_buf[0] with every byte received.
void USART2_IRQHandler(void)
{
  uint8_t ind=0; // index is always 0 when the IRQ gets called
  USART_ClearITPendingBit(USART2, USART_IT_ORE);
  if((USART_GetITStatus(USART2,USART_IT_RXNE))==SET )
  {
    Temp = ((USART_ReceiveData(USART2))&0xff);
    rx_buff[ind++] = Temp;
    if(ind >= (sizeof(rx_buff)-1))
      ind=0;
    USART_ClearITPendingBit(USART2,USART_IT_RXNE);
  }
}

The sensirion_uart_rx function just copies to a local buffer and not to the target buffer. Also you can't now how many bytes there are in the rx_buff.
uint8_t rx_buff[100];
uint16_t sensirion_uart_rx(uint16_t max_data_len, uint8_t *data)
{
  uint8_t data_buff[100];
  if(max_data_len == 0)
    return -1;
  memcpy(data_buff,rx_buff,max_data_len); // this just copies to the local buffer
  data = data_buff; // this doesn't write to the target buffer, just reassign the pointer locally
  return sizeof(data_buff); // this will always return 100
}

Isn't there an UART library available for your platform? This should handle all the low level stuff like interrupt handling for you. Maybe try using the "STMicroelectronics HAL Libraries" like @olirehacek did.

thanks for your reply, surely I'll check things out and update...
About libraries, I'm using STM Std Peripheral Libraries, to learn more in deep about the peripheral programming.

hello there,
I got the sensor working giving me the measured values, Now I'm having some testing issues,

How we can verify the values are correct?
On testing with Air purifier and Sensor in a closed cardboard box the sensor was giving me some constant values like 9-6 for all the parameters.

The given link is having a video in which I'm getting the data from the sensor. Are these values correct?
If not, suggest the improvement I need to do.
https://drive.google.com/open?id=1_k3cfPWxw5sNjZvufEVvvn36u5UUYHJD

@Shubhanshu2student while opening the google drive link showing an error.
Could you please post the link or is it possible to share the source files?


Baseline weights?

Hi. Thanks for open-sourcing this interesting project. Any chance that you can upload the weights for the Transformer++ baselines as well? Thanks a lot!

Hi, you can found the baseline Transformer++ in fla-hub: Link.

Awesome thanks!


Use CosmicFontSystem in public bevy_text APIs and remove cosmic_text re-export

Objective
Fixes #16006
Solution
We currently re-export cosmic_text, which is seemingly motivated by the desire to use cosmic_text::FontSystem in bevy_text public APIs instead of our CosmicFontSystem resource wrapper type.
This change makes bevy_text a "true" abstraction over cosmic_text (it in fact, was already built to be that way generally and has this one "leak").
This allows us to remove the cosmic_text re-export, which helps clean up the Rust Analyzer imports and generally makes this a "cleaner" API.

Huh, looking into this, it seems that there is no API for manually using a cosmic-text Buffer in bevy-text? Is the idea that if you don't want to use bevy-texts "text-as-entities" system that you'd manually pull in your own separate text layouting system?

Is the idea that if you don't want to use bevy-texts "text-as-entities" system that you'd manually pull in your own separate text layouting system?

Yes. The default buffer cannot be publicly exposed because the contents are re-built from the ECS every time text is re-rendered. Any modifications by users will be erased.

Is the idea that if you don't want to use bevy-texts "text-as-entities" system that you'd manually pull in your own separate text layouting system?

Yes. The default buffer cannot be publicly exposed because the contents are re-built from the ECS every time text is re-rendered. Any modifications by users would be erased.

Presumably it could be changed so that this only happens if a marker component is present or similar. Probably too late for the current release cycle, but it could be looked at in future.

Presumably it could be changed so that this only happens if a marker component is present or similar.

If you need to disable all of the functionality tied to ComputedTextBlock, then you might as well not use ComputedTextBlock and just implement everything separately.

Do we really need to do this, I think its quite nice to allow a user to reach the underlying cosmic-text structures, especially while we are experimenting and wanting to create different base widgets for bevy?
for example text-input, where there is stuff we could utilize from cosmic-text already? When bevy is mere feature complete regarding text.

but wouldnt that block external or third party crates experimenting from using the exact same version of cosmic-text that bevy is using by default?

but wouldnt that block external or third party crates experimenting from using the exact same version of cosmic-text that bevy is using by default?

Why would it? You can look in bevy's Cargo.toml if you need the same version.

Huh, looking into this, it seems that there is no API for arbitrary usage of a cosmic-text Buffer in bevy-text?

Yup. Worth exploring ways to enable this use case (later) though!

Why would it? You can look in bevy's Cargo.toml if you need the same version.

Yeah this case is niche enough that I'm cool with having them take on this responsibility, especially given that right now there isn't a supported way for bevy_text to interact with arbitrary user provided cosmic_text ops.