OverflowError: math range error

I am trying train using MQ2007-list dataset.
with open('/home/shivaraj/Downloads/MQ2007-list/Fold1/train.txt') as trainfile,
open('/home/shivaraj/Downloads/MQ2007-list/Fold1/vali.txt') as valifile,
open('/home/shivaraj/Downloads/MQ2007-list/Fold1/test.txt') as evalfile:
TX, Ty, Tqids, T_ = pyltr.data.letor.read_dataset(trainfile)
VX, Vy, Vqids, V_ = pyltr.data.letor.read_dataset(valifile)
EX, Ey, Eqids, E_ = pyltr.data.letor.read_dataset(evalfile)
metric = pyltr.metrics.NDCG(k=10)
Only needed if you want to perform validation (early stopping & trimming)
monitor = pyltr.models.monitors.ValidationMonitor(
VX, Vy, Vqids, metric=metric, stop_after=250)
model = pyltr.models.LambdaMART(
metric=metric,
n_estimators=1000,
learning_rate=0.02,
max_features=0.5,
query_subsample=0.5,
max_leaf_nodes=10,
min_samples_leaf=64,
verbose=1,
)
model.fit(TX, Ty, Tqids, monitor=monitor)
This error log--
OverflowError                             Traceback (most recent call last)
 in
16 )
17
---> 18 model.fit(TX, Ty, Tqids, monitor=monitor)
~/miniconda3/envs/smartDB/lib/python3.6/site-packages/pyltr/models/lambdamart.py in fit(self, X, y, qids, monitor)
199
200         n_stages = self.fit_stages(X, y, qids, y_pred,
--> 201                                     random_state, begin_at_stage, monitor)
202
203         if n_stages < self.estimators.shape[0]:
~/miniconda3/envs/smartDB/lib/python3.6/site-packages/pyltr/models/lambdamart.py in _fit_stages(self, X, y, qids, y_pred, random_state, begin_at_stage, monitor)
406             y_pred = self._fit_stage(i, X, y, qids, y_pred, sample_weight,
407                                      sample_mask, query_groups_to_use,
--> 408                                      random_state)
409
410             train_total_score, oob_total_score = 0.0, 0.0
~/miniconda3/envs/smartDB/lib/python3.6/site-packages/pyltr/models/lambdamart.py in _fit_stage(self, i, X, y, qids, y_pred, sample_weight, sample_mask, query_groups, random_state)
332         for qid, a, b, _ in query_groups:
333             lambdas, deltas = self._calc_lambdas_deltas(qid, y[a:b],
--> 334                                                         y_pred[a:b])
335             all_lambdas[a:b] = lambdas
336             all_deltas[a:b] = deltas
~/miniconda3/envs/smartDB/lib/python3.6/site-packages/pyltr/models/lambdamart.py in _calc_lambdas_deltas(self, qid, y, y_pred)
267         actual = y[positions]
268
--> 269         swap_deltas = self.metric.calc_swap_deltas(qid, actual)
270         max_k = self.metric.max_k()
271         if max_k is None or ns < max_k:
~/miniconda3/envs/smartDB/lib/python3.6/site-packages/pyltr/metrics/dcg.py in calc_swap_deltas(self, qid, targets, coeff)
33             for j in range(i + 1, n_targets):
34                 deltas[i, j] = coeff *
---> 35                     (self._gain_fn(targets[i]) - self._gain_fn(targets[j])) *
36                     (self._get_discount(j) - self._get_discount(i))
37
~/miniconda3/envs/smartDB/lib/python3.6/site-packages/pyltr/metrics/gains.py in _exp2_gain(x)
16
17 def _exp2_gain(x):
---> 18     return math.exp(x * _LOG2) - 1.0
19
20
OverflowError: math range error

Did you find a workaround for this?  I am having the same problem as well ...

One could restructure the problem to be in log space, avoiding the exponential.   This is how many algorithms deal with exponentials (and potential overflow).

That's indeed what the above bit of code does :)


Kanban board

https://github.com/Lusindiso/space-travellers/projects/1
We are 2 students on this project.

Hi @ , 👋
STATUS: Approved  🎉
Your project is complete!  There is nothing else to say other than... it's time to merge it
Congratulations! 🎉  🎉 🎉

Optional suggestions
Every comment with the [OPTIONAL] prefix won't stop the approval of this PR. However, I strongly recommend you to take them into account as they can make your code better. Some of them were simply missed by the previous reviewer and addressing them will really improve your application.
Cheers and Happy coding!👏👏👏
Feel free to leave any questions or comments in the PR thread if something is not 100% clear.
Please, remember to tag me on( @BenMukebo ) in your question so I can receive the notification.

As described in the Code reviews limits policy  you have a limited number of reviews per project (check the exact number in your Dashboard). If you think that the code review was not fair, you can request a second opinion using this form.


Using in Windows 10.

I'm using Windows 10 and I want simple command like this:
powershell -Command "$PSVersionTable.PSVersion"
or maybe I need to launch .ps1 files.
If I use this hook:
[
  {
    "id": "webhook-test",
    "execute-command": "test.ps1",
    "command-working-directory": "."
  }
]

with test.ps1 like this:
Write-Verbose "Testing..." -verbose

I get this from webhook:
[webhook] 2017/05/04 16:13:11 webhook-test got matched
[webhook] 2017/05/04 16:13:11 webhook-test hook triggered successfully
[webhook] 2017/05/04 16:13:11 2017-05-04T16:13:11+02:00 | 200 |          797.6µs | <IP_ADDRESS>:9001 | GET /hooks/webhook-test
[webhook] 2017/05/04 16:13:11 executing test.ps1 (test.ps1) with arguments ["test.ps1"] and environment [] using . as cwd
[webhook] 2017/05/04 16:13:11 command output:
[webhook] 2017/05/04 16:13:11 error occurred: fork/exec test.ps1: %1 is not a valid Win32 application.
[webhook] 2017/05/04 16:13:11 finished handling webhook-test

If I use:
"execute-command": "powershell -Command \"$PSVersionTable.PSVersion\"",
I get:
[webhook] 2017/05/04 16:19:25 executing powershell -Command "$PSVersionTable.PSVersion" (powershell -Command "$PSVersionTable.PSVersion") with arguments ["powershell -Command \"$PSVersionTable.PSVersion\""] and environment [] using . as cwd
[webhook] 2017/05/04 16:19:25 command output:
[webhook] 2017/05/04 16:19:25 error occurred: exec: "powershell -Command \"$PSVersionTable.PSVersion\"": executable file not found in %PATH%

Why?

You got two different behaviors here because of the script call itself (Windows sucks at running PowerShell scripts for some reason)...
Scenarios:

You are missing the script handler here -- makes sense, powershell scripts are still scripts.
The command runner can't resolve either powershell or "powershell -Command \"$PSVersionTable.PSVersion\"" using info from your PATH variable.

I'll assume you can launch your powershell script from your command prompt as well as from the run command. So in order to work around this, you could:

Call a cmd prompt to handle your powershell script and its arguments.
Verify that Windows is resolving your commands by running them from Run or Cmd.
Play with quotes -- these will make or break your script call, specially when the path contains spaces.

Here is a powershell snippet I keep handy when working with spaces:
powershell -noexit "& ""C:\path\to_my\script.ps1"""
I hope this info gets you closer to your answer~

Command should be powershell and you should pass rest of the arguments via pass-arguments-to-command. To pass string use { "source": "string", "name": "firstargument" } as specified in https://github.com/adnanh/webhook/wiki/Hook-Definition

When I run powershell scripts in Windows Task Scheduler, I use the following:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command "& C:\path\to\script.ps1 ; exit $LASTEXITCODE"


HTML comments hidden in texts but displayed in DocCard

Have you read the Contributing Guidelines on issues?

[X] I have read the Contributing Guidelines on issues.

Prerequisites

[X] I'm using the latest version of Docusaurus.
[x] I have tried the npm run clear or yarn clear command.
[x] I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
[X] I have tried creating a repro with https://new.docusaurus.io.
[x] I have read the console error message carefully (if applicable).

Description
Mutli-line HTML comments are not removed from previews. The preview then contains the first line of the comment instead of the actual content.
Reproducible demo
https://stackblitz.com/github/facebook/docusaurus/tree/main/examples/classic-typescript?file=docs%2Ftutorial-basics%2Fcreate-a-document.md
Steps to reproduce

Change the start of the tutorial page create-a-document to

sidebar_position: 2
Create a Document

Documents are ...
2. View the card layout from the page "Tutorial - Basics"
3. The description in the card is "<!-- black"
Expected behavior
The html comment should be ignored even if it is multi-line.
Actual behavior

Your environment

Public source code:
Public site URL:
Docusaurus version used:
Environment name and version (e.g. Chrome 89, Node.js 16.4):
Operating system and version (e.g. Ubuntu 20.04.2 LTS):

Self-service

[ ] I'd be willing to fix this bug myself.

I want to work on this @tomasdahlqvist , can you please assign this to me :-)

Can you assign this to me

Note HTML comments are not valid MDX syntax, and Docusaurus v3 interprets .md docs as MDX by default (unless you use format: md)
We do add back support for HTML comments as a workaround to ease the adoption of Docusaurus v3, but it's preferable to use either format: md or to avoid using HTML comments in the first place. You'd better choose between CommonMark or MDX, not a mix of both. In the future we might remove support for HTML comments in MDX docs.
That being said, we add back support for HTML comments through a lib: https://github.com/leebyron/remark-comment
There was a bug in multiline comments that I tried to fix in this PR: https://github.com/leebyron/remark-comment/pull/3
This official repo is not maintained anymore and the PR hasn't been merged so I published a fork that Docusaurus uses: https://www.npmjs.com/package/@slorber/remark-comment
I'm not an expert in extending Markdown syntax and it's probable that my attempt has unsupported edge cases.

