ClassDirectives.java:188-192: Implement different way to...

The puzzle 108-b077d916 from #108 has to be resolved:
https://github.com/objectionary/jeo-maven-plugin/blob/a7176742502b8a335026f8500cb7edad6af89bbb/src/main/java/org/eolang/jeo/representation/asm/ClassDirectives.java#L188-L192
The puzzle was created by @volodya-lombrozo on 29-Sep-23.
Estimate: 90 minutes,  role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

@0pdd 2 puzzles #128, #129 are still not solved.

@0pdd the puzzle #128 is still not solved; solved: #129.

@0pdd all 2 puzzles are solved here: #128, #129.


Add options to avoid prompts

Source: https://github.com/collective/cookiecutter-plone-starter/?tab=readme-ov-file#use-options-to-avoid-prompts

Trivial update to readme, can I skip the changelog? If not, I'll create one.

@davisagli should I port these changes to https://github.com/collective/cookiecutter-plone-starter/?tab=readme-ov-file#use-options-to-avoid-prompts?

@stevepiercy No, that already looks correct as written. With cookiecutter-plone-starter you ran cookiecutter directly instead of running Cookieplone as a wrapper of cookiecutter.


Add examples to Layout/IndentArray

Adds examples to layout/IndentArray
By the way, I'm kind of new to making pull requests on other people's repos, so I'm not 100% sure that I've rebased onto master properly, and I'm also under the impression that I can squash on merge, but please correct me if I'm wrong about either of these things!

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Used the same coding conventions as the rest of the project.
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] All tests(rake spec) are passing.
[x] The new code doesn't generate RuboCop offenses that are checked by rake internal_investigation.
[x] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[x] Updated cop documentation with rake generate_cops_documentation (required only when you've added a new cop or changed the configuration/documentation of an existing cop).

Could you please restyle the example formatting to look like this https://github.com/bbatsov/rubocop/commit/a50f67d8cae615484b5033a2096b63d4d9002bd3 ?

Soooo.... I fixed the formatting and tried to rebase but I think I did something wrong. Will ask a friend for help tomorrow. The world may never know why rebasing still feels like brain surgery to me.

👍


Poll for task of a specific workflow instance

There is a scenario that we want to poll tasks only from a specific workflow instance.  For example we have a specific worker responsible for completing a given workflow.  Do you see an issue if "workflowInstanceId" is added as a param to the poll GET requests and after we read from the given "taskType" queue we compare the Task's "workflowInstanceId" with the passed in parameter before returning it as the polled task?

@cquon in such case, you can use the GET api on the workflow instance Id to receive the workflow execution details, which contains the list of tasks - completed, scheduled and in progress.  Take the task in progress update the status to desired result and do a task update.  That should work.

Thanks @v1r3n !


Corrupted model when saving checkpoints

System Info
Versions of relevant libraries:
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.25.0
[pip3] torch==2.0.1+cu118
[conda] cudatoolkit               11.8.0               h6a678d5_0
[conda] numpy                     1.25.0                   pypi_0    pypi
[conda] torch                     2.0.1+cu118              pypi_0    pypi
Information

[ ] The official example scripts
[ ] My own modified scripts

🐛 Describe the bug
I have finetuned Llama 2 with some datasets for several epochs using LoRA and I modified the script to save a checkpoint after each epoch with:
model.save_pretrained(checkpoint_dir)
To evaluate my model, I wanted to load each checkpoint and do some inference with it, I tried with the HugginFace Peft library to load the model and the adapter:
model = PeftModel.from_pretrained(model_dir, lora_apply_dir)
as well as with the torch.load(lora_apply_dir + "adapter_model.bin")
And for the majority of the checkpoints (not all, some are loading fine), I have this error:
RuntimeError: PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted
The bin files created for each checkpoints have exactly the same size and seem complete so I don't understand why it is working correctly for some checkpoints and not for others...
Error logs
File [~/miniconda3/envs/megatron/lib/python3.10/site-packages/peft/peft_model.py:203] in PeftModel.from_pretrained(cls, model, model_id, adapter_name, is_trainable, **kwargs)
    201 else:
    202     model = MODEL_TYPE_TO_PEFT_MODEL_MAPPING[config.task_type](model, config, adapter_name)
--> 203 model.load_adapter(model_id, adapter_name, is_trainable=is_trainable, **kwargs)
    204 return model
...
File [~/miniconda3/envs/megatron/lib/python3.10/site-packages/torch/serialization.py:283] in _open_zipfile_reader.__init__(self, name_or_buffer)
    282 def __init__(self, name_or_buffer) -> None:
--> 283     super().__init__(torch._C.PyTorchFileReader(name_or_buffer))

RuntimeError: PytorchStreamReader failed reading zip archive: invalid header or archive is corrupted

### Expected behavior

Load the adapter correctly

@clechristophe couple of notes, first make sure in your save_dir you see adapter_config.json  adapter_model.bin after fiene-tuning. Also, make sure you first load the base model separately then use model = PeftModel.from_pretrained(load_based_model, lora_apply_dir)

I've got the same issue. Has anyone been able to pin down the root cause of this? I had no issues with saving/reloading PEFT models for the 7b chat model but am unable to reload PEFT models that I saved for the 13b chat model.
I also noticed that HF must be internalizing the logic for which rank is responsible for saving PEFT checkpoints (we call save_pretrained on all workers, not just rank 0). Is there something in there that's causing issues?

I've got the same issue. Has anyone been able to pin down the root cause of this? I had no issues with saving/reloading PEFT models for the 7b chat model but am unable to reload PEFT models that I saved for the 13b chat model.
I also noticed that HF must be internalizing the logic for which rank is responsible for saving PEFT checkpoints (we call save_pretrained on all workers, not just rank 0). Is there something in there that's causing issues?
Quick update on this: I'm seeing no issues when I train on up to and including 10 GPUs. As soon as I bump up to 11 GPUs or higher, I see the issue reported above. This appears to be a consistent threshold across a few different configurations that I tried varying the model (e.g. 7b vs. 13b and even GPT2 as a sanity check). It makes me wonder if the workers are stepping on each other's toes when saving or if there is some issue with divisibility of the parameter count by the number of workers.
Please let me know if you have any thoughts on this. I've got a 16 GPU machine on Google Cloud and am in the middle of a rather large experiment and it's unfortunate to be idling 6 of these GPUs for my PEFT runs.
Edit 2: this may have to do with the number attention heads in these models. For example, I get the following error when I try to load the 13b model into text-generation-inference using 16 GPUs.
ValueError: `num_heads` must be divisible by `num_shards` (got `num_heads`: 40 and `num_shards`: 16

from peft import get_peft_model_state_dict
fullstate_save_policy = FullStateDictConfig(offload_to_cpu=True, rank0_only=True)

with FSDP.state_dict_type(
    model, StateDictType.FULL_STATE_DICT, fullstate_save_policy
):
    cpu_state = get_peft_model_state_dict(model, model.state_dict())
if rank == 0:
    print("Save peft model in checkpoint!")
    save_directory = os.path.join(ckpt_dir, "peft")
    os.makedirs(save_directory, exist_ok=True)
    torch.save(cpu_state, os.path.join(save_directory, "adapter_model.bin"))
    model.peft_config["default"].save_pretrained(save_directory)

Hi, I encountered a similar issue when trying to save the PEFT checkpoint. I have found that the above code can successfully save the PEFT checkpoint on my end, although it will consume more RAM. This is because it will dump the all weights onto the CPU and then select the trainable parameters to save.

Thanks so much @newsbreakDuadua9, this was a huge help, and clearly a nice solution that makes use of the FSDP saving facilities. I don't mind the CPU usage for now (I just want correctness!) though I see your point and it might be nice to be able to select which parameters you want to stream back to rank0, as opposed to recalling all parameters.

Thanks, this solved my issue. I had to add the following to my script:
from torch.distributed.fsdp import FullyShardedDataParallel as FSDP

@pcardill0 Thank you for reminding me of this missing import; I have updated my comment.

I was having similar problem but using the above code was causing timeout, I changed it to
if train_config.use_peft:
    if not train_config.enable_fsdp or rank == 0:
        print(f"we are about to save the PEFT modules")

    save_dir = f'{train_config.output_dir}/epoch_{epoch+1}'
    if train_config.enable_fsdp and train_config.fsdp_peft_cpu_offload_for_save:
        print(f"we are about to save using state_dict_type")
        full_state_dict_config = FullStateDictConfig(offload_to_cpu=False, rank0_only=True)
        with FSDP.state_dict_type(model, StateDictType.FULL_STATE_DICT, full_state_dict_config):
            model.save_pretrained(save_dir)

    else:
        model.save_pretrained(save_dir)

    if not train_config.enable_fsdp or rank == 0:
        print(f"PEFT modules are saved in {save_dir} directory")

This might not work for the 70B models

I was having similar problem but using the above code was causing timeout, I changed it to
if train_config.use_peft:
    if not train_config.enable_fsdp or rank == 0:
        print(f"we are about to save the PEFT modules")

    save_dir = f'{train_config.output_dir}/epoch_{epoch+1}'
    if train_config.enable_fsdp and train_config.fsdp_peft_cpu_offload_for_save:
        print(f"we are about to save using state_dict_type")
        full_state_dict_config = FullStateDictConfig(offload_to_cpu=False, rank0_only=True)
        with FSDP.state_dict_type(model, StateDictType.FULL_STATE_DICT, full_state_dict_config):
            model.save_pretrained(save_dir)

    else:
        model.save_pretrained(save_dir)

    if not train_config.enable_fsdp or rank == 0:
        print(f"PEFT modules are saved in {save_dir} directory")

Could you specify the module generating the timeout error and provide the exact error message?

Hi! It seems that a solution has been provided to the issue and there has not been a follow up conversation for a long time. I will close this issue for now and feel free to reopen it if you have any questions!


[e2e]: nodejs release main default slsa3

Repo: https://github.com/slsa-framework/example-package/tree/main
Run: https://github.com/slsa-framework/example-package/actions/runs/5677147395
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.nodejs.release.main.default.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.nodejs.release.main.default.slsa3.yml
Trigger: schedule
Branch: main
Date: Thu Jul 27 06:10:48 UTC 2023

@ianlewis is this due to a problem with an earlier force push?

Repo: https://github.com/slsa-framework/example-package/tree/v40.0.49
Run: https://github.com/slsa-framework/example-package/actions/runs/5688811600
Workflow file: https://github.com/slsa-framework/example-package/tree/main/.github/workflows/e2e.nodejs.release.main.default.slsa3.yml
Workflow runs: https://github.com/slsa-framework/example-package/actions/workflows/e2e.nodejs.release.main.default.slsa3.yml
Trigger: release
Branch: v40.0.49
Date: Fri Jul 28 06:16:48 UTC 2023
Tests are passing now. Closing this issue.


Set, edit, and display timeout

Fixes #202 .
Changes proposed in this PR:

added timeout to publish asset form
added timeout to edit metadata form
output timeout under buy button

Publishing works fine, when i try to edit i get

There is also an issue with sorting the options, should be week, month, year, forever. I'm not sure how to fix this though. The input component has a property sortOptions, but don't know how to pass it in the form.

Publishing works fine, when i try to edit i get

There is also an issue with sorting the options, should be week, month, year, forever. I'm not sure how to fix this though. The input component has a property sortOptions, but don't know how to pass it in the form.

Fixed the autosorting issue, order is as intended now

Fixed the autosorting issue, order is as intended now

Fixed the autosorting issue, order is as intended now

Publishing works fine, when i try to edit i get

There is also an issue with sorting the options, should be week, month, year, forever. I'm not sure how to fix this though. The input component has a property sortOptions, but don't know how to pass it in the form.

I think that is because the changes in the ocean.js are not up yet. I tested it by adding the dependencies locally. I just reinstalled the dependencies getting them from oceanprotocol and I get an error too.

Fixed the autosorting issue, order is as intended now

Publishing works fine, when i try to edit i get

There is also an issue with sorting the options, should be week, month, year, forever. I'm not sure how to fix this though. The input component has a property sortOptions, but don't know how to pass it in the form.

I think that is because the changes in the ocean.js are not up yet. I tested it by adding the dependencies locally. I just reinstalled the dependencies getting them from oceanprotocol and I get an error too.

Publish seems to be sorted correctly, but Edit does not.
Publish:

Edit:

Thanks for the great work on this feature, can't await it.

Publish seems to be sorted correctly, but Edit does not.
Publish:

Edit:

Thanks for the great work on this feature, can't await it.

Just one questions. Would you include "1 day" as an option? This is missing and would be a valuable option for daily subscriptions.

Just one questions. Would you include "1 day" as an option? This is missing and would be a valuable option for daily subscriptions.

Fixed autosorting issue in edit metadata form

Fixed autosorting issue in edit metadata form

Yes, we can add 1 day too.

Yes, we can add 1 day too.

Thank you very much, the daily subscription model is relevant for Evotegra and might be for other publishers that provide daily updates on their data. Thank you @mihaisc

Thank you very much, the daily subscription model is relevant for Evotegra and might be for other publishers that provide daily updates on their data. Thank you @mihaisc

Added "1 day" option to timeout options

Added "1 day" option to timeout options

This is coming along great, nice work!
Form label naming: now seeing that in context, think Access Allowance makes sense? Has the advantage of covering download now, and also compute later.
@claudiaHash if your changes in https://github.com/oceanprotocol/market/pull/317 are not that big yet, it might make sense opening that PR against this feature/add-timeout-to-publish-form branch PR here instead, and we merge it into here. Then we would have all timeout-related changes together for testing and we make sure not to double efforts regarding display mapping. As far as I see both branches don't have overlapping changes yet so should just work opening your existing branch against this one without any merge/rebase.
Travis checks should go green once a new ocean.js with https://github.com/oceanprotocol/ocean.js/pull/544 is released and updated in here. CodeClimate's Cognitive Complexity complain can be fine, our stuff is complex :-) Worth trying if switch/case statements instead of ternary operator chains makes it more happy, at least with many conditions switch/case is easier to read.

This is coming along great, nice work!
Form label naming: now seeing that in context, think Access Allowance makes sense? Has the advantage of covering download now, and also compute later.
@claudiaHash if your changes in https://github.com/oceanprotocol/market/pull/317 are not that big yet, it might make sense opening that PR against this feature/add-timeout-to-publish-form branch PR here instead, and we merge it into here. Then we would have all timeout-related changes together for testing and we make sure not to double efforts regarding display mapping. As far as I see both branches don't have overlapping changes yet so should just work opening your existing branch against this one without any merge/rebase.
Travis checks should go green once a new ocean.js with https://github.com/oceanprotocol/ocean.js/pull/544 is released and updated in here. CodeClimate's Cognitive Complexity complain can be fine, our stuff is complex :-) Worth trying if switch/case statements instead of ternary operator chains makes it more happy, at least with many conditions switch/case is easier to read.

Switch is also faster than ternary operator chains  ( at least chains this big )

Switch is also faster than ternary operator chains  ( at least chains this big )

Sure, 'Access Allowance' sounds good to me.
Before making the PR as suggested, I have a question: for converting the
timeout number to a readable string I use (the already installed library)
'moment' which gives us an output like: 'an hour', 'a day', '7 days' and so
one, which is different from what the user selects in the create/edit form.
Should we install vercel/ms which gives us the output like '1 hour', '1
day', '1 week' to make sure everything is consistent?
În lun., 18 ian. 2021 la 15:27, Matthias Kretschmann <
<EMAIL_ADDRESS>a scris:

This is coming along great, nice work!
Form label naming: now seeing that in context, think Access Allowance
makes sense? Has the advantage of covering download now, and also compute
later.
@claudiaHash https://github.com/claudiaHash if your changes in #317
https://github.com/oceanprotocol/market/pull/317 are not that big yet,
it might make sense opening that PR against this
feature/add-timeout-to-publish-form branch PR here instead, and we merge
it into here. Then we would have all timeout-related changes together for
testing and we make sure not to double efforts regarding display mapping.
As far as I see both branches don't have overlapping changes yet so should
just work opening your existing branch against this one without any
merge/rebase.
Travis checks should go green once a new ocean.js with
oceanprotocol/ocean.js#544
https://github.com/oceanprotocol/ocean.js/pull/544 is released and
updated in here. CodeClimate's Cognitive Complexity complain can be fine,
our stuff is complex :-) Worth trying if switch/case statements instead of
ternary operator chains makes it more happy, at least with many conditions
switch/case is easier to read.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/oceanprotocol/market/pull/324#issuecomment-762250062,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALV7GAM3EA75HBDYRHJPWD3S2QZK3ANCNFSM4WEELYBQ
.

Sure, 'Access Allowance' sounds good to me.
Before making the PR as suggested, I have a question: for converting the
timeout number to a readable string I use (the already installed library)
'moment' which gives us an output like: 'an hour', 'a day', '7 days' and so
one, which is different from what the user selects in the create/edit form.
Should we install vercel/ms which gives us the output like '1 hour', '1
day', '1 week' to make sure everything is consistent?
În lun., 18 ian. 2021 la 15:27, Matthias Kretschmann <
<EMAIL_ADDRESS>a scris:

This is coming along great, nice work!
Form label naming: now seeing that in context, think Access Allowance
makes sense? Has the advantage of covering download now, and also compute
later.
@claudiaHash https://github.com/claudiaHash if your changes in #317
https://github.com/oceanprotocol/market/pull/317 are not that big yet,
it might make sense opening that PR against this
feature/add-timeout-to-publish-form branch PR here instead, and we merge
it into here. Then we would have all timeout-related changes together for
testing and we make sure not to double efforts regarding display mapping.
As far as I see both branches don't have overlapping changes yet so should
just work opening your existing branch against this one without any
merge/rebase.
Travis checks should go green once a new ocean.js with
oceanprotocol/ocean.js#544
https://github.com/oceanprotocol/ocean.js/pull/544 is released and
updated in here. CodeClimate's Cognitive Complexity complain can be fine,
our stuff is complex :-) Worth trying if switch/case statements instead of
ternary operator chains makes it more happy, at least with many conditions
switch/case is easier to read.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/oceanprotocol/market/pull/324#issuecomment-762250062,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALV7GAM3EA75HBDYRHJPWD3S2QZK3ANCNFSM4WEELYBQ
.

