Floats comparison

fabs(a-b) < FLT_EPSILON
does not work very well for 'a' and 'b' being floats

@mgrudzinska Could you please describe more details about it?  what does mean by "does not work very well" ? does it introduce any crashes? or invalid computation? then what float values occur?

A float variable can hold ~8 digits (in general it depends).
FLT_EPSILON is ~1.2e-7 (in my case, in general it's <= 1e-5)
Let's consider 3 cases:

a = 1.2345678e0
b = 1.2345679e0
b - a = 0.0000001e0 = 1e-7 < FLT_EPSILON - as expected

a = 1.2345678e4
b = 1.2345679e4
b - a = 0.0000001e4 = 1e-3 > FLT_EPSILON - most probably we expected a different result, but it's not possible to compare  'a' and 'b' with such precision

a = 1.2345678e-4
b = 1.2349999e-4
b - a = 0.0004321e-4 = 4.321e-8 < FLT_EPSILON - in this case the value of epsilon seems to be too high

Let's consider another example:
while (fabs(f(x) - f(c)) < FLT_EPSILON)
{
make 'x' closer and closer to 'c'
}
If the 'f' function is too steep, we may need to change 'x' (in order to stop the while loop) with a much higher precision than this given for a float variable.
So there are two problems:

as described above with choosing the epsilon value
the condition should take into account, that at some point changing (like adding a very small value) 'x' value may not really change it, because we don't have sufficient precision - than we get an infinite loop

Dash pattern values:
The solution presented in #100 with FLT_EPSILON will fail if the ratio of the total curve length and the 'length' value from a dash pattern is >~10^7.
E.g. for the line from (0, 0) to (2.5e4, 2.5e4) and dash pattern (length and gap) values smaller than [3e-3, 3e-3] the termination condition in the while loop will be never satisfied.
But this example dosn't seem to be realistic.
Bezier curve splitting:
I'd like to get a little more time to think about this case. I still think it is possible (and it should be also easy) to find an example which will crash, because of FLT_EPSILON usage.

The solution could be to use nextafter function:
fabs(a-b) < nextafter(a,b) - a
but the call for this function instead of a macro needs to be justified

We can introduce our own FLT_EPSION definition if the accuracy is not proper. ie) BEZIER_EPSILON.


adding mage support

Description
Related issues

Close #1241

Checklist

[x] I've read the guidelines for contributing to this repository.
[ ] I've added tests that prove my fix is effective or that my feature works.
[ ] I've updated the documentation with the relevant information (if needed).
[ ] I've added usage information (if the PR introduces new options)
[ ] I've included a "before" and "after" example to the description (if the PR is a user interface change).

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

cc: @chen-keinan

@sbdtu5498 thank you for the contribution, look like a very good start. couple of comments:

it will be great to use namespaces
it is required to updated contribution guide
update github actions relevant places

it ok also to make the above changes in a separate PR, let me know what you decide

@sbdtu5498 any update ?

@chen-keinan Sir, I will take a look at the prescribed changes and will push them in the upcoming week. The changes that needs to be made directly into the magefile I will force push them in this PR, but for others such as updating GitHub actions, and removing Makefile, if it feels right to do so, I will do it in another PR as it makes more sense.

@chen-keinan Sir, First of all, Sorry for the delays. I was a bit busy and about to take a look at the prescribed changes. I will take a look on them will push before wednesday. The changes that needs to be made directly into the magefile I will force push them in this PR, but for others such as updating GitHub actions, and removing Makefile, if it feels right to do so, I will do it in another PR as it makes more sense.

@sbdtu5498 I really want to see this change merged to upstream. I hope you'll have some time to complete it :)


drake python include fails on drakevisualizer.py

I don't think the fix in this commit works:
ce35723e54707787c5e31872231abefd93cf918f
the problem is that drake python bindings are now installed to:
dist-packages/lcmtypes/drake
Previously it was to:
dist-packages/drake
It finds the package but cannot import drake types included within the first imported file.
File "/home/mfallon/ipab-distro/drc/software/build/lib/python2.7/dist-packages/lcmtypes/drake/init.py", line 12, in
from .lcmt_qp_controller_input import lcmt_qp_controller_input
File "/home/mfallon/ipab-distro/drc/software/build/lib/python2.7/dist-packages/lcmtypes/drake/lcmt_qp_controller_input.py", line 12, in
import drake.lcmt_joint_pd_override
ImportError: No module named drake.lcmt_joint_pd_override
This is because drake doesn't install its python lcmtypes in a conventional location

I reported it here:
https://github.com/RobotLocomotion/drake/issues/1425
Unfortunately, it's a appears to be an issue in lcm, exposed by drake's non-default install directory.  A couple options to fix:
submit a bugifx to lcm and then in the meantime:

require an older version of LCM for DRC
require a patched version of LCM for DRC
revert the drake install location (but then we need to re-open @rdeits motivation for changing the install location)
use sed or something to fix the generated .py files

Am I right that the reason to rename it from 'drake' was because of the wish to use the drake namspace in python for drake bindings - not the lcmtypes?
Your 3rd suggestion seems straightforward but what about installing the python bindings to a different folder e.g. lcmdrake or drakelcm?
Options 1 and 2 would be troublesome

I think the trouble with installing to lcmdrake or something like that is that it requires changing the lcm package name, which affects matlab, java, and c code files.  For Python, it was simple to just install the drake package in a subdirectory and update the import statement.  This should work, but the lcm bug in lcm-gen wasn't detected when Robin rolled out this change, because Drake uses lcm-gen 1.0.
@rdets what do you think about option 4, to use sed or something to patch the genreate .py files, basically replace "import drake." with "import lcmtypes.drake."  Also, I don't know if this would be tricky, but really a more logical import statement might be import drake.lcmtypes :)

Yeah, option 4 is doable. But I'd really like to get this fixed in LCM itself, since it's a pretty obvious bug. Have we submitted that bug report upstream yet?

I've given up on using the drake namespace for the main python bindings, so we can go back to using the default LCM install package name drake. This should clear up the issues we're having with newer versions of LCM.


Yt-dlg only downloads youtube videos as .webm files, or before reinstalling yt-dlg, as .m4a files, even when choosing the .mp3 file type option

Please follow the guide below

You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
Put an x into all the boxes [ ] relevant to your issue (like that [x])
Use Preview tab to see how your issue will actually look like

WARNING
All invalid issues will be rejected!!

Before going further

If your problem is a bug with youtube-dl or a request for new site support please report it here

Make sure you are using the latest yt-dlg version (Click the Settings icon and then About to view the current version)

Make sure you are using the latest youtube-dl version (Click the Settings icon and then Update to update to the latest youtube-dl version)

Make sure you searched the bugtracker for similar issues including closed ones

Make sure to read the FAQs file