Oh damn, I misunderstood the problem.
Indeed the card will display the comment, but not only. This is because the card description has to be a pure string and we do a best effort to extract and serialize that string to display it in that card.
Our docs tell you the behavior:
https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs

The first line of Markdown content

This is not only used in the card, but also on SEO description metadata and eventually other places.
Unfortunately we won't really be able to solve this. The description has to be a pure string. We provide a default but if the default is not good enough to you, you should rather provide an explicit description front matter instead.

I found it strange that one line comments work but not multiline. Also in for example https://github.com/facebook/docusaurus/issues/9691 the  and /* */ syntax are both viable.
Shouldn't the standard be that either no comments work or all comments work?


[Question]: How would I handle redis failure?

Wondering how to go about handling Redis failure and keeping app availability
I know that we should treat redis like any other database, but is there any way to handle redis failure or restoring redis cache usage once redis is back up without having to restart the application?

The cache decorator logs a warning if a backend fails, it is up to the redis client implementation to retry access to Redis.
The Python Redis client has a rich set of retry configuration options you could explore, but I generally would expect the client to just re-connect once your Redis setup is back up and if the cache is still there and fresh FastAPI Cache will continue to use it to serve future requests.
There is no need to restart anything for this to work.


Adding Vulkan-Headers as a dependency?

Instead of embedding vk.xml, maybe we can add Vulkan-Headers as a submodule, or otherwise add another build function that can fetch the file from GitHub using http.
Benefits:

Cross platform (no system dependent path is required, not even the Vulkan SDK)
Beginner friendly (no need to figure out the path manually)
Up to date automatically
Easier time for downstream projects, no need to include Vulkan-Headers as a submodule in their projects.

The CI already uploads this as artefact, but I think there is no predictable URL to download it, hence I could not provide a link in the readme.

There is no direct way to get a workflows artifact URL, but there is a service for it: https://nightly.link (read what is said on the website)
Here is the example link: https://nightly.link/Snektron/vulkan-zig/workflows/build/master/vk.zig.zip
Workflow artifacts wont work for people that want to get this file through Zigs package manager.
You could also publish vk.zig as a part of github releases.
Ash for Rust seems to directly embed generated files in their repository, that doesn't seem ideal.

It looks like there are ways to create a release from github CI directly. I think ideally it should be as follows:

Automatically generate a release when a new Vulkan SDK version is released.
Manually create releases whenever the Zig compiler is updated in a breaking way.

That leaves the question of what to do with older versions and nightly versions of vk.xml. Im not sure that creating a release every day is a good option, but its an option.

There is an option to also create a separate repo for releases like nim does https://github.com/nim-lang/nightlies/releases
But I don't think this is really needed.
In the future package manager could solve these problems, one could get vk.xml through a package manager, we just have to see how it evolves.

I just pushed a new build.zig for the example that shows you how to do it. For now I haven't yet added it as a dependency to the main build.zig, though I'd be open for it if it can be integrated with dependabot or something. See example build.zig. I've also updated the README with a description of how to do it. I believe that should be sufficient to close this issue.


Use java's builtin facilities for URI encoding.

There is a bug in http4s where %xx sequences are rendered
upper case if the xx characters might be hex digits. But it's
not clear why we're using NIH URI facilities in any case.

Current coverage is 69.15% (diff: 88.88%)

Merging #1397 into master will decrease coverage by 0.01%

@@             master      #1397   diff @@
==========================================
  Files           253        253
  Lines         12905      12907     +2
  Methods       12631      12641    +10
  Messages          0          0
  Branches        136        128     -8
==========================================
  Hits           8926       8926
- Misses         3979       3981     +2
  Partials          0          0

Powered by Codecov. Last update 77478ab...961dc27

👍


Cannot build with flag BUILD_NETWORK_DEVICE=ON

Required Info

Camera Model
D435

Firmware Version
5.15.1

Operating System & Version
Ubuntu 18.04

Kernel Version (Linux Only)
4.9.253-tegra

Platform
Jetson Nano

SDK Version
2.54.2

Language
python }

Segment
Robot }

Issue Description
In attempt to build latest available SDK (v2.54.2) on the Jetson Nano with the following configuration
cmake ../ -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=false -DBUILD_NETWORK_DEVICE=ON -DBUILD_WITH_CUDA=true
I've received the following WARNING for the BUILD_NETWORK_DEVICE:
-- The CXX compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking internet connection...
-- Internet connection identified
-- Info: REALSENSE_VERSION_STRING=2.54.2
-- Setting Unix configurations
-- Info: Building with CUDA requires CMake v3.8+
-- The CUDA compiler identification is NVIDIA 10.2.300
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc
-- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc -- works
-- Detecting CUDA compiler ABI info
-- Detecting CUDA compiler ABI info - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found CUDA: /usr/local/cuda (found version "10.2")
-- CUDA_LIBRARIES: /usr/local/cuda/include /usr/local/cuda/lib64/libcudart_static.a;-lpthread;dl;/usr/lib/aarch64-linux-gnu/librt.so;/usr/local/cuda/lib64/libcusparse.so;/usr/local/cuda/lib64/libcublas.so
-- CHECK_FOR_UPDATES depends on BUILD_GRAPHICAL_EXAMPLES flag, turning it off..
-- Performing Test SUPPORTS_CXX14
-- Performing Test SUPPORTS_CXX14 - Success
-- using RS2_USE_V4L2_BACKEND
-- Found usb: /usr/lib/aarch64-linux-gnu/libusb-1.0.so
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'libudev'
--   Found libudev, version 237
-- Found Udev: /usr/include
-- Found OpenGL: /usr/lib/aarch64-linux-gnu/libOpenGL.so
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Fetching recommended firmwares:
-- disable link time optimization for fw project
-- ... https://librealsense.intel.com/Releases/RS4xx/FW/D4XX_FW_Image-<IP_ADDRESS>.bin
-- ... https://librealsense.intel.com/Releases/SR300/FW/SR3XX_FW_Image-<IP_ADDRESS>.bin
-- ... https://librealsense.intel.com/Releases/L5xx/FW/L51X_FW_Image-<IP_ADDRESS>.bin
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_NETWORK_DEVICE

After building and install, I tried to command rs-server in Jetson nano, but I get:
-bash: rs-server: command not found
Running rs-enumerate-devices shows the camera is connected correctly.
Running sudo systemctl restart rs-server.service gives: Failed to restart rs-server.service: Unit rs-server.service not found.

Hi @yovamo  The rs-server networking interface was removed in librealsense 2.54.1 and so the -DBUILD_NETWORK_DEVICE=ON CMake flag will not work any more.  If your project requires the network interface then librealsense version 2.53.1 or 2.51.1 will need to be installed instead of 2.54.2.
It is planned that a new networking system to replace the removed rs-server one will be introduced in an upcoming librealsense release.

Thanks @MartyG-RealSense. This can be closed!


Corrected sql script folder in system admin guide

According to the system administrator guide, sql scripts are located in db/latest/setup, but they are in db/latest/sql in the latest release

Thanks for spotting @mbreemhaar, will merge


German audio generation ignoring umlaut

@nonstoptimm when using glue for generating german audio, umlaute (äöü) are ignored and left out in the generated audio. I used a textset formatted as utf-8 and de-DE-KatjaNeural as voice.

hi @gbauck , thanks for bringing it up - under investigation!

Hi Gregor, thanks again for bringing this up. The reason for this issue is a mix of an API and SDK change. Back then, it also worked with ä, ö... in the text, but not it is apparently no longer supported. I temporarily fixed this by introducing a normalization function. However, an upgrade to the newest SDK version is necessary, which I will tackle within the next 14 days. Cheers, Timm


JWT (Json web token) with sails

Hello everyone,
Please does somebody knows any tutorial on how to use JWT (Json web token) with sailsJs?

Check this: http://waterlock.ninja/
https://github.com/waterlock/waterlock

Heres my solution with socket-support BUT theres no expire time yet!

Thanks @Josebaseba @psi-4ward!
@rickdana, in the future try StackOverflow, our Google Group or our chat for support questions--we try to keep this forum strictly for bug reports on the Sails core.


Implement aliases for the 'Fast' functions

Fast functions deserve fast aliases.
Implements aliases for the 'Fast' functions and, a minor change, adjusts the verb casing of Foreach-ObjectFast to match PowerShell's - so now it's ForEach-ObjectFast.
Aliases are as follows:

Function
Alias

ForEach-ObjectFast
ForEachObj

Where-ObjectFast
WhereObj

Group-ObjectFast
GroupObj

Closed in favor of https://github.com/TobiasPSP/Modules.PSOneTools/pull/10


Documenting the algorithm and providing justification evidence

Thank you for this very interesting project. Here I share a few of my tests here while using the project.
I initially tested my personal project which has about 3.9k stars, the result seems wasn't so good.
$ docker run -t -e GITHUB_TOKEN=$GITHUB_TOKEN -v "/Users/changkun/dev/mct:/data/" ullaakut/astronomer changkun/modern-cpp-tutorial                                                                                [22:00:10]
Beginning fetching process for repository changkun/modern-cpp-tutorial
Pre-fetching all stargazers...ok
  > Selecting 200 first stargazers out of 3930
  > Selecting 800 random stargazers out of 3930
Fetching contributions for 1000 users up to year 2013
Building trust report...ok