we were discussing that timeout display stuff a bit above: https://github.com/oceanprotocol/market/pull/324#discussion_r559569392
So we try to prevent adding any new library, and only have a fallback display for non-preset case. Interesting find with moment.js, always tried to stay away from introducing that particular library since it is know to be rather huge in file size. Guess some dependency of ours installs this

we were discussing that timeout display stuff a bit above: https://github.com/oceanprotocol/market/pull/324#discussion_r559569392
So we try to prevent adding any new library, and only have a fallback display for non-preset case. Interesting find with moment.js, always tried to stay away from introducing that particular library since it is know to be rather huge in file size. Guess some dependency of ours installs this

so i'm changing now the ternary operator to switch, what should be the returned value when displaying the timeout inside the edit form if none of the cases are matched?

so i'm changing now the ternary operator to switch, what should be the returned value when displaying the timeout inside the edit form if none of the cases are matched?

Changed ternary operators to switch

Changed ternary operators to switch

the fallback should be a value pass-through then so we then output whatever is the DDO. Only suggested to at least convert that fallback to hours, cause it might be easy to do without any new library

the fallback should be a value pass-through then so we then output whatever is the DDO. Only suggested to at least convert that fallback to hours, cause it might be easy to do without any new library

so if there is no match I should add a new option to select containing the timeout value converted to hours, right?

