Add #18.0.0 and #20.0.0 tags for users on older stacks

Thanks for your work on this convenient buildpack and the recent updates for compatibility with the Heroku-22 stack!
My understanding is that the latest main of this branch no longer installs all the necessary dependencies for the Heroku-18 and Heroku-20 stack, as I'm now running into some errors due to a missing libcairo-gobject.so.2 (on the Heroku-18 stack).
The implication of the new suggestion to point to a specific tag is that any users of older stacks need to change their buildpack from just jontewks/puppeteer to the last version before the #22.0.0 tag.
The last tag before #22.0.0 seems to be #1.1.7, but this was released all the way back on 18th April 2020. The Heroku-22 stack was only released on 15th June 2022, so using the #1.1.7 tag means missing out on over 2 years of updates you made for use with the Heroku-18 and Heroku-20 stacks before Heroku-22 came along. In fact, the version with the #1.1.7 tag has a stack check that fails for the Heroku-20 stack, so in practice I think there isn't any suitable tag for that stack!
Is it possible you could add some a tag to the last "pre-Heroku-22" version of this buildpack? My suggestion would be to add both #18.0.0 and #20.0.0 to fit with your new naming convention :)
In the meantime, I've gotten things working by pointing directly to the commit before the Heroku-22 updates started, eg: using
https://github.com/jontewks/puppeteer-heroku-buildpack#ffaa6f7da5a3f486f5ac2d60cd87ee0e5ae9b429

as the buildpack URL.

Hey @robotfelix thanks for the info.
I didn't make those previous tags as from what I could tell it appeared as if this version should work for the previous stacks. If you take a look at https://devcenter.heroku.com/articles/stack-packages you'll see what packages are already available on the various heroku stacks. You'll see the one you wrote in about is available at build time but apparently not at run time. I'll make an 18 version with that included. Would you update this if there are any new requirements that I missed? I'm not able to make new apps on older stacks so its hard to check on these.

Here's the tag. Let me know how that goes: https://github.com/jontewks/puppeteer-heroku-buildpack/releases/tag/v18.0.0

Just let me know if it doesn't, I may have missed one package moving from run time to build time only on the heroku stack or something.


Github workflow to run code checks and pytest

Opening this PR to test the workflow and eventually enable Github Actions.

I think this is ready for a look but please hold off merging until ecmwf-ifs/dwarf-p-cloudsc#24 is merged to develop. Then, we can update the reference to CLOUDSC in the workflow configuration.
Overall it does what it says on the tin: run the pylint checks and pytest battery for Python 3.8, 3.9, 3.10 when opening a PR. Pylint violations should be displayed inline in the diff:

Pylint works now also without the pytest integration, which was often throwing warnings and therefore I have removed that dependency.
An odd failure of F_Front/OMNI occurs with the test_sourcefile_lazy_construction test with the frontend segfaulting. I can't reproduce this locally, not even in a similar docker container, which makes it hard to debug. I have allowed the test to gently xfail if the frontend exits with a signal 11 on that particular line.
Lastly, the base directory path to Loki's source directory was wrong in the CLOUDSC test. This was a leftover from moving the subpackages.

Codecov Report

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

@@           Coverage Diff           @@
##             main       #1   +/-   ##
=======================================
  Coverage        ?   97.34%
=======================================
  Files           ?        1
  Lines           ?      264
  Branches        ?        0
=======================================
  Hits            ?      257
  Misses          ?        7
  Partials        ?        0

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


Refresh doesn't take into account selected sort type consistently

Refreshing the nav works by showing any new code, but it looks like it isn't applying the selected sort properly. I have to click an option again afterwards e.g "Sort by file order".

Thanks for reporting this! Should be fixed in the next release :)

Thanks for fixing it so quickly! The extension is excellent; All the important parts of CodeMap, but much lighter.


Tutorial on Transfer Learning Bayesian Optimisation

Added a tutorial on how to use BoFire for Transfer Learning Bayesian Optimisation. Also made two small modifications for the code to run:

Inverse transform for ordinal encodings transforms into int type

When predicting within the task using MultiTaskGPs we must add likelihood noise manually since the observation_noise flag is not supported by BoTorch for MultiTaskGPs

Next step would be to incorporate a step for task selection for multi-fidelity problems.

Thanks @jpfolch. I will provide a review tomorrow. Best, Johannes

Hi @jduerholt,
I have made the requested changes, I am a little unsure about the _predict method in bofire/strategies/predictives/botorch.pybofire/strategies/predictives/botorch.py being correct, I left some more details in the comment above.
I also added some testing, checking that the sobo and qehvi work okay with MultiTask surrogates, they seem to do! Let me know if I should move the testing to a specs file somewhere, I searched for it but couldn't really pinpoint exactly where they should go so I just tested in a separate file.

Thanks, I will have a look the latest on Monday, but I hope to get it done tomorrow!

Hi @jduerholt,
I have made the requested changes. A few points:

I have made the try and except changes for prediction using MultiTaskGPs both in bofire/surrogates/multi_task_gp.py and bofire/strategies/predictives/botorch.py for consistency.

I was unable to test that if a list of surrogates is used that includes a MultiTaskGP, then all models should be MultiTaskGPs using the specs; I kept getting errors. I noticed that none of the specs in tests/bofire/data_models/specs/surrogates.py have validation testing for the BotorchSurrogates surrogate and that these are instead tested in tests/bofire/surrogates/test_torch_models.py so that is where I added the testing. Let me know if this is okay, or if you have  a guess of what was causing the errors.

The "SMOKE_TEST" variable in the notebook was included in a cell further down, let me know if you'd prefer it at the beginning.

I am happy to write MultiTask / Multifidelity benchmarks in a future PR that are more complete, rather than my current silly examples, I will have a think of which ones would be best to add.

Thanks!
Best,
Jose

Looks very good for me. Thank you very much!


Updates the databuilder directory name after deprecating databuilder submodule

Summary of Changes
docs: update databuilder directory name after deprecating databuilder submodule
Tests
No tests - just docs change
Documentation
The installation manual required an update following the deprecation of https://github.com/amundsen-io/amundsendatabuilder repository
CheckList
Make sure you have checked all steps below to ensure a timely review.

[X] PR title addresses the issue accurately and concisely. Example: "Updates the version of Flask to v1.0.2"

In case you are adding a dependency, check if the license complies with the ASF 3rd Party License Policy.

[X] PR includes a summary of changes.
[X] PR adds unit tests, updates existing unit tests, OR documents why no test additions or modifications are needed.
[X] In case of new functionality, my PR adds documentation that describes how to use it.

All the public functions and the classes in the PR contain docstrings that explain what it does

thanks for pr @marcin-mazurek ! does it cover all obsolete databuilder references?

+1 on @mgorsk1, I wonder whether it covers all the note for amundendatabuilder repo.


Add a snippets pane