Averages                             Score           Trust
--------                             -----           -----
Weighted contributions:              4132              E
Private contributions:               65                E
Created issues:                      9                 D
Commits authored:                    238               C
Repositories:                        37                A
Pull requests:                       6                 E
Code reviews:                        2                 E
Account age (days):                  1444              B
5th percentile:                      9                 A
10th percentile:                     24                A
15th percentile:                     59                A
20th percentile:                     85                B
25th percentile:                     111               C
30th percentile:                     157               C
35th percentile:                     194               D
40th percentile:                     328               C
45th percentile:                     436               C
50th percentile:                     541               D
55th percentile:                     770               D
60th percentile:                     899               D
65th percentile:                     1255              D
70th percentile:                     1579              D
75th percentile:                     2599              D
80th percentile:                     3652              D
85th percentile:                     5277              E
90th percentile:                     6836              E
95th percentile:                     14190             E
----------------------------------------------------------
Overall trust:                                         D

✔ Analysis successful. 1000 users computed.
GitHub badge available at https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fastronomer.ullaakut.eu%2Fshields%3Fowner%3Dbilibili%26name%3Dkratos

Then, I picked another project from GitHub trend page:
$ docker run -t -e GITHUB_TOKEN=$GITHUB_TOKEN -v "/Users/changkun/dev/mct:/data/" ullaakut/astronomer bilibili/kratos                                                                                [22:12:59]
Beginning fetching process for repository bilibili/kratos
Pre-fetching all stargazers...ok
  > Selecting 200 first stargazers out of 5739
  > Selecting 800 random stargazers out of 5739
Fetching contributions for 1000 users up to year 2013
Building trust report...ok

Averages                             Score           Trust
--------                             -----           -----
Weighted contributions:              2536              E
Private contributions:               71                E
Created issues:                      6                 D
Commits authored:                    137               D
Repositories:                        30                A
Pull requests:                       6                 D
Code reviews:                        1                 E
Account age (days):                  1545              B
5th percentile:                      9                 A
10th percentile:                     25                A
15th percentile:                     43                A
20th percentile:                     55                C
25th percentile:                     74                D
30th percentile:                     106               D
35th percentile:                     146               D
40th percentile:                     188               D
45th percentile:                     245               D
50th percentile:                     349               D
55th percentile:                     490               D
60th percentile:                     638               E
65th percentile:                     832               E
70th percentile:                     1092              E
75th percentile:                     1577              E
80th percentile:                     2072              E
85th percentile:                     3117              E
90th percentile:                     5329              E
95th percentile:                     9192              E
----------------------------------------------------------
Overall trust:                                         D

✔ Analysis successful. 1000 users computed.
GitHub badge available at https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fastronomer.ullaakut.eu%2Fshields%3Fowner%3Dbilibili%26name%3Dkratos

OK, then let's test Tensorflow.
$ docker run -t -e GITHUB_TOKEN=$GITHUB_TOKEN -v "/Users/changkun/dev/mct:/data/" ullaakut/astronomer tensorflow/tensorflow                                                                                [23:32:47]
Beginning fetching process for repository tensorflow/tensorflow
Pre-fetching all stargazers...ok
  > Selecting 200 first stargazers out of 131149
  > Selecting 800 random stargazers out of 131149
Fetching contributions for 1000 users up to year 2013
Building trust report...ok

Averages                             Score           Trust
--------                             -----           -----
Weighted contributions:              7495              D
Private contributions:               190               C
Created issues:                      18                B
Commits authored:                    198               D
Repositories:                        16                C
Pull requests:                       10                D
Code reviews:                        3                 D
Account age (days):                  1145              C
5th percentile:                      1                 E
10th percentile:                     2                 E
15th percentile:                     5                 E
20th percentile:                     10                E
25th percentile:                     22                E
30th percentile:                     32                E
35th percentile:                     40                E
40th percentile:                     59                E
45th percentile:                     76                E
50th percentile:                     114               E
55th percentile:                     153               E
60th percentile:                     217               E
65th percentile:                     368               E
70th percentile:                     707               E
75th percentile:                     1076              E
80th percentile:                     2109              E
85th percentile:                     3390              E
90th percentile:                     14580             D
95th percentile:                     30685             D
----------------------------------------------------------
Overall trust:                                         D

✔ Analysis successful. 1000 users computed.
GitHub badge available at https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fastronomer.ullaakut.eu%2Fshields%3Fowner%3Dtensorflow%26name%3Dtensorflow

Issues to the Algorithm
This repo is proposing a justice algorithm without previous study on the ratio of algorithm. As a user of your algorithm, I particularly expect the following supporting points on why the algorithm is accurate:

Showing theoretical analysis regarding the influence of each of the defined factors, and providing regression analysis and statistical stability of the algorithm.

Making benchmarks on various projects, illustrates how your algorithm match the theoretical analysis for the TOP10 valuable open source projects, like golang/go, torvalds/linux, etc.

"Those random stargazers can then sometimes be responsible for slight changes in the results, but they usually represent a difference of 1% to 3%, which is negligeable." -- README.md

May I have how did you have this conclusion? How large is your test samples? What are they? etc.

Establish a user study, an important way of evaluating usability issue is to held an user study. Typically, a single score has lack of expression on many different aspects, and it is not easy to say if the star of a repo is seriously fake or unworthy. Making quantitative analysis on, for example, how other users feel about the score provided by the algorithm, does the score matches your mental expectation? why? how could we help? those are questions should be seriously considered.

Additional results for torvalds/linux
$ docker run -t -e GITHUB_TOKEN=$GITHUB_TOKEN -v "/Users/changkun/dev/mct:/data/" ullaakut/astronomer torvalds/linux                                                                                [23:54:40]
Beginning fetching process for repository torvalds/linux
Pre-fetching all stargazers...ok
  > Selecting 200 first stargazers out of 77590
  > Selecting 800 random stargazers out of 77590
Fetching contributions for 1000 users up to year 2013
Building trust report...ok

Averages                             Score           Trust
--------                             -----           -----
Weighted contributions:              11055             C
Private contributions:               284               B
Created issues:                      13                C
Commits authored:                    236               C
Repositories:                        17                C
Pull requests:                       15                C
Code reviews:                        2                 E
Account age (days):                  1416              C
5th percentile:                      3                 D
10th percentile:                     4                 E
15th percentile:                     10                E
20th percentile:                     18                E
25th percentile:                     33                E
30th percentile:                     43                E
35th percentile:                     70                E
40th percentile:                     101               E
45th percentile:                     133               E
50th percentile:                     197               E
55th percentile:                     304               E
60th percentile:                     490               E
65th percentile:                     902               E
70th percentile:                     1235              E
75th percentile:                     2476              D
80th percentile:                     4888              D
85th percentile:                     8021              D
90th percentile:                     17211             C
95th percentile:                     42782             C
----------------------------------------------------------
Overall trust:                                         D

✔ Analysis successful. 1000 users computed.
GitHub badge available at https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fastronomer.ullaakut.eu%2Fshields%3Fowner%3Dtorvalds%26name%3Dlinux

Hi @changkun ! Thanks for your tests and your very interesting suggestions :)
As stated in the README, my algorithm only attempts to estimate authenticity based on the user contributions. The repositories that you scanned are mostly starred by casual GitHub users, which makes the results quite low :/ For example, your repository being a tutorial, it will tend to be starred by CS students who are learning about C++ and thus their average contributions will tend to be lower than that of technical libraries.
I determined the ratios for what is "trustworthy" based on a sample of some GitHub open source repositories:

LiveSplit/LiveSplit
bettercap/bettercap
bxcodec/faker
cenkalti/backoff
containous/traefik
d5/tengo
derailed/k9s
dgageot/demoit
ehazlett/interlock
envoyproxy/envoy
fatih/color
francoispqt/gojay
gcla/termshark
golang/proposal
grafana/loki
guptarohit/asciigraph
hashicorp/raft
iafan/goplayspace
ikruglov/slapper
imdario/mergo
jlevesy/sind
julienschmidt/httprouter
kataras/iris
knqyf263/trivy
kubernetes/kops
labstack/echo
ldez/prm
lukechampine/uint128
michenriksen/gitrob
montanaflynn/stats
moul/assh
mvdan/gofumpt
nektos/act
notnil/chess
olivere/elastic
operator996/yaocl
rancher/k3s
rs/zerolog
sirupsen/logrus
spf13/cobra
spf13/viper
thoas/stats
totoval/totoval
tsenart/vegeta
ullaakut/astronomer
ullaakut/cameradar
ullaakut/gorsair
ullaakut/nmap
ullaakut/rtspallthethings
valyala/fasthttp
vbauerster/mpb
vektra/mockery
zhangpeihao/gortmp

Unfortunately, this list is biased towards open source Go projects and libraries, which are most often used in technical projects, which means that the average stargazer of those projects is probably not representative of the average GitHub stargazer. That would explain the results you found.

I wish I was able to do that, but I'm not a mathematician in any way so it would probably take me a lot of time. I welcome contributions from people with a better mathematical background than me though! As stated in the README.md, that's the greatest contribution one can do to this project.

As for the impact of the random factor, of course it depends on the project, but thoughout my testing on all those repositories, it never made the result vary by more than +/- 3%. Of couse the sample is quite small, which is why I wrote usually, since I can't guarantee it will never be the case 🤷♂

That could be interesting indeed, but I'm afraid that because of how the community currently tends to point fingers and speculate on their competition not having legitimate stargazers, this system would be biased/abused as well. What do you think?

I would love to discuss this more in depth with you since you seem to have great ideas and suggestions, and a better knowledge than me in this matter :)

Hi @Ullaakut. Sorry for my late response, and thank you for open the discussion regarding the algorithm.

Regarding randomization of the algorithm: this actually relies on the statistic stability of the algorithm, that is exactly why I pointed in the first place. Typically, if you well formalize your evaluation function in mathematics, then you could easily describe the rate of change in each factor by simply compute the gradient of your formula.