[x] I think my problem is NOT with youtube-dl
[x I've verified and i assure that I'm running yt-dlg 1.X.Y
[x] I assure that i am using the latest version of youtube-dl
[x] Searched bugtracker
[x] I've read the FAQs file

What is the purpose of your issue?

[ ] Bug report
[ ] Feature request (request for a new functionality)
[x] Question
[ ] Other

Please remove any sections between (---) if they are not related to your issue

Bug report
If the problem occurs when downloading a URL please provide the full verbose output as follows:

Restart yt-dlg
Go to Options > Extra tab
Enable Debug youtube-dl
Go to Options > Advanced tab and Clear your log content
Try to download the URL
Copy the whole log content and insert it between the ``` part below

2024-11-16 13:43:13,442-DEBUG-Worker_1-[debug] Command-line config: ['--newline', '-i', '-o', 'C:\\Users\\User\\Downloads\\%(title)s.%(ext)s', '-x', '--audio-format', 'mp3', '-v', '--ignore-config', '--hls-prefer-native', 'https://www.youtube.com/watch?v=Zi_XLOBDo_Y']
2024-11-16 13:43:13,442-DEBUG-Worker_1-[debug] Encodings: locale cp1252, fs utf-8, pref cp1252, out cp1252 (No VT), error cp1252 (No VT), screen cp1252 (No VT)
2024-11-16 13:43:13,442-DEBUG-Worker_1-[debug] yt-dlp version<EMAIL_ADDRESS>from yt-dlp/yt-dlp [197d0b03b] (win_exe)
2024-11-16 13:43:13,442-DEBUG-Worker_1-[debug] Python 3.10.11 (CPython AMD64 64bit) - Windows-10-10.0.19045-SP0 (OpenSSL 1.1.1t  7 Feb 2023)
2024-11-16 13:43:13,446-DEBUG-Worker_1-[debug] exe versions: none
2024-11-16 13:43:13,446-DEBUG-Worker_1-[debug] Optional libraries: Cryptodome-3.21.0, brotli-1.1.0, certifi-2024.08.30, curl_cffi-0.5.10, mutagen-1.47.0, requests-2.32.3, sqlite3-3.40.1, urllib3-2.2.3, websockets-13.1
2024-11-16 13:43:13,446-DEBUG-Worker_1-[debug] Proxy map: {}
2024-11-16 13:43:13,446-DEBUG-Worker_1-[debug] Request Handlers: urllib, requests, websockets, curl_cffi
2024-11-16 13:43:13,446-DEBUG-Worker_1-[debug] Loaded 1838 extractors
2024-11-16 13:43:13,446-DEBUG-Worker_1-[debug] [youtube] Extracting signature function js_0ccfa671_105
2024-11-16 13:43:13,446-DEBUG-Worker_1-[debug] Loading youtube-sigfuncs.js_0ccfa671_105 from cache
2024-11-16 13:43:13,446-DEBUG-Worker_1-[debug] Loading youtube-nsig.0ccfa671 from cache
2024-11-16 13:43:13,450-DEBUG-Worker_1-[debug] [youtube] Decrypted nsig GTO-geSm1hOzEnC => eEhmXkOtdDvleQ
2024-11-16 13:43:13,450-DEBUG-Worker_1-[debug] Loading youtube-nsig.0ccfa671 from cache
2024-11-16 13:43:13,450-DEBUG-Worker_1-[debug] [youtube] Decrypted nsig tKa9PgVlhXzbNzm => d95wDJY6E6exdw
2024-11-16 13:43:13,450-DEBUG-Worker_1-[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec, channels, acodec, lang, proto
2024-11-16 13:43:13,450-DEBUG-Worker_1-[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec, channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
2024-11-16 13:43:13,450-DEBUG-Worker_1-[debug] Invoking http downloader on "https://rr4---sn-gvbxgn-tvf6.googlevideo.com/videoplayback?expire=1731804190&ei=vuc4Z8fuKcGkir4PxO6JmAw&ip=2607%3Afea8%3Ae366%3A1000%3Ae850%3Abc8e%3A8a90%3A2fb3&id=o-ALMJTlxyDvfhZJeBn5-aW6P-fDxbvIvnlzwAv_-i-fxX&itag=251&source=youtube&requiressl=yes&xpc=EgVo2aDSNQ%3D%3D&met=1731782590%2C&mh=yF&mm=31%2C29&mn=sn-gvbxgn-tvf6%2Csn-gvbxgn-tt1ee&ms=au%2Crdu&mv=m&mvi=4&pl=41&rms=au%2Cau&gcr=ca&initcwndbps=1748750&spc=qtApAahtpOqU8raQ85Ob7-njmorWRFCi_PWE2qiGd09ikUc&vprv=1&svpuc=1&mime=audio%2Fwebm&rqh=1&gir=yes&clen=4934666&dur=295.861&lmt=1700456040073261&mt=1731782244&fvip=4&keepalive=yes&fexp=51299154%2C51312688%2C51326932&c=IOS&txp=4532434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cxpc%2Cgcr%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Crqh%2Cgir%2Cclen%2Cdur%2Clmt&sig=AJfQdSswRQIhANWNH5eu6D-wx9zooHU2VPt06WQVfZ48eOLjKFt8NUaaAiBvXsXtowj3ohu6feSYIkrfLzxoo34DAJDCzDk1zXT3Bw%3D%3D&lsparams=met%2Cmh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Crms%2Cinitcwndbps&lsig=AGluJ3MwRQIhAO869JY1Td5Q9peNbrX_d1pbRLcBDJ8Eh6w0LUOf-5k2AiA0zBH55u0GpHprTcqXWcCYQjF8vJQqMmDN6EjpkgvdLQ%3D%3D"
2024-11-16 13:43:13,450-DEBUG-Worker_1-[debug] File locking is not supported. Proceeding without locking
2024-11-16 13:43:13,450-DEBUG-Worker_1-ERROR: ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location
2024-11-16 13:43:13,450-DEBUG-Worker_1-Traceback (most recent call last):
2024-11-16 13:43:13,450-DEBUG-Worker_1-  File "yt_dlp\YoutubeDL.py", line 3701, in run_pp
2024-11-16 13:43:13,450-DEBUG-Worker_1-  File "yt_dlp\postprocessor\common.py", line 23, in run
2024-11-16 13:43:13,454-DEBUG-Worker_1-  File "yt_dlp\postprocessor\common.py", line 128, in wrapper
2024-11-16 13:43:13,454-DEBUG-Worker_1-  File "yt_dlp\postprocessor\ffmpeg.py", line 494, in run
2024-11-16 13:43:13,454-DEBUG-Worker_1-  File "yt_dlp\postprocessor\ffmpeg.py", line 242, in get_audio_codec
2024-11-16 13:43:13,454-DEBUG-Worker_1-yt_dlp.utils.PostProcessingError: ffprobe and ffmpeg not found. Please install or provide the path using --ffmpeg-location
2024-11-16 13:43:13,454-DEBUG-Worker_1-Child process exited with non-zero code: 1

What operating system do you use ?
Microsoft Windows 10 Pro 22H2 19045.5131
List of actions to perform to reproduce the problem:

Open yt-dlg.exe.
Add a URL to download an .mp3 file from a youtube video.
Close yt-dlg.exe.

What is the expected behaviour ?
Yt-dlg should download a youtube URL as an .mp3 file if that's the selected download file type, and save it to the computer.
What happens instead ?
Yt-dlg downloads and saves a youtube URL as a .webm file, or as .m4a files if I put "--audio-format mp3 --audio-quality 128 -f 'bestaudio[asr=44100]'" in the options, extra settings, even though I selected .mp3 files as the download file type.

Feature request (request for a new functionality)
Please make sure that the requested feature is NOT already in the TODO list

[x] I've verified and i assure that my requested feature is NOT in the TODO list

What operating system do you use ?
Microsoft Windows 10 Pro 22H2 19045.5131

Yt-dlg one one of my computers works properly, and downloads files in the correct selected file type, however on another computer, it doesn't download youtube URLs as .mp3 files when that's the selected file type. It only saves them as .webm files, or as .m4a files if I put "--audio-format mp3 --audio-quality 128 -f 'bestaudio[asr=44100]'" in the options, extra settings, even after using the update option. Also, the file status says "error" after downloading the file. I'm using yt-dlg 1.8.5, installed in the default installation directory, and have already selected the update option, and chosen the download file type as .mp3 files. I've already tried reinstalling yt-dlg, but it has the same issue. How do I get it to download .mp3 files, especially with custom audio settings? Is there a way to fix that?

Have you changed the interface from default to mp3?

It says you are missing ffmpeg on the log. You may need to install it on windows to convert it from the webm to mp3.  Be sure to add it to your PATH on system environment and restart the application after installing/adding to path.

@chamaramokai thanks. That's helpful information.


rename 'policy modules' to 'subpolicies'

This follows the renaming done in upstream crypto-policies: https://gitlab.com/redhat-crypto/fedora-crypto-policies/-/merge_requests/101/diffs

lgtm
@Jakuje ok?


Anomaly detection

Issue #, if available:
Description of changes:
Allows to get access to distribution on DeepAR trainining network and add a minimal example to do anomaly detection.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Job PR-164/1 is complete.
Docs are uploaded to http://gluon-ts-staging.s3-accelerate.dualstack.amazonaws.com/PR-164/1/index.html

Job PR-164/2 is complete.
Docs are uploaded to http://gluon-ts-staging.s3-accelerate.dualstack.amazonaws.com/PR-164/2/index.html

Job PR-164/3 is complete.
Docs are uploaded to http://gluon-ts-staging.s3-accelerate.dualstack.amazonaws.com/PR-164/3/index.html

Codecov Report

Merging #164 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #164      +/-   ##
==========================================
+ Coverage    78.1%   78.13%   +0.03%
==========================================
  Files         120      120
  Lines        6772     6782      +10
==========================================
+ Hits         5289     5299      +10
  Misses       1483     1483

Impacted Files
Coverage Δ

src/gluonts/model/deepar/_network.py
94.53% <100%> (+0.17%)
:arrow_up:

src/gluonts/model/forecast.py
67.72% <100%> (+0.17%)
:arrow_up:

src/gluonts/model/estimator.py
89.06% <100%> (+0.92%)
:arrow_up:


Fix compatibility for Python 2.6 and string formatting for remote_url

Fixes Issue #5

Thanks! Merged in 649a12. Also conditionally depends on argparse on Python 2.6 and lower.
These patches are so minimal so I don't mind supporting them. But obligatory Python 2.6 PSA: Python 2.6 is EOL'd and you should upgrade to 2.7.

Haha we should do a lot of things :) But you know :P


updated metadata files. and updated clone lists.

Hi there is a new PS2 dump and the date files for these files are old it shows in the list
How can we update these files?
Thanks

Retool is no longer maintained. There won't be updated clone lists from this repository.


Host setup is too early "RUN echo ${HOST_IP} > /setup_ips.txt"

In Dockerfile, the line RUN echo ${HOST_IP} > /setup_ips.txt is evaluated when the image is built, not when it runs. This means that if the host-ip is not "<IP_ADDRESS>", /start_setup.sh will web deny access.
The fix is simple enough: Just add the line to /start_setup.sh instead (before gwsetup). :-)

I wanted to leave the setup.txt as part of the image to have a "default" setup if you start the container with "bash" and not with the default entry point. Nevertheless you were right and I added an option to override the IP. Is this ok for you?

Works great! :+1:


Proposal: Behavior Services

A class of Issue that keeps coming up is the feature that has too many possible implementations. Designing, coding and supporting all the possible implementations that the community asserts should be "the default" is too daunting a task. Some examples of Issues like this are:

Behavior when closing the last open file or last open window (#863, #7835, https://github.com/atom/atom/pull/2411#issuecomment-44497175, #7726)
Behavior when opening files via drag-and-drop, from the command line, whether inside or outside of the project folder ... whether there is a "project" or not, etc
Sorting behavior in the Tree View
Undo/Redo behavior

Additionally, adding configuration options for all the possible permutations of these behaviors is hard to design and difficult for users to understand.
Because of these challenges, I wanted to design a system that:

Keeps the base installation of Atom simpler and more approachable for new users
Allows for maximum configurability in keeping with the "hackable to the core" philosophy of Atom
Removes the necessity of the Atom Core team supporting all possible options

How It Works
When a feature (described as "foo" in this example) is identified for this approach:

A "behavior service" should be designed and built into Atom Core as: atom.foo-behavior
The current behavior should be used as a fallback in the case that no service provides an alternative (see the atom.file-icons service in the tree-view package as an example)
By convention, packages that implement alternatives will end with foo-behavior like my-awesome-foo-behavior
Any interested party implements a package that provides the service to customize Atom's behavior

Benefits
With this system in use, anyone can easily come along and implement their own behavior for this particular feature without:

Needing to describe the behavior in detail (the best specification is code, after all)
Needing to convince anyone that this is a good idea or "deserves to be in core"

This also allows for Atom to act in a manner that is perhaps more familiar and comfortable to the user but goes against the conventions of the platform that they are running Atom upon.
Challenges
There are some pitfalls I've identified with this approach. I don't think that they are significant enough to prevent going ahead with this, but they should be kept in mind and solutions should be identified and implemented over time.
How Granular Should Behavior Services Be?
In the example of the closing the last open file or last window mentioned in the introduction, there are actually a few tightly-related behaviors:

Does closing the last tab close the window?
Does closing the last window exit the application?
Does closing the last tab in a pane destroy the pane?
Does using the standard close command close the window if there is no file open?

Should this be one service? Or four? Or somewhere in between? Because of the way the service hub system works, there can be only one loaded and activated provider.
Discoverability
Let's say I have installed a package that overrides the tab/pane/window close behavior. How do we indicate to the user that to configure this behavior they no longer use the built-in configuration options, but have to go to the super-special-close-behavior package settings to configure it?
Supportability
When someone has an issue with how Atom is behaving, how can we easily find out that they have the super-broken-close-behavior package installed and enabled?
/cc @atom/feedback

I like this idea. Definitely the hard part seems to be in determining the edges in each case. I think we could come up with a behavior service for one feature and see how it goes.

One way to override existing functionality would be to override or hijack an event subscription. Say the tree-view listens for a double-click, override its action with your own.
of course the possibilities for carnage are through the roof.


Inconsistent Phonon README/file naming

The current README lists this command and set of output files

janus phonons --struct tests/data/NaCl.cif --supercell 2x2x2 --minimize --arch mace_mp --calc-kwargs "{'model' : 'small'}"

This will save the Phonopy parameters, including displacements and force constants, to NaCl-params.yml, and the calculated band structure to NaCl-auto-band.yml, in addition to generating a log file, phonons.log, and summary of inputs, phonons_summary.yml.

However, when I run this command  get NaCl-phonopy.yml and NaCl-force_constants.hdf5 instead of NaCl-params.yml and  NaCl-auto-band.yml.
Similarly for the second example:

janus phonons --struct tests/data/NaCl.cif --supercell 2x3x4 --dos --pdos --thermal --temp-start 0 --temp-end 300 --temp-step 50

This will create additional output files: NaCl-cv.dat for the thermal properties (heat capacity, entropy, and free energy) between 0K and 300K, NaCl-dos.dat for the DOS, and NaCl-pdos.dat for the PDOS.

I get NaCl-thermal.dat instead of NaCl-cv.dat

shall be thermal since that file constains more than CV

also without --band shall not generate a dos.
there is another pr open to add extra info we can fix it in there.


Enhance the preview function to get more comprehensive summary

[x] csv preview https://github.com/MLSysOps/MLE-agent/pull/249
[ ] json preview
[ ] yaml preview
[ ] directory preview

In my priority list, previewing the directory is the most important thing. Assume there is a dir containing a large number of pictures (or videos, audios, etc), we cannot simply return all pictures' path (but we need a part of them), how to draw a clear file structure/pattern for LLMs meanwhile maintaining a acceptable (not scale) RAG information?


docs: document homebrew; close #98

Can you give this a try @johnhofman ?

Hi @rollulus I just tested it in my macbook
brew install landscaper
and it worked

Great, thanks!


Basic cloud boot tests

Similarly to the local boot test, make a simple tool in Golang that uses the AWS sdk to upload and boot our ami image and run the same tests against it.

Any reason that Golang is specifically requested here? If the local boot tests are going to be part of test/run this could be as well.

Update: write a tool in Golang to upload the image and use it from the Python framework. The Go code will be shared with our worker.


Default GPU number and training time?

Hi,
May I ask you about the number of GPUs you used for training, and  the training time needed for each dataset?
Best,

I want to know, too. Did you get any information about these?

I think this can be found in the Supplementary: https://openaccess.thecvf.com/content/CVPR2021/supplemental/Yu_pixelNeRF_Neural_Radiance_CVPR_2021_supplemental.pdf


Use direct DynamicObj dependency in component generation

Currently, DynObj is used as transient dependency of Plotly.NET.
I added a direct dependency of the core project, which will be merged soon. This also means that component auto generation needs to

[ ] add a DynamicObj dependency to the component project file
[ ] open DynamicObj on top of the library file

I did this by hand now in #33, but those changes are overridden in the next auto generation cycle.

@plt-joey can you take a look if this is enough? https://github.com/plotly/Dash.NET/pull/33/commits/0e105f86018afaf955b88433b364408d13600907


How to alternately connect two computers to the same phone?

I would like to be able to alternately connect two computers (both with MX Linux 23.4 xfce 64-bit) to the same phone (Galaxy S21 FE G5), depending on which computer I'm currently using. How can I do this, please?
So far, this is what I'm doing:
Being on the first computer, I have to make a USB connection and then a WIFI connection. Then I go to the other computer and make one more USB connection and a WIFI connection.
But when I'm back on the first computer, scrcpy doesn't remember the first WIFI connection and therefore I have to make a new USB connection before I can go on with a WIFI connection.
What can I do to make a USB connection only once for both computers, and afterwards being able to only use WIFI connections, please?

Once your device listens over TCP/IP, until the next device reboot, you can just adb connect xx.xx.xx.xx and adb disconnect as you want, without reconnecting USB.
Adb server does not support 2 connected computers simultaneously though, so you must adb disconnect on one computer before connecting from the other.
For convenience, you can use scrcpy --tcpip=xx.xx.xx.xx which performs the adb connect for you.
https://github.com/Genymobile/scrcpy/blob/master/doc/connection.md#tcpip-wireless

I'm not sure if you understand what I'm trying to do.
I'm looking for a way to access only one(!) phone from two(!) computers (let's say, a desktop computer and a laptop).
So actually, I have two(!) computer IP's, but only one(!) phone IP.
It doesn't have to be these two computers connected at the same time, but one or the other one alternately, but without the need of repeating the USB connection each time I'm moving to the other computer.
If it is not posssible yet, I would very much like to see such a feature in an upcoming version of scrcpy.

'm looking for a way to access only one(!) phone from two(!) computers (let's say, a desktop computer and a laptop).
So actually, I have two(!) computer IP's, but only one(!) phone IP.

Yes, exactly. My previous comment was for this situation. xx.xx.xx.xx is the device IP.

Ok, thank you and sorry!
So the misunderstanding was on my(!) side.

What about the adb key?
I mean, when I'm on USB on the first computer, the phone wants me to confirm an adb key and at the same time, there are adbkey files being created on the computer (in the ~/.android folder).
Now, when I'm on the second computer using WiFi, will I have to confirm another adb key on the phone, or do I have to copy the ~/.android folder from the first computer to the second one, or is another ~/.android folder being created on the second computer with some different data?

Confirm another adb key.


[DEFECT] Executing OMP software is not functional

Defect Description
Describe the defect
What did you expect to see happen?
We tried to run a job using an OMP software (serpent) (using 28 threads/job).
The node we are running on has 256 processors (shared memory).
I expected all the processors in the node to be used to execute 9 parallel tasks.
The RunInfo we used is as follows:
  <RunInfo>
    ...
    <batchSize>9</batchSize>
    <mode>mpi</mode>
    <NumThreads>28</NumThreads>
    <threadParameter>-omp %NUM_CPUS%</threadParameter>
    ...
  </RunInfo>

What did you see instead?
The code does not seem to run exploiting the OMP processors. In the following picture, it can be seen that
most of the processors are not running.

Do you have a suggested fix for the development team?
N/A
Describe how to Reproduce
Steps to reproduce the behavior:

Use an OMP software (e.g. MOOSE)
Execute a Monte Carlo using multiple threads

Screenshots and Input Files
N/A
Platform (please complete the following information):

OS: Linux (Centos) cluster
Version: N/A
Dependencies Installation: CONDA

For Change Control Board: Issue Review
This review should occur before any development is performed as a response to this issue.

[x] 1. Is it tagged with a type: defect or task?
[x] 2. Is it tagged with a priority: critical, normal or minor?
[x] 3. If it will impact requirements or requirements tests, is it tagged with requirements?
[x] 4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
[x] 5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)

For Change Control Board: Issue Closure
This review should occur when the issue is imminently going to be closed.

[ ] 1. If the issue is a defect, is the defect fixed?
[ ] 2. If the issue is a defect, is the defect tested for in the regression test system?  (If not explain why not.)
[ ] 3. If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
[ ] 4. If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
[ ] 5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?

@drewj-usnctech

Hm, dumb question, but if you run the serpent input file manually, do you get better processor utilization? (and if so, what qsub* command did RAVEN generate versus what did you manually use?)
*I am assuming qsub, but if some other system is used, answer for that instead.

Oh, and for the image, is one Serpent instance running on mostly on 2 processors, or is that 2 Serpent instances or 1 Serpent 1 python ...?

Hi Josh, sorry for the delay.
Yes. When we run serpent manually we get perfect utilization (even if we run manually multiple instances in the same node)
The command raven creates for this input file is: sss2 -noplot my_input.i -omp 28

That image shows the cpus usage in the node. All of them should be at >>0% utilization. That picture is for 9 serpent runs (concurrent) using 28 threads each.

@joshua-cogliati-inl

Strange. I still am interesting in the precommand, the postcommand, and then final command used for Serpent.

If I had to guess either the command is getting messed up, or some environmental variable is getting messed up. (Which I admit is pretty vague.)  It might be worth your time to compare the output of env from inside RAVEN versus manually run (don't post the full output here, there is probably private info in it.).

The variables starting with OMP, especially OMP_NUM_THREADS might be worth looking at.

@joshua-cogliati-inl thank you for picking this up and providing some feedback. I can hopefully provide some more insight after some testing on our cluster.
In all cases, the OMP_NUM_THREADS environment variable was unset before running raven.
What worked
Creating a "fake" serpent executable in the working directory and path such that sss2 always ran with some number of threads, e.g.,
$ cat sss2
#!/usr/bin/env bash
/path/to/actual/sss2 -omp N @$

and running without <mode>mpi</mode>.
I found this worked better than alias sss2="/path/to/actual/sss2 -omp N $@" probably due to how RAVEN and python pass environment variables to subprocesses. I don't think aliases are transferred.
I found that the "full" Serpent command (as far as RAVEN was concerned) was just sss2 -noplot [input] and no thread parameters were passed. The real Serpent command (after going through my psuedo-alias) was sss2 -omp N -noplot [input].
What didn't work

Running normal Serpent in MPI mode
Running the "aliased" Serpent in MPI mode
Disabling setting of MV2_ENABLE_AFFINITY via

diff --git a/framework/CustomModes/MPILegacySimulationMode.py b/framework/CustomModes/MPILegacySimulationMode.py
index c10d14a1d..a015312f9 100644
--- a/framework/CustomModes/MPILegacySimulationMode.py
+++ b/framework/CustomModes/MPILegacySimulationMode.py
@@ -194,7 +194,7 @@ class MPILegacySimulationMode(Simulation.SimulationMode):

     #Disable MPI processor affinity, which causes multiple processes
     # to be forced to the same thread.
-    os.environ["MV2_ENABLE_AFFINITY"] = "0"
+    # os.environ["MV2_ENABLE_AFFINITY"] = "0"

     # Create the mpiexec pre command
     # Note, with defaults the precommand is "mpiexec -f nodeFile -n numMPI"
diff --git a/framework/CustomModes/MPISimulationMode.py b/framework/CustomModes/MPISimulationMode.py
index 7457f5eec..390499980 100644
--- a/framework/CustomModes/MPISimulationMode.py
+++ b/framework/CustomModes/MPISimulationMode.py
@@ -103,7 +103,7 @@ class MPISimulationMode(Simulation.SimulationMode):

     #Disable MPI processor affinity, which causes multiple processes
     # to be forced to the same thread.
-    os.environ["MV2_ENABLE_AFFINITY"] = "0"
+    # os.environ["MV2_ENABLE_AFFINITY"] = "0"

     # Create the mpiexec pre command
     # Note, with defaults the precommand is "mpiexec -f nodeFile -n numMPI"
diff --git a/framework/Driver.py b/framework/Driver.py
index 1281088c6..62b816aba 100755
--- a/framework/Driver.py
+++ b/framework/Driver.py
@@ -46,7 +46,7 @@ except (AttributeError,ImportError):
   builtins.profile = lambda f: f

 #warning: this needs to be before importing h5py
-os.environ["MV2_ENABLE_AFFINITY"]="0"
+# os.environ["MV2_ENABLE_AFFINITY"]="0"

 frameworkDir = os.path.dirname(os.path.abspath(__file__))

Other information
I'm not sure what environment variables you'd be intererested in, but I have the env command in my slurm submission script. Some things that I think might be useful
$ grep "^SLURM.*NODE" slurm.out
SLURM_NODEID=0
SLURMD_NODENAME=c1
SLURM_TASKS_PER_NODE=256
SLURM_NNODES=1
SLURM_JOB_NODELIST=c1
SLURM_NODELIST=c1
SLURM_JOB_CPUS_PER_NODE=256
SLURM_NODE_ALIASES=(null)
SLURM_CPUS_ON_NODE=256
SLURM_JOB_NUM_NODES=1

@aalfonsi and I are still investigating on our end if we need to compile Serpent in such a way that it communicates better with RAVEN and MPI. I've tried the MPI-enabled compilation and found that it did not help nor hinder our efforts; it performed as well or poorly as the OMP-only version.
Possible fix
Since it appears that passing -omp N to Serpent works when running without MPI (e.g., sss2 -omp N -noplot [input] vs. mpiexec -n 1 sss2 -omp N -noplot [input]), adding the -omp N post-command should be sufficient. Here, we have a parallel application that does not have MPI capability (not that Serpent can't, we just tend to run with OMP only) and thus could take advantage of the threading parameters.
If a user provides both <NumThreads>N</NumThreads> and <threadParameter>-omp %NUM_CPUS%</threadParameter>, would that be sufficient information to add the post-command, even if we are not running in MPI mode?

Hm, threadParameter only seems to be used in MPI mode (and MPI legacy mode).  If omp is not working with mpiexec then that could be a problem.
Fixing threadParameter to work without MPI is probably needed. Either SimulationMode in Simulation.py needs to modify the postcommand or evaluateSample in Models/Code.py needs to read the threadParameter.

Here is a suggested fix for non-mpi modes:
diff --git a/framework/Simulation.py b/framework/Simulation.py
index 48b0f9652..b5a2e1853 100644
--- a/framework/Simulation.py
+++ b/framework/Simulation.py
@@ -86,13 +86,19 @@ class SimulationMode(MessageUser):
       @ In, runInfoDict, dict, the run info
       @ Out, dictionary to use for modifications.  If empty, no changes
     """
+    newRunInfo = {}
     import multiprocessing
     try:
       if multiprocessing.cpu_count() < runInfoDict['batchSize']:
         self.raiseAWarning("cpu_count",multiprocessing.cpu_count(),"< batchSize",runInfoDict['batchSize'])
     except NotImplementedError:
       pass
-    return {}
+    if runInfoDict['NumThreads'] > 1:
+      newRunInfo['threadParameter'] = runInfoDict['threadParameter']
+      #add number of threads to the post command.
+      newRunInfo['postcommand'] =" {} {}".format(newRunInfo['threadParameter'],runInfoDict['postcommand'])
+
+    return newRunInfo

   def XMLread(self,xmlNode):
     """

@joshua-cogliati-inl I added your suggestion in https://github.com/idaholab/raven/pull/1655.
(please take a look)


Update sbt-updates to 0.5.1

Updates com.timushev.sbt:sbt-updates from 0.5.0 to 0.5.1.
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.timushev.sbt", artifactId = "sbt-updates" } ]

labels: sbt-plugin-update, semver-patch

Codecov Report

Merging #3 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master       #3   +/-   ##
=======================================
  Coverage   88.82%   88.82%
=======================================
  Files          13       13
  Lines         546      546
  Branches       27       27
=======================================
  Hits          485      485
  Misses         61       61

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0ab2dfb...b8de327. Read the comment docs.


type inference in for-each loop is inconsistent with behavior elsewhere

the following code
void main() {
  final Iterable<int>? xs = null;
  final ys = xs ?? [];
  print(ys.runtimeType);        // List<int>
  final List<int>? zs = null;

  for (final x in xs ?? []) {}  // compiler error
  for (final x in ys) {}        // no problem
  for (final x in zs ?? []) {}  // no problem
}

yields a compiler error on the xs ?? [] loop, but not the ys loop.
this is counterintuitive and annoying.  one would think that whatever type the compiler inferred ys is
it should also infer xs ?? [] is in its for loop since it's the same expression.
notice that the zs ?? [] loop does not have a compiler error.
the difference here is that zs is a List, while xs is an Iterable.
i feel like this shouldn't matter, but somehow it does.
why should putting xs ?? [] into a variable and then using that variable
yield different behavior than simply inlining it?
a workaround is to put xs ?? <int>[] into the loop, but we only need this seemingly
superfluous type annotation when xs is an Iterable rather than a List,
and for some reason, we don't need it when declaring ys.
is this a bug relative to spec, or some unintended consequence of the spec?

dart --version
Dart SDK version: 3.2.4 (stable) (Thu Dec 21 19:13:53 2023 +0000) on "macos_x64"

This is not unique to for loops. It happens when the ?? expression has a context type, and that context type gives the [] an element type which is not the same as the element type of xs.
  Iterable<num> i4 = xs ?? []; // compile-time error.

This issue requires the expression to have a context type, which is applied as context type for the second operand. Otherwise it would use the type of the first operand, made non-nullable, as the context type of [], and then it would choose the element type of xs, which works.)
In the error case, the context type for [] becomes Iterable<num>, which means that the type of [] becomes List<num>.
And then the least upper bound of Iterable<int> and List<num?> is Object. That's a known shortcoming of the least-upper-bound algorithm.
It's operating the way it is for a reason, which mostly, or at least often, works, and it could have worked (and given xs ?? [] with context Iterable<num> a type of Iterable<num>) if it wasn't for the least-upper-bound algorithm being particularly bad at handling cases like List<X>/Iterable<Y> where Y is not a subtype of X.

In the error case, the context type for [] becomes Iterable<num>, which means that the type of [] becomes List<num>

i don't understand.  why would the context for assignment to ys be any different from the context in the xs loop?  also, where does this num come from?  i mean, yeah, it's an ancestor of int, but why is any of this code interested in a proper ancestor of int other than perhaps Object?

The num comes from my Iterable<num> i4 = ... example.
Dart performs type inference with an optional context type, if it can see that the context expects a specific type, or an empty context if it can't see any requirements.
The inference of e1 ?? e2 behaves differently depending on whether it has a type context.
If it has context type C, the context type for e1 is C? and the context type for e2 is C.
If it does not have a context type, then e1 has no context type either, but if the static type found for e1 is T, then the context type for e2 becomes NonNull(T).
That's precisely because List<int>? p = ...; var x = p ?? []; usually intends [] to be a <int>[], and we have no better hint.
The assignment to ys has no context type, because var ys =  does not imply any requirements.
Because of that var ys = xs ?? []; infers x to have type Iterable<int>?, then infers [] with context type Iterable<int>, and makes it <int>[]. Then it successfully finds the upper bound of Iterable<int> and List<int>, and all is well.
For for (var x in xs ?? []) ..., the xs ?? [] has a context type of Iterable<_>. We know it must be an iterable, because that's a type requirement on the expression.
That means the context type of xs is Iterable<_>? and for [] it's Iterable<_>, which leads to it being inferred as <Object?>[].
So, [] ends up with different types in the two cases, because one has a context type and the other does not.
And that's fine.
Then we hit the problem that least-upper-bound of Iterable<int> and List<Object?> is Object. That's highly annoying, and a separate problem that we're well aware of. The hope is to find a way to, at least, make sure that the least-upper-bound of two types, in a context with a type requirement that both types satisfy, should at worst choose the context type, and not just Object like today.
But that hasn't happened yet.

One other way of solving this would be:
for (final x in [...?xs]) {} // no problem


how do ex_phone_number support updates of (google libphonenumber) PhoneNumberMetadata.xml?

You can try to:

Replace this file from the ex_phone_number repository with this file from google libphonenumber.
Test if it works.
Add create a pull request here with the changes form point 1. We are welcome to update this.

I am talking about a "live" update (an easy way to update that file) from time to time

If you really need a "live" update then it could do steps 1. (to a different file) and 2. (but using the downloaded file) plus some option that would use the downloaded file instead of the one existing in the repository when compiling. So custom compiled library could be then deployed.
Though I don't see use cases where such a live update of that file would be needed.

You are welcome.
The question was answered. Closing.


References added to docs

Adding citation requirements to the main docs page

Also make sure this addresses #63

Looks good, should we also add this on the main page?

You mean that if we merge this it won't automatically update the main page?

This will update https://chemiscope.org/docs/index.html, I was asking about having something in https://chemiscope.org/index.html

We could include the JOSS markdown badge in the footer. I leave to you to decide if it looks good ^_^

Rebased & fixed conflicts

Probably not, I was thinking the same. Get them out.
On Tue, 21 Jul 2020 at 15:33, Guillaume Fraux<EMAIL_ADDRESS>wrote:

@Luthaf commented on this pull request.
In app/index.html
https://github.com/cosmo-epfl/chemiscope/pull/66#discussion_r458099673:

@@ -173,13 +173,17 @@
References

                   Atomic-Density representations for machine learning

MJ Willatt, F Musil, M Ceriotti - J. Chem. Phys, 2019

                   Chemiscope: interactive structure-property explorer for materials and molecule

G Fraux, RK Cersonsky, M Ceriotti - JOSS, 2020

                   Comparing molecules and solids across structural and alchemical space

@ceriottm https://github.com/ceriottm do we want to keep these
references here now that we have dataset specific reference lists?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/cosmo-epfl/chemiscope/pull/66#pullrequestreview-452461235,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAIREZ2QJOKEDBRK2QO6QRDR4WKMFANCNFSM4PDJIEUQ
.


Price history displays conflicting information depending on display range

Here are the day/week/month histories of market 21, taken April 24, 11:30 UTC. Looking at the two favorites, you'll see that each history shows a different development. That's confusing.

We can show a more granular price history to help combat this though there is quite a bit of a performance hit. @saboonikhil are there any further optimisations that you can do?

Why is the startTime changing? I guess Day, Week and Month account for interval types keeping startTime & endTime constant.

This is to select the time between now and the startTime

Eyeing on subsquid's new version and some query optimisations to allow room for granular level querying.


Add a datepicker component

For setting release dates, purchase dates, etc.
https://github.com/mariomka/vue-datetime
https://github.com/dbrekalo/vue-date-pick
https://github.com/charliekassel/vuejs-datepicker

It doesn't look like I'll actually need this. The default date input seems fine for now.


"Show default" flag was dropped from CLI option initialization

Pull Request Checklist

[x] implement the feature

/packit test


At the end of a round a scoreboard should be shown

https://github.com/sopra-fs23-group-20/client/commit/982ae2d10fefbfc9f6c6f6b6872a8a45443874a4
https://github.com/sopra-fs23-group-20/client/commit/cc7921d6996b83783a216c54953ece5171d3d0f6
https://github.com/sopra-fs23-group-20/client/commit/cc7921d6996b83783a216c54953ece5171d3d0f6
https://github.com/sopra-fs23-group-20/client/commit/40076b4accec8be268f4657e20a4d796e23a9ddc


Journaling does not enable using example shown above

When using the command shown above, journaling does not get enabled - I receive this error:
Set-MsmqQueue : Missing an argument for parameter 'Journaling'. Specify a parameter of type 'System.Nullable`1[System.Boolean]' and try again.
At line:1 char:63

... MsmqQueue –Name "dtriq" -QueueType Public | Set-MsmqQueue -Journaling

                                                          ~~~~~~~~~~~

CategoryInfo          : InvalidArgument: (:) [Set-MsmqQueue], ParameterBindingException
FullyQualifiedErrorId : MissingArgument,Microsoft.Msmq.PowerShell.Commands.SetMSMQQueueCommand

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

ID: 970cfb6e-da9f-2eb2-dd6f-e03d4cbdc1b1
Version Independent ID: f12e6497-dbcf-22ff-b3ee-858fb4cb4b57
Content: Set-MsmqQueue (msmq)
Content Source: docset/windows/msmq/set-msmqqueue.md
Product: w10
GitHub Login: @brianlic-msft
Microsoft Alias: brianlic

@officedocsbot assign @yogkumgit

Hi @jkobs
Thanks for your comments, we really appreciate them.
I tested in a lab, and got the same error, the article should say:
Set-MsmqQueue -Journaling:$true
or
Set-MsmqQueue -Journaling:$false
I'll create a PR to fix the article.
Thank you!

@kenwith please merge this PR if find it suitable

@get-itips  Thank you very much for the contribution and updating the documentation with PR. @jkobs
Hope this update is helpful for you. Thanks for taking out some time to open the issue. Appreciate and encourage you to do the same in future also.

@officedocsbot close


Add support for lz4 compression

Per comments at reddit lz4 compression is quite popular for modules and image compression. Booster should be able to handle this compression algorithm as well.

It turns out that the lz4 library does not support legacy format needed for Linux kernel.

Here is a pull request that implements the lz4 legacy format writer.


Second 'it' starting before first 'it' has been completed even after using done() callback

I have the following test case 'it' with async code for Login.I have used done() callback also but while executing second test case will start itself even when first test case has not yet completed.
Code of test case :
it('Verify Login',function (done) {
console.log(testdata);
browser.get(testdata.baseUrl);
isAngularSite(true);
browser.driver.manage().window().maximize();
browser.waitForAngular();
browser.sleep(6000);
console.log('Before Delete cookies');
browser.driver.manage().deleteAllCookies();
console.log('After delete cookies');
browser.sleep(40000);
var emailTextBoxElement = home_page.getEmailTextBoxSignIn();
console.log('Got email' + emailTextBoxElement);
browser.wait(protractor.ExpectedConditions.presenceOf(emailTextBoxElement), 25000, "Email taking too long to appear in the DOM").then(function () {
browser.wait(protractor.ExpectedConditions.visibilityOf(emailTextBoxElement), 25000, "'Email taking too long to appear on page'").then(function () {
emailTextBoxElement.sendKeys(testdata.login[0].email).then(function () {
browser.sleep(1000);
console.log('After Email filled');
var passwordTextBoxElement = home_page.getPasswordTextBoxSignIn();
passwordTextBoxElement.sendKeys(testdata.login[0].password).then(function () {
browser.sleep(1000);
console.log('After password filled');
var letDoItButton = home_page.getLetDoItButtonSignIn();
letDoItButton.click().then(function () {
browser.waitForAngular();
browser.sleep(3000);
console.log('After login');
var login_successful = home_page.getLoginUserDetails();
login_successful.isPresent().then(function (isPresent) {
expect(isPresent).toBe(true, "Login failed on Staff Portal FE app");
if (isPresent) {
login_successful.isDisplayed().then(function (isDisplayed) {
expect(isDisplayed).toBe(true, "Login failed on Staff Portal FE app");
console.log('Calling done');
done();
});
}
});
});
});
});
});
});
});
As seen above,I am already using 'done' callback too.It is launching the URL successfully but not entering email and password.
Just before entering email it starts second test case itself.I have used done callback too of Jasmine.Can someone please help me with this ?
Regards,
Kunal Shokeen

Hi there!
Your question is better suited for StackOverflow or Gitter. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.
From the the getting help section of the README:

Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)