so if there is no match I should add a new option to select containing the timeout value converted to hours, right?

quick summary:

any timeout display runs through one method converting seconds to human readable, with 0 being mapped to forever. Probably this method with a modified default to that code snippet discussed in Slack, or we use this snippet for everything instead of hardcoding our options
edit select: populated with our default options, but if existing timeout does not match any of them, the custom timeout needs to be shown, again ran through above method

quick summary:

any timeout display runs through one method converting seconds to human readable, with 0 being mapped to forever. Probably this method with a modified default to that code snippet discussed in Slack, or we use this snippet for everything instead of hardcoding our options
edit select: populated with our default options, but if existing timeout does not match any of them, the custom timeout needs to be shown, again ran through above method

added method to map seconds to string
show timeout option inside the edit metadata form for value that doesn't match the default values

added method to map seconds to string
show timeout option inside the edit metadata form for value that doesn't match the default values

Display and edit seem to be working ok

Display and edit seem to be working ok

going through all the places we display timeout, had this idea on consume/compute action which might be better cause it makes the timeout way more clear. Otherwise it feels like we need a tooltip to explain Access Allowance in that place:
Forever timeout, keep as is:

But when a specific timeout is set:

Does this make it more clear?

going through all the places we display timeout, had this idea on consume/compute action which might be better cause it makes the timeout way more clear. Otherwise it feels like we need a tooltip to explain Access Allowance in that place:
Forever timeout, keep as is:

But when a specific timeout is set:

Does this make it more clear?

Seems like a good idea to me, is more explicit. I'll change it right now.
În mie., 20 ian. 2021 la 16:45, Matthias Kretschmann <
<EMAIL_ADDRESS>a scris:

going through all the places we display timeout, had this idea on
consume/compute action which might be better cause it makes the timeout way
more clear. Otherwise it feels like we need a tooltip to explain Access
Allowance in that place:
Forever timeout, keep as is:
[image: Screen Shot 2021-01-20 at 15 42 52]
https://user-images.githubusercontent.com/90316/105190312-2a3e0000-5b36-11eb-90d1-588ded559386.png
But when a specific timeout is set:
[image: Screen Shot 2021-01-20 at 15 43 27]
https://user-images.githubusercontent.com/90316/105190397-3f1a9380-5b36-11eb-9821-f663acd043f3.png
Does this make it more clear?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/oceanprotocol/market/pull/324#issuecomment-763653896,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALV7GAKRX5U4CDOCQ7ML2BLS23T63ANCNFSM4WEELYBQ
.

Seems like a good idea to me, is more explicit. I'll change it right now.
În mie., 20 ian. 2021 la 16:45, Matthias Kretschmann <
<EMAIL_ADDRESS>a scris:

going through all the places we display timeout, had this idea on
consume/compute action which might be better cause it makes the timeout way
more clear. Otherwise it feels like we need a tooltip to explain Access
Allowance in that place:
Forever timeout, keep as is:
[image: Screen Shot 2021-01-20 at 15 42 52]
https://user-images.githubusercontent.com/90316/105190312-2a3e0000-5b36-11eb-90d1-588ded559386.png
But when a specific timeout is set:
[image: Screen Shot 2021-01-20 at 15 43 27]
https://user-images.githubusercontent.com/90316/105190397-3f1a9380-5b36-11eb-9821-f663acd043f3.png
Does this make it more clear?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/oceanprotocol/market/pull/324#issuecomment-763653896,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ALV7GAKRX5U4CDOCQ7ML2BLS23T63ANCNFSM4WEELYBQ
.

We kind of derailed a bit but if we are polishing the consume button

If the user already owns dt shouldn't we hide the second text? the first one is very clear

We kind of derailed a bit but if we are polishing the consume button

If the user already owns dt shouldn't we hide the second text? the first one is very clear

Seemed like a good time to clear up all the confusions around the downlod/buy button since we're introducing another factor now. Sorry @KatunaNorbert & @claudiaHash for the side-tracking, will push some changes for this in here because of that.
I think hiding the 2nd text in that case was always the intention but the !hasDatatoken logic seems buggy. Cause in my case 2nd text is properly hidden:

Seemed like a good time to clear up all the confusions around the downlod/buy button since we're introducing another factor now. Sorry @KatunaNorbert & @claudiaHash for the side-tracking, will push some changes for this in here because of that.
I think hiding the 2nd text in that case was always the intention but the !hasDatatoken logic seems buggy. Cause in my case 2nd text is properly hidden:

In your case did you already buy

Seemed like a good time to clear up all the confusions around the downlod/buy button since we're introducing another factor now. Sorry @KatunaNorbert & @claudiaHash for the side-tracking, will push some changes for this in here because of that.
I think hiding the 2nd text in that case was always the intention but the !hasDatatoken logic seems buggy. Cause in my case 2nd text is properly hidden:

Weird things happen, some because of the bug in aquarius.

Plus in the second image, it says there is no liquidity in the pool but it's a fixed price asset

In your case did you already buy

Seemed like a good time to clear up all the confusions around the downlod/buy button since we're introducing another factor now. Sorry @KatunaNorbert & @claudiaHash for the side-tracking, will push some changes for this in here because of that.
I think hiding the 2nd text in that case was always the intention but the !hasDatatoken logic seems buggy. Cause in my case 2nd text is properly hidden:

Weird things happen, some because of the bug in aquarius.

Plus in the second image, it says there is no liquidity in the pool but it's a fixed price asset

for the second help text, the condition should be (!hasDatatoken &&  !hasPreviousOrder) instead of  ||

for the second help text, the condition should be (!hasDatatoken &&  !hasPreviousOrder) instead of  ||

Agree, all functionality is in place now and couldn't find any bugs with it when testing it through, and the remaining CodeClimate issues are fine to introduce. Left those 2 bonus points which is only about reducing possibilities of future dev errors so no need to stress about it if not done.
Remaining display thing is just copy, we need to unify a bit between form & preview:

Still not fully sure if Allowance is more clear than Timeout. The help text makes it more clear now I think, so tending towards calling the label in the form Download Timeout again, which has advantage that we can just keep as it is in preview. Any other ideas?

Agree, all functionality is in place now and couldn't find any bugs with it when testing it through, and the remaining CodeClimate issues are fine to introduce. Left those 2 bonus points which is only about reducing possibilities of future dev errors so no need to stress about it if not done.
Remaining display thing is just copy, we need to unify a bit between form & preview:

Still not fully sure if Allowance is more clear than Timeout. The help text makes it more clear now I think, so tending towards calling the label in the form Download Timeout again, which has advantage that we can just keep as it is in preview. Any other ideas?

I'm ok with timeout. Honestly with either of them you still need to read the helper text to properly understand the meaning.
And we should remove Download , keep it just Timeout , this way it includes compute as well. When we actually implement compute we just modify the helper text, this way it's less of a visual impact on the structure of the form

I'm ok with timeout. Honestly with either of them you still need to read the helper text to properly understand the meaning.
And we should remove Download , keep it just Timeout , this way it includes compute as well. When we actually implement compute we just modify the helper text, this way it's less of a visual impact on the structure of the form


Crash when attempting to display message with gif image part

Device:
Nexus 6P, Android 8.0.0
SDK Version:
0.4.13, 0.4.14
Issue:
It looks like a gif was uploaded as the image attachment for a message on the iOS app. When attempting to render this message via the AtlasMessagesAdapter in Android, the app crashes (stack trace at bottom).
I have supplied the following Cell Factories to the AtlasMessagesRecyclerView:
messagesRecyclerView
    ...
    .addCellFactories(
           TextCellFactory(),
           ThreePartImageCellFactory(ChatManager.client, picasso),
           LocationCellFactory(picasso),
           SinglePartImageCellFactory(ChatManager.client, picasso))

AtlasMessagesAdapter attempts to return a type based on whichever CellFactory isBindable() for the current message. In this particular case, I would expect ThreePartImageCellFactory to be the correct candidate. The problem lies in the ThreePartImageCellFactory.isType() call.
The message's PREVIEW Part mimetype is image/gif+preview.
ThreePartImageCellFactory.isType() looks like this:
public boolean isType(Message message) {
    List<MessagePart> parts = message.getMessageParts();
    return parts.size() == 3 &&
            parts.get(ThreePartImageUtils.PART_INDEX_FULL).getMimeType().startsWith("image/") &&
            parts.get(ThreePartImageUtils.PART_INDEX_PREVIEW).getMimeType().equals(ThreePartImageUtils.MIME_TYPE_PREVIEW) &&
            parts.get(ThreePartImageUtils.PART_INDEX_INFO).getMimeType().equals(ThreePartImageUtils.MIME_TYPE_INFO);
}

isType() will only return true if the PREVIEW Part mimetype equals MIME_TYPE_PREVIEW, which resolves to image/jpeg+preview. So the preview image must be a jpeg, gif is not supported.
Since no CellFactories return true for isBindable() in the AtlasMessagesAdapter, the adapter's getItemViewType() returns a value of -1. When onCreateViewHolder() is called, no CellType can be found for a viewType of -1. cellType is thus null, and cellType.mMe fails with an NPE.
It looks like the root of this problem is the preview part of an image probably should always be a jpeg, the gif mimetype should not have been included in the first place (so possibly a bug in the iOS SDK?).
Recommendation

I would recommend getItemViewType() throw an Exception rather than return an invalid ViewType of -1 (crash early).

It would be good to see ThreePartImageCellFactory support all possible preview mimetypes that can be thrown at it. If a mime type (such as gif) is not supported, perhaps the ThreePartImageCellFactory can render a placeholder instead?

Steps to reproduce:
Just guessing here:

Using layer sdk on an iOS device, submit a message with a gif image
Open message in AtlasMessagesRecyclerView on Android device
Observe crash