Regarding user study: Your algorithm actually involves more social complexity than other similar repository evaluations, such as Go report regarding the code quality.
In goreport case, it evaluates the code quality based on developer's common best practices, therefore it's results are pretty much reliable. Vise Versa, in your algorithm, we have to ask ourselves: what is the meaning of "likely" in the question of "how likely it is that those users are real humans"? How could we properly define "likely"? Those are open questions to everyone. More deeply, do the stargazers who always stars useful repositories have many open source contribution on GitHub? I am afraid the answer to the question is "No". The "star" function (even "fork") to most of the users are simply like "bookmark", which allow them to quickly revisit the repository somewhere in the future. They could either actively contribute on GitHub or never open a public repo because of some personal reason.
Moreover, do people contribute to GitHub very often star many useful projects? The answer perhaps is a "no" again, they probably do not star projects at all. Many similar questions could be asked.

Regarding biased/abuses: This is the actual reason why you need to explain the algorithm very well to improve people's trusts :)

In conclude, malicious stargazer detection is a challenging problem, you must sample enough data on GitHub and analyzing: 1) what are the essential factors, 2) what are the potential factors that you haven't considered at the moment, so on...

Hey again @changkun !
Thanks for the details 🤔 I'm thinking of ways to have a better idea of the differences between legit and malicious stargazers, but the more I look into it the more challenging the problem becomes.
It turns out a lot of bought stars might be hacked accounts, or accounts from legit GitHub users who are simply getting paid to star projects when asked. (See https://gimhub.com/). And those are pretty much impossible to detect, compared to other users.
What my algorithm is good at detecting is basically any repository that used one of the old python scripts that were used about 3 years ago, to automatically create accounts and star a GitHub project, resulting in the first X accounts of the repository having absolutely 0 contributions and only starring a project.
Those scripts are no longer working though, since GH increased their account creation security by requiring email validation and a security challenge (using either vision or hearing).


Modifying certificate names and path

In previous steps, the signing and encryption certificates were named signCert and encCert, not signingCert nor encryptionCert. It also worked when path was set to Users>Administrator rather than storing in a temp file.

@linkhp,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


github action - report coverage error

main workflow has an issue

We've no more error and no link to error, so re-open it when needed


Google Analytics not working unsure of how to debug

Description
Greetings! I believe that I have everything set up and configured correctly, however I am not seeing any tracking in Google Analytics and I have no idea how to debug this.
When loaded, I see that it renders the following:
<link href="https://www.googletagmanager.com" rel="preconnect">
<script type="text/javascript" async="" src="https://www.google-analytics.com/analytics.js"></script>
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-12345678-90" charset="utf-8"></script>

The "Google Tag Assistant" Chrome add-on shows that the gtag.js is successfully loaded, however it does not record any Google Analytics and says "No hits were found in this recording."
I have attempted to fire events directly using:
> $0.__vue__.$gtag.pageview({ page_path: '/' })
> undefined

Here is how I am loading the gtag library:
import { bootstrap, setOptions } from 'vue-gtag'

export default {
  name: 'googleAnalytics',
  props: ['ga_id'],
  mounted: function () {
    if (this.ga_id !== '') {
      setOptions({
        config: { id: this.ga_id },
      })
      bootstrap().then(gtag => {
        this.$gtag.pageview({ page_path: '/' })
      })
    }
  },
}

Any advice would be greatly appreciated. Thanks kindly!

Ah! It is working now. I'm not sure why, but there seemed to be a lag. Now new traffic is showing up immediately in the real time tracking.
Thanks so much for the hard work on this package!


feat(downvote): remove downvote counts and query field

Someone have already removed the downvote counts and merged it into develop branch.
So I'm wondering how to remove only the downvote counts query field, been trying...

good try in your first commit 604de4f1ef34, but there's more use of downvote than changes in that commit,
you can try remove all occurrences of downvote ?


⚠ ClamAV has degraded performance

In 5e7c9f1, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 65 ms

Resolved: ClamAV performance has improved in 9331fac.


the catalog (Run... button) should support ConfigMap as well as Template for working on vanilla Kubernetes environments

for an example see this issue:
https://github.com/fabric8io/fabric8-maven-plugin/issues/20
basically gofabric8 and apps should allow apps to be packaged as ConfigMap 'catalog' entries so that we can work on vanilla k8s platforms and still have a 'catalog of apps to run' that folks can do the draggy/drop thing or edit etc.
All we'd need to do really is on vanilla kubernetes is not try to load templates at all - and then we also load ConfigMaps with some label selector (e.g. kind=catalog) and treat them kinda like Templates.
The only difference is to run them, we'd iterate through the ConfigMap.data key/value pairs and treat each one as a resource (or Template). So shouldn't be too hard to add

Think this is done...


system: shells are now static in the model, but must be read from /etc/shells

Important notices
Our forum is located at https://forum.opnsense.org , please consider joining discussions there in stead of using GitHub for these matters.
Before you ask a new question, we ask you kindly to acknowledge the following:

[x] I have read the contributing guide lines at https://github.com/opnsense/core/blob/master/CONTRIBUTING.md
[x] I am convinced that my issue is new after having checked both open and closed issues at https://github.com/opnsense/core/issues?q=is%3Aissue

The new model makes shells static but that is not correct:

Even though bash is installed (via pkg install bash) and appears in /etc/shells, it doesn't appear as a shell choice in the UI.

As a side quest the user says:

If I choose another valid shell it still gets written as nologin in /etc/passwd and so I can't log in as that user via SSH.

https://forum.opnsense.org/index.php?topic=44771.0

I have created https://github.com/opnsense/core/pull/8156 which solves both problems for me, I will let you decide how to proceed.
Thanks

I am a bit in doubt that deviating from the previous, OS aligned, unproblematic behaviour gains much other than future reports.
Also, not having opnsense-shell as an explicit choice anymore seems strange. Another side effect from removing auth_get_shells().

Also, not having opnsense-shell as an explicit choice anymore seems strange.

I also expected opnsense-shell in the option list, but while looking at the code again, it is only offered for root...
https://github.com/opnsense/core/blob/908f3ee73edc10ba147c8dddd6c6b946b1d01229/src/etc/inc/auth.inc#L221-L223
In which case the default choice will be non explicit the same:
https://github.com/opnsense/core/blob/908f3ee73edc10ba147c8dddd6c6b946b1d01229/src/etc/inc/auth.inc#L348-L349
In which case I don't think it's much of a loss here, unless we would like to offer it to non root admins as well (which is something we can do without issues).
I can live with something that plugs shells, although given bash is likely the only relevant non default available choice, a static list might even be better in terms of maintenance. The last commit @bensmithurst added (https://github.com/bensmithurst/opnsense-core/commit/0bb18c5badd39b05eed54c8e8edd6bbe7fad2d52) is more or less ok (although we would often wire these via configd), question just is if in the long run we are seeking this type of extensibility (if it wasn't there before, I wouldn't add it now, but there are arguments for keeping it).

I also expected opnsense-shell in the option list, but while looking at the code again, it is only offered for root...

Which is quirkily correct since it needs root privileges to run the scripts successfully and used to be the implicit standard shell for admin/root long before it was called opnsense-shell.

In which case I don't think it's much of a loss here, unless we would like to offer it to non root admins as well (which is something we can do without issues).

It would be nicer to make it explicit, because otherwise nologin and empty login default cause confusion. Again, most of this is old code, which we could migrate now and switch to explicit defaults / values.
I like the shell field, maybe with a backend script to gather all shells and cache the value for a few seconds or so.

it's not really worth the discussion, although static fields are slightly faster, I also don't mind having it pluggable that much. https://github.com/opnsense/core/commit/96a1145c3e453af7ac5cfdf6d035667b5b58bc9c contains the dynamic shell field implementation which can cope with other shells.


allow calling indexer in background (no TTY)

The experiments with the script as of #562  via a remote connection might lead to a drop in the ssh connection. Therefore it would be better to allow starting the script in background. Currently the result is "the input device is not a TTY".
May be this is a docker issue and there is a work-around. I am opening this issue to hint that this obstacle exists.
nohup ./qlever -aw&
[1] 4514
wf@merkur:/hd/jurob/qlever$ nohup: ignoring input and appending output to 'nohup.out'

wf@merkur:/hd/jurob/qlever$ tail -f nohup.out
Using default tag: latest
latest: Pulling from adfreiburg/qlever
Digest: sha256:036bde7c6e675c3cf34cfa3f87513af8a43dbd83be736ca83f21c244dfee91f2
Status: Image is up to date for adfreiburg/qlever:latest
docker.io/adfreiburg/qlever:latest
pulling qlever docker image finished at Di 1. Feb 07:39:42 CET 2022 after 2 seconds
wikidata dump already downloaded
creating wikidata index started at Di 1. Feb 07:39:42 CET 2022
the input device is not a TTY
creating wikidata index finished at Di 1. Feb 07:39:42 CET 2022 after 0 seconds

Seems to be a well known issue with docker https://stackoverflow.com/questions/43099116/error-the-input-device-is-not-a-tty has half a million views ...

docker -i

instead of
docker -it

will hopefully work according to https://stackoverflow.com/a/43099210/1497139


Fix display error for custom card components.

This fixes an issue where the Most Visited Pages Card and Referrers List Card are not displaying due to a name conflict when serving Javascript files.

It's not super clear from a PR but I'm gonna trust it's good! :)


Write multiple parquet files from a single dataframe defined by max file size

The Problem
I was unsuccessful in finding a way to write a single dataframe to multiple parquet files using the s3.to_parquet() method. Currently, it seems to write one parquet file which could slow down Athena queries.
Possible Solution
It would be great to have an option for the "max parquet file size" when using s3.to_parquet(). So instead of creating one large parquet file, we could create many smaller parquet files that would help optimize Athena queries.
My reasoning
I believe Athena, behind the scenes, uses the number of files to split the query workload across different nodes.

Can I work on this particular request ?

@rparthas yep, it would be very welcome! Just make sure to checkout from our dev branch and then open a pull request against the same.

@chrispruitt @rparthas
We already have this feature done to release. Could you both test it directly from our dev branch before the official release? The ideia is publish the fix in the version 1.8.0 next weekend.
pip install git+https://github.com/awslabs/aws-data-wrangler.git@dev

e.g:
wr.s3.to_parquet(
    df=df,
    path="s3://.../myfile.parquet",
    max_rows_by_file=1_000_000,
)

P.S. Thanks a lot for your great work @rparthas, I've basically changed the feature to use max_rows_by_file instead of the file size itself because it is pretty tough to try to guess what will be the size of parquet file serialised on s3 and I don't think that the PyArrow table size will be a good guide for user.
P.P.S. In addition, is expected that writes will be faster when chunked because we are parallelising all files uploads.

Hi @chrispruitt @rparthas !
It is totally off-topic, but we are stating a "Who uses AWS Data Wrangler?" section. So feel free to add yourself if you want 😄 .

Released on version 1.8.0.


[BUG] python3.8/multiprocessing/connection.py EOFError

Required prerequisites

[X] I have read the documentation https://safety-gymnasium.readthedocs.io.
[X] I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
[ ] Consider asking first in a Discussion.

What version of Safety Gymnasium are you using?
0.2.0
System information

print(sys.version, sys.platform)
3.8.16 (default, Mar  2 2023, 03:21:46)
[GCC 11.2.0] linux
print(safety_gymnasium.version)
0.2.0

Problem description
Runnning the first code in the document, tested in my ubuntu 16.04, 18.04, windows, met same problem in multiprocessing files.
File "/home/tian/anaconda3/envs/safe/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes
File "/home/tian/anaconda3/envs/safe/lib/python3.8/multiprocessing/connection.py", line 383, in _recv
EOFError:
Reproducible example code
The Python snippets:

Command lines:

Extra dependencies:

Steps to reproduce:
Runing the following codes, which is in the document.
import safety_gymnasium
env = safety_gymnasium.vector.make("SafetyCarGoal1-v0", render_mode="human", num_envs=8)
observation, info = env.reset(seed=0)
for _ in range(1000):
action = env.action_space.sample()  # this is where you would insert your policy
observation, reward, terminated, truncated, info = env.step(action)
if terminated or truncated:
observation, info = env.reset()
env.close()
Traceback
(safe) tian@ROG:~/safety-gymnasium$ python testrepo.py
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65538) b'Cannot set swap interval without a current OpenGL or OpenGL ES context'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65538) b'Cannot set swap interval without a current OpenGL or OpenGL ES context'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65538) b'Cannot set swap interval without a current OpenGL or OpenGL ES context'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65538) b'Cannot set swap interval without a current OpenGL or OpenGL ES context'
  warnings.warn(message, GLFWError)