Thanks!


PHP version

Looking forward to the PHP version of this example. :)

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

ID: 29256a0d-8508-d6af-220d-4e18e64b6f75
Version Independent ID: 05b78123-9e9c-ea8f-147c-77ef75bda498
Content: Offline Conversions Code Example - Bing Ads
Content Source: BingAds/bingads-12/guides/code-example-offline-conversions.md
Service: bing-ads
Product: unspecified
GitHub Login: @eric-urban
Microsoft Alias: eur

@eric-urban Awesome thanks!!


Wallaby timeouts... All promise returning calls require catch(done)

The reason errors in Wallaby fail with 2000ms timeouts is because there are no catches on the promises in the tests.
Add .catch(done) to the end of each then() in the tests causes any error to correctly logged.
e.g.
        validationGroup.isValid()
            .then(function(isValid){
                expect(isValid).to.be.true;
                validationGroup.release();
                done();
            }).catch(done);

I believe this is all fixed with the latest PR so will flag it as complete feel free to re-open.


add execute_v2 to support cairo1 calls encoding

Closes #1164
Introduced changes

add execute_v2 to support cairo1 calls encoding

[ ] This PR contains breaking changes

Hey @CremaFR, thanks for contributing 🚀
Could you provide code of the account you used for this?

Hey @CremaFR, thanks for contributing 🚀 Could you provide code of the account you used for this?