Stacktrace:
java.lang.NullPointerException: Attempt to read from field 'boolean com.layer.atlas.adapters.AtlasMessagesAdapter$CellType.mMe' on a null object reference
  at com.layer.atlas.adapters.AtlasMessagesAdapter.onCreateViewHolder(AtlasMessagesAdapter.java:298)
  at com.layer.atlas.adapters.AtlasMessagesAdapter.onCreateViewHolder(AtlasMessagesAdapter.java:63)
  at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6367)
  at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5555)
  at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5440)
  at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:5436)
  at android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2224)
  at android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1551)
  at android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1511)
  at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:570)
  at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3583)
  at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3312)
  at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844)

Temporary Workaround:
As a temporary workaround, to prevent crashing, just check whether the preview mimetype starts with image/ and contains +preview, in ThreePartImageCellFactory:
    public boolean isType(Message message) {
        List<MessagePart> parts = message.getMessageParts();
        return parts.size() == 3 &&
                parts.get(ThreePartImageUtils.PART_INDEX_FULL).getMimeType().startsWith("image/") &&
                parts.get(ThreePartImageUtils.PART_INDEX_PREVIEW).getMimeType().startsWith("image/") &&
                parts.get(ThreePartImageUtils.PART_INDEX_PREVIEW).getMimeType().contains("+preview") &&
                parts.get(ThreePartImageUtils.PART_INDEX_INFO).getMimeType().equals(ThreePartImageUtils.MIME_TYPE_INFO);
    }

@timusus Thanks for the detailed ticket!
I'm going to file a work item for us to address this issue. I don't yet have a timeline for when we'll have a fix out.
In the meanwhile, a fix you could easily implement is to subclass ThreePartImageCellFactory and override the isType with the contents of above workaround.

No worries.
I've since realised that adding the GenericCellFactory is probably another simple workaround for this issue.

@thecombatwombat is this resolved due to some internal change, or because of the workaround above?

@timusus a bit of both. I've marked it for fixing in the future, since we have a workaround for you now.
Won't be a super quick fix since I'd like to make sure the types are coordinated across platforms, so that something like this does not happen again.

OK, would you consider reopening this ticket until the issue is resolved? It's a bit unconventional to me to have 'closed' issues which are in-progress or pending a fix. It leads to the expectation that the a fix is about to become available in the next release, which is not the case here.


Scoped Slots doesn't work when count slots

Vue version
3.2.37
Link to minimal reproduction
https://codepen.io/sarkiroka/pen/mybyVNG?editors=1010
Steps to reproduce
When I call useSlots().default function (to get how many slot used), the scoped slots stops work.
working example: https://codepen.io/sarkiroka/pen/ZYzYOBR?editors=1010
don't working example: https://codepen.io/sarkiroka/pen/mybyVNG?editors=1010
My goal is get the count of the default slots.
const slots=useSlots();
const countOfSlots = slots.default().length;

What is expected?
Work properly
What is actually happening?
Don't work
System Info
No response
Any additional comments?
No response

It should be
console.log(slots.default({aFunction:()=>{}}));

Thanks, I think I understand now.
Are you planning to be able to request the number of slots without a complete parameterized render process? Because if I understand correctly, two renders happen now in my example:

one when I request the colunt of slots,
and another when it appears on the website

@edison1105

{aFunction:()=>{}}

It doesn't work for me: https://codepen.io/sarkiroka/pen/PwYwRbN?editors=1010
Please helt with this


500 "'NoneType' object is not subscriptable" error on every table page

Seeing this on Datasette Cloud right now. Sentry says:

That's this code here: https://github.com/datasette/datasette-secrets/blob/e81e9a45c006f2817dc5ceae3e1555c6dff28132/datasette_secrets/init.py#L24-L39


SQL Import: Fix help prompts for imports and S-R

Description

Add examples for the SQL import command
Add examples for standalone Search and Replace command
Expose the output flag for S-R when it's run during an import (we're currently only exposing it for standalone S-R commands)
Fix wording of descriptions to be more user-friendly + add warning about no space for S-R params

Steps to Test

Check out PR.

Run npm run build

Run VIP_PROXY="<proxy>" node ./dist/bin/vip-import-sql -h

Verify help output looks good:

Run VIP_PROXY="<proxy>" node ./dist/bin/vip-search-replace -h and verify help output looks good

+1 we should not commit the search and replace binary -- mostly since it's OS-specific

+1 we should not commit the search and replace binary -- mostly since it's OS-specific

Argh, that pesky file! I excluded it from the commit, but it somehow made its way!
Removed! Merging :shipit:

Argh, that pesky file! I excluded it from the commit, but it somehow made its way!
Removed! Merging :shipit:


Test translation creation with missing parameters

Also:

Respond with Bad Request instead of Internal Server Error;
Use a generic NewTranslation struct for tests;
Factorize bad request error creation;
Remove wrongly committed database.

Thanks for the review! I’m glad you’re back ;)


Use Directive when creating bundle

When creating a bundle, a Directive should be generated using the metadata from each Runnable's DotHive, and the Directive file should be included in the bundle

If a version is not provided, one should be sussed out using git tags?

Basic version of this is done, will open new issue for generating a version number


fixed Syndicate smokes pack being half-filled

About the PR

changed a value from 5 to 10
Why / Balance

#28336
Technical details

N/A, literally just changed a number
Media