python: /builds/florianrhiem/pyGLFW/glfw-3.3.8/src/window.c:646: glfwGetFramebufferSize: Assertion `window != ((void *)0)' failed.
python: /builds/florianrhiem/pyGLFW/glfw-3.3.8/src/window.c:646: glfwGetFramebufferSize: Assertion `window != ((void *)0)' failed.
python: /builds/florianrhiem/pyGLFW/glfw-3.3.8/src/window.c:646: glfwGetFramebufferSize: Assertion `window != ((void *)0)' failed.
python: /builds/florianrhiem/pyGLFW/glfw-3.3.8/src/window.c:646: glfwGetFramebufferSize: Assertion `window != ((void *)0)' failed.
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65538) b'Cannot set swap interval without a current OpenGL or OpenGL ES context'
  warnings.warn(message, GLFWError)
python: /builds/florianrhiem/pyGLFW/glfw-3.3.8/src/window.c:646: glfwGetFramebufferSize: Assertion `window != ((void *)0)' failed.
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65538) b'Cannot set swap interval without a current OpenGL or OpenGL ES context'
  warnings.warn(message, GLFWError)
python: /builds/florianrhiem/pyGLFW/glfw-3.3.8/src/window.c:646: glfwGetFramebufferSize: Assertion `window != ((void *)0)' failed.
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)'
  warnings.warn(message, GLFWError)
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65538) b'Cannot set swap interval without a current OpenGL or OpenGL ES context'
  warnings.warn(message, GLFWError)
python: /builds/florianrhiem/pyGLFW/glfw-3.3.8/src/window.c:646: glfwGetFramebufferSize: Assertion `window != ((void *)0)' failed.
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/glfw/__init__.py:916: GLFWError: (65538) b'Cannot set swap interval without a current OpenGL or OpenGL ES context'
  warnings.warn(message, GLFWError)
python: /builds/florianrhiem/pyGLFW/glfw-3.3.8/src/window.c:646: glfwGetFramebufferSize: Assertion `window != ((void *)0)' failed.
Traceback (most recent call last):
  File "testrepo.py", line 6, in <module>
    observation, reward, terminated, truncated, info = env.step(action)
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/gymnasium/vector/vector_env.py", line 197, in step
    return self.step_wait()
  File "/home/tian/safety-gymnasium/safety_gymnasium/vector/async_vector_env.py", line 122, in step_wait
    result, success = pipe.recv()
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/multiprocessing/connection.py", line 250, in recv
    buf = self._recv_bytes()
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes
    buf = self._recv(4)
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/multiprocessing/connection.py", line 383, in _recv
    raise EOFError
EOFError
/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/gymnasium/vector/async_vector_env.py:457: UserWarning: WARN: Calling `close` while waiting for a pending call to `step` to complete.
Exception ignored in: <function AsyncVectorEnv.__del__ at 0x7f11c2ebd430>
Traceback (most recent call last):
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/gymnasium/vector/async_vector_env.py", line 546, in __del__
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/gymnasium/vector/vector_env.py", line 265, in close
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/site-packages/gymnasium/vector/async_vector_env.py", line 461, in close_extras
  File "/home/tian/safety-gymnasium/safety_gymnasium/vector/async_vector_env.py", line 122, in step_wait
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/multiprocessing/connection.py", line 250, in recv
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/multiprocessing/connection.py", line 414, in _recv_bytes
  File "/home/tian/anaconda3/envs/safe/lib/python3.8/multiprocessing/connection.py", line 383, in _recv
EOFError:

Expected behavior
No response
Additional context
No response

I ran the code on my three devices, and they all failed.

Hi, @Zhaofeng-Tian you choose 'human' render_mode when rendering 8 environment instances at the same time, it requires too many resources beyond your computers and the power of your hardware. To verify this, you can try to set num_envs=2, it works on my laptop. If you don't need to train a policy and continuously render it, you can set the render_mode="rgb_array" and call env.render() manually when needed.
If it helps, please let me know.