Hey! I used OZ implementation https://github.com/OpenZeppelin/cairo-contracts/blob/cairo-2/src/account/account.cairo
And a test transaction with a multicall using my changes to show that calldata are not separated anymore
https://goerli.voyager.online/tx/0x1629061102ff83ed6ba03ba72256077724634f535050529c36b2de4420f3619

Hello, great to see a contribution to starknet.py! Regarding the pull request, to serialize calldata for calls we use own serializers like in Cairo0 methods and we'd like to reuse them here, too. You can take your time and dig through our code to know how to use them or we can do it for you. Which option do you prefer?

Hello, great to see a contribution to starknet.py! Regarding the pull request, to serialize calldata for calls we use own serializers like in Cairo0 methods and we'd like to reuse them here, too. You can take your time and dig through our code to know how to use them or we can do it for you. Which option do you prefer?

I've done the modifications, you're right it's better this way :)

Well done 👌 One last thing before merging - I think replacing the additional _v2 methods with a flag cairo_version: int = 0 in execute and propagating it down to _prepare_invoke, in which there would be some if statements deciding which serializer to use, would be a bit better of an interface.

Done :)


Unable to integrate Juniper Routers with gnmic

I have successfully integrated Nokia Routers with gnmic and successfully visualizing telemetry stats on Grafana. But with Juniper, i am unable to retrieve any data using get command, hence, it's not working using subscription as well. PFB for reference.
gnmic -a <IP_ADDRESS>:57400 -u admin -p admin--insecure -d  get --path /interfaces/interface/state/counters
2024/04/24 15:06:19.625745 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel created
2024/04/24 15:06:19.625790 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to CONNECTING
2024/04/24 15:06:19.625867 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel exiting idle mode
2024/04/24 15:06:19.625967 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING
2024/04/24 15:06:19.626077 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "<IP_ADDRESS>:57400" to connect
2024/04/24 15:06:19.626201 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc0007c9e60] Received SubConn state update: 0xc00085c000, {ConnectivityState:CONNECTING ConnectionError:}
2024/04/24 15:06:19.629830 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY
2024/04/24 15:06:19.629957 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc0007c9e60] Received SubConn state update: 0xc00085c000, {ConnectivityState:READY ConnectionError:}
2024/04/24 15:06:19.630026 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to READY
2024/04/24 15:06:20.066320 /home/runner/work/gnmic/gnmic/pkg/app/logging.go:21: [gnmic] target "<IP_ADDRESS>:57400" get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
2024/04/24 15:06:20.066420 /home/runner/work/gnmic/gnmic/pkg/app/logging.go:21: [gnmic] target "<IP_ADDRESS>:57400" Get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
target "<IP_ADDRESS>:57400" get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
target "<IP_ADDRESS>:57400" Get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
When i used --encoding, same issue arise.
gnmic -a <IP_ADDRESS>:57400 -u admin -p admin --encoding proto get --path /interfaces/interface/state/counters -d --insecure
2024/04/24 15:11:51.328128 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel created
2024/04/24 15:11:51.328235 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to CONNECTING
2024/04/24 15:11:51.328364 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel exiting idle mode
2024/04/24 15:11:51.328484 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING
2024/04/24 15:11:51.328583 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "<IP_ADDRESS>:57400" to connect
2024/04/24 15:11:51.328791 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc0009b0150] Received SubConn state update: 0xc0009b02d0, {ConnectivityState:CONNECTING ConnectionError:}
2024/04/24 15:11:51.331169 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY
2024/04/24 15:11:51.331325 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc0009b0150] Received SubConn state update: 0xc0009b02d0, {ConnectivityState:READY ConnectionError:}
2024/04/24 15:11:51.331429 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to READY
2024/04/24 15:11:52.063025 /home/runner/work/gnmic/gnmic/pkg/app/logging.go:21: [gnmic] target "<IP_ADDRESS>:57400" get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
2024/04/24 15:11:52.063115 /home/runner/work/gnmic/gnmic/pkg/app/logging.go:21: [gnmic] target "<IP_ADDRESS>:57400" Get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
target "<IP_ADDRESS>:57400" get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
target "<IP_ADDRESS>:57400" Get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
sudo systemctl status gnmic.service
gnmic.service - gNMIc Service
Loaded: loaded (/etc/systemd/system/gnmic.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2024-04-24 10:15:42 PKT; 4h 58min ago
Main PID: 2158922 (gnmic)
Tasks: 15 (limit: 9428)
Memory: 34.6M
CPU: 35min 48.328s
CGroup: /system.slice/gnmic.service
2158922 /usr/local/bin/gnmic --debug --config /home/gnmi/gnmic.yml subscribe
gnmic.yml:
port: 57400
timeout: 10s
insecure: true
targets:
<IP_ADDRESS>:
username: admin
password: admin
subscriptions:
- sros_port_stats
- sros_ce_port_stats
- sros_cpu
- sros_memory_pool
- sros_bgp_state
- sros_ospf_state
- sros_interface_state
- sros_oper_state
<IP_ADDRESS>:
username: admin
password: admin
subscriptions:
- junos_interface_stats
subscriptions:
sros_cpu:
paths:
- "/state/system/cpu[sample-period=60]/summary/usage"
mode: stream
stream-mode: sample
sample-interval: 5s
sros_memory_pool:
paths:
- "/state/system/memory-pools"
mode: stream
stream-mode: sample
sample-interval: 5s
sros_port_stats:
paths:
- "/state/port[port-id=esat-1/1/1]/statistics"
mode: stream
stream-mode: sample
sample-interval: 5s
sros_ce_port_stats:
paths:
- "/state/port[port-id=1/1/c1/1]/statistics"
mode: stream
stream-mode: sample
sample-interval: 5s
sros_bgp_state:
paths:
- "/state/router/bgp/neighbor/statistics/session-state"
mode: stream
stream-mode: sample
sample-interval: 1s
sros_ospf_state:
paths:
- "/state/router/ospf/area/interface/neighbor-state/oper-state"
mode: stream
stream-mode: sample
sample-interval: 1s
junos_interface_stats:
paths:
- "/interfaces/interface/state/counters/in-octets"
- "/interfaces/interface/state/counters/out-octets"
mode: stream
stream-mode: sample
sample-interval: 5s
outputs:
prom:
type: prometheus
listen: :9273
path: /metrics
metric-prefix: gnmic
append-subscription-name: true
export-timestamps: true
debug: false
gnmic version
version : 0.35.1
commit : 91f4205
date : 2024-01-25T21:10:47Z
gitURL : https://github.com/openconfig/gnmic
docs : https://gnmic.openconfig.net

You are missing the --encoding flag. you can either pass it as a flag or part of the config file.

As I mentioned earlier, when I passed --encoding as flag with get, it still showed same error.

can you show an example of how you did that ?

PFB.
gnmic -a <IP_ADDRESS>:57400 -u admin -p admin --encoding proto get --path /interfaces/interface/state/counters -d --insecure
2024/04/25 10:37:42.599834 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel created
2024/04/25 10:37:42.599884 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to CONNECTING
2024/04/25 10:37:42.599961 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel exiting idle mode
2024/04/25 10:37:42.600025 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to CONNECTING
2024/04/25 10:37:42.600072 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel picks a new address "<IP_ADDRESS>:57400" to connect
2024/04/25 10:37:42.600225 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc000ad28a0] Received SubConn state update: 0xc000ad2a20, {ConnectivityState:CONNECTING ConnectionError:}
2024/04/25 10:37:42.602102 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1 SubChannel #2] Subchannel Connectivity change to READY
2024/04/25 10:37:42.602199 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [pick-first-lb 0xc000ad28a0] Received SubConn state update: 0xc000ad2a20, {ConnectivityState:READY ConnectionError:}
2024/04/25 10:37:42.602256 /home/runner/go/pkg/mod/google.golang.org/grpc@v1.60.1/grpclog/logger.go:53: [gnmic] [core] [Channel #1] Channel Connectivity change to READY
2024/04/25 10:37:43.425883 /home/runner/work/gnmic/gnmic/pkg/app/logging.go:21: [gnmic] target "<IP_ADDRESS>:57400" get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
2024/04/25 10:37:43.425972 /home/runner/work/gnmic/gnmic/pkg/app/logging.go:21: [gnmic] target "<IP_ADDRESS>:57400" Get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
target "<IP_ADDRESS>:57400" get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
target "<IP_ADDRESS>:57400" Get request failed: "<IP_ADDRESS>:57400" GetRequest failed: rpc error: code = Unimplemented desc = Encoding not supported
Error: one or more requests failed

you should check with Juniper which encodings are supported

Afair Juniper didn't play well with get requests; users were forced to use subscribe rpc

So, if i use encoding in config file, will it impact Nokia Routers as well because it is visualizing successfully for Nokia Routers.

you can set the encoding per subscription: https://gnmic.openconfig.net/user_guide/subscriptions/#file-based-subscription-config

Yes, get doesn't work with Juniper. I used encoding in config file and it start scrapping data to Prometheus.
subscriptions:
junos_interface_stats:
paths:
- "/interfaces/interface[name=et-1/1/0]/state/counters"
mode: stream
stream-mode: TARGET_DEFINED
sample-interval: 5s
encoding: proto
Thanks.


Feature-request: Images instead of icons

It would be awesome if the iconpicker could handle a set of relative imagepaths instead of icons as well!

Yes i really need this too !


Please disable logs by default

We often see these messages, originating from audio_session, a transitive dependency:
2021-09-15 15:58:12.148450+0100 Runner[10580:833980] routeChange detected
2021-09-15 15:58:13.457703+0100 Runner[10580:833980] routeChange detected
2021-09-15 15:58:14.760813+0100 Runner[10580:833980] routeChange detected
2021-09-15 15:58:21.482768+0100 Runner[10580:833980] routeChange detected

Those logs have probably outlived their usefulness. I've commented them out in the latest commit which you can test with a dependency override.

Thank you, @ryanheise. We'll upgrade to the next pub version once it's ready.

audio_session 0.1.6+1 has now been published.


[Feature] Add meta data for routes/views etc

In theory more classes, besides the IoC container, could benefit from the meta file for phpstorm.

[ ] Views
[ ] Routes
[ ] Config
[ ] Translation

Only problem it would have to be generated every time..

@barryvdh There are plugin for phpstorm which already handle this.
Check it: https://plugins.jetbrains.com/plugin/7532-laravel-plugin
It's very cool, but it break work of .meta.php so I just recompile it without some features :)


Update Java Liberty app to use Open Liberty

Application updated to use mphealth2.2. (outdated health method removed)
Dependencies updated to recommended versions and unit/IT tests to use junit-jupiter.
Dockerfile and pom.xml simplified.
Tested with CF and k8s helm based deployments.

CF manifest sample below: (microservice needs to be updated)
---
applications:
  - instances: 1
    timeout: 180
    name: appname
    buildpacks:
      - liberty-for-java
    path: ./target/javalibertyapp.war
    memory: 256M
    routes:
      - route: appname.us-south.cf.appdomain.cloud
    env:
      JAVA_OPTS: '-XX:ReservedCodeCacheSize=16M -XX:MaxDirectMemorySize=16M'
      JBP_CONFIG_OPEN_JDK_JRE: '[memory_calculator: {stack_threads: 20}]'
      JBP_CONFIG_LIBERTY: 'app_archive: {features: [microProfile-3.3]}'

@jmeis, rebased from development.

@ChuckCox conflicts resolved in PR https://github.com/IBM/java-liberty-app/pull/58


feat: add javascript implementation for lapack/base/dlaswp

This PR aims to add javascript implementation for lapack/base/dlaswp
Checklist

[x] Add readme.md
[x] Add package.json
[x] Add lib
[x] Add examples
[x] Add ndarray implementation
[x] Add docs
[x] Add benchmark
[x] Add test

I am getting following lint error, not sure why:
% git commit -m "chore: add index.d.ts"
make[1]: Entering directory '/Users/pranavchiku/repos/stdlib-js/stdlib'

Linting file<EMAIL_ADDRESS>
<EMAIL_ADDRESS>  52:2  error  Interface only has a call signature, you should use a function type instead  @typescript-eslint/prefer-function-type

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.

make[1]: *** [/Users/pranavchiku/repos/stdlib-js/stdlib/tools/make/lib/lint/typescript/eslint.mk:157: eslint-ts-files] Error 1
make[1]: Leaving directory '/Users/pranavchiku/repos/stdlib-js/stdlib'
make: *** [/Users/pranavchiku/repos/stdlib-js/stdlib/tools/make/lib/lint/typescript/Makefile:130: lint-typescript-declarations-files] Error 2

TypeScript declaration file lint errors.

You're getting the error because you haven't added the ndarray method signature. Without that, the interface isn't necessary.

That is what I suspected, I am thinking to get this implementation done correctly, make tests, and then do a ndarray implementation. ATM I think ndarray handling will be slightly tricky for me.

You don't need to incrementally write your TypeScript declaration files. Otherwise, you'll just waste your (and mine) time with spurious lint errors.

ndarray should be fairly trivial. You need offsetA and offsetX. It only affects your starting indices for iteration.

See https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/blas/base/dspmv for a slightly updated approach to writing BLAS packages. It is missing the offset parameter for the matrix, but this should be straightforward to add.

Applied code review, I think this PR can have a final review.

I applied the changes, where shall we add the comment that represents A as a matrix and illustrates how rows are interchanged.

Thank you for finishing this PR!


Pass Max/Min for PushTransposeSolution

Converting a deep-speaker model here. There is a pattern Conv->Max->Min, so we need add Max/Min to _broadcast_flip_whitelist. For one case, when we PushTransposeSolution, it stops at a Reshape node and skip optimization. For this case, I relax the logic to allow "one input" case.

This PR has a bug and the fix is immediately the next PR: PR 140


fix a bug in graph engine

In euler::core::graph_engine::GET_FEATURE, forget to use loop variable "i"

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Allow multiple users per ConnectionManager

From discussion:
@fooling :

Hi,
Another problem here.
We know that when using multi-thread to connect database, each thread would use the ConnectionManagerProvider to create a ConnectionManager.
A ConnectionManager seems to be designed to handle several connections which connect to a same database.
We can simply save the ConnectionManager to invoke connect() several times to achieve the multiplexing. But in some cases with DBCJ , when upper layer use a pooled datasource such as DBCP , the ConnectionManager to the same database would be created many times, and each ConnectionManager contians only one connection !
So , in consideration of some multi-thread cases, I want to induce a hashmap (ie. url ->ConnectionManager )into ConnectionManagerProvider.
So when a connection is creating, the hashmap would be used to ensure the ConnectionManager would not be created repeatly.

@gamlerhart :

Well, no. The intentions is to have usually one ConnectionManager per application. The intentions is that your application creates a ConnectionManager and create many connection with it. A ConnectionManager is (or should be) thread safe and create connections.
So, for DBCJ i would create one ConnectionManager per database type and reuse that one.
Yes: you would create a map holding the URL -> ConnectionManager mapping and reuse the same connection manager.
Connection-Pools: ADBCJ has it's simple connection pool, when you include the dependency and add the "adbcj:pooled:mysql" prefix. When using DBCJ, you've to decide on which layer of connection pool you want, I guess. Regular JDBC connection pool cannot deal with the async connections.

@fooling :

Then I need to figure out a way to reuse the ConnectionManager automatically, so that the upper layer connection pool could be changed freely.Or maybe I can add this map to Driver of DBCJ.
I have tried a connection pool named "druid" on async connections. It performs good as long as I close async resources carefully :)