[ X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

N/A
Changelog

:cl:

fix: Syndicate smokes pack now has 10 cigarettes as intended.

i always thought this was for balance and not an oversight
2tc for like 50u omnizine nobody tell maintainers

I don't think they're supposed to be able to be ground up someone should pr blacklisting them from the material reclaimers and stuff

who gives a shit about the grinding part you still have the ability to heal virtually any injuries for 2tc and some downtime

i always thought this was for balance and not an oversight
2tc for like 50u omnizine nobody tell maintainers

as the person who made the mistake (the pr changing them), it is not

as the person who made the mistake (the pr changing them), it is not

issue was only opened yesterday and i never saw any discussion about it before then :shrug:

I don't think they're supposed to be able to be ground up someone should pr blacklisting them from the material reclaimers and stuff

who gives a shit about the grinding part you still have the ability to heal virtually any injuries for 2tc and some downtime even without grinding syndie smokes are really good

0.05u of healing per second is not that crazy at all, especially if its dilluted with nicotine even more. Simply going to medbay and siphoning meds with syringe or stealing whole jugs will offer you way more and better healing than smoking omni cigarette for almost 7 minutes.

I mean, no one buys the smokes since its not worth it for the amount of omni you get, getting the amount higher could actually make it so people buy it sometimes

no balance fuckery during the holy freeze. this doesn't seem like a bug fix on the nose.

that’s surprising because it actually is a bug

Can we reopen this PR?

Fill makes sense and if chems are the problem nerf the chems.


Fix for https://github.com/near/near-shell/issues/385

Should be passing a string here...
/**
 * Convert account balance value from internal indivisible units to NEAR. 1 NEAR is defined by {@link NEAR_NOMINATION}.
 * Effectively this divides given amount by {@link NEAR_NOMINATION}.
 *
 * @param balance decimal string representing balance in smallest non-divisible NEAR units (as specified by {@link NEAR_NOMINATION})
 * @param fracDigits number of fractional digits to preserve in formatted string. Balance is rounded to match given number of digits.
 * @returns Value in Ⓝ
 */
function formatNearAmount(balance, fracDigits = exports.NEAR_NOMINATION_EXP) {

Do you mind providing some details on how you tested this?
(e.g. test cases tried, which environment, etc)
Thank you!

For easy navigation: This is a fix for https://github.com/near/near-shell/issues/385

Sure, I changed the numSeats filtered the current_validators to match the conditions as given by @mfornet in https://github.com/near/near-shell/issues/385.  Some examples of output:
Using options: {
networkId: 'betanet',
nodeUrl: 'https://rpc.betanet.near.org',
contractName: undefined,
walletUrl: 'https://wallet.betanet.near.org',
helperUrl: 'https://helper.betanet.near.org',
useLedgerKey: "44'/397'/0'/0'/1'",
epoch: 'current',
initialBalance: null
}
Validators (total: 3, seat price: 50,000,259):

Validator Id
Stake
# Seats
% Online
Blocks produced
Blocks expected

node0
50,000,259
1
0%
0
2

node2
50,000,259
1
0%
0
1

node3
50,000,259
1
0%
0
3

And currently comparing a run on betanet (note the seat column):
Without fix:

Validator Id
Stake
# Seats
% Online
Blocks produced
Blocks expected

yyyyyyyyyyyyy1
84,522
0
NaN%
0
0

With fix:

Validator Id
Stake
# Seats
% Online
Blocks produced
Blocks expected

yyyyyyyyyyyyy1
84,522
1
NaN%
0
0

Further looking at the comments of the function that is being called, it seems clear that it is not being called correctly.  Someone with more familiarity with the code base (than myself) should be able to better confirm the validity of the fix.  Otherwise, don't see that any testing framework is in use...


Custom popup colors

Hi all,
I have introduced the option of setting the following attributes for the tooltip:

textColor
backgroundColor
borderColor - only active if the border attribute is specified
arrowColor

New additions do not change the existing workflows and do not break the existing functionality (the testing project code can be provided, if necessary).
The README.MD file has been updated accordingly.
The GitHub page with the examples has been updated accordingly and tested in comparison with the current master branch examples page.
Usage example:
V(^-^)V
<ReactTooltip id='custom-color' className='custom-color' place='right' border textColor='#5F4B8BFF' backgroundColor='#E69A8DFF' borderColor='darkgreen' arrowColor='red'/>

Additionally:

The build process now incorporates a unit testing phase
Refactoring
CSS is now dynamically generated via the aphrodite-jss package
eslint refactoring - converting prettier rules into eslint rules to allow better flexibility

Awesome, thanks for your work!
Looks like you aren't based on the latest master?  Can you rebase?
Also, you will need to make at least one commit message with the formatting:
"fix(colors): allow customizable border color"
to trigger a semantic release when this is merged.
@Rogger794 can you take a look?

No problem, I'll fix the merge conflicts and push as soon as I can.

Awesome, thanks for your work!
Looks like you aren't based on the latest master? Can you rebase?
Also, you will need to make at least one commit message with the formatting:
"fix(colors): allow customizable border color"
to trigger a semantic release when this is merged.
@Rogger794 can you take a look?

Si, no hay problema

@aronhelser , @Rogger794 ,
Hi, resolved the merge conflicts and put the commit message in a required format.
Thanks.


futures_close_all() fails often, a bug?

We call futures_close_all() sometimes in our program but it fails many times with no error code returned. Wonder if there's anything wrong at the backend endpoint.
https://github.com/ln-markets/api-python/blob/4c4bed1ce04ced749cebebf2bc1bdc9c58d363ae/lnmarkets/rest.py#L133

Hey,
Have you tried updating to the latest version of the connector?
It should fix the issue.
Thanks,
Romain

thanks for pointing that, I will try and update.


Read presets from setting file

Read status text and emoji combination from config file (such as .json, .toml ...)
TODO: How to specify and make subcommands from config file?

Read config file before defining App ... ?

Define and switch by using 'argument' not sub command.


New version: SomePythonThings.WingetUIStore version 3.0.1

Pull request has been created with WinGet Releaser v2 :rocket:
Microsoft Reviewers: Open in CodeFlow

This is the same issue as always

Automatic Validation ended with:

Installation failed with exit code 1

(Automated response - build 870.)

it always fails

@wingetbot waivers Add Validation-Installation-Error


Umer Completed Changes RB

Hi @globalworming ,
Thanks for feedback. Made changes as requested and commit the code but seems not showing in here ? thanks

still showing last week commits


Why do I get "xml" properties in the generated output?

Code:
'use strict';
module.exports = function(app) {
    app.get('/health', (req, res, next) => {
        // #swagger.summary = "Health check"
        // #swagger.description = "Health information check endpoint to show if the service is responding"
        // #swagger.operationId = "get-health"
        // #swagger.tags = ["health"]
        // #swagger.produces = ["application/json"]

        /* #swagger.responses[200] = {
            description: "Health check OK response",
            schema: {
                response: "I am alive and kicking"
            }
        } */
        res.send({ response: 'I am alive and kicking' })
    });
};

Output:
"paths": {
    "/health": {
      "get": {
        "tags": [
          "health"
        ],
        "summary": "Health check",
        "description": "Health information check endpoint to show if the service is responding",
        "operationId": "get-health",
        "produces": [
          "application/json"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Health check OK response",
            "schema": {
              "type": "object",
              "properties": {
                "response": {
                  "type": "string",
                  "example": "I am alive and kicking"
                }
              },
              "xml": {
                "name": "main"
              }
            }
          }
        }
      }
    }

Hi @daniel-walz
The code
"xml": {
   "name": "main"
}

prepare the input/output of documentation for XML too, that is, when you want to do something like:
"produces": [
   "application/json",
   "application/xml"
]

You will be able to see in both formats without problems.
It was good that you brought up this question, because I will see the possibility of optimizing this in a future version so that this "xml" in the .JSON appears only when the "application/xml" is present in the consumes/produces.
But did the "xml" cause a problem with your documentation?

Hi @daniel-walz
The code
"xml": {
   "name": "main"
}

prepare the input/output of documentation for XML too, that is, when you want to do something like:
"produces": [
   "application/json",
   "application/xml"
]

You will be able to see in both formats without problems.
It was good that you brought up this question, because I will see the possibility of optimizing this in a future version so that this "xml" in the .JSON appears only when the "application/xml" is present in the consumes/produces.
But did the "xml" cause a problem with your documentation?

It didn't cause any problems with the documentation when looking at it in the Swagger UI, but was confusing to see in the json since I have set
consumes: ["application/json"],
produces: ["application/json"],

in my main object. So I thought it would only be json on all my API endpoints in the generated doc.

It didn't cause any problems with the documentation when looking at it in the Swagger UI, but was confusing to see in the json since I have set
consumes: ["application/json"],
produces: ["application/json"],

in my main object. So I thought it would only be json on all my API endpoints in the generated doc.

Ok. In a future version, I will try to resolve this. As it is not visually impacting, for now I will close the issue. If this is seen in the future, I will open it again.

Ok. In a future version, I will try to resolve this. As it is not visually impacting, for now I will close the issue. If this is seen in the future, I will open it again.


Fix deprecation warning with Django 1.7+

I was just about to make this fix myself. This should work.
@jezdez — Any chance you can restart the build on this? (There was an error but the fix itself looks good.)
It would be great if this could be merged and put on PyPI... :-)
I'm happy to contribute if that would help.

Are you kidding me?

@davidfischer-ch No, I merged #15.

I know, why did you never replied to my pull request? That's the same fix
11 months earlier.
On Feb 15, 2015 2:27 PM, "Jannis Leidel"<EMAIL_ADDRESS>wrote:

@davidfischer-ch https://github.com/davidfischer-ch No, I merged #15
https://github.com/jezdez/django-appconf/pull/15.
—
Reply to this email directly or view it on GitHub
https://github.com/jezdez/django-appconf/pull/11#issuecomment-74417370.

@davidfischer-ch Honestly, because I have a huge amount of GitHub notifications that I often have to declare inbox bankruptcy for. @paltman's PR just happened to show up in a almost empty mailbox situation. No offense to you or your code intended.

I am a lucky developer using your project into mines and thought it was a
good way to thank you and the community. Unfortunately my work went to
trash.
On Feb 15, 2015 2:38 PM, "Jannis Leidel"<EMAIL_ADDRESS>wrote:

@davidfischer-ch https://github.com/davidfischer-ch Honestly, because I
have a huge amount of GitHub notifications that I often have to declare
inbox bankruptcy for. @paltman https://github.com/paltman's PR just
happened to show up in a almost empty mailbox situation. No offense to you
or your code intended.
—
Reply to this email directly or view it on GitHub
https://github.com/jezdez/django-appconf/pull/11#issuecomment-74417725.

@davidfischer-ch Yeah, that really sucks, and I apologize for that.  Hopefully I can make things right when you do you next contribution.

@jezdez: just to say again, I'm happy to help maintain here. (I'm both using the app and know you're busy)

Is it thanksgiving ;-)
Happy Sunday dear developers.
On Feb 15, 2015 3:17 PM, "Carlton Gibson"<EMAIL_ADDRESS>wrote:

@jezdez https://github.com/jezdez: just to say again, I'm happy to help
maintain here. (I'm both using the app and know you're busy)
—
Reply to this email directly or view it on GitHub
https://github.com/jezdez/django-appconf/pull/11#issuecomment-74418973.


How to use OAK-D on Raspberry Pi

You guys have prepared a system image, but I want to use my own system image, how can I install depthai

Hello @2640546445 ,
You can see all the steps and changelogs in this document (doc linked from here). I hope this helps!
Thanks, Erik


Nested templates

Hello, @arunoda
Maybe you can share your experience, how do you handle such situations:
we have a basic template, where we have nav and notifications parts + Template.dynamic part:
basic

{{> nav}}
{{> notifications}}
{{> Template.dynamic template=main}}

For most of the templates it's okay to have one part changing. But, what about a case, where we want two dynamic parts. But we still want to have nav and notification parts (we don't want them to rerender).
So it looks smth like this:
example

{{> nav}}
{{> notifications}}
{{> Template.dynamic template=one}}
{{> Template.dynamic template=two}}

Of course, we can create a new layout template and use it, but when navigating from basic to example layout - all notifications and nav parts will rerender.
Is there a way to use in the main part of basic layout a template, that has 2 dynamic parts and render the data there. Some sort of nested Template.dynamic. That way, the nav and notifications parts won't rerender, only the main part will.
Is it possible to do that somehow, what would you do in that situation?

I tried this and it worked:
<template name="basic">
  {{> notifications}}
  {{> nav}}
  <main>
    {{> Template.dynamic template=main}}
  </main>
</template>

<template name="twoColumns">
  {{> Template.dynamic template=one}}
  {{> Template.dynamic template=two}}
</template>

<template name="left">
  left
</template>

<template name="right">
  right
</template>

and the js part:
action: function () {
  FlowLayout.render('basic', {main: 'twoColumns', one: 'left', two: 'right'})
}

Is it safe to use such constructions?

I also added some onCreated and onDestroyed callbacks and tried navigation:
// 1
FlowLayout.render('basic', {main: 'orders'})
// 2
FlowLayout.render('basic', {main: 'twoColumns', one: 'left', two: null})
// 3
FlowLayout.render('basic', {main: 'twoColumns', one: 'left', two: 'anotherTemplate'})

It seems, that they work as expected, the basic layout is created once and all the parts are properly created and destroyed.
So, if I am not missing something, this would work fine and we can have a single template, that we can use for one, two, three or more dynamic parts.
If what I did is okay, probably we could add this to readme as an example - this way we can create complex nested templates with only one layout and some nested ones.

+1

Frankly I didn't test this. We normally render some root template using FlowLayout. Then that template take the reposiblity of rendering the child templates. Usually, we get the data from router directly.
This seems like a new strategy. I quite not sure how it works :D Need to have a look at it.

@arunoda ok, I've created a repo with readme and deployed a demo app. You can see the onCreated, onRendered and onDestroyed callbacks in the console.
Maybe you can check it and tell, what do you think about it ;)

I also experimented a lot with this layout system and I can say that it works well !
It just gets complicated when using content blocks, you have to be careful about what you render and how it is rendered.

Hum, I'd really like to use this, but am having issues with templates not rendering. Does this still work for you in with the latest version of blazelayout?