Hi there,
thank you for your fast response. I will check it out when I go to the lab
today.
But it seems my Windows still doesn't work with your suggestions when I run
the same code. It is still about the multiprocessing system,
the error traceback was recorded below.
By the way, I was wondering if multiprocessing really helps, and how many
seeds usually can be run at the same time in a normal machine, e.g., a
single 2080 card machine?
Thank you, I appreciate your work.
Zhaofeng
(safe)
C:\Users\61602\Desktop\Coding\safety-gymnasium>C:/App/Anaconda/envs/safe/python.exe
c:/Users/61602/Desktop/Coding/test.py
Traceback (most recent call last):
File "", line 1, in
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 116,
in spawn_main
Traceback (most recent call last):
File "", line 1, in
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 116,
in spawn_main
exitcode = _main(fd, parent_sentinel)
exitcode = _main(fd, parent_sentinel)
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 125,
in _main
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 125,
in _main
prepare(preparation_data)
prepare(preparation_data)
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 236,
in prepare
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 236,
in prepare
_fixup_main_from_path(data['init_main_from_path'])
_fixup_main_from_path(data['init_main_from_path'])
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 287,
in _fixup_main_from_path
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 287,
in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "C:\App\Anaconda\envs\safe\lib\runpy.py", line 265, in run_path
main_content = runpy.run_path(main_path,
File "C:\App\Anaconda\envs\safe\lib\runpy.py", line 265, in run_path
return _run_module_code(code, init_globals, run_name,
return _run_module_code(code, init_globals, run_name,
File "C:\App\Anaconda\envs\safe\lib\runpy.py", line 97, in
_run_module_code
File "C:\App\Anaconda\envs\safe\lib\runpy.py", line 97, in
_run_module_code
_run_code(code, mod_globals, init_globals,
_run_code(code, mod_globals, init_globals,
File "C:\App\Anaconda\envs\safe\lib\runpy.py", line 87, in run_code
File "C:\App\Anaconda\envs\safe\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
exec(code, run_globals)
File "c:\Users\61602\Desktop\Coding\test.py", line 2, in
File "c:\Users\61602\Desktop\Coding\test.py", line 2, in
env = safety_gymnasium.vector.make("SafetyCarGoal1-v0",
render_mode="human", num_envs=2)
env = safety_gymnasium.vector.make("SafetyCarGoal1-v0",
render_mode="human", num_envs=2)
File
"C:\Users\61602\Desktop\Coding\safety-gymnasium\safety_gymnasium\vector_init.py",
line 90, in make
File
"C:\Users\61602\Desktop\Coding\safety-gymnasium\safety_gymnasium\vector_init.py",
line 90, in make
return SafetyAsyncVectorEnv(env_fns) if asynchronous else
SafetySyncVectorEnv(env_fns)
File
"C:\Users\61602\Desktop\Coding\safety-gymnasium\safety_gymnasium\vector\async_vector_env.py",
line 66, in init
return SafetyAsyncVectorEnv(env_fns) if asynchronous else
SafetySyncVectorEnv(env_fns)
File
"C:\Users\61602\Desktop\Coding\safety-gymnasium\safety_gymnasium\vector\async_vector_env.py",
line 66, in init
super().init(
File
"C:\App\Anaconda\envs\safe\lib\site-packages\gymnasium\vector\async_vector_env.py",
line 164, in init
super().init(
File
"C:\App\Anaconda\envs\safe\lib\site-packages\gymnasium\vector\async_vector_env.py",
line 164, in init
process.start()
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\process.py", line
121, in start
process.start()
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\process.py", line
121, in start
self._popen = self._Popen(self)
self._popen = self._Popen(self)
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\context.py", line
327, in _Popen
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\context.py", line
327, in _Popen
return Popen(process_obj)
return Popen(process_obj)
File
"C:\App\Anaconda\envs\safe\lib\multiprocessing\popen_spawn_win32.py", line
45, in init
File
"C:\App\Anaconda\envs\safe\lib\multiprocessing\popen_spawn_win32.py", line
45, in init
prep_data = spawn.get_preparation_data(process_obj._name)
prep_data = spawn.get_preparation_data(process_obj._name)
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 154,
in get_preparation_data
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 154,
in get_preparation_data
_check_not_importing_main()
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 134,
in _check_not_importing_main
_check_not_importing_main()
File "C:\App\Anaconda\envs\safe\lib\multiprocessing\spawn.py", line 134,
in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.    raise

RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

muchvo @.***> 于2023年4月11日周二 06:31写道：

Hi, @Zhaofeng-Tian https://github.com/Zhaofeng-Tian you choose 'human'
render_mode when rendering 8 environment instances at the same time, it
requires too many resources beyond your computers and the power of your
hardware. To verify this, you can try to set num_envs=2, it works on my
laptop. If you don't need to train a policy and continuously render it, you
can set the render_mode="rgb_array" and call env.render() manually when
needed.
If it helps, please let me know.
—
Reply to this email directly, view it on GitHub
https://github.com/OmniSafeAI/safety-gymnasium/issues/40#issuecomment-1503080212,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6RLPULWKHGNFCMQJBEKJ3XAUXH7ANCNFSM6AAAAAAWZTTNPA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Thanks for your feedback.
I have reproduced it on my Windows laptop, our library has not officially support Windows for now, but it is on our to-do list already, we will fix this bug before we provide official support for Windows. You can run this library on Linux for now.
The multiprocessing actually helps, environments in Safety-Gymnasium are more complex than mujoco environments in Gymnasium, so we need multiprocessing to boost our speed of collecting data, we implement it on OmniSafe, you can compare the speed based on OmniSafe.
And because our library is based on mujoco which completes all calculations on the CPU, the capability of CPU and memory decides the number of environments that can be run at the same time whether you use CUDA to calculate gradients or not. Last point, the number of multiprocessing will affect the performance of algorithms, refer to it.

Thank you for your explanations. I got the lib just now, I changed env_num
to 1, both my ubuntu 16.04 and 18.04 reported same original bugs that I
reported on Github.
Then I changed the render_mode to "rgb_array", it reported a new bug shown
below:
(saferl) @.***:~/safety-gymnasium$ python test.py
Traceback (most recent call last):
File "test.py", line 6, in
observation, reward, terminated, truncated, info = env.step(action)
ValueError: too many values to unpack (expected 5)
muchvo @.***> 于2023年4月11日周二 09:48写道：

Thanks for your feedback.
I have reproduced it on my Windows laptop, our library has not officially
support Windows for now, but it is on our to-do list already, we will fix
this bug before we provide official support for Windows. You can run this
library on Linux for now.
The multiprocessing actually helps, environments in Safety-Gymnasium are
more complex than mujoco environments in Gymnasium, so we need
multiprocessing to boost our speed of collecting data, we implement it on
OmniSafe
https://github.com/OmniSafeAI/omnisafe/blob/main/examples/train_from_custom_dict.py#L24,
you can compare the speed based on OmniSafe.
And because our library is based on mujoco which completes all
calculations on the CPU, the capability of CPU and memory decides the
number of environments that can be run at the same time whether you use
CUDA to calculate gradients or not. Last point, the number of
multiprocessing will affect the performance of algorithms, refer to it
https://iclr-blog-track.github.io/2022/03/25/ppo-implementation-details/
.
—
Reply to this email directly, view it on GitHub
https://github.com/OmniSafeAI/safety-gymnasium/issues/40#issuecomment-1503390259,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6RLPVLQMMJYVF544EKD53XAVOMDANCNFSM6AAAAAAWZTTNPA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Hi there,
As my last email said, there were still bugs on my both ubuntu machines. I
was wondering if any content in your document is outdated right now?
Please let me know if there is anyway to fix this issue. Thank you very
much!
Best regards,
Zhaofeng
muchvo @.***> 于2023年4月11日周二 09:48写道：

Thanks for your feedback.
I have reproduced it on my Windows laptop, our library has not officially
support Windows for now, but it is on our to-do list already, we will fix
this bug before we provide official support for Windows. You can run this
library on Linux for now.
The multiprocessing actually helps, environments in Safety-Gymnasium are
more complex than mujoco environments in Gymnasium, so we need
multiprocessing to boost our speed of collecting data, we implement it on
OmniSafe
https://github.com/OmniSafeAI/omnisafe/blob/main/examples/train_from_custom_dict.py#L24,
you can compare the speed based on OmniSafe.
And because our library is based on mujoco which completes all
calculations on the CPU, the capability of CPU and memory decides the
number of environments that can be run at the same time whether you use
CUDA to calculate gradients or not. Last point, the number of
multiprocessing will affect the performance of algorithms, refer to it
https://iclr-blog-track.github.io/2022/03/25/ppo-implementation-details/
.
—
Reply to this email directly, view it on GitHub
https://github.com/OmniSafeAI/safety-gymnasium/issues/40#issuecomment-1503390259,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6RLPVLQMMJYVF544EKD53XAVOMDANCNFSM6AAAAAAWZTTNPA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Thank you for your explanations. I got the lib just now, I changed env_num to 1, both my ubuntu 16.04 and 18.04 reported same original bugs that I reported on Github. Then I changed the render_mode to "rgb_array", it reported a new bug shown below: (saferl) @.***:~/safety-gymnasium$ python test.py Traceback (most recent call last): File "test.py", line 6, in  observation, reward, terminated, truncated, info = env.step(action) ValueError: too many values to unpack (expected 5) muchvo

Please change observation, reward, terminated, truncated, info = env.step(action) to observation, reward, cost, terminated, truncated, info = env.step(action)
For examples, you can check out our official examples in examples

Hello, Zhaofeng. Did you try to run our code in examples? And is your machine headless?

If you have more questions, feel free to reopen it.

Hi there,
Sorry for my late response, I was out of the project for a while. I tried
today, the example successfully ran on my Ubuntu16.04 machine.
Thank you again for your time,
Zhaofeng
muchvo @.***> 于2023年4月13日周四 11:38写道：

Thank you for your explanations. I got the lib just now, I changed env_num
to 1, both my ubuntu 16.04 and 18.04 reported same original bugs that I
reported on Github. Then I changed the render_mode to "rgb_array", it
reported a new bug shown below: (saferl) @.***:~/safety-gymnasium$
python test.py Traceback (most recent call last): File "test.py", line 6,
in observation, reward, terminated, truncated, info = env.step(action)
ValueError: too many values to unpack (expected 5) muchvo
Please change observation, reward, terminated, truncated, info =
env.step(action) to observation, reward, cost, terminated, truncated,
info = env.step(action)
For examples, you can check out our official examples in examples
https://github.com/OmniSafeAI/safety-gymnasium/tree/main/examples
—
Reply to this email directly, view it on GitHub
https://github.com/OmniSafeAI/safety-gymnasium/issues/40#issuecomment-1507187898,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6RLPWGHXWFACIVIQP47RDXBAMYDANCNFSM6AAAAAAWZTTNPA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Congratulations on solving the problem.  We also hope you can recommend this repository to your friends who are doing research on safe reinforcement learning. We will actively provide detailed technical support.
QAQ.

Yes, I am the co-author of CUP.

That is a solid work, I am reading it right now. Will follow up your future
work as well. 👍👍👍
Jiaming Ji @.***> 于2023年4月27日周四 11:30写道：

Yes, I am the co-author of CUP.
—
Reply to this email directly, view it on GitHub
https://github.com/OmniSafeAI/safety-gymnasium/issues/40#issuecomment-1525905211,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6RLPQ3FHOZVH7JG72YV5TXDKGJBANCNFSM6AAAAAAWZTTNPA
.
You are receiving this because you were mentioned.Message ID:
@.***>

Great! Talk to you later.
Best,
Zhaofeng
Jiaming Ji @.***> 于2023年4月27日周四 11:42写道：

Thank you for your appreciation. I will continue to work at SafeRL and
Constraint Learning, and we can keep communicating.
—
Reply to this email directly, view it on GitHub
https://github.com/OmniSafeAI/safety-gymnasium/issues/40#issuecomment-1525925801,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AP6RLPRXWE4N7DHB3QZIJYLXDKHW5ANCNFSM6AAAAAAWZTTNPA
.
You are receiving this because you were mentioned.Message ID:
@.***>


Possibility for Exchange admin to provide pre-defined Roaming Settings

This is just a question related to API functionality described on this page.
Is there a possibility for an Exchange Administrator to "prefill" Roaming Settings for a certain add-in ID? Suppose you have an add-in that works in conjunction with an on-premise server. Ideally, you would want to offer this add-in via App Source to a broader audience, but allow individual organizations to pre-define the URL to the on-premise server (while providing a fallback to a "demo" server of some sort).
In short, I'm looking for a way to define custom key-value pairs that applies to a single add-in of an Exchange admin's organization.
Thanks!

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

ID: efdb5871-0293-beb6-a584-9401f4be8443
Version Independent ID: 55687f2c-7649-5ca7-d090-aface4cd8a7e
Content: Manage state and settings for an Outlook add-in - Office Add-ins
Content Source: docs/outlook/manage-state-and-settings-outlook.md
Product: outlook
Technology: add-ins
GitHub Login: @o365devx
Microsoft Alias: o365devx

@adem Thanks for inquiring about this.
@exextoc Can you provide any guidance here?
Thanks.

This isn't possible with the Roaming Settings API today, since the API stores settings only on a per-user basis.
If you would like to suggest a feature, please add an idea to the Outlook add-ins UserVoice.

Will do - thanks for the information!


HDDS-8331. Add rocksdb option template file and docs

What changes were proposed in this pull request?
Add a template file and description to clarify how to customize the rocksdb options.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-8331

@kaijchen  Thanks! add new commit.

cc @tanvipenumudy can you please take a look?

@kaijchen @kerneltime  Adding a template file seems controversial. Just adding docs without template file maybe better.
I will remove the template file if possible. What do you think?


build system

What the purpose to choose cake as the build system for a general purpose library?
Could you please support building via cmake as well as the user normally do not want add non-necessary dependencies...
Next, if the cake is supposed to be something new then it is a good idea at least to work against python 3.0, not 2.x.

+1

This library is also available via vcpkg https://github.com/microsoft/vcpkg (for Window,Linux&MacOS).
Also, don't expect too much an answer... this library does not look like it is maintained anymore.

This library is also available via vcpkg https://github.com/microsoft/vcpkg (for Window,Linux&MacOS). Also, don't expect too much an answer... this library does not look like it is maintained anymore.

Any idead if vcpkg mess the python versions when installing on Windows ...i use python 3.9 and dont want to install...if it does maybe i will try to modify the python files :)

This library is also available via xmake/xrepo https://github.com/xmake-io/xmake
we need only write a simple xmake.lua file
xmake.lua
add_requires("cppcoro")
target("test")
    set_kind("binary")
    add_files("src/*.cpp")
    add_packages("cppcoro")
    set_languages("c++17")
    add_cxxflags("/await")

then we run xmake to build your project with cppcoro.
or we can also use xrepo to install this library directly
 $ xrepo install cppcoro

it's package configuration in xmake-repo
https://github.com/xmake-io/xmake-repo/blob/master/packages/c/cppcoro/xmake.lua
If you accept pr, I can also submit a xmake.lua to the project root directory and use the xmake build system to maintain this library.

You're my god, thank you.


⚠ ClamAV has degraded performance

In 35c5628, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 118 ms

Resolved: ClamAV performance has improved in 4c12ff2.


Unable to use API due to CORS

When trying to create an invoice via API key in the browser it fails saying
Access to fetch at 'https://legend.lnbits.com/api/v1/payments' from origin 'http://localhost:3000' has been blocked by CORS policy:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested
resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

the api key works fine when tested outside the browser like in Postman, I believe the API route needs to send response with the header Access-Control-Allow-Origin: "*"

Fixed in PR #478


test_toplevel_query_lat_mappings FAILS

due to changes to database likely

fixed when debugging code is removed.
Probably related to #94 where there is no lateralising data and Q_S pipeline is used, maybe at some point indices are reset


vocab for pcb

:heart: Thank you for your contribution!
Description

Please describe briefly your pull request.
You can use your commit messages to describe the overall PR
If there's a preferred way to review your code, let the reviewer know!

Checklist
Ticks in all boxes and 🟢 on all GitHub actions status checks are required to merge:

[x] I'm aware of the code of conduct.
[ ] I'm aware of the contributing guidelines.
[ ] I've created logical separate commits and followed the commit message format.
[ ] If this PR resolves or addresses an issue, I've linked it in the commit message.
[ ] I've added relevant test cases.
[ ] I've added relevant documentation.
[ ] I've NOT included third-party code (copy/pasted source code or new dependencies).

If you have added third-party code (copy/pasted or new dependencies), please make sure this has been discussed in a github issue.

Reminder
By using GitHub, you have already agreed to the GitHub’s Terms of Service including that:

You license your contribution under the same terms as the current repository’s license.
You agree that you have the right to license your contribution under the current repository’s license.

electricity -> http://data.europa.eu/xsp/cn2024/271600000080
PCB -> http://data.europa.eu/xsp/cn2024/853400000080


Added react 16 compatibility

createClass and PropTypes has been removed from react's internal in react 16. So I changed the implementation to class to avoid pulling in create-react-class. prop-types is now a dependency.

Coverage remained the same at 100.0% when pulling f601b5970c6b7f6c4529fd619d09470b797d4c45 on Nic128:enhancement/react-16 into 9d2a6241d8625a8f431af1d4f44f7b75fb590c63 on insin:master.

Codecov Report

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

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

Coverage remained the same at 100.0% when pulling f1c51ed838fccc84daa57c6306f7e2c0addb4539 on Nic128:enhancement/react-16 into 9d2a6241d8625a8f431af1d4f44f7b75fb590c63 on insin:master.

Would be great to see this in npm!


Fix V2 parameter deserializer to recognize formData instead of form

Fix V2 parameter deserializer to recognize formData instead of form
Basic unit tests for all types of possible parameters in V2.

@darrelmiller @xuzhg
I'll take care of embedding the all test files in a separate PR. Please let me know if you guys have more comments about the changes here.


requirejs should be a devDependency

It's only used in the examples and is not needed for normal usage as a library.
If requirejs were actually used inside of jsPDF core that would pretty much break the NPM package as any bundler would conflict with it. IIRC it was previously removed when the new rollup build process was made several months ago as it indeed was causing problems.

Good spot. This look ok?

^I'm confused as that PR deletes as one commit, then readds, in the second commit, the subtree of requirejs (??). It seems like you removed requirejs entirely from the examples recently and are just using script tags -- in which case seems like the first commit is spot on, but really confused by the second one that just adds everything back

I initially thought it was a subtree of requirejs and removed it, but it's actually an optional file people can include to setup the config for requirejs to work with jsPDF plugins. It's not included in the built dist file.

it seems like that's what libs/require/config.js is, but fairly sure libs/require/require.js is the code for require.js (considering it says so at the top of the file and it's 2k LoC).
Also to clarify, the config.js file is for development purposes and was previously used in order to require plugins inside of script tags in the examples. The dist minified file that people import and use already has all the plugins bundled for production, so such a config would never be necessary.
The debug file is currently used in for development and  rollup --watch (and rollup-watch for usage outside of CLI) can be used for incremental rebuilds during development as well. If you grep the codebase it doesn't seem like requirejs is used anywhere at all anymore since your recent changes to the examples pages


number of arms

Hi Mabwiser team,
Thank you so much for the great work on the MAB library with neighborhood policy. I really loved it.
I am using mabwiser for recommendation systems, but my number of arms can be in thousands. The library works fine when we have arms in a few hundred, but looking into various ways to do better recommendations using mabwiser. Is there any limit or max number of arms without sacrificing the performance? Thank you in advance.

Hi @Harricane-data,
Thank you for the positive feedback --glad you find it is useful in your applications!
Aside from the mabwiser implementation, it is a valid question in Bandits literature on how to treat cases with a large (1000+) number of arms. The ultimate goal is to learn an unknown distribution of reward for each arm, and when there exist a large number of arms --the experimentation time for learning increases. This is not desirable.
So your point is relevant not only about runtime performance but in general.
As for runtime efficiency: you might consider parallelization settings. See the n_jbos parameter. More broadly, you can consider Hierarchial Bandits. For instance, group 1000 content into 10 topics first, and create 2 layers of bandits to first learn a relevant topic and then to learn a particular content in that topic. With MABWiser, it should be easy to build such hierarchical bandit applications.
Hope this helps!

@skadio  Thank you for quick response. I will try that and get back to you if i have further questions.


File not uploading output to output.txt file immediately

Issue Type: Bug
Steps to reproduce:

Have g++ compiler installed (I have it installed on both WSL2 and windows)
Have a 2 column layout with the source file, and txt file. Wherein the txt files are split horizontally in their column.

Have a C++ file with the following code.

#include <iostream>

int main() {
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif

    std::string x;
    std::cin >> x;
    std::cout << x << "\n";
}

Run C++ file.

Expected output:

Output from file will immediately be shown to the output.txt file in realtime.

Actual output:

Output isn't shown immediately. I had to close the output file and open it again for it to show.

Is the file located on a Windows drive mount? e.g. /mnt/c/...

Is the file located on a Windows drive mount? e.g. /mnt/c/...

Yep!

It's a known WSL issue that file events are not reported on /mnt/.... We are waiting for a fix in WSL. Tracked in https://github.com/microsoft/vscode-remote-release/issues/5000.
It's recommended, also for performance reasons, to place projects on Linux file system (e.g. the home folder)


【Big bug】Every time you copy a large file, it will open! ! !

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.74.3
OS Version: Windows_NT x64 10.0.22621

Steps to Reproduce:

copy a large file (>3G) from one folder to another
then the file will be default open !!!

I use the vscode on my remote server(network connect is too slow to load such a big file), and it made me crazy, hope to fix it.
Every time I have to restart my vscode.

有时候我不小心点到了这样一些大文件（通常是神经网络权重），我也不得不重启我的vscode。
Sometimes I accidentally click on such large files (usually neural network weights), and I have to restart my vscode.

See #169433 for information about a change that is coming in 1.75, which is currently Insiders and expected to release as Stable next week.

See #169433 for information about a change that is coming in 1.75, which is currently Insiders and expected to release as Stable next week.

thanks~


[GLUTEN-1679][CH] Fixed: compatibility between collect_list/collect_set and groupArray/groupUniqArray

What changes were proposed in this pull request?
make the result of groupArray same as collect_list.
Also groupUniqArray and collect_set
Fixes: #1679
How was this patch tested?
(Please explain how this patch was tested. E.g. unit tests, integration tests, manual tests)
unit tests
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this)

Run Gluten Clickhouse CI


x/pkgsite: Use host GOOS when viewing documentation.

pkg.go.dev has the ability to show documentation for different GOOS by setting the variable in the URL or by using the dropdown. It does however not default to the host operating system like it did on godoc. This has lead to repeated confusion when people want to use a function, but find out it doesn't exist during compile time.
An example of this is https://pkg.go.dev/github.com/creack/pty, which when viewed on a windows machine shows a function Start.  When changing the GOOS to windows it disappears.
I would propose defaulting to the host operating system when possible.

When you say "host", do you mean the machine running pkgsite as a server, or the machine running the browser that visits pkgsite?

The machine running the browser that visits the site. I should have clarified that.


Get next Batch

Hi there,
browsing through the documentation I found the cursor API only has a .next() method.
Is there a way to get the next batch of size batchsize that I set in the options of the initial query?
Thank you

To be more precise: How can I trigger
curl -X PUT --dump - http://localhost:8529/_api/cursor/123123

through the javascript driver?
So, a dirty hack within my code looks like this:
let c = new ArrayCursor(this.dbconn._connection, {id: cursor, result: [], hasMore: true })
let res = await c.next()
let after = c._id
return {
	cursor: {
		after: after
        },
	docs: [res]
}

But is there a better way to achieve cursor-based pagination?

You should never need to create a cursor directly. The next method automatically fetches the next batch as needed but only returns the next item in the result set (which spans all batches).
Are you looking for a method that returns an array of all results per batch?

I'm closing this as the question seems to have been answered.


persistent volumes?

Is there a way to get an example of a docker-compose.yml file with persistent volumes? Every time I do a docker-compose down all data is gone.
Thanks

Nevermind. I forked it, added persistent volumes for Grafana and Elastic search and better instructions:
https://github.com/deeztek/dmarc-visualizer


Fix h2 boards json

@luar123

Thanks!
Initially I had some issues with 64MHz, but I guess this was due to some other reasons. Now it seems to work.


Try again audio was not clear #issue

I too had the same issue regarding my audio file. And I constantly get this message("Try again the sound of the audio was not clear") after testing every functions (for eg: mysp.myspsr(p,c)). Can you explain the reason why I get this issue even though the audio is in wav format and not of short duration? Can you please check my audio file, and tell if it works for you?
my-voice-analysis.zip
Originally posted by @ahalyaj in https://github.com/Shahabks/myprosody/issues/8#issuecomment-643089648

same issue here.

NOTE:
1- 1- Both My-Voice-Analysis and Myprosody work on Python 3.7
2- If you install My-Voice-Analysis through PyPi, please use:
      mysp=__import__("my-voice-analysis") instead of import myspsolution as mysp
3- It it better to keep the folder names as single entities for instance "Name_Folder" or "NameFolder" without space in the dirctoy path

mysp =import("myprosody")
import pickle
file_name="suun3.wav" # Audio File title
files_directory=r"/myprosody/dataset/audioFiles" # Path to the Audio_File directory (Python 3.7)
print(file_name)
print(files_directory)
result = mysp.mysptotal(file_name,files_directory)
Same issue while using your folder structure.

Anybody could fix it? I have the same issue.

Same issue here. Any solutions yet? Will you update with respect to python 3.9?

Same issue here :( any luck?

I ran in to this issue, was able to fix it by not including the .wav extension in the file name.  The code adds the extension itself with this line internally:
sound=p+"/"+m".wav"
Where p is the path and m is file name (minus extension).  Also be sure to include the myspsolution.praat file in the path folder or you'll likely see the same error.  If you are still stuck try amending your local copy of the library file to print out the exception.  Right now any exception that occurs during the load will result in "Try again the sound of the audio was not clear"


Port doesn't get closed upon discovery complete

I've wrapped the Discover function like this:
func Discover() {
	info := make(map[string]string)
	info["name"] = "device"
	info["id"] = "1"
	info["address"] = ip

	b, _ := json.Marshal(&info)

	for {
		_, err := peerdiscovery.Discover(peerdiscovery.Settings{
			Limit:   -1,
			Payload: b,
			Notify: func(d peerdiscovery.Discovered) {
				// save the discovered nodes into memory
			},
		})
		if err != nil {
			log.Errorf("Error trying to discover peers: %s", err)
		}
		time.Sleep(5 * time.Second)
	}
}

If I'm understanding the Settings correctly, this should discover for 10 secs (default) for unlimited nodes, exits, and restart in 5 secs.
But what I'm seeing here is that after the discovery completes, there's a lot of listeners on port 9999 (default):
$ sudo lsof -i:9999 -n -P | wc -l
1041

Is there a way to close these listeners after the function is finished?
EDIT: The reason I'm running this in a loop is that if I set the time limit to -1, it works for some time; if the network changes, it will just stop discovering/being discovered altogether. So I figured maybe I'll just let it run periodically for 10 secs.

I think I've found the problem:
https://github.com/maddie/peerdiscovery/blob/8e53523cb7128edc0a2e286fe20642872dd0a125/peerdiscovery.go#L305-L384
I've set the limit to -1, so the break statement will never reach; and somehow p2.ReadFrom never returned error, so the return statement never reached either, and there goes the dangling listener.
Was this done by purpose, or is it just a case not tested/handled?


Insomnia Designer with Schema produces RequestBody null in Debug

Describe the bug
When Debuging a Request which is defined by using a schema as request body the request body in debugging view is null
To Reproduce
The following is a minimal OpenAPI 3 config which reproduces the bug:
paths:
  "/foo":
    post:
      requestBody:
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/Foo"
components:
  schemas:
    Foo:
      title: Foo
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string

Expected behavior
As the Example Request Body is generated using the schema I would expect it to be filled in in the debug view as well.
Screenshots
The generated Request Body in Preview:

The Request Body in Debug View:

Desktop (please complete the following information):

OS: Windows 10 Enterprise 64 Bit
Installation Method: Installer
App Version: 2020.3.3

Additional context
Add any other context about the problem here.

Hi, i am also. is it wrong with my swagger or insomnia. idk

Hi. I have this problem too. I think that it is problem with $ref in requestBody. For example:
If I tried to use this OpenAPI schema I've got null value in debug:
openapi: '3.0.3'
info:
  title: Application API
  description: Documentation for API
  version: v1.0.0
paths:
  /api/auth/login/2:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/login"
components:
  schemas:
    login:
      type: object
      required: ["password"]
      properties:
        username:
          title: Username
          type: string
        email:
          title: Email
          type: string
          format: email
        password:
          title: Password
          type: string
          minLength: 1

I've tried another schema and this works well:
openapi: '3.0.3'
info:
  title: Application API
  description: Documentation for API
  version: v1.0.0
paths:
  /api/auth/login/2:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              login:
              type: object
              required: ["password"]
              properties:
                username:
                  title: Username
                  type: string
                email:
                  title: Email
                  type: string
                  format: email
                password:
                  title: Password
                  type: string
                  minLength: 1

any update on this?

any update on this?

Hello,
I just changed from openapi: '3.0.3' to openapi: '3.0.2' and it works well !!

having same issue, any update?

Thank you for reporting this! I did some investigation and it seems the version of swagger-parser used by insomnia-importers does not support 3.0.3 yet, and is the likely cause of this issue. As noted above, changing the spec version to 3.0.2 works as intended.
This is loosely related to https://github.com/Kong/insomnia/issues/2977

Hi. I have this problem too. I think that it is problem with $ref in requestBody. For example:
If I tried to use this OpenAPI schema I've got null value in debug:
openapi: '3.0.3'
info:
  title: Application API
  description: Documentation for API
  version: v1.0.0
paths:
  /api/auth/login/:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/Login"
components:
  schemas:
    Login:
      type: object
      required: ["password"]
      properties:
        username:
          title: Username
          type: string
        email:
          title: Email
          type: string
          format: email
        password:
          title: Password
          type: string
          minLength: 1

I've tried another schema and this works well:
openapi: '3.0.3'
info:
  title: Application API
  description: Documentation for API
  version: v1.0.0
paths:
  /api/auth/login/:
    post:
      requestBody:
        required: true
        content:
          application/json:
            schema:
              login:
              type: object
              required: ["password"]
              properties:
                username:
                  title: Username
                  type: string
                email:
                  title: Email
                  type: string
                  format: email
                password:
                  title: Password
                  type: string
                  minLength: 1

This problem occurs in Insomnia Core too. I'm working on Ubuntu 20.04.1

also work to me. "hard code" schema into content path

Hey folks. We recently added support for OpenAPI version 3.0.3 in Insomnia. Are you still having this problem?

I have tested it with the following spec in 22.4.1. Seems to work fine. I guess the issue can be closed now, thank you for your support.

 We recently added support for OpenAPI version 3.0.3 in Insomnia. Are you still having this problem?

yes!!