This adds a snippets pane, which can be a static pane with all your snippets (sendInput actions) in it. (See #17329)
This pane has a treeview with these actions in it, that we can filter with a textbox at the top.
Play buttons next to entries make it quick to run the command you found.
Bound in the default actions with
        { "command": { "action": "splitPane", "type": "snippets" }, "id": "Terminal.OpenSnippetsPane", "name": { "key": "SnippetsPaneCommandName" } },

re: #1595

TODO, from 06-04 bug bash

[ ] Snippets pane doesn't display some "no snippets found" text if there aren't any yet
[x] open snippets pane; find a "send input"; click the play button on it; input is sent to active pane; begin typing
[x] I can open an infinite amount of suggestions panes

I'm closing this as by-design for now at least. Nothing stopping anyone from opening infinite of any kind of pane.
This would require kind of a lot of refactoring in this PR to mark a kind of pane as being a singleton or singleton-per-tab

[x] Ctrl+Shift+W should still work in the snippets pane even if focus isn't in textbox
[ ] open snippets pane; click on text box; press TAB key;

[ ] If you press TAB again, I have no idea where focus went

[x] some previews don't work. Like ^c ("input": "\u0003")
[ ] nested items just give you a bit of extra space for no reason and it looks a little awkward
[x] UI Suggestion: add padding on the right side
[ ] [Accessibility] Narrator says "Clear buffer; Suggestions found 132" when you open the snippets pane

Note: this is probably Narrator reading out the command palette (since that's where I opened it from)
We should probably expect something like "Snippets", then (assuming focus is thrown into text box) "Type to filter snippets" or something like that

Snippets pane doesn't display some "no snippets found" text if there aren't any yet

Adding

in the latest commit.

Addressed the feedback in https://github.com/microsoft/terminal/pull/17330#pullrequestreview-2108999709, save for one thing that isn't unique to this PR, and the infinite snippets pane thing.


N/A: version "N/A" is not yet installed. Node 6.9.1 OSX El Capitan

Thanks to everyone who contributes to this project. Issue is not critical as I can manually tell NVM which version to install. As per issue creation request here:  https://github.com/creationix/nvm/issues/437#issuecomment-255465512.
Alexs-MBP-3:desktop-fe alex$ nvm use
Found '/Users/alex/proj/desktop-fe/.nvmrc' with version <v6.9.0>
N/A: version "N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.

Alexs-MBP-3:desktop-fe alex$ nvm ls
         v4.4.0
         v6.4.0
         v6.8.0
->       v6.9.1
         system
default -> v6.8 (-> v6.8.0)
node -> stable (-> v6.9.1) (default)
stable -> 6.9 (-> v6.9.1) (default)
iojs -> N/A (default)
lts/* -> lts/argon (-> N/A)
lts/argon -> v4.6.1 (-> N/A)
lts/boron -> v6.9.1

Alexs-MacBook-Pro-3:desktop-fe alex$ nvm debug
nvm --version: v0.31.4
$SHELL: /bin/bash
$HOME: /Users/alex
$NVM_DIR: '$HOME/.nvm'
$PREFIX: ''
$NPM_CONFIG_PREFIX: ''
nvm current: v6.9.1
which node: $NVM_DIR/versions/node/v6.9.1/bin/node
which iojs:
which npm: $NVM_DIR/versions/node/v6.9.1/bin/npm
npm config get prefix: $NVM_DIR/versions/node/v6.9.1
npm root -g: $NVM_DIR/versions/node/v6.9.1/lib/node_modules

Thanks! Can you provide the output of cat /Users/alex/proj/desktop-fe/.nvmrc?

Sure, it's just v6.9.0

Wow... so I just ran nvm install and nvm use and it worked. I assume I tried that before, but if not... wow. Sorry, maybe this can just be closed.

Thanks for following up - if it wasn't installed properly, that message was correct - the nvm ls output might have been incorrect, however - but it's too late to debug that now :-)

Same problem here

Had the previous lts version via nvm install --lts && nvm use --lts
Installed the new lts yesterday via nvm install --lts && nvm use --lts

Now:
nvm use --lts
N/A: version "N/A" is not yet installed.

You need to run "nvm install N/A" to install it before using it.

Relevant outputs:
> nvm ls
nvm ls
         v4.6.0
         v6.9.1
default -> lts/* (-> N/A)
node -> stable (-> v6.9.1) (default)
stable -> 6.9 (-> v6.9.1) (default)
iojs -> N/A (default)
lts/* -> lts/argon (-> N/A)
lts/argon -> v4.6.1 (-> N/A)
lts/boron -> v6.9.1

@dmitriid I think you don't have the latest nvm - that was a bug that's fixed in v0.32.1.

Aha! Thank you! This fixed things

@ljharb I have this issue in this very version of nvm
http://stackoverflow.com/questions/40704814/the-npm-command-is-not-found-in-my-nodejs-docker-container

@stephaneeybert nvm must be sourced, and nvm install ran, in the same user and profile that you want to run it in. I don't know much about Docker, but my guess is that the user in the image script isn't the same one in docker run.

In a Docker container, by default the user is root. And I'm root indeed in both environments.
Sourcing the nvm doesn't seem to help:
root@60446f9286d0:/# . ~/.nvm/nvm.sh;
root@60446f9286d0:/# . ~/.nvm/nvm.sh; npm -i
bash: npm: command not found
root@60446f9286d0:/# . ~/.nvm/nvm.sh; npm install -g npm
bash: npm: command not found

@stephaneeybert can you file a separate issue? This one is for OS X

Oops. My mistake. I will do.

N/A poppin up on latest version...
~/Dev/frontend (dev) $ nvm ls
         v6.9.2
->       system
node -> stable (-> v6.9.2) (default)
stable -> 6.9 (-> v6.9.2) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> v6.9.2)
lts/argon -> v4.7.0 (-> N/A)
lts/boron -> v6.9.2

.nvmrc has
lts/argon

@typeoneerror which N/A are you talking about? You don't have any argon or io.js versions installed, according to your nvm ls output. Try nvm install in that directory to ensure it's installed.


README.md: Getting started

Section How to run the API now explains clearly how to build and run the API, including how to install the dependencies easily.

LGTM


Can you recompile the websites that use your cloud-game?

I'd like to test the websites that are adding your great work. Kosmi seems to use Webrtc but his emulators are clunky.
Oh if the cloudretro website could add our own Roms, it would be great, in a way (using the ones hosted on archive.org)

Hey @ImanCol! Thanks for the interest.
Correct me if I'm wrong, you are asking for a list of public sites that are using cloud-game code and where you can play some games, right? I can't think of any other sites except cloudretro.io. @giongto35, do you know any?
Now, on the second part of your message. Allowing to upload arbitrary user ROMs on the main site would be too risky due to copyright and piracy concerns. On the other hand, allowing users to download and play some free/public games from some catalog may be an interesting idea for further consideration.
archive.org is hosting mainly desktop computer games, except the old Atari console ROMs, if I remember correctly, so it's not really suited for this project dedicated mainly to retro consoles gaming.
@giongto35, what do you think?

@sergystepanov I think roms request is top 1 frequently asked question. CloudRetro.io is hosted on my infrastructure, and it is serving as the demo of the open-source, not a production. I'm feeling an unhealthy trending that people expect CloudRetro.io is a completed product and request game feature on top of that.
So here, I would expect users to host their own infrastructure and adding their own roms. We try to make that hosting process is easy as possible.
Or if we really want to have ROMs adding utility on CloudRetro.io, we can consider building a user system and different repo for each user or may just allow everyone uploads to the same repo so that we can keep enriching the game list. We don't let user download game, so I don't know if we violate copyright and privacy somehow.

Copyright infringement (colloquially referred to as piracy) is the use of works protected by copyright law without permission for a usage where such permission is required, thereby infringing certain exclusive rights granted to the copyright holder, such as the right to reproduce, distribute, display or perform the protected work, or to make derivative works. The copyright holder is typically the work's creator, or a publisher or other business to whom copyright has been assigned. Copyright holders routinely invoke legal and technological measures to prevent and penalize copyright infringement.

If a game is not opensource or free for use or not licensed (bought) for public use then letting play or just display it is technically copyright infringement. There is a thing called fair use doctrine in the US law but I'm not sure how it applies or if it applies at all to our research purposes.
It would be nice to have some ROM management capabilities for sure.

Oh I understand. Thanks for all the responses from her.
Sorry if I was misunderstood, my English is not very good, but I really wanted to know more about this project, mainly because IT IS THE BEST CLOUD GAMING AND FREE ACCESS THERE IS !. Mainly because I see that I was able to play a game of GBA (or Gameboy Color?), And Metal Slug so smoothly. Even Kosmi doesn't feel as good playing SNES as his big WebRTC project does.
In any case, I don't want them to abandon this project, he has an impeccable job and makes good use of WebRTC. I found it with the desire to be able to share a game with someone with the lowest latency. But although the list of games is very short and I cannot recognize all the emulators that are used, I cannot find or recognize any website that uses your project.
So I wanted to know which pages are using his project and adding more emulators.
But I already want to know that other emulators are compatible? And hopefully you can help me configure it in my own environment.
Thank you for your time and this great project.

Kosmi is not mine, it is just a webparty that accepts nes, snes and psx. The latter is unstable.
I just want to know how to integrate NEW EMULATORS in Cloud Gaming on my PC, or to know from the testing that you have done, which ones are compatible.

Basically, it can run any emulator that Libretro can.
Be aware that we don't have all the extended controller input support such as R2 L2 buttons, second analog stick from the PS and etc.
You can check the current list and add new emulators in the config file at the libretro.cores.list key:
https://github.com/giongto35/cloud-game/blob/569ed4c0ccc93d2816ad356b9c4a79496ae6ce40/configs/config.yaml#L115-L124
In case if you want to add a new emulator, you either download and put one that you need for your OS from here (these are for Linux, different OSes are there too) or just get the emulator name from this list and add a new entry to the config file (you can probably guess params from already present entries), it will download it automatically for your OS. As an example, I want to add 3DS then I'd rite something like this:
  3ds:
    lib: citra_libretro # the name
    roms: [ "3ds", "cia" ] # ROM file names
    # add config: citra_libretro.cfg if you want for manual core config


UserGuide

Codecov Report

Merging #184 (789efd5) into master (d698b29) will not change coverage.
The diff coverage is n/a.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff            @@
##             master     #184   +/-   ##
=========================================
  Coverage     51.56%   51.56%
  Complexity      497      497
=========================================
  Files           102      102
  Lines          2368     2368
  Branches        241      241
=========================================
  Hits           1221     1221
  Misses         1072     1072
  Partials         75       75

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


[Python] test_cython failing on macOS

https://github.com/apache/arrow/actions/runs/3315249930/jobs/5475594297#step:5:354

ImportError: dlopen(/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pytest-of-runner/pytest-0/test_cython_api0/pyarrow_cython_example.cpython-310-darwin.so, 0x0002): Library not loaded<EMAIL_ADDRESS>357  Referenced from: '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pytest-of-runner/pytest-0/test_cython_api0/pyarrow_cython_example.cpython-310-darwin.so'
358  Reason: tried: '/usr/local/lib/libarrow_python.1000.dylib' (no such file), '/usr/local/lib/libarrow_python.1000.dylib' (no such file), '/usr/local/lib/libarrow_python.1000.dylib' (no such file), '/usr/lib/libarrow_python.1000.dylib' (no such file)

Reporter: Alenka Frim / @AlenkaF
Note: This issue was originally created as ARROW-18150. Please see the migration documentation for further details.

@AlenkaF @jorisvandenbossche this was fixed by: https://github.com/apache/arrow/pull/14643, right?

Yes, correct.


Broken links

The following links generate 404's:

Office Add-ins community call – February 10, 2021
Office Add-ins community call – January 13, 2021
Office Add-ins community call – December 9, 2020
Office Add-ins community call - November 11, 2020
Office Add-ins community call - October 14, 2020
Office Add-ins community call - September 9, 2020
Office Add-ins community call - August 12, 2020
Office Add-ins community call - July 8, 2020
Office Add-ins community call - June 10, 2020

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

ID: a57f1340-d9ee-6bbc-c4ba-104b77840a6a
Version Independent ID: 82ff44e8-1cdc-20e9-3ce6-d560de532b14
Content: Microsoft Office Add-ins community call - Office Add-ins
Content Source: docs/overview/office-add-ins-community-call.md
Product: non-product-specific
Technology: add-ins
GitHub Login: @o365devx
Microsoft Alias: o365devx

Hi @elegault,
I believe this will be fixed by @davidchesnut's #3001 PR. I'll assign this to him to close when that PR is checked in.


Reading/recreating calibrated models fails in v3.7.1, v3.7.2 and v3.8.1

Project Robyn
Describe issue
Once calibration step is added to the modeling process, I can't recreate any of the models from that run. The error message it this from the reproducible example I have included for the latest version. It is taken from demo.R and simply uncommented the calibration code.
RobynRecreated <- robyn_recreate(
+   json_file = json_file,
+   dt_input = dt_simulated_weekly,
+   dt_holidays = dt_prophet_holidays,
+   quiet = FALSE)
>>> Recreating model 4_161_1
Imported JSON file succesfully: /Users/yanhongzhao/EF/next-gen-mmm/Robyn_202211031129_init/RobynModel-4_161_1.json
>> Running feature engineering...
Input data has 208 weeks in total: 2015-11-23 to 2019-11-11
Initial model is built on rolling window of 92 week: 2016-11-21 to 2018-08-20
Error in `filter()`:
! Problem while computing `..1 = .data$solID %in% allSolutions`.
Caused by error in `.data$solID`:
! Column `solID` not found in `.data`.
Run `rlang::last_error()` to see where the error occurred.
Warning messages:
1: In is.na(date_var_dates) || is.infinite(date_var_dates) :
  'length(x) = 2 > 1' in coercion to 'logical(1)'
2: In is.na(date_var_dates) || is.infinite(date_var_dates) :
  'length(x) = 2 > 1' in coercion to 'logical(1)'
3: In check_calibconstr(calibration_constraint, OutputModels$iterations,  :
  Input 'calibration_constraint' set for top 10% calibrated models. 0 models left for pareto-optimal selection. Minimum suggested: 500
> rlang::last_error()
<error/rlang_error>
Error in `filter()`:
! Problem while computing `..1 = .data$solID %in% allSolutions`.
Caused by error in `.data$solID`:
! Column `solID` not found in `.data`.
---
Backtrace:
  1. Robyn::robyn_recreate(...)
 14. rlang:::abort_data_pronoun(x, call = y)

I have run into the similar issue with my own dataset where it will complain "Error while running robyn_mmm(); providing PARTIAL results" triggered in the model.R script and the downstream function will get an error but I haven't seen that with the demo.R script
Provide reproducible example
robyn_debug.txt
Environment & Robyn version
Make sure you're using the latest Robyn version before you post an issue.

Check and share Robyn version: packageVersion("Robyn")
R version (Please, check and share: sessionInfo() or R.version$version.string)
Robyn version: 3.8.1
R version 4.2.2 (2022-10-31)
Platform: aarch64-apple-darwin21.6.0 (64-bit)
Running under: macOS Monterey 12.3

Just tried running on my own data with the updated v3.8.1 code with calibration and here is the error reported: the warning "Error while running robyn_mmm(); providing PARTIAL results" doesn't really help when debugging for error.
>>> Starting 10 trials with 2000 iterations each with calibration using TwoPointsDE nevergrad algorithm...
  Running trial 1 of 10
  |                                                                      |   0%Timing stopped at: 0.846 0.533 0.225
Error while running robyn_mmm(); providing PARTIAL results
Error in {: task 1 failed - "non-numeric argument to binary operator"

  Finished in 0.01 mins
Error in `arrange()`:
! Problem with the implicit `transmute()` step.
✖ Problem while computing `..1 = .data$nrmse`.
Caused by error in `.data$nrmse`:
! Column `nrmse` not found in `.data`.
Backtrace:
     ▆
  1. ├─global run_robyn_mmm(config)
  2. │ └─Robyn::robyn_run(...)
  3. │   └─Robyn::robyn_train(...)
  4. │     └─Robyn::robyn_mmm(...)
  5. │       └─... %>% as_tibble()
  6. ├─tibble::as_tibble(.)
  7. ├─dplyr::arrange(., .data$nrmse)
  8. ├─dplyr:::arrange.data.frame(., .data$nrmse)
  9. │ └─dplyr:::arrange_rows(.data, dots)
 10. │   ├─base::withCallingHandlers(...)
 11. │   ├─dplyr::transmute(new_data_frame(.data), !!!quosures)
 12. │   └─dplyr:::transmute.data.frame(new_data_frame(.data), !!!quosures)
 13. │     └─dplyr:::mutate_cols(.data, dots, caller_env = caller_env())
 14. │       ├─base::withCallingHandlers(...)
 15. │       └─mask$eval_all_mutate(quo)
 16. ├─nrmse
 17. ├─rlang:::`$.rlang_data_pronoun`(.data, nrmse)
 18. │ └─rlang:::data_pronoun_get(...)
 19. └─rlang:::abort_data_pronoun(x, call = y)
 20.   └─rlang::abort(msg, "rlang_error_data_pronoun_not_found", call = call)
Warning messages:
1: In is.na(date_var_dates) || is.infinite(date_var_dates) :
  'length(x) = 2 > 1' in coercion to 'logical(1)'
2: In is.na(date_var_dates) || is.infinite(date_var_dates) :
  'length(x) = 2 > 1' in coercion to 'logical(1)'
3: In value[[3L]](cond) :
  Error while running robyn_mmm(); providing PARTIAL results
Execution halted

Running the same data without calibration works without a hitch

Hey, very sorry about this bug that is also reported by another user #520. I just pushed another fix. Could you please update and test? thanks!

Hey, very sorry about this bug that is also reported by another user #520. I just pushed another fix. Could you please update and test? thanks!

Is this fix on the main branch? Is it the one from an hour ago?

Updated the code and tried it out. The problem still exist.
I read through the other issue and my 2nd comment above is the same as the latest on that issue.
The first comment (original comment I opened the issue with) is likely different and you can use the script I provided to reproduce the bug.

yes, and that's to fix the bug. because of the new calibration function, we require one more column, calibration_scope, in the calibration_input table. please check here. If you're using experiments to calibrate, just put "immediate" in it.

Can confirm that in both the script I provided and my own script that column exists and the bugs are there

ok, to clarify: after updating and restarting R, you still have the robyn_run bug? I'm using your robyn_debug.txt and the robyn_run function works well with calibration.
regarding the robyn_recreate bug, I'll look into it.

Sorry for the confusion! I really should have opened two separate issues. The original bug reported is for robyn_recreate and iyou can run it with the robyn_debug.txt. I found this bug while trying to replicate the robyn_run bug in my own dataset rather than the simulated dataset. For my own dataset, robyn_run bug still exists when I tried running it with the latest code.
Does this make it clear? I can open a separate issue for robyn_run bug and we can focus this issue on robyn_recreate bug.

for robyn_recreate I did some digging around and found the culprit:
The error is from this line here https://github.com/facebookexperimental/Robyn/blob/main/R/R/outputs.R#L113 where pareto_results$resultCalibration is missing a column 'solID'. The current columns are:
[1] "rn"               "liftStart"        "liftEnd"          "liftAbs"          "decompStart"
 [6] "decompEnd"        "decompAbsScaled"  "mape_lift"        "rsq_train"        "nrmse"
[11] "decomp.rssd"      "mape"             "lambda"           "lambda_hp"        "lambda_max"
[16] "lambda_min_ratio" "iterPar"          "iterNG"           "df.int"           "trial"

I am running line by line for the 'robyn_run' bug as well and will report back the result tomorrow when I get to it!

Thanks. I can reproduce the error now and will update asap

I've just pushed another fix and it runs on my macbook. please update and try

Thank you @gufengzhou the debug file now runs without a hitch. Let me run on my own data and report back

There is still an error when running my own data with calibration - I suggest we close this issue and I will open a new one to track that bug.


Resolving LLM Configuration Error - .env file config - LM Studio, local model (MAC)[Question]:

What is your question?
After reading thello,
somehow I can't get any further...  especially since it worked once before - but not since a few updates.
I always get the following error message and I guess it has to do (among other things) with the settings in the .env.
(base) USER@MBP-von-USER fabric % fabric --listmodels
Traceback (most recent call last):
  File "/opt/homebrew/bin/fabric", line 6, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/USER/AI/fabric/installer/client/cli/fabric.py", line 101, in main
    standalone = Standalone(args, args.pattern)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/USER/AI/fabric/installer/client/cli/utils.py", line 56, in __init__
    sorted_gpt_models, ollamaList, claudeList = self.fetch_available_models()
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/USER/AI/fabric/installer/client/cli/utils.py", line 297, in fetch_available_models
    if "/" in models[0] or "\\" in models[0]:
              ~~~~~~^^^
IndexError: list index out of range
(base) USER@MBP-von-USER fabric % fabric --listmodels
Error: Connection error. trying to access /models: ("Request URL is missing an 'http://' or 'https://' protocol.",)

My actual .env looks like this:
OPENAI_API_KEY=lmstudio
OPENAI_BASE_URL=http://localhost:1234/v1

DEFAULT_MODEL=lmstudio

YOUTUBE_API_KEY=AI

Can someone tell me please what the .env should look like that primarily accesses the local LLM (via LM Studio) - in the future also Claude.
Thank you!he documentation, I am still not clear how to get X working. I tried this, this, and that.

What is your question?
After reading thello, somehow I can't get any further... especially since it worked once before - but not since a few updates.
I always get the following error message and I guess it has to do (among other things) with the settings in the .env.
(base) USER@MBP-von-USER fabric % fabric --listmodels
Traceback (most recent call last):
  File "/opt/homebrew/bin/fabric", line 6, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/USER/AI/fabric/installer/client/cli/fabric.py", line 101, in main
    standalone = Standalone(args, args.pattern)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/USER/AI/fabric/installer/client/cli/utils.py", line 56, in __init__
    sorted_gpt_models, ollamaList, claudeList = self.fetch_available_models()
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/USER/AI/fabric/installer/client/cli/utils.py", line 297, in fetch_available_models
    if "/" in models[0] or "\\" in models[0]:
              ~~~~~~^^^
IndexError: list index out of range
(base) USER@MBP-von-USER fabric % fabric --listmodels
Error: Connection error. trying to access /models: ("Request URL is missing an 'http://' or 'https://' protocol.",)

My actual .env looks like this:
OPENAI_API_KEY=lmstudio
OPENAI_BASE_URL=http://localhost:1234/v1

DEFAULT_MODEL=lmstudio

YOUTUBE_API_KEY=AI

Can someone tell me please what the .env should look like that primarily accesses the local LLM (via LM Studio) - in the future also Claude.
Thank you!he documentation, I am still not clear how to get X working. I tried this, this, and that.

Ok first I am very novice at any of this.  But I finally got it I think by removing the "default model"
this is what my .env is looking like:
OPENAI_API_KEY=lmstudio OPENAI_BASE_URL=http://localhost:1234/v1/


⚠ Bofrost.at has degraded performance

In 023449e, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1297 ms

Resolved: Bofrost.at performance has improved in 5f65b41.


Any published papers available?

Dear Authors,
I just wonder whether there are some published papers available for the excellent or-tools.
I want to go deep for routing optimization and details.

There are none.
This old paper roughly describe the routing architecture of or-tools.

@lihuiknight  look at https://github.com/google/or-tools/issues/920#issuecomment-435880431

looks pretty good. Thank you.


add endpoint covid_hosp_facility

api udpated
all clients updated
added integration test which exercises the new endpoint in server and
python client

next pr will add another endpoint for hospital discovery. (e.g. answer "what hospitals are in PA?". then use that info to query covid_hosp_facility with a specific hospital_pk of interest.)
all unit and integrations pass

@dfarrow0  Does this need any prep in the DB before merging?

yes, the duplication hurts me too :(
no prep necessary, should be safe to merge -- and endpoint should go live once auto-deployed
we'll need to update pypi at some point, but i still have a new endpoint on the way, so recommend waiting for that


I can't figure out how to give iCanHazShortcut permission to automate Chrome

I'm trying to configure iCanHazShortcut to run a script that accesses Chrome via AppleScript (wrapped in Python) but am running into a
aem.aemsend.EventError: Command failed: The user has declined permission. (-1743)

error. More fully, the error report is
[stderr]
Traceback (most recent call last):
  File "/Users/raymondyee/C/src/my_conda_envs/myenv5/.venv/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 482, in __call__
    return self.AS_appdata.target().event(self._code, params, atts, codecs=self.AS_appdata).send(timeout, sendflags)
  File "/Users/raymondyee/C/src/my_conda_envs/myenv5/.venv/lib/python3.7/site-packages/aeosa/aem/aemsend.py", line 92, in send
    raise EventError(errornum, errormsg, eventresult)
aem.aemsend.EventError: Command failed: The user has declined permission. (-1743)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/Users/raymondyee/bin/chrome_tabs_to_clipboard.py", line 10, in <module>
    for w in gc.windows():
  File "/Users/raymondyee/C/src/my_conda_envs/myenv5/.venv/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 664, in __call__
    return self.get(*args, **kargs)
  File "/Users/raymondyee/C/src/my_conda_envs/myenv5/.venv/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 518, in __call__
    raise CommandError(self, (args, kargs), e, self.AS_appdata) from e
appscript.reference.CommandError: Command failed:
		OSERROR: -1743
		MESSAGE: The user has declined permission.
		COMMAND: app('/Applications/Google Chrome.app').windows.get()

Action executed successfully!

I don't ever remember getting prompted to give iCanHazShortcut permission to access Chrome, and I'm pretty sure that I would have said yes.  I can't seem to set that situation right to give the right permissions now.
My setup:

iCanHazShortcut 1.0.1
MacOS Mojave 10.14.3

I've reset System Preferences -> Security & Privacy -> Automation with
tccutil reset AppleEvents

but still get the same problem.
Thanks in advance for any help!  (and thanks for iCanHazShortcut in the first place)

Hello. Please create a shortcut with this command:
osascript -e 'tell application "Google Chrome" to open location "http://google.com"'
Does it work for you?

@deseven -- yes that does work for me.  Hmmm.

Then i guess it has nothing to do with iCHS itself. Still, have you tried to launch your python script/program manually? Does it work that way?

Okay, i did some tests, apparently this is related to #26 (which is fixed, but not released yet). I've built fixed version for you, you can download it here.

Thanks @deseven for your fix. I'll take a look at it.  BTW, you may have figured it out -- but my Python script does work from the terminal, making me think that the permission issue was related to iCHS.

It is related after all, i was wrong.
It's more like a feature than a bug though, current version spawns non-interactive shell and that's why you don't get that permission request. Invoking a shell with -l or -i param helps, but there is no way to add that in current version of iCHS. That's why the coming version 1.1 supports explicit declaration which shell you run and with which params.
Please report if that test build works for you when you can.

@megadr01d you can check out the new test version too if you want.

@deseven Thanks. Downloaded, will try later and report back.

@deseven Thanks, dev version is working great. With the -l flag I no longer need to declare the full path to my scripts or to dependencies inside the scripts, as long as they're all present in my $PATH.
Small glitch on the Preferences window, tho. Open Preferences from the menubar, switch to Shortcuts and edit a shortcut (pencil icon or double click).
Looking forward to the next release. Awesome job.

Alas, the new version still doesn't work for me.
I reset my macOS privacy settings (with tccutil reset All) and when I came to run my script on iTerm, I got prompted to give permission:

yet when I go to test my script in iCHS, I still get the same error (with no prompt to give permission).  It seems that somehow I must have said no at some point to iCHS in the past and can't figure out how to reset that decision so that I can be given a chance to say yes this time.

The script in question is:
#!/Users/raymondyee/C/src/my_conda_envs/myenv5/.venv/bin/python

from appscript import app, k, its
import pyperclip

gc = app("Google Chrome")

links = []

for w in gc.windows():
    for (i, tab) in enumerate(w.tabs()):
        links.append('[{}]({})'.format(tab.title(), tab.URL()))

links_md = "* " + "\n* ".join(links)
pyperclip.copy(links_md)

Ok, i'll try your script tomorrow.
I tested it before with a very simple example:
from appscript import *

app('Finder').home.folders.name.get()

And it requests a permission correctly if i run it as python script.py in Terminal or iCHS.

I tried the simple script that you included here but unfortunately getting the same error in iCHS:
Action: /Users/raymondyee/bin/ichs_test.py
Shell: /bin/bash -l
Exit code: 1

[stderr]
Traceback (most recent call last):
  File "/Users/raymondyee/C/src/my_conda_envs/myenv5/.venv/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 482, in __call__
    return self.AS_appdata.target().event(self._code, params, atts, codecs=self.AS_appdata).send(timeout, sendflags)
  File "/Users/raymondyee/C/src/my_conda_envs/myenv5/.venv/lib/python3.7/site-packages/aeosa/aem/aemsend.py", line 92, in send
    raise EventError(errornum, errormsg, eventresult)
aem.aemsend.EventError: Command failed: The user has declined permission. (-1743)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/Users/raymondyee/bin/ichs_test.py", line 5, in <module>
    app('Finder').home.folders.name.get()
  File "/Users/raymondyee/C/src/my_conda_envs/myenv5/.venv/lib/python3.7/site-packages/aeosa/appscript/reference.py", line 518, in __call__
    raise CommandError(self, (args, kargs), e, self.AS_appdata) from e
appscript.reference.CommandError: Command failed:
		OSERROR: -1743
		MESSAGE: The user has declined permission.
		COMMAND: app('/System/Library/CoreServices/Finder.app').home.folders.name.get()

I might have try this on another account or another Mac.

I don't have much of an understanding of Mojave permission systems but macOS Mojave gets new APIs around AppleEvent sandboxing – but AEpocalypse still looms seems to talk about issues related to the problem I've been experiencing.

Oh, thanks, your link helped a lot! So this is another security "feature" from Apple that doesn't make any sense (since you can control any app without any permissions using osascript). Good to know.
I've added that NSAppleEventsUsageDescription key and tried your script, it works fine now. It worked for me before because i ran iCHS from the IDE and apparently parent process defines this behavior.
Please re-download the test version to check if it works for you now.

@deseven Now it works fine -- thank you so much!  Yeah, I really don't understand Apple's security restriction here either.

Great! I'm closing this then.


Validator Middleware

I have an idea, "Validator Middleware".
I plan that I'll make it with validator.js, which is used in express-validator. So, it will depend on the external library, which will be a "third-party" middleware.
The express middleware is helpful, but it's a bit fat, and it seems not too easy to implement. And "just do porting" is not like Hono. I want to make the "Validator Middleware" simpler than the express middleware. Below is the synopsis that on my head now:
const app = new Hono()

app.use(
  '/',
  validator((v) => [
    {
      rule: v.isAlpha,
      field: 'query',
      name: 'q',
    },
  ])
)

app.get('/', (c) => {
  const res = validatorResult(c)
  return c.json(res)
})

export default app

I'll try to build it on github.com/honojs/validator repository. So if it's ready, please take a look!

It is very good for the framework to have a nice validation library.
However, I think that functions should be context object independent if at all possible.
I may not be able to achieve the same thing as your code, but I think it would be better if it were as follows.
import { buildValidator } from "middleware/validator"

const validatorSearch = buildValidator((v) => [
  {
    rule: v.isAlpha,
    name: 'q',
  },
])

app.get('/', (c) => {
  const res = validatorSearch(c.query())
  return c.json(res)
})

export default app

It is very good for the framework to have a nice validation library.
However, I think that functions should be context object independent if at all possible.

Second on this, and what's in my mind is like this,

const schema  = {
  type: 'object',
  required: ['requiredKey'],
  properties: {
    someKey: { type: 'string' },
    someOtherKey: { type: 'number' },
    requiredKey: {
      type: 'array',
      maxItems: 3,
      items: { type: 'integer' }
    },
    nullableKey: { type: ['number', 'null'] }, // or { type: 'number', nullable: true }
    multipleTypesKey: { type: ['boolean', 'number'] },
    multipleRestrictedTypesKey: {
      oneOf: [
        { type: 'string', maxLength: 5 },
        { type: 'number', minimum: 10 }
      ]
    },
    enumKey: {
      type: 'string',
      enum: ['John', 'Foo']
    },
    notTypeKey: {
      not: { type: 'array' }
    }
  }
}

app.get('/',  validate({ schema }), handler)

Oh, sorry, I finally understood what it means to register as middleware using app.use when I saw this.
app.get('/',  validate({ schema }), handler)

I'll reconsider for a moment.

I would like the following API.
import validator from 'middleware/validator'

const validatorSearch = validator((v) => [
  {
    rule: v.isAlpha,
    field: 'query',
    name: 'q',
  },
])

app.get('/', validatorSearch, (c) => {
  const q = c.req.query('q') // get value if q is alphabetic only, otherwise throws error
  const unknownParam = c.req.query('unknownParam') // throws error
  const qFromCookie = c.req.cookie('q') // throws error

  // fetch result...

  return c.json(result)
})

app.onError((err, c) => {
  // handle validation error
})

export default app

Since validation failures are literally exceptional, it would be nice to be able to handle them in app.onError, etc., without writing explicit error handling in the normal handler.
Supporting JSON Schema might be good, but I think there are some things that are difficult to describe using only regular expressions, such as validation of email addresses. Ah, but if we decide that "the only validations that can be specified are those that can be expressed in JSON Schema," then we might be able to make it middleware without external dependencies.

Hi! @usualoma @metrue
This is in my head!:
https://gist.github.com/yusukebe/b9b48e910f45ac7cb88f72b998bfc8b8
To make the error message such "query : q is invalied", Validation object must have field and name parameters.

@metrue:
Second on this, and what's in my mind is like this,

That code @metrue wrote is based on "JSON Schema".  It's the same validator, but I think these are different things. How about make both validators, "traditional style" and "JSON Schema style"?
First I want to make the "traditional style" on 'github.com/honojs/validator' and '@honojs/validator' namespace. And, it's OK to make github.com/honojs/json-schema and @honojs/json-schema. Addition, to implement JSON Schema, we can use this library:
https://www.npmjs.com/package/@cfworker/json-schema

@usualoma:
Since validation failures are literally exceptional, it would be nice to be able to handle them in app.onError, etc., without writing explicit error handling in the normal handler.

It's a good idea that users don't have to handle results, but
So, I like to handle the "Result" object in the handler. although it's verbose...
I think it's difficult handling the validation error and separate processing for each errors. We dare not implement custom Error objects, using only Error object.
So, I like to handle the "Result" object in the handler. although it's verbose...

Hi! @usualoma @metrue
This is in my head!:
https://gist.github.com/yusukebe/b9b48e910f45ac7cb88f72b998bfc8b8
To make the error message such "query : q is invalid", Validation object must have field and name parameters.

@metrue:
Second on this, and what's in my mind is like this,

That code @metrue wrote is based on "JSON Schema". It's the same validator, but I think these are different things. How about making both validators, "traditional style" and "JSON Schema style"?
First, I want to make the "traditional style" on github.com/honojs/validator and @honojs/validator namespace. And, it's OK to make github.com/honojs/json-schema and @honojs/json-schema. In addition, to implement JSON Schema, we can use this library:
https://www.npmjs.com/package/@cfworker/json-schema

@usualoma:
Since validation failures are literally exceptional, it would be nice to be able to handle them in app.onError, etc., without writing explicit error handling in the normal handler.

It's a good idea that users don't have to handle them in handlers. The code in the handler tends to be complicated.
If we handle validation error on app.onError,  how we separate processing. We have not dared make custom Error objects.

@usualoma:
Since validation failures are literally exceptional, it would be nice to be able to handle them in app.onError, etc., without writing explicit error handling in the normal handler.

@yusukebe:
It's a good idea that users don't have to handle them in handlers. The code in the handler tends to be complicated.
If we handle validation error on app.onError, how we separate processing. We have not dared make custom Error objects.

I think the validation exception handling should be inside the validation middleware itself. or we just simply put them into ctx.validationResult, then in the handler we can check it just like @yusukebe did in the gist.
const res = c.get('validatorResult')
if (res.hasError) {
  ...
}

That code @metrue wrote is based on "JSON Schema". It's the same validator, but I think these are different things. How about making both validators, "traditional style" and "JSON Schema style"?
First, I want to make the "traditional style" on github.com/honojs/validator and @honojs/validator namespace. And, it's OK to make github.com/honojs/json-schema and @honojs/json-schema. In addition, to implement JSON Schema, we can use this library: https://www.npmjs.com/package/@cfworker/json-schema

Agree, we can have both of them. and the current interface of validation middleware @yusukebe designed is just simple and enough.
type Field = 'query' | 'param' | 'header' | 'body'

type Validation = {
  rule: Function
  field: Field
  name: string
  message?: string
  isError?: boolean
}

type Result = {
  hasError: boolean
  validations: Validation[]
}

const validationMiddleware = (option: (validator: Validator) => Validation[]): Handler {}

One minor thought, is Validation.rule need to be an array, like Validation.rules to support the multiple rule on one field?

@metrue

One minor thought, is Validation.rule need to be an array, like Validation.rules to support the multiple rule on one field?

Ah, yes! It's good to be array to support the multiple rules.

@metrue Thank you for your comment!

I think the validation exception handling should be inside the validation middleware itself. or we just simply put them into ctx.validationResult, then in the handler we can check it just like @yusukebe did in the gist.

I don't have a particular insistence that "onError should be handled as an exception".  but I didn't want to write the following code over and over again anyway.
  const res = validatorResult(c)
  // It's verbose...
  if (res.hasError) {
    res.validations.map((v) => {
      if (v.isError && v.field === 'query') {
        return c.notFound()
      }
    })
  } else {
    // ...
  }

Also, after thinking about it for a moment, I can achieve what I want to accomplish with the current implementation of @yusukebe , since we can summarize the error handling as follows
const app = new Hono()
app.use(
  '*',
  validationMiddleware((v) => [
    {
      rule: v.isAlpha,
      field: 'query',
      name: 'q',
    },
  ]),
  function handleValidationError(c, next) {
      const res = validatorResult(c)
      if (hasError) {
        return c.json({message: 'Invalid request'}, 400)
      }
      else {
        next()
      }
  }
)

app.get('/', (c) => {
  return c.json(res)
})

@usualoma
but I didn't want to write the following code over and over again anyway.

Totally agree on this, to make life easier, maybe we make it like this,
const app = new Hono()

type ValidationErrorHandler = (ctx, next) => Promise<void>
type Validation = {
  rule: Function
  field: Field
  name: string
  onError: ValidationErrorHandler,
}

app.use(
  '*',
  validationMiddleware((v) => [
    {
      rule: v.isAlpha,
      field: 'query',
      name: 'q',
      onError: (ctx, next) => {
          return c.json({message: 'Invalid request'}, 400)
       }
    },
  ]),
)

app.get('/', (c) => {
  return c.json(res)
})

But if we still need the validation results, we have to save them into the ctx in the validation middleware.

Also, after thinking about it for a moment, I can achieve what I want to accomplish with the current implementation of @yusukebe , since we can summarize the error handling as follows

Oh, that's cool! Why didn't I notice it? This is taking advantage of Hono's middleware structures.

@metrue @usualoma
Thank you both! Referring to this discussion, I'll make the prototype of "Validator Middleware" this weekend (or after).

I actually thought that this ticket will be about JSON-Schema type validator. If some of you will be working on the non-JSON-Schema one, I can try and tinker a bit for the other one...

@digitalmio I'm also interested in a validation middleware for JSON Schema and/or JSON Type Definition, and since AJV supports both of those I was thinking about creating a middleware for that.  What library were you thinking of using?

Hey, AJV might be a good option, I would also check what library Fastify is using. I'm going on holiday soon, will be able to take a look into this in about week and a bit.

Hi!
I think the first thing we have to do is look into whether the AJV works on Cloudflare Workers fine.

Hi there! especially @metrue and @usualoma .
I'm creating "Validator Middleware" and  almost done:
https://github.com/honojs/validator/tree/develop
This is what I consider to be the Ideal API. I would like to go with this, but if you must have an opinion, please let me know.


Zoom level is reset on auto refresh (on dark mode)

I noticed that user zoom level (if I zoom with mouse) is reset to default selection when the auto cloud database refresh triggered. This was on devstation.ruuvi.com/darkmode but when tried devstation.ruuvi.com I didn't see this same behaviour.

I'll close this, /darkmode is slightly older. I will rebase it before next update and it'll be fixed


Fix client issues cookies

I think we should change where the X509 certs are written. Instead of writing them to ~/.ssh I think they should be written to ~/.ssl.


Procedure for 4 in 1 raspberry pi ADS1115.

Last time you can chose to read which address like this:
adc = Adafruit_ADS1x15.ADS1015(address=0x49, busnum=1)
how about this library for ADS1115?

you can set the address in init
https://github.com/adafruit/Adafruit_CircuitPython_ADS1x15/blob/master/adafruit_ads1x15/ads1x15.py#L60
in circuitpython you dont pass the busnumber into the object, you create a bus device separately then pass it in, there's only one on the raspi:
https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/i2c-sensors-and-devices

Hi Ladyada,
Thanks you for the reply and thanks for the Adafruit libraries.
If I will use 2 or 3 ADS1115 in my circuit how to set it up on my python commands?
Previously I am setting it up by:
adc0 = Adafruit_ADS1x15.ADS1015(address=0x49, busnum=1)
adc1 = Adafruit_ADS1x15.ADS1015(address=0x48, busnum=1)
On the init I can only change the address.
Thanks

drop busnum, you don't need to specify it.

ok thanks.

Hey Thanks. I will do that.

Hi @ladyada @caternuson ,
Sorry to bring this up again, I am trying to update my existing system reading temperature from ADS1115.
I want to upgrade my circuit with 4 ADS1115 to read 16 temperature and pressure sensors.
Ad I am currently using the old script and below is the script to identify all 4:
adc0 = Adafruit_ADS1x15.ADS1115(address=0x48)
adc1 = Adafruit_ADS1x15.ADS1115(address=0x49)
adc2 = Adafruit_ADS1x15.ADS1115(address=0x4A)
adc3 = Adafruit_ADS1x15.ADS1115(address=0x4B)
*this is on one python script
How can I adapt this on new circuitpython?
Thank you and regards,

That looks fine. In general, you specify the address when you create the object. Looks like that is what you are doing. Is it not working?

That looks fine. In general, you specify the address when you create the object. Looks like that is what you are doing. Is it not working?

Hi, Thanks. I haven't tried it yet.
I am wondering how to include it or modify the adafruit circuitpython simpletest python script.
In the script it called the adc
"ads = ADS.ADS1115(i2c)"
Im not sure how to put the i2c address?
Or is it like this?
ads0 = ADS.ADS1115(i2c, address=0x48)
ads1 = ADS.ADS1115(i2c, address=0x49)
ads2 = ADS.ADS1115(i2c, address=0x4A)
ads3 = ADS.ADS1115(i2c, address=0x4B)
Thanks for your help.

That's it. You're setting the address with the parameter address=. So ads0 is 0x48, etc. If you don't specify an address, it just uses a default value.
Do you think it would help if the simpletest example had this in it?
# Create the ADC object
ads = ADS.ADS1015(i2c)                 # use the default address
#ads = ADS.ADS1015(i2c, address=0x49)  # specify an address

hey @caternuson,
Ok I understand now. I will try soon, thank you.
Yes it would be very helpful if the simpletest had this specially a noob like me:
Create the ADC object
ads = ADS.ADS1015(i2c)                 # use the default address
#ads = ADS.ADS1015(i2c, address=0x49)  # specify an address

Want to try and make a pull request with those changes? If you've never made a pull request before, this would be an excellent one to try.
We even have a few guides that might help.
https://learn.adafruit.com/an-introduction-to-collaborating-with-version-control/overview
https://learn.adafruit.com/contribute-to-circuitpython-with-git-and-github/overview

Hi @caternuson , Thanks.
I will check and try to pull request with those chages.


Fix README

Make AngularJS controller's method name consistent to the caller in the respective HTML

Hi @fikriauliya - thanks for taking the time to send this PR.
The HTML examples and the JS examples are not meant to be used together. My intention was to show two different ways of accomplishing the same thing.
The JS examples assume that there is corresponding HTML that uses that method.
This code, for example:
angular.module('ngTokenAuthTestApp')
  .controller('IndexCtrl', function($scope, $auth) {
    $scope.handleBtnClick = function() {
      $auth.authenticate('github')
        .then(function(resp) {
          // handle success
        })
        .catch(function(resp) {
          // handle errors
        });
    };
  });

Assumes that there is a corresponding template that looks like this:
<button ng-click="handleBtnClick()">
  Sign in with Github
</button>


AAI Compatibility - Circuit Network Ore Signals

I'm running a stripped down AAI deployment with YARM and am seeing some issues on circuit network signals. It looks like including YARM makes it so there are multiple signals for ore types.
Where this becomes an issue in AAI is that AAI uses tile scanners to generate signals for ore nodes to be mined on a tile. Tile scanner generated signals are "different" from the signals available in the regular circuit network logic post YARM install.
No idea if this lies directly in YARM or in AAI, but YARM lists AAI compatibility, so I figured I'd report here.
The attached save should show the issue:
circuit-bug-test.zip
Check the signal inputs on the right combinator and you'll see a duplication, rather than addition.
Is this expected necessary behavior for YARM or is it a bug?

Hi, sorry, I'm not actively maintaining YARM at the moment. I'll leave this link here to unify the discussions: https://mods.factorio.com/mod/YARM/discussion/5d1aae6c56d0c1000d9325cd


data mixing - Fix duplicate context issue by taking set of all context, using sampling without replacement, and comparing text directly instead of row_idx

See https://github.com/aakankshaduggal/sdg/pull/18
I understand from @bbrowning that there are bugs to be resolved though:

it breaks the pipeline when used with smaller qna.yaml files like the e2e tonsils

See https://github.com/aakankshaduggal/sdg/pull/21 from @abhi1092 for the fixes

The changes above address multiple areas - the areas specific to generating additional document contexts to add onto the samples to improve training (ie the RAFT changes in the PR above) are opened as a PR at #215.
There are other changes in the fork PR linked above that are unrelated, around things like batch parameters. #215 does not incorporate those.

This issue was for "the duplication issue" with  build_raft_dataset(), I figured that is resolved by #215
Do open other issues for anything else


Revert "v3.9.0"

Reverts Bitcoin-com/rest.bitcoin.com#428

Pull Request Test Coverage Report for Build 2266

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 70.245%

Totals

Change from base Build 2264:
0.0%

Covered Lines:
2057

Relevant Lines:
2739

💛  - Coveralls


Add Namespace Definition/Imports to Operator Log

As proposed in November 1st meeting, I think a good way to start prototyping federation is to introduce a basic namespace-to-origin mapping into the registrty state via two new Operator Log Entries.

ImportNamespace { name: String, registry: String } - This registry imports the namespace name from registry.
DefineNamespace { name: String } - This registry defines the namespace name in its own logs.

A registry's name is currently required to be a domain name and a registry's "location" is currently required to map to itself. In the future we can relax this constraint if we want to add indirection between registry name and registry location.
As a validation rule, it would be illegal for an operator log to contain two or more *Namespace entries using the same name value. This means that every namespace is mapped to exactly zero or one registries (either a remote or this one) and that that mapping does not change over time.
This feature when combined with the previously discussed Warg-Registry header will make it possible for clients to reason about the relationships between registries and talk to registries about each other. Most (or all?) registries will want to require that releases only reference namespaces that are bound and that requests with Warg-Registry headers only use header values which are registries in the operator log as this acts as a record of which registries they federate with.
Future Note 1: ImportNamespace can be extended in the future with an additional field that indicates what name from the specified registry is being imported as name and when no value is provided for that it is implicitly the same as name.
Future Note 2: The no duplicate definitions/imports validation rule can be relaxed in the future in order to introduce namespace re-mapping.

To clarify, registry: String and its use in the Warg-Registry header need to validate as a domain name or authority?

We could add a header to federated (Warg-Registry) responses:
Warg-Registry-Location: <registry URL>
In the short-term that would always be e.g. https://{registry} but it might let us avoid needing to require that registry must be a domain name. In the future (with more design work) it might also be a good mechanism for updating an imported registry's origin URL.

To elaborate...
Warg-Registry header and registry values in the proposed operator log entry are arbitrary unique string IDs (but not necessarily globally unique across other registries).
To handle the use case where a client wants to check the actual source registry API instead of what is provided by the proxying registry, a Warg-Registry-Location header is optionally provided with the current URL to the source registry. That source registry URL may change over time but the identifier used in the Warg-Registry header wouldn't change.
How do we feel about that?
Do we still need future extension to remap a namespace under this implementation?

For now, I would really like to stick to the names being Domain Names because the fact that they're globally unique means they mean the same thing regardless of who your home registry is (which simplifies user assumptions) and we can cache things from the same registry name together because they refer to the same state.
To zero in on something Calvin said, I think this proposal should be considered a candidate implementation for Namespace Remapping and not part of this feature because they serve very overlapping purposes.
I would like to move forward initially without the additional Warg-Registry-Location header. To carve out some room for options like this one, I'll update my initial post to talk about registry names as being "currently required to be a domain name" and "currently required to map to a location 1:1" leaving us the room to consider future features as relaxing these constraints.

On that note, do you think the client should globally share the cache of logs by registry domain, regardless if sourced directly or different proxy registries?
I could imagine proxy registry checkpoints being not necessarily up to date and in sync. That might be problematic.
I recall that we discussed separately caching. Thoughts?

My intention is that clients can combine together information about a given registry from different sources (e.g. the registry itself, it's home registry) as long as every new checkpoint it receives is checked against the registry it's about (either by getting it from its own origin or monitoring against the origin) and all data about the registry is checked against verified checkpoints.
There is some consistency stuff we need to be careful about, but I think this is the goal and is pretty powerful.

As a clarifying point, namespace importing does not imply proxying support. And a registry may support proxying other registries that aren't mentioned in the operator log.
So the operator log's ImportNamespace mappings define how published package dependencies are resolved but doesn't imply proxying support for those registries.
By default, the CLI tries to proxy through the default registry. If that isn't supported, then the client tries to directly request from the source registry.
How does that sound?

As a clarifying point, namespace importing does not imply proxying support. And a registry may support proxying other registries that aren't mentioned in the operator log.
So the operator log's ImportNamespace mappings define how published package dependencies are resolved but doesn't imply proxying support for those registries.
By default, the CLI tries to proxy through the default registry. If that isn't supported, then the client tries to directly request from the source registry.
How does that sound?

This might be problematic in the case where the registry domain needs to be remapped, but we don't have that ability.

I'd like us to find a better term for "serving a response on behalf of another party" than proxy, but I think letting registries choose to not serve the content of all registries they import is fine and we can write the client to fall back to fetching from the imported registry itself.
I do think for certain common registry use cases (e.g. internal corporate registries) they'll serve all of it.

Think we are ready for a PR?

I think so, it should be relatively straightforward to add the entry types and implement the validation logic.
Since the client already validates the operator log it'll get propagated to the client without any extra work.

Merged the server-side https://github.com/bytecodealliance/registry/pull/225


What's the difference between shards and replicas? When should I use each?

A replica is an exact copy. The goal in replication is to have the same data set on both Primary and slave.
Sharding, on the other hand, is segmentation. The data set is broken into shards and kept in different nodes. This division of data is performed based on different algorithms.
In Jina we support two ways of scaling:
-Replicas can be used with any Executor type and is typically used for performance and availability.
-Shards are used for partitioning data and should only be used with Indexers since they store a state.
~ answered by Anoushka Jha


Alazar example (and driver) is broken

Locating an Alazar board is broken due to an invalid identifier for a temporary instrument in get_board_info().
Steps to reproduce

Follow the example notebook, specifically,AlazarTechATS9360.find_boards()

The problem lies in get_board_info(), which creates temporary instruments with the (unique) identifier f'alazar_temp{time.perf_counter()}'. However, perf_counter() returns a float, whose decimal point does not constitute a valid identifier:
AlazarTechATS9360.find_boards()
Traceback (most recent call last):

  Cell In[5], line 1
    AlazarTechATS9360.find_boards()

  File ~\Documents\Qcodes\src\qcodes\instrument_drivers\AlazarTech\ATS.py:80 in find_boards
    boards.append(cls.get_board_info(api, system_id, board_id))

  File ~\Documents\Qcodes\src\qcodes\instrument_drivers\AlazarTech\ATS.py:106 in get_board_info
    board = cls(f'alazar_temp_{time.perf_counter()}',

  File ~\Documents\Qcodes\src\qcodes\instrument\instrument_meta.py:36 in __call__
    new_inst = super().__call__(*args, **kwargs)

  File ~\Documents\Qcodes\src\qcodes\instrument_drivers\AlazarTech\ATS9360.py:24 in __init__
    super().__init__(name, dll_path=dll_path, **kwargs)

  File ~\Documents\Qcodes\src\qcodes\instrument_drivers\AlazarTech\ATS.py:133 in __init__
    super().__init__(name, **kwargs)

  File ~\Documents\Qcodes\src\qcodes\instrument\instrument.py:68 in __init__
    super().__init__(name=name, metadata=metadata, label=label)

  File ~\Documents\Qcodes\src\qcodes\instrument\instrument_base.py:48 in __init__
    self._is_valid_identifier(self.full_name)

  File ~\Documents\Qcodes\src\qcodes\instrument\instrument_base.py:558 in _is_valid_identifier
    raise ValueError(f"{name} invalid instrument identifier")

ValueError: alazar_temp_504106.315358 invalid instrument identifier

The most straightforward solution seems to me to replace perf_counter() with perf_counter_ns(), which returns an integer instead of a float.

Thanks @thangleiter I don't have access to an Alazar board at the moment but that seems like a reasonable fix.

All right, I'll open a PR and make sure the example notebook runs through (I have an ATS9440 at hand).


Missing roundtrip methods

Several Hash methods in Ruby's standard library return a hash. As expected, many of these methods roundtrip in the same way when called on hashes with Hashie extensions i.e. they return a hash with the same type and behavior as the receiver.
class HashieTest < Hash
  include Hashie::Extensions::IndifferentAccess
  include Hashie::Extensions::MergeInitializer
end

puts HashieTest.new(foo: "bar").merge(baz: "quux").class # => HashieTest
puts HashieTest.new(foo: "bar").clear.class # => HashieTest
puts HashieTest.new(foo: "bar").replace({}).class # => HashieTest

But I've just noticed that slice doesn't behave in this way e.g.:
puts HashieTest.new(foo: "bar").slice(:foo).class # => Hash

And in fact there are several methods which return a plain Hash rather than an extended Hash:

compact
invert
reject
select
slice
transform_keys
transform_values
update

Makes sense, please PR!

This is due to Hash#slice being implemented in C, specifically that it creates the new hash with the C function rb_hash_new() or rb_hash_new_with_size(). Please see my talk at RubyConf 2018 for more information as to why this happens.
It's not clear how we could handle this. In this specific case, with Hash#slice, we could override the method to make sure the new Hash is of the same singleton class as the generator, but I'm not really sure what that would look like. Would every extension have to implement #slice in the same way? That's the only thing I can think of.

Closed via #481


fancontrol: restart service after suspend

Description of changes
A change was done to fancontrol to restart the service in case of failure (#144210), however there seem to still be some cases in which fancontrol does not recover properly after stand-by.
According to a comment in lm-sensors/#172, the issue is caused by one of /sys/class/hwmon/hwmon[n]/pwm[n]_enable files which change their value from 1 to some other value, indicating a potential kernel/driver problem. The solution is to simply restart fancontrol after sleep, which will cause it to reset the pwm_enable flags correctly.
This is done by creating a new service (fancontrol-restart-on-suspend), which restarts the fancontrol service.
Combined with the change with #144210, most issues regarding fancontrol not recovering after suspend should be solved.
Things done

Built on platform(s)

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

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[x] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

@evils , could you please review this PR?
As maintainer (and also #144210), let me know if the implementation is OK for you. If the restart of the service might be a problem, we might put it behind a separate option (e.g. options.hardware.fancontrol.restart-after-suspend).

i'll give it a try tomorrow
i did the restart on-failure because it failed to resume after waking my desktop systemctl suspend
i'm slightly surprised that that doesn't cover your stand-by case,
but i guess that's just the perils of partially stopping a system xD
i'm also a bit surprised that there's no more direct way to restart a service after suspend
but if this is the best way, then so be it
do maybe add a comment about why we want to restart it after a suspend

my fans recovered to their set speed after waking systemctl suspend with this change (so it didn't break my use case :)

i'll give it a try tomorrow i did the restart on-failure because it failed to resume after waking my desktop systemctl suspend i'm slightly surprised that that doesn't cover your stand-by case, but i guess that's just the perils of partially stopping a system xD
i'm also a bit surprised that there's no more direct way to restart a service after suspend but if this is the best way, then so be it
do maybe add a comment about why we want to restart it after a suspend

Thank you for testing and the feedback. Unfortunately this was the only way to have my fans work after resuming from stand-by. I've added a comment, as well as improved the description of the service a little bit.

would this not be done better with a systemd-suspend hook, possible even added to the lm_sensors package with a patch?

@pennae , you're right. It would be better to implement it as a systemd-suspend hook. I've found some documentation on how to write the hook, but the only constraint I'm seeing is that I don't know where exactly to define the hook.
I've found in NixOS Wiki that there is an option called powerManagement.resumeCommands which seems to do exactly what we need.
@evils , @pennae , please re-review.


Update help page.

Updated team name.
Made the troubleshooting item shorter to fit on one line on a small screen, to align better with the other items in the same section.

Current coverage is 89.23% (diff: 100%)

Merging #2380 into new-docs will not change coverage

@@           new-docs      #2380   diff @@
==========================================
  Files            39         39
  Lines          1486       1486
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits           1326       1326
  Misses          160        160
  Partials          0          0

Powered by Codecov. Last update 85f9260...5ce1abf


Teku stops synchronising at headslot 83460.

Description
As a user, I want to use Teku as its intended so that I can contribute to the medalla testnet  without having to use the majority-used validators, Prysm and Lighthouse.  Using various validators benefits the network more.
Acceptance Criteria
*N/A
Steps to Reproduce (Bug)

I booted teku with the the flags shown in the attached log file and no database or log files.
I let it synchronise with the network up until headslot 83460.
It won't synch past headslot 83460. Left it for over an hour but no luck.

Expected behavior: Teku to continue synchronising the headslot until the latest so it can start validating.
Actual behavior: Stops at headslot 83460.
Frequency: 100% in my case.
Versions (Add all that apply)

Software version: [teku --0.12.3]
Java version: [java -14]
OS Name & Version: [Windows 10 | Build 19041.450 | Version 2004]

teku.log

I'm stuck as well.
teku/v0.12.4-dev-84673770/linux-x86_64/-privatebuild-openjdk64bitservervm-java-14
Kubuntu 20.04, 32 Gb ram, i5, HDD (no SSD yet).

Doing some syncs to attempt to reproduce this now.  When we've seen similar behaviour in the past the sync was actually continuing but the head block wasn't being updated as we skip updating the fork choice data while syncing finalised slots since there should only be one chain to follow.  However, it is possible to get blocks from the wrong chain which would result in a fork being imported and then Teku switching back to the right chain to continue importing.
I'm also looking into whether we can efficiently update those fork choice structures during a sync to avoid the problem entirely.

Depending on the exact issue you were encountering, #2643 may be needed or potentially #2644 which has just been merged in might be enough.

Reopening due to a new occurence of this in the wild. See the report  from @jgm (@mcdee):

Trying to sync from clean and it seems to stick at slot 83460:

12:07:56.148 INFO  - Sync Event  *** Current slot: 215739, Head slot: 81220, Connected peers: 72
12:08:08.209 INFO  - Sync Event  *** Current slot: 215740, Head slot: 81998, Connected peers: 72
12:08:20.029 INFO  - Sync Event  *** Current slot: 215741, Head slot: 82734, Connected peers: 72
12:08:33.680 INFO  - Sync Event  *** Current slot: 215742, Head slot: 83460, Connected peers: 73
12:08:44.020 INFO  - Sync Event  *** Current slot: 215743, Head slot: 83460, Connected peers: 74
12:08:44.511 INFO  - Epoch Event *** Epoch: 6742, Justified checkpoint: 2290, Finalized checkpoint: 2289, Finalized root: d0ea42..255b
12:08:56.020 INFO  - Sync Event  *** Current slot: 215744, Head slot: 83460, Connected peers: 74
12:09:08.019 INFO  - Sync Event  *** Current slot: 215745, Head slot: 83460, Connected peers: 74
12:09:20.021 INFO  - Sync Event  *** Current slot: 215746, Head slot: 83460, Connected peers: 74
12:09:32.020 INFO  - Sync Event  *** Current slot: 215747, Head slot: 83460, Connected peers: 74

This is the second time I've tried syncing; first time it stuck at this slot for over a day before I killed it.
This is running from master.  Any ideas?

Was this from the pre-compiled binaries or self-compiled? Not sure if the pre-compiled are the latest...

@Dallion3K this is self-compiled from master:
$ git rev-parse HEAD
50cfa70b4ad694151014ddf063a32ac7e9aa7709

@mcdee TY

I got a log privately from @mcdee. Copying comment from Discord so we have a more permanent record:
So the node appears to be making progress in a way but is in the long period of non-finalization on Medalla.  It looks like at some point it sync'd up to block 83460 and then for some reason got interrupted with its sync.  In the log you sent it's then started again back at the finalized checkpoint and is gradually following a new peer's chain back up but hasn't reached where it was up to yet.  The Teku version seems to be quite out of date (teku/v0.12.4-dev-df300e3b) so it doesn't include most of the fixes for dealing with the Medalla incident, in particular we now try to find a closer common ancestor to restart sync from which should get it making visible process much faster.
The key logs I'm looking at are from the PeerSync class:
2020-09-03 21:38:48.036+00:00 | beaconchain-async-5 | DEBUG | PeerSync | Request 200 blocks starting at 81363 from peer 16Uiu2HAmS3GGdznKQ6TYfnCW2q5LuKpmsHFq35BQu3fDM5fXXPNy

which show what blocks it's actually requesting.

Closing again. @mcdee has confirmed that there were some out of date JAR files in use, and sync is making progress after being updated to the latest.

FWIW, I just started a sync today and am running into this issue, too.  Not going past Head slot 83460.  Running with docker image pegasyseng/teku:develop

@alexfisher Can you check you've actually pulled the latest docker image (docker pull pegasyseng/teku:develop) and attach the logs here so I can take a look please?

Thanks for the fast response @ajsutton -- I just updated and can confirm I was able to pull a newer version.  Started it back up and will see how it does!


'try for free' button no longer exists

The 'trial overview page' linked in the first bullet point no longer includes a 'try for free' button as suggested.

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

ID: 3fec457e-9f2f-5054-bbec-9470e1f41b5a
Version Independent ID: 33783f5f-da8d-bfc3-6b88-9ebfa705106a
Content: Sign up for a free trial - Dynamics 365 Field Service
Content Source: ce/field-service/trial-signup.md
Service: dynamics-365-field-service
GitHub Login: @FieldServiceDave
Microsoft Alias: daclar

Hello Mark @markwheeler  - thank you for reporting the issue and apologies for the delay in getting back to you.
I've just pushed a fix to the link and it will be live shortly.
Thanks,
Michael


[BUG] git worktree support

When running npm version ... a commit/tag isn't created when you run within a git worktree. We should be able to detect when there's a ref to follow (ie. gitdir) inside a relative .git file. Need to update lib/is.js to understand this scenario....

This was fixed in: https://github.com/npm/git/commit/d56ed69f7081a5fcb12dc9bef5d79e6ef4bbfe3e


Netstandard 2.1

轻量化包引用
更新依赖包版本
兼容.net standard 2.1
test passed

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

你好，当前PR存在如下问题：

代码风格被严重修改
所有实体的不变性均被改变，此修改不符合当初设计不变性实体的初衷
System.Text.Json还处于rc阶段，在正式release后才会加入

希望官方跟进吧。
本PR我给关掉了应该不需要合并了。谢谢。


Fix missing pg_config_path in nightly

Yeah sure, let me try detecting homebrew and openssl installation, or overrides.

I would also try pkg-config --libs --cflags openssl to support those who use MacPorts.

Detection on macOS will be added in a separate PR.


I investigated this. We basically just make dozens or even hundreds of requests to deckbox.org and either it can't keep up or it starts refusing us.
We should debounce this in some way?

This affects all card tables not just rotation


Update media type for attestation command

Description
When I was using the cosign attach attestation command I saw in the code that layer media type is always going to be ctypes.SimpleSigningMediaType.
https://github.com/sigstore/cosign/blob/70d4cce81112331e7e934642372db347165fcc12/cmd/cosign/cli/attach/attestation.go#L71-L74
https://github.com/sigstore/cosign/blob/70d4cce81112331e7e934642372db347165fcc12/pkg/oci/static/signature.go#L38-L42
https://github.com/sigstore/cosign/blob/70d4cce81112331e7e934642372db347165fcc12/pkg/oci/static/options.go#L38-L42
Per the specification here, I was wondering if I could make a change so that the media type can be changed in this constructor. When the cosign attach attestation command is used I believe that the type should be application/vnd.dsse.envelope.v1+json
If this is not correct I can close this issue. If this does need follow-up I can create a PR today to update the command to use the correct media type.
Thanks again!

It looks like this is indeed a bug! A fix would be welcomed.


Sudo Keep-Alive

Find a solution how to enter the sudo password only once without using sudo su (per command base)

Not solved the problem yet?

sadly not @LaraCraft93

This issue seems as though it's been resolved.. no?

@dcondrey it can still be an issue as sudo prompts for the password after some idle time

Issue resolved in merge request #11


google-api-go-generator doesn't correctly deal with []byte fields

Currently if you define an endpoint (e.g. with [https://github.com/GoogleCloudPlatform/go-endpoints]) as
type RequestType struct {
  Field []byte
}

which would then show up something like:
"RequestType": {
  "id": "RequestType",
  "type": "object",
  "properties": {
    "Field": {
      "type": "string",
      "format": "byte"
    }
  }
}

Currently, this will get translated back into a generated struct like:
type RequestType struct {
  Field string
}

But it should really look like the original :)

Looks like inserting
		case "byte":
			gotype = "[]byte"

At https://github.com/google/google-api-go-client/blob/master/google-api-go-generator/gen.go#L2240 is enough. I'll make a real gerrit CL for this tomorrow, unless someone beat me to it.

Closed due to lack of activity.


Challenge 3.2 - As a User I am able to start a course and finish a course so that I can enter a segment

Able to Start / Finish a course.
TODO: connect to Segment

closed with #17


Xml comments are being ignored

I am using Swashbuckle.AspNetCore version 3.0.0 and ASP.NET Core 2.1 on Linux.
My request DTO looks like this:
https://github.com/alexeyzimarev/ddd-book/blob/master/Marketplace/Contracts/ClassifiedAds.cs
And the controller looks like this:
https://github.com/alexeyzimarev/ddd-book/blob/master/Marketplace/Api/ClassifiedAdsCommandsApi.cs
Now, the startup code is:
https://github.com/alexeyzimarev/ddd-book/blob/master/Marketplace/Startup.cs
When I check the JSON file, it has no content from XML comments. Instead, it just contains the details that are generated by reflections:
https://gist.github.com/alexeyzimarev/c48a96dbaa120f51e7c2327e77b21b73
I remember when I used 2.3 and .NET Core 2, it all worked.
My XML file is:
https://gist.github.com/alexeyzimarev/c9fc7919578200e5e059360a87b68a59
The issue is easy to reproduce by cloning this repo https://github.com/alexeyzimarev/ddd-book and running the application.

You should add route attribute on each controller action.I have the same problem.

Looking at your Startup.cs file, I see you haven't configured Swashbuckle to include XML comments. This is a required step as you need to tell it which XML file(s) to use. See the following section in the readme for more details:
https://github.com/domaindrivendev/Swashbuckle.AspNetCore#include-descriptions-from-xml-comments


Check domain file does not include NLU keys

Proposed changes:
This would allow us to consider domain files in the data/ directory
again in Rasa X. We currently filter those out, since NLU files with a
responses key would wrongly be identified as domain files.
Status (please check what you already did):

[ ] added some tests for the functionality
[ ] updated the documentation
[ ] updated the changelog (please check changelog for instructions)
[ ] reformat files using black (please check Readme for instructions)

Closing this one as we're targetting a micro release. New PR is at #8104.


[WIP] Fix load_npz to refuse loading pickled objects by default

This fixes #4530.

Hmm, it seems there's no numpy.load(allow_picke=) argument in NumPy 1.9.

Ok, I'll fix the code so that it will use allow_pickle only after NumPy 1.10.
(Maybe we need to think about deprecation of old NumPy also.)

We discussed some ideas:

Drop NumPy 1.9 support in v5 and do not backport this.

Pros: No dirty workarounds.  Also reduces cost in many other ways (e.g. testing).
Cons: NumPy 1.9 users are affected.

Use allow_pickle=None as default, which defaults to True (more specifically, not specifying allow_pickle) if NumPy 1.9 and False if NumPy 1.10 or later.
If allow_pickle=False is explicitly specified for NumPy 1.9, raise an error.

Pros: Can support NumPy 1.9.
Cons: Models saved by NumPy 1.10 may not be loaded by NumPy 1.9.

Make the default behavior controllable via environment variable.

Pros: Can support NumPy 1.9 and still compatible between different NumPy versions.
Cons: Another configuration item is added.

If we go with idea 1 or 2, NumPy 1.10+ users may not be able to customize pre-defined models defined in Chainer (e.g., calling add_persistent on chainer.links.model.vision.vgg). However, users can workaround that issue by specifying pretrained_model=None to constructor of such link and manually calling npz.load_npz(allow_pickle=True) later. So this change is no-compat (and cannot be backported to v4) but I think is still acceptable.
I'd like to proceed with idea 2. Do you think it is OK? @niboshi

I'm sorry for delay.
I don't understand the relation between add_persistent and pretrained_model.
Could you clarify that?

@niboshi load_npz will be called without allow_pickle from built-in Links under chainer/links/model/vision.
What we concerned at that time was that if pre-trained model file contains user-defined persistent object, the model cannot be specified to allow_pickle.
https://docs.chainer.org/en/stable/reference/generated/chainer.links.VGG16Layers.html?highlight=VGG16Layers

Is this PR still WIP?


Add class locator

Coverage decreased (-0.3%) to 99.734% when pulling 36f3b061efcc86e98d8457b7da9727a68a1277c3 on add-class-locator into 94c83467bd0b05ad3a5ce025b45fd6a1fa1c18b4 on master.


add links to app store and playstore for DeFiChain Wallet

What would you like to be added:
Would be nice to have some links on the explorer to app store and play store once it's ready.
Why is this needed:

DeFi Scan should be wallet implementation agnostic.
DeFi Scan provides a scan of the DeFi blockchain. It should not be concerned with the wallet as it can exist on its own without referencing any wallet ecosystem or patterns.


Uncaught exception input sequence_length is >= max_length

Hi everyone,
I recently tried Phi-3 example (onnxruntime-inference-example/mobile/examples/phi-3) on iPhone.
Sometimes the output of Phi-3 is more than my max_length.
My app will crash since I am not able to catch the exception.

libc++abi: terminating due to uncaught exception of type std::runtime_error: input sequence_length (12) is >= max_length (10)

I tried Obj-C and C++ type try-catch, but all failed to catch this exception.
Anyone has had the same issue?
Thanks!

Hi @hubertwang, can you please  share your prompt and your max_length value?

Hi @hubertwang, can you please share your prompt and your max_length value?

Yes, I tried two relatively extreme conditions.
I input a privacy policy extract from app store, ask prompt to analyze The max length set to 500, the output size will be around 800~900 and throw exception.
After I got this exception, I tried another prompt, expect short answers:
"How are you?" max limit 10
I except something like "I am good" or "good".
But it throw exception output (11, 12) > (10)
Then I try to further limit the answer:
"How are you, answer good or no good"
It still throw same exception. output (11, 12) > (10)
Note: The question is wrapped by the fine-tuned prompt format mentioned in the paper, with ## prefix.

To clarify: the max_length includes the prompt length + the answer. Try setting it to 200 and run your prompts again

To clarify: the max_length includes the prompt length + the answer. Try setting it to 200 and run your prompts again

Hi @natke,
Thanks for your reply. We'll keep that in mind and adjust the parameter.
Is it possible to catch this exception? Looks like the app will just crash for now, no chance to catch the exception. It's hard to estimate the output prompt may give us.
BTW, we also observed excessive memory usage when the prompt is longer. Seems longer prompt consume more memory.
I need to use iPhone 15 pro max to run certain prompt, which is the iPhone with the most memory for now.
Is it a expected behavior? Is it possible to control memorry message through search option?
Thank you.

Can you please add details of the exception you are seeing?

Can you please add details of the exception you are seeing?

libc++abi: terminating due to uncaught exception of type std::runtime_error: input sequence_length (12) is >= max_length (10)
Yes, this is the exception I received. I tried try catch but not working.

Hi @natke, yes, this is my sample code.
I used try-catch, or @try-@catch, but failed to catch the exception.
But I can set a break point to stop it while throwing exception.
Weird...
- (nullable NSString *)generate:(nonnull NSString*)input_user_question maxLength:(nonnull NSNumber*)max_length
{
  __weak __typeof__(self) weakSelf = self;
  NSMutableString *result = [NSMutableString string];

  @try {
    NSString* llmPath = [[NSBundle mainBundle] resourcePath];
    const char* modelPath = [llmPath cStringUsingEncoding:NSUTF8StringEncoding];

    auto model = OgaModel::Create(modelPath);
    auto tokenizer = OgaTokenizer::Create(*model);

    NSString* promptString = [NSString stringWithFormat:@"<|user|>\n%@<|end|>\n<|assistant|>", input_user_question];
    const char* prompt = [promptString UTF8String];

    auto sequences = OgaSequences::Create();
    tokenizer->Encode(prompt, *sequences);

    auto params = OgaGeneratorParams::Create(*model);
    params->SetSearchOption("max_length", max_length.intValue);
    params->SetInputSequences(*sequences);

    // Streaming Output to generate token by token
    auto tokenizer_stream = OgaTokenizerStream::Create(*tokenizer);

    auto generator = OgaGenerator::Create(*model, *params);

    while (!generator->IsDone()) {
      generator->ComputeLogits();
      generator->GenerateNextToken();

      const int32_t* seq = generator->GetSequenceData(0);
      size_t seq_len = generator->GetSequenceCount(0);
      const char* decode_tokens = tokenizer_stream->Decode(seq[seq_len - 1]);
      //NSLog(@"Decoded tokens: %s", decode_tokens);

      // Add decoded token to SharedTokenUpdater
      NSString* decodedTokenString = [NSString stringWithUTF8String:decode_tokens];
      if (hasListeners) {// Only send events if anyone is listening
        [weakSelf sendEventWithName:RCTOnnxEventGenTextTokenUpdate body:decodedTokenString];
      }
      //NSLog(@"[Phi-3] %@", decodedTokenString);
      [result appendString:decodedTokenString];
    }
  } @catch (id exception) {
    NSLog(@"Exception: %@", exception);
  }
  //NSLog(@"[Phi-3] Result: %@", result);
  return result;
}

Exception:
libc++abi: terminating due to uncaught exception of type std::runtime_error: input sequence_length (11) is >= max_length (10)

Hi @natke,
I managed to catch the c++ exception.
What I have done is just adding another layer c++ style try catch inside obj-c style @try-@catch.
Not sure why it didn't work, thanks for your responses!
I'll close this issue.
  try {
     // The sample code
  } catch (const std::exception &e) {
      NSLog(@"Caught C++ exception: %s", e.what());
  }