Woops, spoke too soon. I had it nested inside of a {{#with}} statement, and it didn't seem to like that

Should those all be FlowLayout?  Shouldn't they be BlazeLayout ?

@Pushplaybang it was renamed, I've updated the demo repository / demo app with the latest version.
It works great.

@arunoda it works really well, can I add this to readme so that we can close 2 issues?

Yeah this works fantastically, and was exactly what I was looking for @VladShcherbin  - thanks had a scratch through your demo repo, was exactly what I was trying to do
I wanted to handle auth in one master template to switch between authed view and a block  or public content if the user was logged out, and this did the trick exactly.

+1 for putting it in the readme, this should be essential reading.

Why is this not working if is enclosed inside {{#with ...}}? Normally, I can use
{{#with user}}
  {{> Template.dynamic template=../main}}
{{/with}}

if I want to access main outside my {{#with ...}}

Not sure, I ran into the same problem

@mazing , @JulianKingman
It's working for me. I have something like this:
<template name="section">
{{#with ....}}
  {{> Template.dynamic template=../subsection}}
{{/with}}
</template>

With, in route:
BlazeLayout.render( 'mainLayout', { main : 'section', subsection : 'some_content' } )

@mazing are you sure user is true?


Nano bow modes (Industrial Craft 2 combo armors)

What happens:
I can't switch modes of nano bow from IC2 combo armors with infinybow tweak. (any EnderCore version)

Incomplete information. Also if this is only dependent on EnderCore even without EnderIO present - then you should report that to EnderCore.


Publish the new fileRef option to npm

Could you publish the latest merge to npm ?

published - v0.9.6
To be honest I have no idea if it works because there are no tests, so please try it out and let me know if it breaks as soon as possible

OK nous problem
Le jeu. 15 janv. 2015 22:43, Zoli Kahan<EMAIL_ADDRESS>a écrit :

Closed #16 https://github.com/Zolmeister/grunt-sails-linker/issues/16.
—
Reply to this email directly or view it on GitHub
https://github.com/Zolmeister/grunt-sails-linker/issues/16#event-219723501
.


Triangle example: background not clearing to the correct color

In the triangle example, the background color doesn't seem to clear properly.
Long-term, I'm probably not going to investigate this too deeply until work on a higher-level binding has progressed to the point where it can be replicated there.

This is now fixed in the high-level bindings wgpu-hs.


[BUG] 1.18.12 Internal Compiler Error in Eclipse 2020-03 (4.15.0) JRE 1.8.0-231

Describe the bug
After creating a maven project I could not get the @ExtensionMethods to work.  Every build generates Internal compiler error: java.lang.ArrayIndexOutOfBoundsException	TestSystem.java	/lomboktest/src/main/java/lomboktest	line 0	Java Problem
To Reproduce
lomboktest.zip
contains the project
You'll need to pull the version of the JRE (1.8.0-231) for yourself
The example code is from the web page description of ExtensionMethods
Expected behavior
It should compile
Version info (please complete the following information):

Lombok version: 1.18.12
Platform Eclipse 2020-03 (4.15.0) with JRE 1.8.0-231

Additional context
I switched to Eclipse after issues with IntelliJ IDEA

I'm quite sure that this one is already fixed in the latest edge build (PR: https://github.com/rzwitserloot/lombok/pull/2376)

Reading #2376 it does talk about a maven issue.  The attached zipfile is a maven project.
If it is a maven related bug could somebody please tell me how to get a work around so that I can do a demo that is promoting the use of lombok

No one mentioned maven because it doesn't really matters in eclipse. If you run normal builds (e.g. builds after saves or Run as -> Java Application) eclipse uses it's own compiler (ejc). This also happens if a project uses maven. Run as -> Maven build invokes the real maven process and uses the compiler defined in your pom.xml (usually javac).
Your error message looks like an eclipse message (ejc) and the exception is the same that is mentioned in the PR. Have you tried installing the edge build (https://projectlombok.org/download-edge)?

@Rawi01 any chance you could post an updated pom.xml for the project that I uploaded in the original post.  I'm struggling with getting my head around java IDEs as I've literally just started after spending 15 years in C# and Visual Studio.
I copied the resource and dependencies form the down load page into the pom but and still got the error.
I really want to get this working for a demo on how Extension Methods assist in applying Functional programming techniques within Java8

@jm98 You have to update the installed lombok version, only updating the maven mananged version is not sufficient. Just install the edge version as you did before or simply replace the lombok.jar in you eclipse directory or update the path to the jar in your eclipse.ini. Make sure to close and restart eclipse after the installation.

@Rawi01 thanks - now compiles in eclipse


Eliminate the need to reload, and fix wrong IDs

While trying out the fix for #3, I discovered that the initial assignment of the ID was happening after the call to addURICommand(), which means that new commands were always given an internal ID of uri-commands: (with no actual command ID following the ":").  I went ahead and made a pull request to fix this problem, and in the process also made it so that it isn't necessary to reload Obsidian or the plugin when commands are changed or deleted.  Hope you find it helpful, please let me know if you have any questions about what was done or how it works.

Oh, yes, thank you for catching the id order! That's what I get for deciding that some changes are minor and don't need to be thoroughly tested.
And thank you for the other changes!


How do you get APS dataset's keyword attribute?

Hello! When I visit https://journals.aps.org/datasets to download the raw APS dataset, I dont find anything about "keyword". But in your work, you use "keyword" as a node type. So how do you get that?

Hi @hcmdgh, we generate the keywords of APS datasets using the method proposed in Shang et al, Automated phrase mining from massive text corpora, you can refer to the public repo. We basically use the keywords extracted by this method from the paper titles. The details of how we generate them can be found in datasets description of section 4.1.

That's it, thanks.


Added Multi Step Form React App

In this pull request I have added a quote generator app which will generate random quotes from variety of topics.
Features : #47

update readme

Updated README.md file kindly check it.


Switch to github actions

Also update Scala Native to 0.4.0.

/cc @xuwei-k @lolgab this will supercede #1073 and #1077.

/cc @xuwei-k @lolgab this will supercede #1073 and #1077.

not quite, we still need to dig out a 2.3.3 binary compatible version 😄

not quite, we still need to dig out a 2.3.3 binary compatible version :smile:

Agreed, but I think this is a good place to start from :smiley_cat:


From private repo

@v-alje : Thanks for your contribution! The author, @msraiye, has been notified to review your proposed change.


[ambermini] fix static gfortran dependencies on osx

This works on my machine, but may need more testing.

Making gcc a runtime dependency on every platform seems like a heavy handed solution. Maybe only for osx?

Good idea.  The gcc package isn't even available for win.

This works on my machine too.

Thanks!  Shouldn't affect the linux or win builds then.


https://github.com/Grand-Theft-Auto-V-Download/

https://github.com/Grand-Theft-Auto-V-Download/

Close with reason: Spam;

Close with reason: Spam;


Enhance error report for rbTree

Summary:

Added ArrayUtil 🍒-picked from arrays branch (#192)
Now index unification failure in constructor selection (in coverage checker) is taken carefully: if the failure is due to a stuck case and there aren't any catch-all patterns, we report an error. (in case there are no patterns, we do not report error, as this will eventually become either an impossible case or a missing case)
Added indexed redblack tree (I blame @dramforever for pushing me to do this, it took me the entire afternoon!! But I also appreciate it as this helped me discovering all these bugs)
Since ownerTele in CtorDef isn't equal to the corresponding DataDef.telescope() (so in case core of a concall is missing, we can't retrieve ownerTele!! This is impossible yet, but may once become possible). To address this problem, we now store ownerTele into CtorDecl.patternTele.

https://github.com/aya-prover/aya-dev/blob/54c167ba509d63114df816440fb7e70796b13689/base/src/main/java/org/aya/tyck/StmtTycker.java#L194
This line of code constructs CtorDef.ownerTele, which is certainly not always the dataParams.

Since this PR fixes build (which is broken for main), I'll push it to main.
bors merge

For the record: https://docs.google.com/presentation/d/1st0TeiIIe_voZ1mx52N4BqnPuxYALaEMHMjCg6Y40vY/edit#slide=id.gfbba5c4add_1_123


Diagnostic listener not called for GraphQL error

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the bug
I believe that in the past one of the error-related methods of the DiagnosticEventListener (like ResolverError) would be called in case this error was generated:
{
  "errors": [
    {
      "message": "Cannot return null for non-nullable field.",
      "locations": [
        {
          "line": 237,
          "column": 21
        }
      ],
      "path": [
        "somepath"
      ],
      "extensions": {
        "code": "HC0018"
      }
    }
  ]
}

With version 12.11.1 and 12.12.0 none of the diagnostic listener methods seem to be called, apart from the regular ones.
Steps to reproduce

Add a DiagnosticListener to the GraphQL server.
Generate a "Cannot return null for non-nullable field." error.
Observe that none of the error methods are called.

Relevant log output
No response
Additional Context?
No response
Product
Hot Chocolate
Version
12.12.0

This is a known bug in version 12. I am working on this for 13.

This one is now fixed with #5168


Weird style

The commands running always to the end, but afterwards the style of the list/table is a bit weird. It runs in full screen. But sometimes it does happen that you have the 100% at the end of the list/table and the content of errors is between the penultimate line and the third penultimate line with the amount of tasks. Sometimes I also had it that the last line was between the second and third part of the list of erros.
   0/133 [>---------------------------]   0%

  13/133 [==>-------------------------]   9%

  26/133 [=====>----------------------]  19%

  39/133 [========>-------------------]  29%

  52/133 [==========>-----------------]  39%

  65/133 [=============>--------------]  48%

  78/133 [================>-----------]  58%

  91/133 [===================>--------]  68%

 104/133 [=====================>------]  78%

 117/133 [========================>---]  87%

 ------ ---------------------------------------------------------------------------------------------------------------------------------------
  Line   app\Exceptions\Handler.php
 ------ ---------------------------------------------------------------------------------------------------------------------------------------
  51     Method App\Exceptions\Handler::render() should return Illuminate\Http\Response but returns Symfony\Component\HttpFoundation\Response.
 ------ ---------------------------------------------------------------------------------------------------------------------------------------

 130/133 [===========================>]  97%
 133/133 [============================] 100%

It's Windows 10 and I'm using both Xampp and Homestead.

@ForzaSFerrari You can give it a try.

Wouldn't know, where I have to start. 😅


ImportError: cannot import name 'keys' from 'securesystemslib'

Description

I am trying to sign my Python package with Sigstore but I get the following error:
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/home/runner/.local/lib/python3.10/site-packages/sigstore/__main__.py", line 20, in <module>
    from sigstore._cli import main
  File "/home/runner/.local/lib/python3.10/site-packages/sigstore/_cli.py", line 34, in <module>
    from sigstore._internal.rekor.client import (
  File "/home/runner/.local/lib/python3.10/site-packages/sigstore/_internal/rekor/__init__.py", line 19, in <module>
    from .client import RekorClient
  File "/home/runner/.local/lib/python3.10/site-packages/sigstore/_internal/rekor/client.py", line 33, in <module>
    from sigstore._internal.tuf import TrustUpdater
  File "/home/runner/.local/lib/python3.10/site-packages/sigstore/_internal/tuf.py", line 42, in <module>
    from tuf.ngclient import RequestsFetcher, Updater
  File "/home/runner/.local/lib/python3.10/site-packages/tuf/ngclient/__init__.py", line 14, in <module>
    from tuf.ngclient.updater import Updater
  File "/home/runner/.local/lib/python3.10/site-packages/tuf/ngclient/updater.py", line 48, in <module>
    from tuf.api.metadata import (
  File "/home/runner/.local/lib/python3.10/site-packages/tuf/api/metadata.py", line 56, in <module>
    from securesystemslib import keys as sslib_keys
ImportError: cannot import name 'keys' from 'securesystemslib' (/home/runner/.local/lib/python3.10/site-packages/securesystemslib/__init__.py)

Error: Process completed with exit code 1.

I am using the following .yaml file:
name: Publish Python 🐍 distribution 📦 to PyPI

on: push

jobs:
  build:
    name: Build distribution 📦
    if: startsWith(github.ref, 'refs/tags/')  # only build on tag pushes
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
    - name: Set up Python
      uses: actions/setup-python@v4
      with:
        python-version: "3.x"
    - name: Install pypa/build
      run: >-
        python3 -m
        pip install
        build
        --user
    - name: Build a binary wheel and a source tarball
      run: python3 -m build
    - name: Store the distribution packages
      uses: actions/upload-artifact@v4
      with:
        name: python-package-distributions
        path: dist/

  publish-to-pypi:
    name: Publish Python 🐍 distribution 📦 to PyPI
    if: startsWith(github.ref, 'refs/tags/')  # only publish to PyPI on tag pushes
    needs:
    - build
    runs-on: ubuntu-latest
    environment:
      name: pypi
      url: https://pypi.org/p/pymoxel  # Replace <package-name> with your PyPI project name
    permissions:
      id-token: write  # IMPORTANT: mandatory for trusted publishing

    steps:
    - name: Download all the dists
      uses: actions/download-artifact@v4
      with:
        name: python-package-distributions
        path: dist/
    - name: Publish distribution 📦 to PyPI
      uses: pypa/gh-action-pypi-publish@release/v1
      with:
        skip-existing: true

  github-release:
    name: >-
      Sign the Python 🐍 distribution 📦 with Sigstore
      and upload them to GitHub Release
    needs:
    - publish-to-pypi
    runs-on: ubuntu-latest

    permissions:
      contents: write  # IMPORTANT: mandatory for making GitHub Releases
      id-token: write  # IMPORTANT: mandatory for sigstore

    steps:
    - name: Download all the dists
      uses: actions/download-artifact@v4
      with:
        name: python-package-distributions
        path: dist/
    - name: Sign the dists with Sigstore
      uses<EMAIL_ADDRESS>      with:
        inputs: >-
          ./dist/*.tar.gz
          ./dist/*.whl
    - name: Create GitHub Release
      env:
        GITHUB_TOKEN: ${{ github.token }}
      run: >-
        gh release create
        '${{ github.ref_name }}'
        --repo '${{ github.repository }}'
        --notes ""
    - name: Upload artifact signatures to GitHub Release
      env:
        GITHUB_TOKEN: ${{ github.token }}
      # Upload to GitHub Release using the `gh` CLI.
      # `dist/` contains the built packages, and the
      # sigstore-produced signatures and certificates.
      run: >-
        gh release upload
        '${{ github.ref_name }}' dist/**
        --repo '${{ github.repository }}'

You can view the full GitHub action: here.

Thanks for the report @adosar! I believe this is a dupe of #122, i.e. the failure is caused by using a too-old version of the action. Could you try upgrading to a more recent version?

That's because there is no version v2.1.4 of the action (yet). The latest version is v2.1.1, as you can see here: https://github.com/sigstore/gh-action-sigstore-python/releases/tag/v2.1.1

Understandable mistake! The versions are unfortunately very similar looking. Glad to hear you were able to get it working.


Typos and grammar

Title - Typos and grammar
What will change - Fix pull_request_template.md and CONTRIBUTING.md
Type of Issue - documentation/template fix
Please add/delete options that are not relevant.

[ ] Adding New Code
[ ] Improving Code
[x] Improving Documentation
[ ] Bug Fix

Programming Language
Please add/delete options that are not relevant.

[ ] Python
[ ] C++
[ ] Java
[ ] SQL

Self Check

Ask for issue assignment and wait to get assigned to it before making Pull Request.
Add your file in the proper folder
Clean Code and Documentation for better readability
Add Title and Description of the program in the file

:star2: Star it :fork_and_knife:Fork it :handshake: Contribute to it!
Discord server ✉ - https://discord.gg/CXksGdn
Happy Coding,

Once creating PR my gramarly reported few issues. Might be nice to fix it.
(I'm not asking to assign me to it)

What issues were those @wpedrak

This is what I've spotted:
https://github.com/wpedrak/LeetCode-Solutions/commit/4f59ffbacdf8780fbad847eaf927c894b944d9d0

@wpedrak You can make a PR to make these corrections.

Done in https://github.com/SHY-Corp/LeetCode-Solutions/pull/308


Create a java module for the HMACKeyGenerator

Component to Generate HMACKey

HMACKeyGenerator

generateHMACKey(): JWK

is implemeneted with JWTSigner.generateHMacSecret


Add vue-route-props

vue-route-props provide that automatically bind vue-router query to vm, APIs are mostly same as the Vue props.
playground

@iendeavor Please create a PR if this is still relevant

@Scrum thanks for review.😃


OLS-293: Sequence diagram with basic flow

Description
Sequence diagram with basic flow
Type of change

[ ] Refactor
[ ] New feature
[ ] Bug fix
[ ] CVE fix
[ ] Optimization
[x] Documentation Update
[ ] Configuration Update
[ ] Bump-up dependent library

Related Tickets & Documents

Related Issue #OLS-293

Checklist before requesting a review

[x] I have performed a self-review of my code.
[x] PR has passed all pre-merge test jobs.
[ ] If it is a core feature, I have added thorough tests.

Codecov Report
Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (618eeab) 94.49% compared to head (4dfd492) 94.86%.
Report is 20 commits behind head on main.

Additional details and impacted files

@@            Coverage Diff             @@
##             main     #387      +/-   ##
==========================================
+ Coverage   94.49%   94.86%   +0.37%
==========================================
  Files          32       32
  Lines        1035     1033       -2
==========================================
+ Hits          978      980       +2
+ Misses         57       53       -4

Files
Coverage Δ

ols/app/endpoints/ols.py
100.00% <ø> (ø)

ols/constants.py
100.00% <100.00%> (ø)

ols/src/ui/gradio_ui.py
96.00% <ø> (ø)

ols/src/query_helpers/docs_summarizer.py
91.80% <63.63%> (ø)

... and 1 file with indirect coverage changes

/assign @bparees

Cool, we just need to remember to update it when some flow changes.
/lgtm

/approve
/lgtm


How to use {ControlChars.Tab} as delimiter?

I know this project is called CSV. I'm not sure if the C stand for Character or Comma.
How can we set a TAB as delimiter character instead of a Comma?

I found it. Code for VB.NET:
Using csv As New LumenWorks.Framework.IO.Csv.CsvReader(New IO.StreamReader(MyImportFileName), False, ControlChars.Tab)


Thumb for a TS segment

hi,
In an HLS streaming, how can I record a thumb for each TS segment with the same segment name?
my conf:
    application live {
        live on;
        hls on;
        hls_path /www/site_teste/hls;
        hls_fragment 30s;
        hls_datetime system;
        recorder preview {
             record all;
             record keyframes;
             record_max_frames 4;
             record_path /www/site_teste/hls;
             record_interval 30s;
        }
    }

You could use exec_record_done event handler which triggered on every recorded segment.


Error trying to change default timeout

I am having difficulty where Watir-Webdriver is timing out after 60 seconds waiting for a very slow page to load. I am attempting to run the following code to change the default internal timeout value:
require 'watir-webdriver'
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 120 # seconds
driver = Selenium::WebDriver.for(:remote, :http_client => client)
but when this code is run it generates the following error:
/Users/Charles/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:644:in initialize': Connection refused - connect(2) (Errno::ECONNREFUSED) 	from /Users/Charles/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:644:in open'
from /Users/Charles/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:644:in block in connect' 	from /Users/Charles/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/timeout.rb:58:in timeout'
from /Users/Charles/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/timeout.rb:89:in timeout' 	from /Users/Charles/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:644:in connect'
from /Users/Charles/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:637:in do_start' 	from /Users/Charles/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:626:in start'
from /Users/Charles/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/net/http.rb:1168:in request' 	from /Users/Charles/.rvm/gems/ruby-1.9.2-p290/gems/selenium-webdriver-2.15.0/lib/selenium/webdriver/remote/http/default.rb:81:in response_for'
from /Users/Charles/.rvm/gems/ruby-1.9.2-p290/gems/selenium-webdriver-2.15.0/lib/selenium/webdriver/remote/http/default.rb:43:in request' 	from /Users/Charles/.rvm/gems/ruby-1.9.2-p290/gems/selenium-webdriver-2.15.0/lib/selenium/webdriver/remote/http/common.rb:39:in call'
from /Users/Charles/.rvm/gems/ruby-1.9.2-p290/gems/selenium-webdriver-2.15.0/lib/selenium/webdriver/remote/bridge.rb:450:in raw_execute' 	from /Users/Charles/.rvm/gems/ruby-1.9.2-p290/gems/selenium-webdriver-2.15.0/lib/selenium/webdriver/remote/bridge.rb:92:in create_session'
from /Users/Charles/.rvm/gems/ruby-1.9.2-p290/gems/selenium-webdriver-2.15.0/lib/selenium/webdriver/remote/bridge.rb:68:in initialize' 	from /Users/Charles/.rvm/gems/ruby-1.9.2-p290/gems/selenium-webdriver-2.15.0/lib/selenium/webdriver/common/driver.rb:33:in new'
from /Users/Charles/.rvm/gems/ruby-1.9.2-p290/gems/selenium-webdriver-2.15.0/lib/selenium/webdriver/common/driver.rb:33:in for' 	from /Users/Charles/.rvm/gems/ruby-1.9.2-p290/gems/selenium-webdriver-2.15.0/lib/selenium/webdriver.rb:60:in for'
from timeout_test.rb:5:in `'
Thanks for considering this.

This is a Selenium issue, not a watir-webdriver one, so you should really file it in the Selenium tracker.
Since you're passing in :remote, where is that server running? Is it on the default host/port (localhost:4444)?
Perhaps you really meant to do:
driver = Selenium::WebDriver.for :firefox, :http_client => client

Understood. Sorry for the trouble.


docs: replace HCL code with correct language specific code

Removed left over HCL code with Pulumi specific code

link: https://github.com/pulumi/registry/pull/4184


List Numbering Discrepancy With Github When Bolding Items

I just wanted to point out a discrepancy between how Redcarpet and Github handle bolding a line in an ordered list.
Whenever you enter the following markdown...
**1. first**

2. Second

3. Third

And try to render it as HTML in Redcarpet, you get the following HTML...

  1. First

Second

Third

This makes the numbering off in that it would go (1, 1, 2) and not (1, 2, 3).
However, on Github, it starts the numbering at 2 so that the sequence is correct.

  1. First

Second

Third

It's certainly an edge case, but I just wanted to point it out.

Hi there,
Sorry for the late answer but actually, this is something we can't really change. GitHub is now using another flavor of Markdown (CommonMark) but according to the spec of the "plain old" Markdown, people can write things like:
3. Hello
6. World

And still get a list that starts at one.
I'm giving this a close but thanks for reporting.


[WIP] Approximate Bayesian Computation (ABC)

This is an initial draft of implementing ABC in Turing.
I've implemented the following samplers:

GetData <: InferenceAlgorithm: a hacky way of extracting the observations by running the model once before inference. We need the observations to compute the reference statistics at each step! for any ABC method, and this allows us to get the observations once in the construction of the state. This also means that I'm currently assuming the model to be static, i.e. observations doesn't change between each execution of the model.
AbstractABC <: InferenceAlgorithm: allows some code-reuse between different ABC methods.
ABC <: AbstractABC: Essentially makes use of AbstractMH.jl to make a simple random-walk ABC method. Doesn't have any additional dependencies beyond Turing and it's dependencies.
GPABC <: AbstractABC: Attempts to make use of the GpABC.jl package under the hood. After looking at a couple of packages, this seemed like pretty good one that is being actively maintained. But none of these frameworks are really designed with an interface such as AbstractMCMC.jl in mind, though algorithmically they should fit the bill perfectly.

There are a couple of awkward hacks to make this work in Turing:

GetData is a hack.
Currently only works for univariate observations. I bet we have some functionality somewhere in the VI impls which can deal with flattening all sorts of things, so I didn't bother with that just now.
Generally the code is quick-and-dirty, so def needs some work in general.

Other relevant packages:

GpABC.jl: contains ABC-rejection and ABC-SMC methods, and has additional emulation-approaches using GPs. Looks like it's active and maintained, but hasn't reached v1.0 yet (or at least isn't on available via Pkg.install).
ApproximateBayesianComputing.jl: looks like it's a bit more in the earlier stages of development.
ApproxBayes.jl: contains ABC-rejection and ABC-SMC methods. Looks a bit more "mature" than others maybe, but their README points to GpABC.jl for a more feature-complete implementation.

IMHO, GpABC.jl seems like the thing to interface with if we want some more feature-complete impls.
Examples
Setup
julia> using LinearAlgebra

julia> using Turing

julia> import Turing.Inference: ABC, GPABC

julia> import AdvancedMH

julia> const AMH = AdvancedMH
AdvancedMH

julia> Turing.turnprogress(false)
[ Info: [Turing]: progress logging is disabled globally
false

julia> @model function demo(x)
           m ~ Normal(0, 0.1)

           for i ∈ eachindex(x)
               x[i] ~ Normal(m, 1)
           end
       end;

julia> xs = randn(10_000);

julia> m = demo(xs);

AdvancedMH.jl based
julia> f(x, y) = norm(x - y) / length(x) # mean squared error
f (generic function with 1 method)

julia> proposal = (m = AMH.RandomWalkProposal(Normal(0.0, 0.1)), );

julia> alg = ABC(proposal, f; epsilon = 0.05);

julia> chain = sample(m, alg, 1000);

julia> mean(chain)
Mean
  parameters    mean
  ──────────  ──────
           m  0.0026

GpABC.jl interop
julia> # GpABC.jl integration
       using GpABC

julia> threshold = 0.05 * length(xs);

julia> n_particles = 1;

julia> max_iter = 10 * n_particles;

julia> priors = [Normal()];

julia> summary_statistic = "keep_all";

julia> reference_data = reshape(xs, (:, 1));

julia> distance_function = GpABC.Distances.euclidean;

julia> summary_statistic = GpABC.build_summary_statistic(summary_statistic)
keep_all_summary_statistic (generic function with 1 method)

julia> alg = Turing.Inference.GPABC(summary_statistic, distance_function, threshold, n_particles, max_iter)
GPABC{typeof(GpABC.keep_all_summary_statistic),typeof(Distances.euclidean),Float64}(GpABC.keep_all_summary_statistic, Distances.euclidean, 500.0, 1, 10)

julia> samples_gpabc = sample(m, alg, 1000);

julia> mean(samples_gpabc)
Mean
  parameters     mean
  ──────────  ───────
           m  -0.0014

This looks cool! With @francescoalemanno I started the JuliaApproxInference org which aims at a coherent interface for ABC and approximate point estimation. We have already some methods implemented in LikelihoodfreeInference.jl and KissABC.jl but we intend to refactor these packages such that we can have a common API. Some initial ideas are written up here. Would be great, if you would chime in such that we arrive at something that works smoothly with Turing.jl!

@yebai Thanks for the comments! But when I made this it was only as a demonstration of how we could approach this in Turing. The current implementations only works with a subset of possible models, e.g. univariate continuous observations. It's also the issue of how to extract the data from a Model; the current approach of using a Sampler to do so seems very hacky imo.
The same with the dependency on GpABC.jl; this should not be forced (as you mentioned, e.g. using requires), but I've added it at the moment just so people can try the branch out.
My hope here is to get a discussion going of how to implement ABC in Turing :+1:

@jbrea I'm very happy to join the conversation so we can make the integration with Turing as smooth as possible!:) I'll follow and try to chime in over at your repo from now on :+1:

I made a few scripts that do one version of ABC, based on summary statistics and the asymptotic Gaussian distribution of the statistics, using Turing and AdvancedMH. They are just an example. They might be helpful for more ambitious examples: https://github.com/mcreel/ABC-MSM-Turing

Probably better to do this via a separate ABC package that supports models specified via DynamicPPL.


CALL program open source

Good morning,
i have a request, tell me if it is possible.
Can you make me able to press ctrl+click on call program or press F12 to see the source of called program?
For instance, i have this call:

i press ctrl+click on the call program between quotation marks and automatically the extension bring me to the called program source.

news? is it possible ?

As said, you can navigate to a known program that has been seen or processed through the metadata (maintain_metadata_cache).
Then, once you use it for navigation to the file, you can then navigate back to the previous source file with alt+left aka go > back command.
What is definitely not present, isn't supported is called-by searches, so they may be some confusion here.


[WIP] Implementing video modes

Summary of the PR
Adds video mode settings (resolution, refresh rate and depth buffer bits).
Related issues, Discord discussions, or proposals
Make depth buffer bits configurable
Further Comments
Closes #98
Closes #101

 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.

@Perksey Maybe you could have a look at the implementation. FYI this should also fix #98.
Some testing is needed though.

Another problem I bumped into is an assertion in GlfwMonitor which will occur if the Handle is null (which is the case when fullscreen mode is not active). Maybe we should add a safety check there or throw an exception when trying to retrieve the video mode?

Get the window's current monitor
If it returns a nullptr, get the system's primary monitor and return that

It's the best we can do really.

Thanks a lot for championing this! Make any final changes and remove the WIP mark, then I can merge this bad boy in :D

Ok I fixed the monitor null-value issue. Unfortunately the null coalescing operator isn't available for pointers yet so the null checks look a bit bad. But it works now. I tested it now on Windows (previously on Ubuntu) and even the refresh rate is working. On the current machine I have options for 50, 59 and 60 HZ. It chooses the closest one so if I set the refresh rate to 58 it will use the value 59.
I think you can merge now. Was a pleasure to help. I look forward to preview4 as I use Silk.net in my Settlers1 clone with great success. :)