@gamlerhart :

Em...
How can 'druid work, when it's not written for an async way of working? You mean "druid" works, if you're using the database via the JDBC API?
That will mean, when the part of the application which will use the async part will not benefit from the pool. Especially since the JDBC connection pool cannot be aware of running async operations of a potential underlying ADBCJ connection.
Anyway, just my though, and depends on the application.
We / I can add a entry point which reuses the ConnectionManager in ADBCJ, for easier usage. I'll do that. Also convinient when someone uses ADBCJ directly.

@gamlerhart :

Instead of creating a ''ConnectionManager' per user, you want to create one connection provider for a database. And then create a Connection per user.
So, the basic idea would be something like this:

Allow ADBCJ API to create a ConnectionManager just for a database, and then create connections per user .

Closed, stale.


Logging material and use of Sphere Sampler

Would it be possible to implement the Logging material (https://github.com/raysect/source/issues/98) as-is, with it just logging the hit points?
Also, would it be appropriate to use SphereSampler to generate a source that emits rays isotropically (similar to the UniformSurfaceEmitter)? Thanks!

Hi Eclipse17,
Apologies, Alex and I have been quite busy lately with another project and holidays, etc. We both need to find more time to build up some momentum on these issues.
I think that the code stub in #98 doesn't really have enough functionality to generate proper spot diagrams. It was more some prototype code to get us going. Because of your interest we'll try to prioritise this and get it resolved soon. I'll have a quick look at the code I have lying around to see if I can coble together a basic demo.
Can you say a bit more about your specific use case? Do you just want to put in a primitive and get the 3D hit points? Or are you more interested in getting convention spot diagrams, e.g. hit points in a plane passing through a lens, etc.
Also, a bit confused about what you need the SphereSampler source for. For observing radiation, you can use the UniformSurfaceEmitter and UniformVolumeEmitter. If its because you want to trace the paths its easy enough to just generate a uniform distribution of vectors and launch the rays manually. If it was a common use case we could add it. What are you using it for?
Matt

Hi Matt,
I completely understand, and my apologies for my delay in responding as well. Thanks so much for getting back to me.
For this specific case, I'm modeling how light from a point source enters the core material of a fiber optic fiber that consists of a cladding and a core. Using Raysect, I created a hollowed-out primitive box that has a second primitive box inside it. The outer hollowed-out box acts as the cladding around the inner box. This combination of objects are mounted on a crystal-like material, inside of which is the point source fo light. (see attached image)
Primarily, I just want to get 3D hit points for the locations where light would intersect the inner box (core) material. There are no lenses in the set-up, and wavelength is not a big concern right now.
The reason I asked about the SphereSampler is that I was trying to create an isotropic source of vectors and adapt the hit point demo (https://raysect.github.io/documentation/demonstrations/ray_intersection_points.html#demo-ray-intersection-points) for my situation. I was under the impression that I had to have a source of rays (rather than the UniformSurfaceEmitter or UniformVolumeEmitter) for the intersections to register. How would one go about generating the uniform distribution of rays, as you suggested?
Please let me know if you need more information!
Many thanks,
Eclipse17

Hi Eclipse17,
We've added a LoggingRay which should help with logging the 3D trajectories. See an example here:
https://github.com/raysect/source/blob/master/demos/optics/logging_trajectories.py
In this new demo we launch a set of ray paths through a glass lens and onto a target. Their trajectories are automatically logged. Its up to the user to decide what to do with the histories. In the example I use matplotlib to make a simple 3D plot of the trajectories.
For the isotropic source of of rays, just change the demo slightly. Launch all the rays from a single origin point but instead supply a list of evenly spaced isotropic vectors. Then iterate through the list of rays and launch your trajectories. We may make some helper "Light Probes" in the near future.
I think this deals with everything you are looking for functionality wise. Let us know if you still need more help.
Matt

Hi Matt,
This is fantastic -- this does exactly what I was wanting to do.
(Just a quick note -- when I ran the logging_trajectories.py demo, it didn't show the plot. I think the demo code might be missing a plt.ioff() right before the plt.show() command.)
Thank you so much!
Eclipse17

Fantastic, and thanks for spotting the bug. Let us know if you need help with anything else.


Create fcroc.nl

Email domain for teachers of Friesland College (frieslandcollege.nl)

This file should end with .txt, not .nl

@fcroc Flagging as inactive.


Point Cloud Compression

glTF version 2 with the GLB container supports the draco compression extension.
The XVIZWriter has an option for this but it is currently disabled as it was not working as expected. We need to work with @loaders.gl/gltf to fix this path and enable the option.
We know that draco decompression can take ~500ms to decode, but the size savings are still significant and is a valid option to add to XVIZ handling.

gltf will be dropped as we wrap up the current 0.x version and move to 1.0, where the focus will be on json & protobuf.
gltf was an attempt to balance JSON readability with binary data, but protobuf has been better from a performance perspective


Upgrading Bonfire 1 to Bonfire 2

I have an application developed by using Bonfire 1. The PHP version is 5.6. Now I want to upgrade same modules compatible with latest, PHP 7.4+.How to upgrade bonfire 1 application to Bonfire 2.

As per my knowledge, it seems very complicated. Cz bonfire 1 was based on ci 3 and bonfire 2 is based on ci4. Moreover bonfire is still beta version


Add support for peer and child projects

Describe the solution you'd like
A clear and concise description of what you want to happen.
CoG supports peer and child projects.

Specifically for CMIP5, the query for results includes additional sub-projects in the query (TAMPI, EUCLIPSE, LUCID, GeoMIP, and PIMP3).
https://esgf-node.llnl.gov/esg-search/search/?offset=0&limit=10&type=Dataset&replica=false&latest=true&project=CMIP5&project=TAMIP&project=EUCLIPSE&project=LUCID&project=GeoMIP&project=PMIP3&facets=project%2Cproduct%2Cinstitute%2Cmodel%2Cexperiment%2Cexperiment_family%2Ctime_frequency%2Crealm%2Ccmor_table%2Censemble%2Cvariable%2Cvariable_long_name%2Ccf_standard_name%2Cdata_node&format=application%2Fsolr%2Bjson
   "fq": [
        "type:Dataset",
        "replica:false",
        "latest:true",
        "project:\"CMIP5\" || project:\"TAMIP\" || project:\"EUCLIPSE\" || project:\"LUCID\" || project:\"GeoMIP\" || project:\"PMIP3\""
      ],

Describe the solution you'd like
A clear and concise description of what you want to happen.

Add support for peer and child projects, which includes new Django models and fields (M2M and/or FK).
Asub_project field that is an array of strings which is only used in the query (e.g. CMIP5)

Good find.  treating these as child projects to be added to the search seems like a good resolution...

Having missed this issue, I think it is still relevant and will put it on the board

In some ways, Tom's suggestion is a stopgap, adding to the DB when really this should be corrected in the index metadata.  Right now the issue is the related projects don't appear and should for CMIP5.  One way or another we need that before declaring production-ready.

Simple fix to add projects to the search query for CMIP5


Suggestion: addition of "Stringified" type for JSON.stringify()

It would be helpful if JSON.stringify() could be more specific about its return type than simply string. This would make it easier and safer to keep track of types. particularly in this real-world example of implementing Encrypted Media Extensions (EME).
Code
// https://www.w3.org/TR/encrypted-media/ : 9.1.3 License Request Format
export type LicenseRequest = {
    kids: string[];
    type: MediaKeySessionType;
}
export type LicenseObject = { keys: JsonWebKey[]; }

function generateEMELicense(licenseRequest: LicenseRequest, key: string): Stringified<LicenseObject> {
    let keyObj: JsonWebKey = {
        kty: "oct",
        alg: "A128KW",
        kid: licenseRequest.kids[0],
        k: key
    };

    return JSON.stringify({ keys: [keyObj] });
}

// Before this change, we could only type license simply as 'string'.
function updateMediaKeySession(mks: MediaKeySession, license: Stringified<LicenseObject>): Promise<void> {
    let encodedLicense: Uint8Array = new (window as any).TextEncoder().encode(license);
    return mks.update(encodedLicense);
}

JSON.stringify returns a value that is of type string | undefined. What would Stringified<T> look like and how would it restrict usage?

Stringified<T> would act for all purposes like a string outside of the context of JSON.parse(). However, it would narrow the output type of JSON.parse(). Sorry that I didn't make that clear in the initial post!
export type ObjWithFirstName = { firstName: string; };
let objWithFirstName: ObjWithFirstName = { firstName: "John" };
let objStr: Stringified<ObjWithFirstName> = JSON.stringify(objWithFirstName);

// No error, because Stringified<T> acts like a string, so inherits all the string methods.
objStr.split("{");
// No error, because JSON.parse() would narrow type from 'any' to ObjWithFirstName.
let firstName: string = JSON.parse(objStr).firstName;
// Error: property 'secondName' does not exist on type 'ObjWithFirstName'.
let secondName: string = JSON.parse(objStr).secondName;

// For both, no compile-time error. Will each throw SyntaxError at runtime upon JSON.parse().
let corruptStringified1: string = "]extra text[" + objStr;
let corruptStringified2: Stringified<ObjWithFirstName> = "]extra text[" + objStr;

What would Stringified look like?

I'm not sure how exactly the interface/implementation would look like (it's getting to the edge of my knowledge here), but based on my described behaviour, I hope someone can comment on whether this would be feasible to implement in any way; I'm open to input.

I use the following helper type/functions in a project of mine to preserve JSON type-safety. Not sure if it's possible to adapt it to make it compatible with a standard string, but I'll leave it here, maybe it can inspire someone.
interface JSONData {
brand: T;
data: string;
}
function toJSON(obj: T): JSONData {
return {
brand:   null,
data: JSON.stringify(obj)
};
}
function fromJSON(json: JSONData): T {
return JSON.parse(json.data);
}

You can define more restricted stringify/parse functions to keep tracking of serializable objects
interface Stringified<T> extends String {}

module JSONEx {
    export function parse<T>(raw: Stringified<T>): T {
        return JSON.parse(<string>raw);
    }

    export function stringify<T>(obj: T): Stringified<T> {
        return JSON.stringify(obj);
    }
}

let serialized = JSONEx.stringify({ x: 1, y: 2 });
let obj = JSONEx.parse(serialized);

@shadeglare Your definition of Stringified doesn't really add much type safety since structural typing matches it to any other Stringfied. E.g
let serialized = JSONEx.stringify({ x: 1, y: 2 });
let fake: typeof serialized = "hello";
let obj: Point = JSONEx.parse(serialized); // compiles
let obj2: Point = JSONEx.parse(fake); // also compiles

This example is a bit trivial but as the codebase gets bigger these kinds of bad assignments get more like to happen and then havoc ensues.

A possible improvement that just came to my mind:
// JSONData and toJSON unchanged

function fromJSON<T>(json: string): {};
function fromJSON<T>(json: JSONData<T>): T;
function fromJSON<T>(json: string | JSONData<T>): T {
    if (typeof json == "string") {
        return JSON.parse(json);
    }
    return JSON.parse(json.data);
}

interface Point {
    x: number;
    y: number;
}

let serialized = toJSON({ x: 1, y: 2 });
let obj = fromJSON(serialized); // OK: obj is {x: number, y: number}
let fake: typeof serialized = "hello"; // Error
let x = fromJSON("hello"); // OK: x is {}

JSON.parse(JSON.stringify(x)) is hardly an identity function T.
You could accomplish this with a branding yourself if you were willing to take on that risk; I don't think we need anything special in the type system for it

you can emulate this today with mapped types, for instance,,
// use space in the name to avoid the property showing in your completion list
type Stringified<T> = string & {
    [P in keyof T]: { "_ value": T[P] }
};

declare function parse<T>(text: Stringified<T>): T;
declare function stringify<T>(value: T): Stringified<T>;

export type ObjWithFirstName = { firstName: string; };
let objWithFirstName: ObjWithFirstName = { firstName: "John" };
let objStr = stringify(objWithFirstName);  //

// No error, because Stringified<T> acts like a string,  check
objStr.split("{");

// No error, because parse() would narrow type from 'any' to ObjWithFirstName. check
let firstName: string = parse(objStr).firstName;

// Error: property 'secondName' does not exist on type 'ObjWithFirstName'. check
let secondName: string = parse(objStr).secondName;

// any concat operations render it to string.. not sure there is a way in the type system to make this part work.
let corruptStringified1: string = "]extra text[" + objStr;
let corruptStringified2 = "]extra text[" + objStr;

As @RyanCavanaugh noted, this is a very specialized scenario, and does not benefit the general population, you can always add your "taged" strings to parse and striginify.

use tag types:
declare global {
    class Stringified<T> { private ___stringified T; }
    interface JSON {
    //    stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
         stringify<T>(value: T, replacer?: (key: string, value: any) => any, space?: string | number): Stringified<T>;
    }
}

@aleksey-bykov Your JSON.stringify() interface is exactly what I need, however your Stringifed<T>, by not relating to the string primitive, does not facilitate string concatenation. Could you explain your reasoning behind adding the ___stringified: T field?
@mhegazy Your mapped types solution works wonders. I don't understand what the { "_ value": T[P] } type means, however. Is "_ value" a magic name of some sort? I don't see any usage like it in the TypeScript docs.
Here is what I've come to use, by combining mhegazy's Stringified<T> and aleksey-bykov's JSON interface:
export type LicenseObject = { keys: JsonWebKey[]; }
declare global {
    type Stringified<T> = string & {
        [P in keyof T]: { "_ value": T[P] }
    };
    interface JSON {
        //    stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
        stringify<T>(value: T, replacer?: (key: string, value: any) => any, space?: string | number): string & Stringified<T>;
        // parse(text: string, reviver?: (key: any, value: any) => any): any;
        parse<T>(text: Stringified<T>, reviver?: (key: any, value: any) => any): T;
    }
}

@mhegazy Your mapped types solution works wonders. I don't understand what the { "_ value": T[P] } type means, however. Is "_ value" a magic name of some sort? I don't see any usage like it in the TypeScript docs.

no, it is a regular property. i just wanted to add a space in the name to filter it out of the completion list when you hit o.. (the language service filters out any thing that is not a valid identifier name, so something that starts with a @ or a digit would do the same as well)

@mhegazy So Stringified<T> is the intersection of a string and an anonymous interface with the following behaviour, as far as I understand:
Every property matching a key of T effectively maps to an object which has one field, named "_ value", which is itself typed as T[P].
What exactly is this doing? Regardless of whether or not it shows up in the completion list, what is the purpose of "_ value" here?

Stringified<T> is a string, and a tagged object type. the string makes it behave like string for reading, the tagged object type makes it so that you can not assign anything to it unless it came from a a stringify from the same type.. so Stringified<{a:number}> is not assignable to Stringified<{a:string}>. it also allows you to infer the type back in parse and get your T back.
You could also have done this with a simple intersection, i.e. string & T, but that makes the type appear to have the properties of T, which is not correct at runtime; the "_value" prop, makes it so that the type  T is tucked under one property, and reduces the chance that you by mistake would do something like stringified.a and get away with it, you will have to write stringified["_ value"] which is less accessible.

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.


Include .nvmrc into source

This assists in node development (similar to Pipfile in Python, defines the node version)

[ ] Ensure file is excluded from build output

Done


Basic tutorial fail, mapDispatchToProps() in Connect(FAQ) must return a plain object. Instead received undefined

Hi! I'm trying to use redux-saga in my project. I'm starting with simply fetching the data as an array from my API. However, I keep having this warning mapDispatchToProps() in Connect(FAQ) must return a plain object. Instead received undefined. Also, as I'm logging in my sagas, when I start the component, in console I see FAQSaga, watchData, actions, true but neither getdata nor error appear. I wonder why and how to fix it.
My rootSaga:
import { fork } from 'redux-saga/effects';
import FAQSaga from '../sagas/FAQSaga.js';

export default function * rootSaga() {
    yield [
        fork(FAQSaga)
    ];
}

FAQSaga.js
import * as actions from '../actions/FAQActions';
import axios from 'axios';
import { call, put, take, fork } from 'redux-saga/effects';

export function* getData() {
    try {
        console.log('getdata');
        const response = yield call(axios.get, 'http://localhost:8080/rest/book/all');
        const data = yield response.json();
        yield put(actions.GET_FAQ.SUCCESS(data));
    } catch (e) {
        console.log('erorr');
        console.log(e);
        yield put(actions.GET_FAQ.FAILURE(e));
    }
}

export function* watchData() {
    console.log('watchData');
    while (true) {
        console.log('true');
        yield take(actions.GET_FAQ.REQUEST);
        yield fork(getData);
    }
    // yield takeEvery(actions.GET_FAQ.REQUEST, getData);
}

function * FAQSaga() {
    console.log('FAQSaga');
    yield [
        fork(watchData)
    ];
}

export default FAQSaga;

FAQActions.js
import {REQUEST, SUCCESS, FAILURE, action} from './helpers';

const GET_FAQ_BASE = 'GET_FAQ_';
export const GET_FAQ = {
    REQUEST: GET_FAQ_BASE + REQUEST,
    SUCCESS: GET_FAQ_BASE + SUCCESS,
    FAILURE: GET_FAQ_BASE + FAILURE
};

const POST_FAQ_BASE = 'POST_FAQ_';
export const POST_FAQ = {
    REQUEST: POST_FAQ_BASE + REQUEST,
    SUCCESS: POST_FAQ_BASE + SUCCESS,
    FAILURE: POST_FAQ_BASE + FAILURE
};

export const getFAQ = {
    request: () => action(GET_FAQ.REQUEST),
    success: response => action(GET_FAQ.SUCCESS, {response}),
    failure: error => action(GET_FAQ.FAILURE, {error})
};

export const postFAQ = {
    request: data => action(POST_FAQ.REQUEST, {data}),
    success: response => action(POST_FAQ.SUCCESS, {response}),
    failure: error => action(POST_FAQ.FAILURE, {error})
};

FAQ.js
import axios from 'axios';
import PropTypes from 'prop-types';

import { connect } from 'react-redux'
import * as actions from '../../actions/FAQActions';

class FAQ extends Component {

    render() {
        return (

Here some Frequently Asked Questions will be displayed.

                {console.log('FAQ')}
                { this.props.children }
                <button type="button" onClick={this.postLoginData}>
                    post
                </button>
                {/*<button type="button" onClick={this.onClick}>book</button>*/}

        )
    }
}

FAQ.propTypes = {};

const mapStateToProps = state => {
    return {
        data: state.FAQReducer.fetchedFAQData
    }
};

const mapDispatchToProps = (dispatch) => ({
    actionOnLoad: () => dispatch(actions.getFAQ.request())
});

export default connect(mapStateToProps, mapDispatchToProps)(FAQ);```

Could u put ur code on smth like codesandbox.io ? Then I would be able to check ur issue quickly once I get home

the codesandbox example is broken and incomplete, you do not create store anywhere, nor do u actually render ur FAQ component

Sorry, I have never before used it. Can I give you access to my bitbucket repo instead?

@Andarist, fixed it. It should be working now along with the store.

Bitbucket repo is also great, I'm asking for codesandbox, because in most cases people can't share work-related repositories.
I would like to ask you for the future, to test examples you give others for testing - I had to put my time into making it work. From the very beginning there was no mentioned error. I had to tweak ur code to use correct imports and stuff and when I have 'fixed' those issues example is working as expected (at least I guess so). You can check this out here - https://codesandbox.io/s/02rnnwv1l

I am deeply sorry. Especially for lack of question; when writing it was obvious for me, but after re-reading, it's not.
What I would like to have: I want to call action which will populate my store with some data. So, when calling actions.getFAQ.request I'd like to have saga call my API and using axios fetch the data and put it into Redux store. In FAQ.js (which is my component) I would like to have access to fetchData which is dispatched in FAQContainer.js. Also I'd like to have access to props which I mapped in mapStateToProps in FAQContainer.js
What I have now: basically I'm doing mapStateToProps and mapDispatchToProps and then using connect to connect my FAQContainer.js with FAQ.js. But when I try to access my props they appear to be undefined. Also, redux store is unchanged.
What I believe might be an issue: saga? Not sure if getData() in FAQSaga.js is called. I tried console logging it and debugging but it seems that it's not called. If not that, maybe there is some kind of issue with reducer since the state is not changed.
Additional questions: after my update, was the codesandbox still not working? I tested it and though that everything should be correct. But once again, sorry for the first time. I'll learn from my mistakes and apologize for your lost time. As for your changes; I believe they didn't really solve my issue. The props are still undefined. But maybe something in the logic itself is incorrect?

Im just about to get sleep, gonna respond in full tomorrow.
As to the codesandbox tweaked by me - u need to click the button to trigger the action which will trigger ur getData saga

I tried clicking the button but I received typeError: this.props.fetchData() is not a function.

Please check my sandbox again, I think I have forgotten to save every file in there (action is triggered with a button click as mentioned before)

Yes, it works now, thank you. But I'm trying to find the places where I did mistakes and I'm failing.
I can see the change in FAQ.js => 	postLoginData() { 		console.log(this.props) 		this.props.fetchData() 	} and 				<button type="button" onClick={this.postLoginData.bind(this)}> 					post 				</button>
Also there are some changes in FAQsaga.js yield put(actions.getFAQ.success(data)) and yield put(actions.getFAQ.failure()). Am I missing any other changes? I tried applying these to my code but it didn't help. Still looks as if mapDispatchToProps isn't working.

Well, I haven't listed all the changes I've made - you should be able to compare codesandbox provided by you with mine, file by file. Honestly I haven't done much changes (logic-wise), just fixed some bad imports/usage.
Gonna close this issue as it seems to be resolved. Don't be afraid to post more comments with new findings, I'm always do my best and try to reply, even in the closed issues.


how to run multiple bot  (clone) in one go file program,Is there a code example?

run multiple telebot in one go file program,Is there a code example?

i solved the problem


Update install.rst to specify how to install board definitions

Source for this being the correct way: https://libera.irclog.whitequark.org/amaranth-lang/2023-09-21

I'm aware that this is a pain point for new users of Amaranth but I'm also not sure if the current installation page is what we should continue to present, given that it only works in a virtual environment if you're on a modern Linux system (Debian, Ubuntu, WSL 2). It's possible that the right thing to do is to recommend using PDM, but it might also not be.
I'm not going to merge this within the 0.5 release cycle but we should definitely look into improving installation instructions for the 0.6 release cycle.

I found this particular step worked for me on a MacBook, using a venv but not pdm.
Other steps didn't, (I needed to set some environmental variables to point out the toolchain and my current hack of doing this via setting os.environ is not ideal) so I can see why you would want to just rewrite the installation guide instead.

Take a look at https://github.com/amaranth-lang/template-fpga, it could be a useful starting point.


[RESOLVED] High ICMP ping response time

Problem started at 16:45:29 on 2023.08.21
Problem name: High ICMP ping response time
Host: HP_iLO
Severity: Warning
Operational data: Value: 522ms
Original problem ID: 86411
Event details in Zabbix: http://<IP_ADDRESS>/tr_events.php?triggerid=23268&eventid=86411

Problem has been resolved in 5m 0s at 16:50:29 on 2023.08.21
Problem name: High ICMP ping response time
Host: HP_iLO
Severity: Warning
Original problem ID: 86411