Add CMake support for samples

In order to support building our samples on Windows, we'll need to add a cross platform way to build them there. CMake seems like the easiest solution, since the rest of our build uses CMake. This could also help solve #1357
I've assigned Ionut, Alin, and Anita to this issue, but realistically we don't need everyone working on it. @aserdean I remember you mentioned this is something you were interested in. Let me know if you'd like to work on this :).  I know Anita was considering working on this too, so I'll sync up with everyone next week

@johnkord issue https://github.com/Microsoft/openenclave/issues/1357 has a different problem IMO. I updated it with my findings.
I can take a stab at generating also cmakefiles across the samples if that is okay with you.

Sounds good to me.

Thanks @aserdean !

As an update on this one, I finished with samples/helloword and samples/file-encryptor, after which I got to samples/data-sealing and I hit a semi issue:
/home/ubuntu/openenclave/samples/data-sealing/common/keys.cpp:108:14: error: no matching function for call to 'oe_get_seal_key_by_policy_v2'
    result = oe_get_seal_key_by_policy(
             ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/openenclave/include/openenclave/enclave.h:517:35: note: expanded from macro 'oe_get_seal_key_by_policy'
#define oe_get_seal_key_by_policy oe_get_seal_key_by_policy_v2
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu/openenclave/include/openenclave/enclave.h:579:13: note: candidate function not viable: no known conversion from 'uint8_t [1]' to 'uint8_t **' (aka 'unsigned char **') for 2nd argument
oe_result_t oe_get_seal_key_by_policy_v2(

samples/data-sealing uses OE_API_VERSION v1
Is it okay if I update the samples for OE_API_VERSION v2 as part of the effort?
CC: @andschwa

@paulcallen ought to know.

@aserdean - Can you please point us to your branch? OR file a PR with what you already have. Thanks.

@anitagov : Sure: https://github.com/Microsoft/openenclave/pull/1466 .
I will close the PR and break all the changes into atomic commits after we decide what we keep and CI is green.

Closed via: https://github.com/Microsoft/openenclave/pull/1472 and https://github.com/Microsoft/openenclave/pull/1570

Thank you so much @aserdean!


Reproducible builds

We should do what we can to support reproducible builds. However I think it's more practical to wait for better tooling than to start dumping compilers and other tools into the Git repository.
Right now I think LibreSSL is the biggest offender. #92

I assume that you have looked at Gitian (the reproducible build system that Bitcoin Core uses). You typically use a system such as the depends system that Bitcoin Core uses (located in the depends directory in the source tree) to download and build dependencies from source, before proceeding with the build of the actual software using those dependencies that were built. So you shouldn't need to dump tools directly into this repository. Rather you would just have makefiles, for instance, that download and build the dependencies.
You mention compilers. I don't know whether you are thinking about it in terms of including a particular compiler so that everyone is using the same compiler or if you mean that people would need to build the compiler from source. In the former case, with Gitian, that is unnecessary, because people would be using a virtual machine of a particular release of Ubuntu and they would use the compiler included with that release of Ubuntu. In the latter case, I would consider whether any advantages that there may be to compiling the compiler from source are great enough to overcome the issues arising from a much longer build time as a result of compiling the compiler. It is admirable to want to mitigate the Trusting Trust Attack by using Diverse Double Compilation (if that is what you intend), but the reality is that if no one builds a program reproducibly because it takes too long to do so, there is no advantage to making that program reproducible.
I think it is great that you are considering reproducible builds. I also agree that the tooling can be improved, but I think the need for improvement has a lot to do with the limited use of reproducible builds. Let me know if you have any questions about reproducible builds and I will try to help as best I can.

Thanks for the comment!
Let me start by saying I know very little about reproducible builds. I've read a bit about NixOS and saw the news about Debian. I hadn't heard of Gitian but I've started looking into it.
One of the reasons I am interested in reproducible builds and the biggest reason I think they are important for StrongLink right now (when the whole project is so limited and immature) is because bitwise reproduction is also important for content addressing systems. For example, if you want to import an arbitrary web page into StrongLink, there is probably dynamic/random content on that page that should not affect its identity (e.g. comments, ads). So there needs to be a way to do that and there is probably a lot to learn from reproducible build systems. (I have some ideas there.)
For a while I was interested in what I called semantic hash algorithms, which would strip out irrelevant information before passing the data to a regular (i.e. cryptographic) hash function. I ended up deciding that approach was probably bad though.
Honestly I was planning on just packaging for Debian and then waiting to get included in their reproducible builds project. Gitian sounds pretty easy to set up though (although I haven't looked in depth yet). Here is a question though: how valuable are reproducible builds if they are not even for the user's system (e.g. OS X or Windows) or architecture? Doesn't building in a VM limit the applicability? Perhaps this is answered in the Gitian docs...
Diverse double compiling would be nice, but given the other security problems of this project and its relatively low value as a target (compared to, say, Bitcoin), I don't think it can be a priority right now.

Obviously the VM can run other operating systems, including the same as the host. Never mind that question!

Getting a package into Debian and having it be made reproducible through their reproducible builds project sounds like a good idea. Their toolchain sits in a special repository and consists of modified versions of packages such as dpkg and debhelper. I think the goal is to ultimately get these changes to the toolchain integrated into the official Debian repositories. But right now, you are able to add this additional repository to a Debian-based distro and use the normal process of packaging software for Debian. A lot of the issues that are being discovered by Debian that need to be solved to make a build reproducible are relevant even if you are building for OS X or Windows. But the Debian reproducible build project itself makes some changes to the tools used to build a deb package. So it doesn't fully solve OS X or Windows reproducible builds.
Gitian is pretty easy to setup up. It just uses Ubuntu VMs to do the building, so you need to cross-compile for OS X or Windows. In what is called a Gitian descriptor, you specify the version of Ubuntu to use and some other data, including a script for Gitian to run in the VM. That script does the building and copies the output to the output directory. You end up with the output and a file that says the filenames of the inputs and outputs, along with their hashes and it also lists the packages installed in the VM. Here is the Linux Gitian descriptor for Bitcoin Core. As you can see, it uses libfaketime and the --mtime option to tar, among other things to make the build reproducible. Once the descriptor is written, then you get people to build the software and publish the hashes they get.
So with Gitian, the "hard part" is that you would have to write the descriptor and ideally have some way of building the dependencies also (maybe using the Bitcoin Core depends system). The process of actually using Gitian to build once the descriptor is made is easy.

Right now we vendor all of our non-base dependencies (see the deps dir) and statically link them. We build them basically through recursive Make. It sounds like that might actually be an advantage for using Gitian, as long as the dependencies themselves build cleanly in that environment.
I'm not a build system expert by any means and I haven't tried out native cross-compiling yet, so that might be a long ways off.
For now I will download Gitian and give it a go. Thanks for your advice!


docs: Fix missing space in setup-recommended.md

Previously, there was a missing space in setup-recommended.md that I noticed when reading it. It made me double take and need to reread the sentence. Fixing the space improves potential understanding of the doc and ensures professionalism.

Fixes: Missing space in setup-recommended.md

Self-review checklist

[ ] Self-reviewed the changes for clarity and maintainability
(variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

[ ] Explains differences from previous plans (e.g., issue description).
[ ] Highlights technical choices and bugs encountered.
[ ] Calls out remaining decisions and concerns.
[ ] Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

[X] Each commit is a coherent idea.
[X] Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

[ ] Visual appearance of the changes.
[ ] Responsiveness and internationalization.
[ ] Strings and tooltips.
[ ] End-to-end functionality of buttons, interactions and flows.
[ ] Corner cases, error conditions, and easily imagined bugs.

Great job on your first contribution, @mVolpe94! 🎉
The changes look reasonable to me!

Merged, thanks @mVolpe94!

Absolutely, I was reading through the docs and thought I would practice a quick PR. Have a good one!


Bleve index should have max 1 queue workers

Per https://github.com/blevesearch/bleve/blob/master/index.go#L28-L33
bleve is not thread safe, so only 1 workers should be running.

It is thread safe to call index.NewBatch() . The comment states that the bleve.Batch structure itself is not threadsafe and should be used in a single-threaded way. The only use of a bleve.Batch is as a FlushingBatch:
https://github.com/go-gitea/gitea/blob/main/modules/indexer/bleve/batch.go
These are used in a single threaded way:
https://github.com/go-gitea/gitea/blob/e81ccc406bf723a5a58d685e7782f281736affd4/modules/indexer/code/bleve.go#L284-L311
I think we need to see logs for this concurrency/race. AFAICS the use of bleve.Batch within in direct gitea code is correct. (I'm not ruling out misbehaviour relating to use of rupture - there may well be issues there.)

As an aside, just to prove that Bleve itself believes that it is threadsafe, it starts for itself around 4 worker go-routines:
https://github.com/blevesearch/bleve_index_api/blob/615d85c70e101ee9492853f37d87e9dbb75f6125/analysis.go#L32-L41
which can be seen as unassociated go-routines in processes stacktraces.
I'm not certain which init() function causes this - I've not looked hard enough yet - but starting go-routines within init is a fairly unpleasant behaviour.

Each batch for each worker, it is thread-safe.


Got error while running npu_modelsx4_demo

Hello,
While running demo/multi-model-exec/npu_modelsx4_demo, I was found the following error.

Running ...
Close window to stop
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
gui is starvatting!!
WARNING: Logging before InitGoogleLogging() is written to STDERR
F20241030 17:57:51.908277  3752 DpuKernelRunner.hpp:969] DPU timeout: (Exception type: class xrt::run::command_error), Timeout layer name:[subgraph_(MobilenetV2/Conv/BatchNorm/FusedBatchNormV3:0_vaip_55)], Command failed to complete successfully (ERT_CMD_STATE_ERROR)

I also built "npu_multi_models.exe" on own enviroment and try again, couldn't find any change.
My environment is Notebook PC (CPU : AMD Ryzen AI 9 HX 370 w/ Radeon 890M, GPU : NVIDIA Geforce RTX 4060 Laptop GPU), and I found dedicated gpu memory on internal GPU (Radeon 890M) is almost used up.
Does this condition have anything to do with the error?
Also, when I execute the demo first time, I found "Download Resource Package" isn't contain "image_list.txt" file. I made it myself and maybe it's working.
Thanks,
Yuki

Hi, Have you solved this problem? I have the same problem on HX370

Hi @yuki-ele , could you please provide info on which of the batch files you were running in https://github.com/amd/RyzenAI-SW/tree/main/demo/multi-model-exec/npu_modelsx4_demo ?

@ThomasGmeinder
Thanks for your reply.
I was running "run_mobile_net_v2.bat" and "run_resnet50.bat" by following the README instructions, got same problems.


Test a Like

Black-box behavioral.

And while we are at it, also Undo the Like.

Placeholder: https://github.com/fediverse-devnet/feditest-tests-fediverse/blob/develop/tests/fediverse/for0.4/like.py

Works now.


Use eccodes.codes_set_key_vals in output.py

I fixed the failing tests. It revealed that we cannot set the missing_value to np.finfo(np.float32).max.
See the newly added test: test_grib_output_missing_value

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.48%. Comparing base (c5d00d1) to head (7ee7a69).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #529      +/-   ##
===========================================
- Coverage    91.08%   90.48%   -0.60%
===========================================
  Files          148      148
  Lines        10765    10782      +17
  Branches       511      511
===========================================
- Hits          9805     9756      -49
- Misses         796      862      +66
  Partials       164      164

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

🚨 Try these New Features:

Flaky Tests Detection - Detect and resolve failed and flaky tests


Set initial state with HTML Code with style doens't work

I am using draft-js library and I want to set the initial EditorState with HTML Code. I am doing the following:
const allStyles = `<span style="color: blue"><em style="font-style: italic">testing</em></span>`;

const blocksFromHTML = convertFromHTML(allStyles);
const state = ContentState.createFromBlockArray(
  blocksFromHTML.contentBlocks,
  blocksFromHTML.entityMap
);

const [editorState, setEditorState] = React.useState(() =>
  EditorState.createWithContent(state)
);

I want to initialize the component with the testing label with the color blue and with an italic font. The italic font-style is being applied but the ones that should be applied with the style tag are not. It happens with whatever style that I pass into the style. I am using the same code that the draft-js component generates and it doesn't work!
Please help me.
I am using React and Typescript.
package.json:
  "dependencies": {
    "@emotion/core": "^10.0.35",
    "@emotion/styled": "^10.0.27",
    "@svgr/webpack": "^5.5.0",
    "html-to-draftjs": "^1.5.0",
    "react-date-picker": "^8.0.3",
    "react-datetime-picker": "^3.0.4"
  },
  "devDependencies": {
    "@babel/core": "^7.11.6",
    "@rollup/plugin-commonjs": "^15.1.0",
    "@rollup/plugin-node-resolve": "^9.0.0",
    "@storybook/addon-actions": "^6.1.14",
    "@storybook/addon-essentials": "^6.1.14",
    "@storybook/react": "^6.1.14",
    "babel-loader": "^8.1.0",
    "babel-preset-react-app": "^9.1.2",
    "draft-js": "^0.11.7",
    "draft-js-custom-styles": "^2.1.1",
    "draft-js-export-html": "^1.4.1",
    "draft-js-import-html": "^1.4.1",
    "hex-rgb": "^4.2.0",
    "node-sass": "^4.14.1",
    "postcss-import": "^12.0.1",
    "react": "^17.0.1",
    "react-click-outside": "^3.0.1",
    "react-dom": "^17.0.1",
    "rollup": "^2.29.0",
    "rollup-plugin-babel": "^4.4.0",
    "rollup-plugin-css-only": "^2.1.0",
    "rollup-plugin-peer-deps-external": "^2.2.3",
    "rollup-plugin-postcss": "^3.1.8",
    "rollup-plugin-svg": "^2.0.0",
    "rollup-plugin-typescript2": "^0.27.3",
    "rollup-plugin-url": "^3.0.1",
    "semantic-ui-react": "^1.3.1",
    "styled-components": "^5.2.0",
    "typescript": "^4.0.3"
  },
  "peerDependencies": {
    "@types/react": "^16.9.52",
    "react": ">=16.8.0",
    "react-dom": ">=16.8.0",
    "semantic-ui-css": "^2.4.1"
  },

Hi I think you should add a custom decorator to the createWithContent method.
There is an example here

Hi I think you should add a custom decorator to the createWithContent method.
There is an example here


Fine-tuning NLLB model in multi-gpu makes RuntimeError

I tried to fine-tune NLLB model on my custom dataset on multi-gpu environment, and it makes following error.
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1! (when checking argument for argument index in method wrapper_CUDA__index_select)
It was ok on single GPU. Is there anything I need to modify code for multi-gpu?
I attempted to run following code:
def train_lora(weight_path,save_path,lr):
    tokenizer = NllbTokenizerFast.from_pretrained(
        "facebook/nllb-200-distilled-1.3B", src_lang="kor_Hang", tgt_lang="eng_Latn"
    )
    model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-1.3B")
    peft_config = LoraConfig(
        target_modules=['q_proj','v_proj'], task_type=TaskType.SEQ_2_SEQ_LM, inference_mode=False, r=8, lora_alpha=32, lora_dropout=0.1
    )
    model = get_peft_model(model, peft_config)
    model.print_trainable_parameters()

    from datasets import Dataset
    import json
    with open('./kor-eng_news.json','r')as f:
        a = json.load(f)

    dataset = Dataset.from_dict(a)
    dataset = dataset.train_test_split(test_size=0.015, shuffle=True)

    def preprocess_function(examples):
        model_inputs = tokenizer(examples['korean'], text_target=examples['english'], max_length=200, truncation=True)
        return model_inputs

    data_collator = DataCollatorForSeq2Seq(tokenizer=tokenizer, model=model)
    tokenized_datasets = dataset.map(preprocess_function, batched=True)

    import numpy as np
    import evaluate
    metric = evaluate.load("sacrebleu")

    def postprocess_text(preds, labels):
        preds = [pred.strip() for pred in preds]
        labels = [[label.strip()] for label in labels]
        return preds, labels

    def compute_metrics(eval_preds):
        preds, labels = eval_preds
        if isinstance(preds, tuple):
            preds = preds[0]
        decoded_preds = tokenizer.batch_decode(preds, skip_special_tokens=True)

        labels = np.where(labels != -100, labels, tokenizer.pad_token_id)
        decoded_labels = tokenizer.batch_decode(labels, skip_special_tokens=True)

        decoded_preds, decoded_labels = postprocess_text(decoded_preds, decoded_labels)

        result = metric.compute(predictions=decoded_preds, references=decoded_labels)
        result = {"bleu": result["score"]}

        prediction_lens = [np.count_nonzero(pred != tokenizer.pad_token_id) for pred in preds]
        result["gen_len"] = np.mean(prediction_lens)
        result = {k: round(v, 4) for k, v in result.items()}
        return result

    training_args = Seq2SeqTrainingArguments(
        output_dir=weight_path,
        evaluation_strategy="steps",
        save_strategy='steps',
        logging_steps=5000,
        eval_steps=25000,
        save_steps=25000,
        learning_rate=lr,
        per_device_train_batch_size=6,
        per_device_eval_batch_size=18,
        weight_decay=0.01,
        num_train_epochs=2,
        predict_with_generate=True,
        load_best_model_at_end=True,
        save_total_limit=1,
        metric_for_best_model='eval_bleu',
    )

    trainer = Seq2SeqTrainer(
        model=model,
        args=training_args,
        train_dataset=tokenized_datasets["train"],
        eval_dataset=tokenized_datasets["test"],
        tokenizer=tokenizer,
        data_collator=data_collator,
        compute_metrics=compute_metrics,
    )

    print(trainer.evaluate())
    trainer.train()
    trainer.model.save_pretrained(save_path)

Hi @comchobo
Thanks for the issue!
I think you need to load your model with accelerate:
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-1.3B", device_map="auto")

And also make sure to use the main branch of transformers as it has a fix for Trainer + multi-gpu: https://github.com/huggingface/transformers/pull/22532

To use the main branch of transformers:
pip install git+https://github.com/huggingface/transformers.git

I followed the instructions but still getting error:
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm)

I ran this code with following command:
CUDA_VISIBLE_DEVICES=0,1,2 python lora_training.py

@comchobo can you share the full traceback of the error?

Traceback (most recent call last):
  File "/home/sorryhyun/finetune_nllb_with_transformer/lora_training.py", line 96, in <module>
    train_lora('lora_training_nllb_1p3B_lr=5e-4','lora_training_nllb_1p3B_lr=5e-4_saved',lr=5e-4)
  File "/home/sorryhyun/finetune_nllb_with_transformer/lora_training.py", line 92, in train_lora
    trainer.train()
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/transformers/trainer.py", line 1662, in train
    return inner_training_loop(
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/transformers/trainer.py", line 1929, in _inner_training_loop
    tr_loss_step = self.training_step(model, inputs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/transformers/trainer.py", line 2699, in training_step
    loss = self.compute_loss(model, inputs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/transformers/trainer.py", line 2731, in compute_loss
    outputs = model(**inputs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/peft/peft_model.py", line 667, in forward
    return self.base_model(
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = old_forward(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/transformers/models/m2m_100/modeling_m2m_100.py", line 1335, in forward
    outputs = self.model(
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/transformers/models/m2m_100/modeling_m2m_100.py", line 1208, in forward
    encoder_outputs = self.encoder(
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/transformers/models/m2m_100/modeling_m2m_100.py", line 837, in forward
    layer_outputs = encoder_layer(
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = old_forward(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/transformers/models/m2m_100/modeling_m2m_100.py", line 390, in forward
    hidden_states, attn_weights, _ = self.self_attn(
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/accelerate/hooks.py", line 165, in new_forward
    output = old_forward(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/transformers/models/m2m_100/modeling_m2m_100.py", line 249, in forward
    query_states = self.q_proj(hidden_states) * self.scaling
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/peft/tuners/lora.py", line 350, in forward
    result += self.lora_B(self.lora_A(self.lora_dropout(x))) * self.scaling
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/sorryhyun/anaconda3/envs/sorryhyun/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 114, in forward
    return F.linear(input, self.weight, self.bias)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:1 and cpu! (when checking argument for argument mat2 in method wrapper_CUDA_mm)

What is your peft version?

It is peft==0.2.0

You need to install peft from source, as you need to have this fix: https://github.com/huggingface/peft/pull/145
Please uninstall peft and re-install it with the following command:
pip install git+https://github.com/huggingface/peft

Thanks! It's now working @younesbelkada


Shortcut crashed the launcher

After the "Install Shortcut" message, then loading the shortcut that was installed, the launcher crashes.

This feature is not ready yet. I'll update this issue if the feature is ready.

Sorry, I didn't know. Also, yeah the title of this issue was not that specific and really dumb. I was sleepy, sorry! :)

I was looking around for as how to implement this feature, I don't know if this'll be helpful, but it goes over what you have to do to add support for shortcuts: https://stackoverflow.com/questions/60365764/how-to-support-shortcut-pinning-in-a-custom-launcher


operator project-quay (3.10.0-nightly.20230921)

Add 3.10.0-nightly.20230921 to community operators

/merge possible

/merge possible


req.headers producing error - Cannot read property 'headers' of undefined

I am using vue-i18n in my project. the issue is when i am loading the page. below codes are able to fetch cookie data but again it producing nuxt error.
I tried putting try..catch, (process.server) but no one worked. Because if this, now axios is not working.

code which i am using -
in plugin/i18n.js
import Vue from 'vue';
import VueI18n from 'vue-i18n';
Vue.use(VueI18n);

export default ({ app, store, req }) => {
	console.log('plugins')
	var cookies = req.headers.cookie
	var KeyNameLocale =  "locale="
	var decodedCookie = decodeURIComponent(cookies)
	console.log('cookie')
	console.log(decodedCookie)

  // Set i18n instance on app
  // This way we can use it in middleware and pages asyncData/fetch
  app.i18n = new VueI18n({
    locale: store.state.locale,
    fallbackLocale: 'en',
    messages: {
      'en': require('~/locales/en.json'),
      'fr': require('~/locales/fr.json')
    }
  });
  app.i18n.path = (link) => {
    if (app.i18n.locale === app.i18n.fallbackLocale) {
      return `/${link}`;
    }
    return `/${app.i18n.locale}/${link}`;
  }
}

in middleware/i18n.js
export default function ({ isHMR, app, store, route, params, error, redirect }) {
	store.commit('SET_LANG', 'fr')
}

This question is available on Nuxt.js community (#c6982)

@clarkdo  any suggestion

@sudhir600 Please create issue via template introduction and provide repo to reproduce the issue.

@clarkdo  sorry for the inconvenience, but i didn't get this line  "create issue via template introduction"
However, I have created a repo to reproduce the issue.
https://github.com/sudhir600/nuxt_i18n

Ok, I will take a look.
BTW, issue template:

IMPORTANT: Please use the following link to create a new issue:

https://nuxtjs.cmty.io/issues/new

If your issue was not created using the app above, it will be closed immediately.

Ok.
Thanks @clarkdo Will follow above link from next time.

Hi, @clarkdo
Its so strange that i am still getting same issue. even try in another pc but same issue. here is the screen recording-

@sudhir600
My previous comment was using mac and node 9.x, then I tried windows, node 9.11.0 and yarn, it also works for me.

About the browser error, you should add process.server to avoid using req which is not existed in client side.
  if (process.server) {
    var cookies = req.headers.cookie
    var KeyNameLocale =  "locale="
    var decodedCookie = decodeURIComponent(cookies)
    console.log('cookie')
    console.log(decodedCookie)
  }

thanks @clardo
(process.server) resolve this issue.
Prevesly i was not sure about how plugin and middleware excute.  by doing this i identity that both file run 1st on server and then client too. So when i18n excute on client side  req.headers goes undefined.
Thanks alot clarkdo
Guys, If any one facing the same issue, fixes is here (plugin/i18n, middleware/i18n and store/index).
https://github.com/sudhir600/nuxt_i18n

@sudhir600 It's nice that everything is working now.
Cloud you mark @clarkdo 's message as the solution please? (It helps clean up the site)
:slightly_smiling_face:


Added Design of Computer Programs to free-courses-en.md

Added the free Udacity course Design of Computer Programs by Peter Norvig.
What does this PR do?
Add resource(s)
For resources
Description
This is a course that teaches you how to model problems, and how to optimize performance by using some of the advanced features of Python.
Why is this valuable (or not)?
Teaches essential software engineering skills, helping learners design efficient Python programs.
How do we know it's really free?
Listed as a free course on Udacity.
For book lists, is it a book? For course lists, is it a course? etc.
It is a course.
Checklist:

[x] Read our contributing guidelines.
[x] Search for duplicates.
[x] Include author(s) and platform where appropriate.
[x] Put lists in alphabetical order, correct spacing.
[x] Add needed indications (PDF, access notes, under construction).
[x] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

Thanks, and welcome to free-programming-books!


powershell has stopped working on x86

powershell has stopped working on x86, it works on x64

What version of windows/Office are you using?

windows 7 office 2013, it always runs on x64 but on x86 it just ran the first time only and then started giving that error

I'll look into it.  Anyway you can share the actual error message with me?

This is not an issue with MacroShop, but between the MSF handler and the payload generated by Veil.  Occasionally, it appears the handler will lock up and not receive new callbacks.  This may be due to ExitOnSession not being set to False, a payload/handler architecture mismatch (x86/x64), the handler has expired, or MSF needs a restart.  This item will be closed.


Update Nutanix node driver to version 3.6.0 / rancher 2.9

Update Nutanix node driver to version 3.6.0 for rancher 2.9

Ticket #44984 - Test Results - ✅
Verified on Rancher v2.9-0dc6561b4a0cbcda67199cf86d45d28da10ac1f5-head:

Fresh install of Rancher v2.9-head
Navigate to Cluster Management > Drivers > Node Drivers, and observe nutanix driver
Verified - v3.6.0 is available
Active nutanix driver
Verified - driver successfully activates and is available for use

Screenshot:

Once enabled i also try to deploy cluster with v2.9-head and vm are correctly created


Use React Storybook to demonstrate components

Hi @tomchentw ,
We can use react-storybook to demonstrate some use cases for each component. I can work on this issue if you're interested.

Yes! Please feel free to open up a PR!

Just to let you know  6.0.0 is released on npm beta tag now. See the changelog here. We also have a new demo page. Feel free to try it:
https://tomchentw.github.io/react-google-maps/

Anyone interested?

This stuff is so cool!

styleguidist is alternative option for this

Yeah I like styleguidist.

Switched to react-styleguidist in v8.0.0
https://tomchentw.github.io/react-google-maps/


Adds debounce to the counters animation

This PR adds a debounce to the counters animation in order to reduce the browser load.

Can you have a look, @xavijam?

debouncing! :+1:

Thankings!


Issue 3494

Fixes Issue #3494
Description of Change
Fix the condition for the hints for spring-security so that it actually fires for file-based scans.
Have test cases been added to cover the new functionality?
no

Converted to draft as further issue comments hint that we need more fixes for other Spring libraries that also do  not get the vmware vendor added in.

Abandoning this attempt as I've identified a root-cause that is somewhere else


[PPP-5384]-XSS Findings for Pentaho-kettle

PPP-5384-XSS Findings for Pentaho-kettle

 Note:

Frogbot also supports Contextual Analysis, Secret Detection, IaC and SAST Vulnerabilities Scanning. This features are included as part of the JFrog Advanced Security package, which isn't enabled on your system.

🐸 JFrog Frogbot

:white_check_mark: Build finished in 26m 49s
Build command:
mvn clean verify -B -e -Daudit -Djs.no.sandbox -pl plugins/core-ui

:exclamation: No tests found!
:information_source:  This is an automatic message


Add support for profiling CLI scripts

Pretty standard stuff.  I decided to use gethostname() because using the posix command wouldn't work on Windows if I'm not mistaken.
Let me know your thoughts.

looks good to me. could you please rebase the comit?
did you test it with a real script?

Yeah I tested is with a CLI script and it worked well for me.

@mdevine82 thank you.


Add doc for TBPTT

What does this PR do?

Fixes #19985

Before submitting

[x] Was this discussed/agreed via a GitHub issue? (not for typos and docs)
[x] Did you read the contributor guideline, Pull Request section?
[x] Did you make sure your PR does only one thing, instead of bundling different changes together?
[x] Did you make sure to update the documentation with your changes? (if necessary)
[x] Did you write any new necessary tests? (not for typos and docs)
[x] Did you verify new and existing tests pass locally with your changes?
[x] Did you list all the breaking changes introduced by this pull request?
[x] Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist

[x] Is this pull request ready for review? (if not, please submit in draft mode)
[x] Check that all items from Before submitting are resolved
[x] Make sure the title is self-explanatory and the description concisely explains the PR
[x] Add labels and milestones (and optionally projects) to the PR so it can be classified

📚 Documentation preview 📚: https://pytorch-lightning--20422.org.readthedocs.build/en/20422/

This will need to be added to the main index but I can do it after this is merged

This will need to be added to the main index but I can do it after this is merged

thank you!

@lantiga can you explain the doc-make errors, these seem to be blocking the merge. I can't seem to figure out what's cause them to fail.

hey @chualanagit really sorry for the wait on this
we're super close, you got two warnings
First warning
/home/runner/work/pytorch-lightning/pytorch-lightning/docs/source-pytorch/common/tbptt.rst:1: WARNING: Title overline too short.
just change
##############
Truncated Backpropagation Through Time (TBPTT)
##############

to
##############################################
Truncated Backpropagation Through Time (TBPTT)
##############################################

Second warning
/home/runner/work/pytorch-lightning/pytorch-lightning/docs/source-pytorch/common/tbptt.rst: WARNING: document isn't included in any toctree
just add
.. displayitem::
    :header: Truncated Back-Propagation Through Time
    :description: Efficiently step through time when training recurrent models
    :button_link: ../common/tbtt.html
    :col_css: col-md-4
    :height: 180

to https://github.com/Lightning-AI/pytorch-lightning/blob/master/docs/source-pytorch/common/index.rst

@chualanagit if you give me write access to your fork I can make these changes and get them in

hey @chualanagit really sorry for the wait on this
we're super close, you got two warnings
First warning
/home/runner/work/pytorch-lightning/pytorch-lightning/docs/source-pytorch/common/tbptt.rst:1: WARNING: Title overline too short.
just change
##############
Truncated Backpropagation Through Time (TBPTT)
##############

to
##############################################
Truncated Backpropagation Through Time (TBPTT)
##############################################

Second warning
/home/runner/work/pytorch-lightning/pytorch-lightning/docs/source-pytorch/common/tbptt.rst: WARNING: document isn't included in any toctree
just add
.. displayitem::
    :header: Truncated Back-Propagation Through Time
    :description: Efficiently step through time when training recurrent models
    :button_link: ../common/tbtt.html
    :col_css: col-md-4
    :height: 180

to https://github.com/Lightning-AI/pytorch-lightning/blob/master/docs/source-pytorch/common/index.rst

I'll make the change now, one second!

@lantiga fixed and added you as collaborator as well


Remove MachineEvaluation and SplittingStrategy subtypes from swig

@karlnapf we can't use watch_method because this method has arguments

Good point. Maybe you are right
The whole thing might need refactoring .... sigh. Maybe for now then your
confidence might be best.
What about a new labels subclass just for Bayesian methods? Too much?
We can also postpone this as it seems some more work.
What’s best in your opinion?
On Thu, 14 Feb 2019 at 04:46, Wuwei Lin<EMAIL_ADDRESS>wrote:

@vinx13 commented on this pull request.
In src/shogun/labels/DenseLabels.h
https://github.com/shogun-toolbox/shogun/pull/4498#discussion_r256682045
:

@@ -275,6 +275,8 @@ namespace shogun
protected:
/** the label vector */
SGVector<float64_t> m_labels;

/** the confidence vector */

I see, so I will store variance to CLabels::m_current_values. One thing
I'm concerned about is that this may be confusing since higher scores
usually mean higher confidence. But the variance is different. So when
users call labels.get_value they will get value with totally different
meaning. What do u think?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/shogun-toolbox/shogun/pull/4498#discussion_r256682045,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAqqvy8nY5sP5SWMYbOiueDK-kSixoquks5vNNwZgaJpZM4accKO
.

--
Sent from my phone

@karlnapf I think it is okay to have Bayesian labels, but then we need to subclass every label type (binary, multiclass, regression) because we have both GP classification and regression

@karlnapf I think it is okay to have Bayesian labels, but then we need to subclass every label type (binary, multiclass, regression) because we have both GP classification and regression.
And actually, condifence has the opposite meaning to variance

true, not good. Mixin would be better, but that complicates things quite a bit as well ... and is out of scope
Ok then we just need to decide between using the existing field with the bad name or add another field that is useless for all other occasions... ?

CI is green. I would use the old mechanism to prevent adding things that would be refactored later.


Possible deadlock around pool.Close()

Hello!
I'm seeing some deadlock behavior when closing the pool. I don't immediately see where it could be occurring, but I thought I'd raise an issue.
Will fill in details as I discover them.

Hey @tonyghita, thanks for trying out v3 and submitting this. I also don't immediately see where this could be occurring, but if you could give a bit more detail about what the deadlock looks like (Close just hangs? go actually does the deadlock trace dump?) and how you're using Pool (by itself? in a cluster?) I could try and track this down further. Thanks!

Hey, sorry for the vague issue description.
The last thing I do on my application's shutdown is to call Close() on the Pool, which is connected to a single remote Redis instance.
The behavior I'm seeing is that the application does not exit, but waits indefinitely. Unfortunately we don't get the deadlock trace dump.
For added difficulty, this doesn't happen deterministically in regular usage (maybe 10% of the time).

Hmm that is really weird. The only thing I can think is that one of the pool connections is hanging on being closed? If you were able to get the trace that'd be amazingly helpful in figuring this out, otherwise I don't really know where to go. The next time if happens you can send the process a SIGABRT to have it dump the stack of every go-routine.

The only thing I can think is that one of the pool connections is hanging on being closed

This seems like it may be the case. I don't see any connection leaking so it feels like maybe just one or a handful of connection is hanging on close.
In the meantime, to workaround the issue, I've wrapped the pool's close method with a timeout.

I'm going to go ahead and close this issue. The Pool code has been significantly rewritten since it was opened, and apparently no one else has encountered this since. If something comes up we can absolutely reopen it.


Step support for multi selection per resource property

Currently ELB checks require ssl_certificate_id defined in the listener property. In some cases ( for e.g. WebSockets ) ELBs should work in TCP mode, where ssl_certificate_id becomes void.
Add support to that.

Instead of adding this capability to ELB, code must be flexible enough to have if clauses where a Scenario should continue to run if a resource has specific resource defined in it.
E.g.
Scenario: Enforcement of TLS Certificates on ELB resources
  Given I have AWS ELB defined
  And it must contain listener
  When it contains instance_protocol with https value
  Then it must contain ssl_certificate_id

Scenario: Enforcement of not using HTTP protocol on ELBs
  Given I have AWS ELB defined
  And it must contain listener
  Then it must contain instance_protocol
  And its value must match the "!(http)" regex

Where When it contains <property_type> with <property_value> value should not change step.context to avoid going deeper on the following steps.


metrics description does not propogate to leaderboard tooltip automatically

Describe the bug
when I update a description in a metrics definition and then go back to the dashboard, the tooltip  I see when hovering over the leaderboard (e.g. the one in the screenshot below) does not update until I refresh the page.

This might have been fixed at some point. I couldn't reproduce this. @bcolloran could you confirm if you are seeing it on main?

actually, at this point (main 02cea30), it's even worse than it was when I reported it -- I can't see custom tooltips on leaderboards at all, even after a manual refresh:
https://user-images.githubusercontent.com/2380975/208737269-89cb730b-a6bc-4ed2-8ba3-e3cfead8d616.mp4


[v1.x][FEATURE] Add MKLDNN Deconvolution 1D and 3D support

Description
Adds Deconvolution 1D and 3D support with MKLDNN  #19904
Checklist
Essentials

[x] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
[x] Changes are complete (i.e. I finished coding on this PR)
[x] All changes have test coverage
[x] Code is well-documented

Changes

[x] Adds Deconvolution 3D and 1D support with MKLDNN
[x] Adds 3D Deconvolution test
[x] Fixes 1D Deconvolution test

@sha Can you please review this?

Merged. Thank you @PawelGlomski-Intel


expect publishing which based tensorflow framework

Thank you for your suggestion. Assigning and building graphs on PyTorch follows a dynamic computation graphical approach. Users who are familiar with mathematical libraries in Python will find it easy, since one does not have to scratch their head to build the graphs. You can directly write the input and output functions the way you want, without worrying about dimensional tensors. With the CUDA support, this makes much easier and more flexible for researchers/engineers to develop high-performance deep face recognition models and algorithms quickly for practical use and deployment. Whereas in TensorFlow, one has to work on building the dimensions of the tensor (graph) as well as assigning the placeholders for the variables. Once this is completed, a session has to be run in order to work out all the computations. However, we will still consider it:)

@ZhaoJ9014
First, thank you for NUS-Panasonic's great job!
As to dynamic computation graphical approach of Tensorflow, just try  Eager Execution  and Tensorflow Fold :)
Another similar question:
Could you explain in detail why not use MxNet framework(ArcFace source code)?
Thanks.


Golang: Handle backoffs on a per-log basis

Right now the Golang client has nice backoff logic for 503's, respecting Retry-After. However, when submitting requests from many goroutines, this backoff logic won't be as effective. One goroutine might be in backoff mode, while a hundred others are still sending requests.
Proposal:
Maintain a map of sync.WaitGroup, indexed by either log URL. Each request checks this map before firing, and Wait()s on the relevant entry. Normally this completes right away; however, any request that gets a 503 calls wg.Add(1), then calls wg.Done() once it gets success or non-retryable error. That way all requests to the same log wait until the 503 condition clears.

Making the backoff cope better with multiple goroutines sounds like a good idea, but I'm not sure about using a sync.WaitGroup to do it -- won't that fall foul of the restriction that "calls with a positive delta that occur when the counter is zero must happen before a Wait."?
Have you got a sample implementation?  (And does it test OK with -race ?)
(Also, sorry for the delay in responding.)

Good point about the sync.WaitGroup semantics. We'd have to find an alternate approach. I don't have a sample implementation yet. Was waiting to hear whether this was something you'd want in the library. Good to know you do, so we can try to implement as we have time. Thanks1

Took a stab at this, would be interested in peoples thoughts on the implementation. This moves the backoff to a per-JSONClient basis instead of per-PostAndParseWithRetry (note I haven't updated the existing backoff test, this is just a rough implementation).
The one thing I'm not super sure about is that this basically ignores the Retry-After header if it is set on 503 responses which is probably fine but I'm not 100% sure.
https://github.com/google/certificate-transparency-go/compare/master...rolandshoemaker:per-log-backoff?expand=1

My opinion: If a log operator went to the trouble to set a Retry-After header, the library should definitely obey it. This also provides a convenient way for log operators to ask submitters (like us) to back off using config solely on their side, rather than asking us to change our configuration.
Also, this branch seems to switch from exponential to linear backoff. I think it would be better to just change the behavior to be per-client without changing the backoff algorithm, and if you want to also change the backoff algorithm, propose it in a separate change.


Add section descriptions for service declarations

We need to be clear about your answers to these questions.
Something like this was on the service page in the prototype, but this:

makes more sense
is more official

:+1:


Add matrix for full-sized tests on AWS

PR checklist

[ ] This comment contains a description of changes (with reason).
[ ] If you've fixed a bug or added code that should be tested, add tests!
[ ] If you've added a new tool - have you followed the pipeline conventions in the contribution docs
[ ] If necessary, also make a PR on the nf-core/rnaseq branch on the nf-core/test-datasets repository.
[ ] Make sure your code lints (nf-core lint .).
[ ] Ensure the test suite passes (nextflow run . -profile test,docker).
[ ] Usage Documentation in docs/usage.md is updated.
[ ] Output Documentation in docs/output.md is updated.
[ ] CHANGELOG.md is updated.
[ ] README.md is updated (including new tool citations and authors/contributors).

I just shamelessly copied what @ewels did trying to be as careful as possible with all of those quotes 🙈 How can it be manually triggered? Haven't done that before. Was there a button somewhere?

Yes, you can hit the Run workflow button and select dev branch once merged.

Awesome! Thanks 😎


116 update nginx app with variable for cert manager cluster issuer

Implemented cert manager and tls

@gcarcassi can you bump the chart version? That seems to be the only problem indicated by the pull request checks.

That's what I forgot...


Song Difficulty Counter doesn't shows in Installed UserScripts.

After installing the song difficulty counter I proceeded to check the information on about how to make it work, but problem is that it won't show on the "Installed UserScript" section that explains how to use it. I had to check the final part of the script itself and I still don't know how to make it work.
I have checked if this was the case on other user and turns out it was, but I'm not sure about that feedback.
About other scripts I have installed, all of them are from this repository so I thought they would be all compatible. My browser is Brave and I have turned off the ad-blocker and different protections.
This problem might be caused by:
-The script isn't loading properly Edit: [It works as said in the code]
-The part of the script that handles the guide it's not working.
-My partner and I might have a bad installation or another script that it's getting on the way. Edit: [The script is working on a Solo Room]
-Something was changed on the webpage and it no longer works. Edit: [Seems to be working]

The AMQ_addScriptData call just fails to launch for some other reason, only happens certain times you access the website.


Make changes pointed out in Review two

What does this PR do?
Make changes based on the suggestions made during the second review of the checkpoint.
Action Points

Remove space between the this. & split(/(?=)/g) on line 212 in the getMiddle() function.
Remove comment from isDigit().
Define the callMethod() function before calling it.
Use querySelector() instead of getElementByid().
Use addEventListener() instead of onClick().
Place e.preventDefault() at the top of the function.
Shorten calMethod() function by using a better implementation instead of switch case.

Nitpick
Add spaces after an anonymous function and its parenthesis. Also before if and its parenthesis.


Fix some animation issues

Resolves: #8613
The fact that we prefer options before defaults made the animation config resolution prefer the duration from options over transition defaults.
This changes the scope order, so that all the transtion scopes come before the fallback (animations, animation) scopes.
Also makes the getOptionScopes more flexible, by takin an 2 dimensional array of keys, so the caller has more control over the order.
In this case, for the hover animations:
Before:

dataset
options
overrides
transition defaults
dataset defaults
defaults
descriptors

After:

dataset
transition defaults
options
overrides
dataset defaults
defaults
descriptors

Filename
Size
Change

dist/chart.esm.js
66.6 kB
+99 B (0%)

dist/chart.js
84.3 kB
+92 B (0%)

dist/chart.min.js
60.1 kB
+52 B (0%)

dist/chunks/helpers.segment.js
18.8 kB
-3 B (0%)


setup\au_setup.ps1 cannot be loaded. The file is not digitally signed

.\au_setup.ps1 : File C:\Users\User\git\chocolatey-packages-template\setup\au_setup.ps1 cannot be loaded. The file
C:\Users\User\git\chocolatey-packages-template\setup\au_setup.ps1 is not digitally signed. You cannot run this script
on the current system. For more information about running scripts and setting execution policy, see
about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\au_setup.ps1
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

I get this error.

@ericoporto if you run Get-ExecutionPolicy on your machine, what does it return?

Closing as stale - The file is not signed, that is correct. It's something you would need to do if you are going to use AU as not much of it is signed IIRC.


docs: fix typo in qwikcity/data/overview

Fix typo
What is it?

[ ] Feature / enhancement
[ ] Bug
[x] Docs / tests

Description

Fix typo in QuickCityData Overview :

Each route has the ability to add HTTP request and response handers handlers

Use cases and why

Fix typo

Checklist:

[x] My code follows the developer guidelines of this project
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation
[x] Added new tests to cover the fix / functionality

thanks @ETN-Tech !


怎么写PHP项目的.drone.yml呢？

请问，.drone.yml有没有什么语法规则？

please use the https://gitter.im/drone/drone chat room for all questions, reserving the issue logs for verified bugs and feature requests


Roll engine 5c3c4336395d..8024e76548fb (1 commits)

https://github.com/flutter/engine/compare/5c3c4336395d...8024e76548fb
git log 5c3c4336395def2a3d4b13fdd9d9bd846281be33..8024e76548fb6c96157856a1a43cc32fc0d9c5c9 --no-merges --oneline
8024e7654 Roll src/third_party/skia b851469b8e96..afd2c10c989c (2 commits) (flutter/engine#9573)
The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md
If the roll is causing failures, please contact the current sheriff (chinmaygarde@google.com), and stop
the roller if necessary.

Trybots failed. These were the failed builds: https://cirrus-ci.com/task/5841563809218560

Commit queue failed; closing this roll.


Added flag of the Czech Republic

Hey @Baegus,
Thank you for sharing this. :smile: Please read the contribution guidelines and make appropriate changes. Thank you. :smile:

@Baegus You need to share a screenshot as well as update README.md with "Project Name", "Your name" with Github Handle linked and screenshot/gif.


Disabling Efficiency Mode can greatly improve Firefox performance on Windows 11

By default Efficiency Mode is throttling Firefox, anything that try to save battery works just by throttling applications, unless the application itself disables some of its features to do that, there's no magic behind it. To disable it:

Go to about:config
Type dom.ipc.processPriorityManager.backgroundUsesEcoQoS -> + to create -> set to false

A lot of users confirmed that Firefox runs much faster after disabling it
Source: https://old.reddit.com/r/firefox/comments/1efmvvk/if_youre_using_windows_11_and_firefox_is_laggy/

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

https://github.com/yokoffing/Betterfox/blob/29f081696200afc3af6a43f300a8000af18fa86e/Fastfox.js#L58-L66

I hope more users will test this and send feedback, so far I've seen only positive result from people who disable Efficiency Mode, I believe it's just another garbage technology made by Microsoft, so far only Edge benefit from this to some extends.

A lot of users confirmed that Firefox runs much faster after disabling it

There were further optimizations made soon after this post. I remember this Reddit post lol.

https://old.reddit.com/r/firefox/comments/1efmvvk/if_youre_using_windows_11_and_firefox_is_laggy/lfyglyv/

This comment is interesting. I haven't tried gaming and running a video on a duel monitor setup.
With normal use (general browsing on one monitor), I've tested disabling Efficiency Mode on both low-end and high-end Windows machines, and I can't tell a difference either way.

There were further optimizations made soon after this post. I remember this Reddit post lol.

This comment is interesting. I haven't tried gaming and running a video on a duel monitor setup.

I can't trust the quality of Microsoft post-BG, Windows did an update that makes Windows auto-update BIOS, which broke computer of a lot of users.
Like this, so many people are still experience slow down after their patch or it didn't completely fix this issue as there's some disscussion in Bugzilla of Firefox devs following in the closed bug.

I made an observation. I need to try this to confirm it on my setup, but what i am seeing is an increase RAM use by Firefox when this is turned off. Has anyone else seen this or could it be my setup / firefox version i am running (beta) 130b3.
I am going to turn this off and look at memory utilisation. However i would like to get your view on this matter as this could be isolated to me.
Thanx

Just to drop a message. I can confirm my findings. Turning the "dom.ipc.processPriorityManager.backgroundUsesEcoQoS" to false increase my firefox memory utilisation to 4x. I have not noticed any additional speed with our without on my Intel 12th gen NUC. Maybe this has major impact on lower end hardware.
Firefox currently open and have 89 open tabs. Memory is about 1.5 gig instead of the 6 -10 gig.
I would be keen to know if anyone else notice this difference in memory utilization.

@Feejus
Just some thoughts about the RAM usage:
1.5 GiB for 89 open tabs is basically "impossible" if all those tabs are actually loaded.
I use Simple Tab Groups, which always shows how many tabs of each group are actually in-memory and how many are just "sitting there" on disk in the cold session storage. You can also check which tabs are actually loaded in the about:processes page. That page also lets you discard tabs without closing them - which sometimes is useful when a lot of "trash" has accumulated in RAM from a tab (e.g. my Twitch tab frequently uses up 800~900 MiB after a while, but when I discard and reload it, the RAM usage goes down to about 350 MiB).
It would be interesting to know if the backgroundUsesEcoQoS property changes the way Firefox automatically discards tabs. Discarding a tab will just free up it's memory and CPU usage, since it's unloaded, but not closed. You might have noticed this behavior when switching to a tab that was still open after restarting firefox - the tab usually loads on-demand in that case.
I've never witnessed any tabs being discarded automatically on my end. I'm not on Windows 11 though. But from what you describe regarding your tests in terms of RAM usage, my assumption would be that backgroundUsesEcoQoS somehow allows for automatic discarding of tabs.

@philg-dev
Thank you for your insightful comment. I'd like to clarify that I never claimed the tabs were fully loaded; I only mentioned they were open. I appreciate you reminding me about the about:processes function, which I had forgotten.
Your point about the backgroundUsesEcoQoS property potentially affecting how Firefox automatically discards tabs is particularly interesting. This is exactly why I was eager to get different perspectives on the matter.
Moving forward, I plan to run my PC with Firefox open for several days to observe its memory usage. I'll adjust the settings and monitor how it behaves under different conditions.
Thank you

@Feejus yes - I know you didn't claim that, don't worry :-)
I just wanted to clarify the behavior as I know it. I'm very used to freeing up my RAM manually via either Simple Tab Groups "Discard Tab" / "Discard Group" function or directly via about:processes. That's why it was important for me to explain the details
Looking forward to your test results :+1:

I made an observation. I need to try this to confirm it on my setup, but what i am seeing is an increase RAM use by Firefox when this is turned off. Has anyone else seen this or could it be my setup / firefox version i am running (beta) 130b3.
I am going to turn this off and look at memory utilisation. However i would like to get your view on this matter as this could be isolated to me.
Thanx

Windows 10 doesn't have Efficiency Mode and doesn't have any issue with RAM so far.
The question is how much RAM do you have, if you have a lot Firefox will try to use a lot.
The best way to debug RAM is to use about:memory, Measure and Compare between false and true

My impressions are quite similar after running with Efficiency Mode mode OFF and ON for a few months or weeks each. RAM usage is definitely higher with it OFF, but overall performance and snappiness, couldn't honestly tell if there is much of a difference.

My observations
D
I have observed double amount of RAM usage. Also on the question of how much ram I got, machine is Intel NUC 12 with 64gb of ram. Running it in off mode I did not notice any difference between on or off.

Thanks for the good discussion, everyone.

It's night and day if you turn it off while using tabs that are 500mb+ and use any cpu/gpu.
If I keep it enabled and try to use multiple tabs with TradingView.com (stock charting website) there is a huge lag in switching tabs.


Proposal: use ubuntu-slim as the base image

Detailed summary can be found here: deis/workflow-e2e#105 (comment)
In short, if we use gcr.io/google_containers/ubuntu-slim:0.2, we could link our binaries with libc, which would reduce binary size and speed compilation in some cases.

@krancour shall I assign this to you, since you're working on the ubuntu-slim move? :)

Yes.  I just assigned it.

Fixed by #57. closing


Remove xfail from tests decorated by @gen_cluster

@gen_cluster has now been fixed upstream.

Perfect. Thanks @crusaderky


GH3: Added Cake.Recipe for build process

@jzeferino @luisgoncalves as promised, here is the first pass at adding Cake.Recipe to this project.
There is some documentation about Cake.Recipe here:
https://cake-contrib.github.io/Cake.Recipe/docs/
I am aware that it is lacking, and more information is needed.  What I can say is that I am now using Cake.Recipe on almost 50 repos, and it has been working exactly as required.
When running locally, you can do a normal build using:
.\build.ps1
If you want to check out the Wyam generated documentation, then you can run:
.\build.ps1 -target preview
and then you can open this:
http://localhost:5080/Cake.ResxConverter/docs
To see the generated docs.
Please let me know if you have any questions about the changes that I have made.

Didn't have the time to analise all the commits, but the build.sh needs to be changed as the .psi was. Can you do that change and add update the PR?
Two more questions:

Why do you removed the usage sample from readme?
Why do you remove the appveyor build status badge in readme?

@jzeferino apologies for not replying sooner, missed the notification...

@jzeferino said...
I didn't have the time to analise all the commits, but the build.sh needs to be changed as the .ps1 was.

At the minute, Cake.Recipe only runs on a Windows environment.  That is something that will change going forward, but at the minute it simply won't work.  As a result, the build.sh wasn't updated.  Is that going to be a problem?  Are you actually building the addin on a non-Windows system?

@jzeferino said...
Why do you removed the usage sample from readme?

Cake.Recipe includes the creation of a documentation site, using Wyam.  I moved the usage example into that documentation.  The result should be something similar to this:
https://cake-contrib.github.io/Cake.Http/docs/usage/examples

@jzeferino said...
Why do you remove the appveyor build status badge in readme?

I didn't 😄 I moved it.  You can see it here:
https://github.com/cake-contrib/Cake.ResxConverter/pull/4/files#diff-04c6e90faac2675aa89e2176d2eec7d8R21
Most addin's in the Cake Contrib Organisation have a standard readme file, so I simply used the same template, slotting in the values specific to this project.

Thanks for the answers.

At the minute, Cake.Recipe only runs on a Windows environment. That is something that will change going forward, but at the minute it simply won't work. As a result, the build.sh wasn't updated. Is that going to be a problem? Are you actually building the addin on a non-Windows system?

i'm running on OSX. Can I still run the old .sh?

@gep13 thanks for the answers.

At the minute, Cake.Recipe only runs on a Windows environment. That is something that will change going forward, but at the minute it simply won't work. As a result, the build.sh wasn't updated. Is that going to be a problem? Are you actually building the addin on a non-Windows system?

i'm running on OSX. Can I still run the old .sh?

@jzeferino said...
i'm running on OSX. Can I still run the old .sh?

Hmm, that is unlikely, at the minute anyway.  We could, in theory re-instate the build.cake file that you did have, which would make it all work again, but that would mean that there would be a difference between the script that is ran on AppVeyor, compared to what you run locally.
I will have to think about this one.

@jzeferino thinking about this some more... I don't have a Mac to test on, but if I update the build.sh, would you be willing to work with me to get Cake.Recipe running on your Mac?

I only had time to look through this today. It looks good. I have a few comments/questions though @gep13:

Why the /nuspec/nuget indirection (subfolder)?
I see that flags such as ShouldPostToTwitter are true. Will this be done when running on AppVeyor? Does it use pre-configured environment variables to get credentials and stuff?
Similarly, will the Wyam docs be published to cake-contrib.github.io/Cake.ResxConverter or do we need to configure anything else?
The calculated semantic version was 1.0.1-Cake-Recipe0001 but at a first glance I was expecting 1.0.2-something. We have the 1.0.2 tag on master.. is this the cause? Did we do something wrong on the Git flow?

Regarding the changes to build.sh, I guess it can also be tested in an Ubuntu VM or something. I can do that.

@luisgoncalves said...
Why the /nuspec/nuget indirection (subfolder)?

This is a convention.  Cake.Recipe understands how to package both nuget and chocolatey packages.  NuGet nuspec files live in nuspec/nuget and Chocolatey nuspec files live in nuspec/chocolatey.

@luisgoncalves said...
I see that flags such as ShouldPostToTwitter are true. Will this be done when running on AppVeyor? Does it use pre-configured environment variables to get credentials and stuff?

Yes, the publishing steps are only attempted when the build is happening on AppVeyor, and when it is a tagged build.  All the required environment variables have been configured and setup within the AppVeyor project settings.

@luisgoncalves said...
Similarly, will the Wyam docs be published to cake-contrib.github.io/Cake.ResxConverter or do we need to configure anything else?

That is correct, this is where the documentation will reside.  The only thing that needs to happen outside of this PR would be to create a gh-pages branch.  Once we are all happy, I can take care of this step.

@luisgoncalves said...
The calculated semantic version was 1.0.1-Cake-Recipe0001 but at a first glance I was expecting 1.0.2-something. We have the 1.0.2 tag on master.. is this the cause? Did we do something wrong on the Git flow?

Where did you see that version number?  The asserted version number that I am seeing is this one: 1.1.0-PullRequest.4+15.build.22 from here: https://ci.appveyor.com/project/cakecontrib/cake-resxconverter/build/1.1.0-PullRequest.4+15.build.22 which is in inline with what I would expect.  The latest tag that you have on the repository is 1.0.2.  The PR that I created was into the develop branch, and the next release number from develop is 1.1.0.  The next hotfix release (which would be a branch from the master branch, would be 1.0.3.

@luisgoncalves said...
Regarding the changes to build.sh, I guess it can also be tested in an Ubuntu VM or something. I can do that.

If you could, that would be great.  I expect things to fail here, but we can address them as they come up.
Please let me know if you have any further questions.

@gep13 said...
@jzeferino thinking about this some more... I don't have a Mac to test on, but if I update the build.sh, would you be willing to work with me to get Cake.Recipe running on your Mac?

@gep13 yes, we can do that with no problem.

@jzeferino perfect! I will try to update this PR later today to make the necessary changes to the build.sh file, and you can take it for a spin on your Mac.  Like I say, I expect several things to break 😄 as it has never been tested there, but it would be good to figure out what the problems are and get them fixed.

@gep13 Thanks for all the answers. Regarding the version number, I saw that when I checked out your fork and run the build locally.

@gep13 ping 👍

@gep13 how are we on this?

@jzeferino honestly, I haven't forgotten about this.  Just been tied up with a few other things 😢


Feature/peft compatible models

Edits needed to support a combo of composer with hf/peft.
Pipeline is:

load a hf model e.g., mpt-7b
use hf/peft to add lora modules or adapter modules.
convert that peft model (that is loaded into python) into a composer model (use my new function for this)
train in composer (required adding the inputs_embeds args to model.forward().

refactored the hf convertor to a single function as suggested by @dakinggg. tested it on my end and ran pre-commit successfully. I want to move forward and push the code updates to the hub.

Tests are failing with
___________________ ERROR collecting tests/test_training.py ____________________
ImportError while importing test module '/llm-foundry/tests/test_training.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
llmfoundry/__init__.py:8: in <module>
    from llmfoundry.data import (ConcatTokensDataset,
llmfoundry/data/__init__.py:5: in <module>
    from llmfoundry.data.denoising import (MixtureOfDenoisersCollator,
llmfoundry/data/denoising.py:20: in <module>
    from llmfoundry.models import utils
llmfoundry/models/__init__.py:4: in <module>
    from llmfoundry.models.hf import (ComposerHFCausalLM, ComposerHFPrefixLM,
llmfoundry/models/hf/__init__.py:4: in <module>
    from llmfoundry.models.hf.hf_causal_lm import (ComposerHFCausalLM,
llmfoundry/models/hf/hf_causal_lm.py:10: in <module>
    import peft
E   ModuleNotFoundError: No module named 'peft'

Hello @danbider , could you share your yamls for MPT peft/lora training? Thanks.

@stoperro according to https://github.com/mosaicml/llm-foundry/pull/416 just use the ordinary peft code (huggingface has ready to go PEFT notebooks) or with llm-foundry add

Hey @chris-aeviator, I noticed that in the repository, LoRA currently only supports MPT models. Can we perform LoRA fine-tuning on other models such as LLAMA?

@palash04 this is getting fixed in https://github.com/mosaicml/llm-foundry/pull/435


WIP: KFServer & XGBoost Server

TL;DR
Very WIP. Please comment ideas if you think the high level idea is flawed. Please let me know if you have any ideas for structuring the packages re: dependencies.
Main Idea

Flexible Library of Python files for use within KFServing or extension by Users
XGBoost, SKLearn, Pytorch, and other OOTB Python servers should implement KFServer
KFServer should implement utilities for retrieving pickle/saved_model files from all cloud providers
KFServer should make it easy to implement custom Predict functions extended by users
Initial Implementation will use Tensorflow Serving's API and support HTTP only.

Remaining Work

I want to write a doc discussing the high level strategy here regarding protocols, will probably co-author with Clive
Get XGBoost working w/ GCS
Clean up code comments, file structure, lots of other things

This change is

/assign @cliveseldon
/assign @yuzisun

/assign rakelkar

hmm it appears I am not a kubeflow member...?

@ellis-bigelow is this working? Good to get an initial working version merged, get the developer guide on, with some roadmap items indicated.

I think python version is quite a big issue. Ideally I would prefer we just support python >3.4 and have all the code use the latest features such as type annotations for best practice and clean code. I realise this means we could not serve python 2 sklearn python pickles unless someone knows a way to do this? Python 2 will not be maintained in 7 months time so I'm not sure handling old data science models in python 2 pickles just for sklearn is worth it - we should push people to upgrade in a similar way to saying we only support KNative if you want to use kfserving.
I realise this is maybe a contentious issue so lets discuss pros/cons.

@ellis-bigelow is this working? Good to get an initial working version merged, get the developer guide on, with some roadmap items indicated.

I can run
python xgbserver and then curl with the sample and it works. More effort needed to Dockerize it. I'll probably do it this weekend.

Hey All. I think this is reasonably ready as a starting place.

/lgtm
/approve

/approve


added TypeConverters utility class

This class can be used to find appropriate type converters for parameters or fields.
Update 2017-07-08:
Also implemented classes for injecting values into fixture field and invoking methods of fixtures.

yeah, Java doesn't like readable class names in tests. I'm not sure if we should kill the warning or use normal names..

I analysed the warning and I was wrong, it's not that java doesn't like readable class names. I defined an interface for all number converter tests with upper and lower bounds to the number in question. Since the tests inside that interface are default methods, Kotlin generates internal Klasses named 1 and 2 (the interface has two methods) - and these are the classes Java has a problem with. I'll change the implementation from an interface to a second level of abstract contract class for the affected converter tests.

Based on this I implemented the execution of Decision Tables in #62 - can someone review (and ideally merge) this till end of the week?


Feature/openbrush example

WIP. thought out some logic, started implementing the functions, also created the documentation where i explain stuff

Most of the project structure is done and also described in the docs, though it will need to be refactored after @xgreenx 's changes :smiley: Some methods need to be implemented in the lending contract, they are already defined along with the steps which should be programmed so it would work properly. Documentation is done for almost everything that is done (structure, individual contracts, etc.). And also it will need to be tested with integration tests, and then maybe some bugs will come up :smiley:  so they need to be fixed as well. Raise my child well.

Ok, so everything should be implemented, along with docs, I have described three core functions in docs, the rest would be the same so it is not necessary IMO. So we just need integration tests and then refactor :smiley: And review :smiley:


Link Libraries

Perhaps we can link contracts by their addresses outside of the current working directory and enable ourselves to search for them by their contract address. Simply by replacing the code with the address and searching for the '0x' we then switch the context to look for addresses in the chain.

Can you explain a bit more, please?

this was written some time ago, but what I think I meant to say was that we should enable importing from addresses on the chain and be able to generate bytecode inside the browser compiler by inputting what addresses are utilized...that or some complex etherscrape mechanism that we probably don't have the time to maintain :P

I'm not 100% understanding what you're communicating @VoR0220, but I wonder if this is a place where https://github.com/ConsenSys/live-libs might be helpful?

Pretty certain this request predates livelibs...i think ill close due to lack of memory of what it was i wanted.

Looks like this issue was created 4 days ago, right?

@redsquirrel this is the original issue: https://github.com/chriseth/browser-solidity/issues/166


Improve type narrowing on switch(true) statements

Bug Report
🔎 Search Terms

switch narrowing
switch(true)

🔗 Related issues

#37178
#8934

Maybe these ones too

#46143
#43873

🕗 Version & Regression Information

This is the behavior in every version I tried, and I reviewed the FAQ for entries about type guards

⏯ Playground Link
Playground link with relevant code
💻 Code

const char = "(" as string;

// This works fine, char inside the if statements get's property narrowed to type "("
if (char === '(') {
  char;
}

// This doesn't work, char inside the case statement is of type string
switch (true) {
  case char === '(':
    char;
}

🙁 Actual behavior
Char inside the case statement in a switch(true) has a type string
🙂 Expected behavior
It should have type "("

Duplicate of #37178.


Realsense in browsers?

Hi,
Is it possible to get Realsense cameras (including the R400 series) streaming in browsers with accessible depth data etc? I was looking at the node.js wrapper, assuming that was for browser compatibility, but as far as I can tell that's just for server-side, or at least capturing on server and streaming data to a client - is that correct?
I've also found a W3C repository for developing depth in-browser functionality, but it looks like that's been abandoned now.
Is anyone aware of a way to get this working currently, or if a solution is actively being worked on anywhere?
Thanks!

Hi @jb455
Currently we don't have a solution for in-browser as far as I know (@tingshao - are you aware of any solution?)
Running node.js server is probably the easiest way to integrate with a web App.

Hi @dorodnic  @jb455
Chrome has partly supported the w3c media capture depth extension spec and realsense was among the first supported devices.  and you could try a demo using the realsense camera, I tried it using RS435, it worked.

[Realsense Customer Engineering Team Comment]
@jb455
does suggestion from tingshao work for you?

Yes thanks, I'll keep an eye on that repo to see if any further development is done.


Is it possible for players to get an e-mail when they have messages.

One of my players asked if it is possible that he could get e-mails when for example his Construction fails. He does see the Messages in-game, but he would like to receive an e-mail about this.
A way to send out an hourly e-mail containing the aggregated messages might be a nice idea.
Any comments about this idea are welcome.

How can a construction fail after you start it?

I am talking about the fact that you can queue up buildings. But the code will only check if you have the resources for the first one.
After that all sequential buildings can fail because either you do not or no longer have the required resources.

This project has already ended and not being developed anymore. Please check 2moons.cc official forums. You can hire some developers for additional features.

Too bad. Seems I will have to do it myself then. Since I can hire some developers should I also charge for my translations then? How generous.......

Sorry. :/

Uhm, i'm still there. The main developer.

Don't worry, Jan. Just because you are still working as hard as you are I will still submit the translations.

So, you want to talk about idea to implement this feature or not?

If you wanna do it Jan, we can help I guess.
At least I can...
One question:
How am i supposed to work with an installed local copy of the game?
Because installation deletes the FIRST_INSTALL file in includes directory. Should I simply git checkout includes/FIRST_INSTALL?

I am willing to assist as well as I can as well. But I will first have to read through the code a little. I already have SQL query which would return most of the info required for this feature.

We should probably update our PhpMailer library too.

On 1 Nov 2015, at 20:01, korhaldragonir<EMAIL_ADDRESS>wrote:
I am willing to assist as well as I can as well. But I will first have to read through the code a little. I already have SQL query which would return most of the info required for this feature.
—
Reply to this email directly or view it on GitHub.

So I have two solutions:

crontab:
run a crontab which runs all five minute to look for new messages and send mails.

directly:
add a function directly to SendMessage function to send a mail. But aggregation where not possible here.

Both are fine solutions. I prefer the crontab one since that one does not require any interaction from the user side. And when having a lot of users you will have more control over the mail-flow.
How do we plan keeping track of which messages a user has been notified about? Or are we going to send out an e-mail for as long as they are unread?
E.g: A user gets the message he has unread messages, but is unable to login to check them today. Will he get another reminder the next day or not? And would we want that or not?

It would be also cool if we could add a functionality to email which is responsible from logging in the user that received the email and clicked the link to check his buildings.

@OzanKurt you mean a link like;
Some of your buildings were unable to construct. Click here to go to the queue
In which the Click here text is a link to the buildings page? That would be nice.

As promised this is the SQL query I built to get most of the information in one go:
SELECT
  `uni1_users`.`username`,
  `uni1_users`.`email`,
  COUNT(`uni1_messages`.`message_subject`) AS `total`
FROM
  `uni1_messages`
LEFT JOIN
  `uni1_users`
ON
  `uni1_messages`.`message_owner` = `uni1_users`.`id`
WHERE
  `uni1_messages`.`message_subject` = 'Construction Failed!'
GROUP BY
  `uni1_messages`.`message_owner`;

Not sure if this is useful or not.

Hello
This is quit simple
Way N1) You add a sendmail function in the planetresupdate file where it send you the message if the queu failed due to a lack of resource.
$to = $UserData['email'];
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From<EMAIL_ADDRESS>. "\r\n";
$headers .= 'Reply-To<EMAIL_ADDRESS>. "\r\n";
mail($to, $Subject, $Message, $headers);
Way N2)
If you want to do it with crontab, then you have to create a crontab file, and if you want to check if mail is already send, just add a row in the uni1_message called isMailSend (0,1)
And you select where the value is 0 and once mail is send you update it to 1.
Quit easy.

Speaking of..what happened to 2moons forum??

Hi,
I dont know. I'm not the maintainer of 2moons.cc.
penguin1969<EMAIL_ADDRESS>schrieb am Mo., 15. Feb. 2016, 06:11:

Speaking of..what happened to 2moons forum??
—
Reply to this email directly or view it on GitHub
https://github.com/jkroepke/2Moons/issues/81#issuecomment-184067457.

Well, if you talk to whomever is, I would be glad to help out by hosting it if that is the issue.

has somebody a working crontab file for sending in game messages to email?

xD what the hell of function is that, first of all your cronjob will take age to get finished if you have a good amount of players. if alot of message are send
Just add this code in send message function
$Message = 'Mesage from game';
$to = $UserData['email'];
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From<EMAIL_ADDRESS>. "\r\n";
$headers .= 'Reply-To<EMAIL_ADDRESS>. "\r\n";
mail($to, $Subject, $Message, $headers);

You should not use php Mail function. Use the internal 2moons Mail function the prevent Spam flags. Sending mails should not taken more then 80ms...
Hilarious001 <notifications<EMAIL_ADDRESS>schrieb am Fr., 27. Mai 2016, 13:07:
xD what the hell of function is that, first of all your cronjob will take age to get finished if you have a good amount of players. if alot of message are send
Just add this code in send message function
$Message = 'Mesage from game';
$to = $UserData['email'];
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: no-reply<EMAIL_ADDRESS>. "\r\n";
$headers .= 'Reply-To: no-reply<EMAIL_ADDRESS>. "\r\n";
mail($to, $Subject, $Message, $headers);
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/jkroepke/2Moons/issues/81#issuecomment-222120367, or mute the threadhttps://github.com/notifications/unsubscribe/ABfQCy5yDNgX77VlaPxgakQEcfWxziCOks5qFtBLgaJpZM4GYTFF.

Ok i put the Text in the PlayerUtil.class.php after Line 656 in {}
I got an error that the Variable $UserDate is undef.
NOTICE: "Undefined variable: UserData"
Error LOG:
[27-May-2016 14:12:21] NOTICE: "Undefined variable: UserData"
File: /volume1/web/game/2moons/includes/classes/PlayerUtil.class.php | Line: 661
URL: http://db-cloud.de/game/2moons/game.php?page=overview | Version: 1.8.git
Stack trace:
#0 /includes/classes/PlayerUtil.class.php(661): errorHandler(8, 'Undefined varia...', '/volume1/web/ga...', 661, Array)
#1 /includes/classes/missions/MissionCaseSpy.class.php(161): PlayerUtil::sendMessage('1', 0, 'Spionageabteilu...', 0, 'Spionagebericht', '<div class="spy...', '1464351140', NULL, 1, '1')
#2 /includes/classes/class.FlyingFleetHandler.php(80): MissionCaseSpy->TargetEvent()
#3 /includes/FleetHandler.php(31): FlyingFleetHandler->run()
#4 /includes/common.php(137): require('/volume1/web/ga...')
#5 /game.php(24): require('/volume1/web/ga...')
#6 {main}

// Start - Email Versand
    {

    $sql = "SELECT email FROM uni1_users WHERE id = :userId;";

    $Message = 'Mesage from db space game';
     $to = $sql;
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: xxx<EMAIL_ADDRESS>. "\r\n";
    $headers .= 'Reply-To: xxx<EMAIL_ADDRESS>. "\r\n";
    Mail::send($to, $subject, $Message, $headers);
    }

// Ende - Emailversand
NOTICE: "Undefined variable: userID"

the code works but you have to adapt it for your game and you didnt define :userId
jan said above its better to use 2moons internal function
mail::MultiSend or something like that

no i get the id but the Variable is filled wrong in my case:
require 'includes/classes/Mail.class.php';
    $sql = "SELECT email FROM uni1_users WHERE id = $userId";

    $Message = 'Message from db space game';
     $to = $sql;
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
    $headers .= 'From: space<EMAIL_ADDRESS>. "\r\n";
    $headers .= 'Reply-To: space<EMAIL_ADDRESS>. "\r\n";
    mail::send($to, $subject, $Message, $headers);

[27-May-2016 21:19:36] USER ERROR: "Invalid address: SELECT email FROM uni1_users WHERE id = 5"

Solution:
Add after Line 156 in UserUtility.class.php:
// Start - Email Versand
$db = Database::get();
    $sql = "SELECT * FROM  %%USERS%% WHERE id = :id;";

    $to = $db->selectSingle($sql, array(
    ':id' => $userId
    ));

	$Message = $text;
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
    $headers .= 'From<EMAIL_ADDRESS>. "\r\n";
    $headers .= 'Reply-To<EMAIL_ADDRESS>. "\r\n";
	if($to['spyMessagesMode'] == 1)
	{
	mail($to['email'], $subject, $Message, $headers);
	}

// Ende - Emailversand
This little snip does send Emails to the User if compact Spy Messages in the Settings is activ.
If you don´t like to have a setting then you can use this:
// Start - Email Versand
$db = Database::get();
    $sql = "SELECT * FROM  %%USERS%% WHERE id = :id;";

    $to = $db->selectSingle($sql, array(
    ':id' => $userId
    ));

	$Message = $text;
    $headers = 'MIME-Version: 1.0' . "\r\n";
    $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
    $headers .= 'From<EMAIL_ADDRESS>. "\r\n";
    $headers .= 'Reply-To<EMAIL_ADDRESS>. "\r\n";
    mail($to['email'], $subject, $Message, $headers);

// Ende - Emailversand

I will not implement this feature, because it require sql changes. Thats what I dont want anymore.
Anyway, the solutions above maybe works. Improved code:
$sql = "SELECT username, email FROM  %%USERS%% WHERE id = :id;";

$to = $db->selectSingle($sql, array(
    ':id' => $userId
));

require 'includes/classes/Mail.class.php';
Mail::send($to['email'], $to['username'], $subject, $text);

Never use mail(), because it ignore all mail settings that can be configured in the admin panel.
Also SELECT * FORM is bad, too.
The next step would be an Template like
Hello!

here is a new message for you:

{MESSAGE}

Cheers,
Your Game

saved in languages/<code>/templates/pn.txt
Then you can do things like
$text = str_replace('{MESSAGE}', $text, $LNG->getTemplate('pn');

The mails will be look more awesome like in the solution before.

Changed to:
$db = Database::get();             $sql = "SELECT username, email FROM  %%USERS%% WHERE id = :id;"; 		$to = $db->selectSingle($sql, array( 		 		':id' => $userId 				));         $subject2 = 'IGM from: ' . $senderName . ' - ' . $subject; 		$Message = $text;         $headers = 'MIME-Version: 1.0' . "\r\n";         $headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";         $headers .= 'From<EMAIL_ADDRESS>. "\r\n";         $headers .= 'Reply-To<EMAIL_ADDRESS>. "\r\n"; 		mail($to['email'], $subject2, $Message, $headers);
got an error:
Fatal error: Cannot redeclare class Mail in /2moons/includes/classes/Mail.class.php on line 21

Use require_once
bornhaeusser <notifications<EMAIL_ADDRESS>schrieb am Do., 9. Juni 2016, 19:51:
Changed to:
$db = Database::get();
$sql = "SELECT username, email FROM %%USERS%% WHERE id = :id;";
$to = $db->selectSingle($sql, array(
':id' => $userId
));
$subject2 = 'IGM from: ' . $senderName . ' - ' . $subject;
$Message = $text;
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: space<EMAIL_ADDRESS>. "\r\n";
$headers .= 'Reply-To: space<EMAIL_ADDRESS>. "\r\n";
mail($to['email'], $subject2, $Message, $headers);
got an error:
Fatal error: Cannot redeclare class Mail in /2moons/includes/classes/Mail.class.php on line 21
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHubhttps://github.com/jkroepke/2Moons/issues/81#issuecomment-224973994, or mute the threadhttps://github.com/notifications/unsubscribe/ABfQC-uJmZjigfkyRqcw5NxcpMw3erjaks5qKFKEgaJpZM4GYTFF.

That works - but i receive a Mail wich look s terrible:
  Spionagebericht von Hauptplanet [1:3:7] am 09. Jun 2016, 21:07:49   Rohstoffe  Metall 1.315 Kristall 665   Energie 22   Schiffe   Verteidigungsanlagen   Gebäude  Solarkraftwerk 1   Forschungen   Angreifen Die Wahrscheinlichkeit der Zerstörung der Spionagesonde beträgt: 0 % 		Simulieren


Generic geometric types

What problem does this solve or what need does it fill?
We used to have generic Size and Rect types, but they were specialized (for good reasons IMO).
But it's left some ergonomic friction, especially with measures which take separate width and height Option<f32> and AvailableSpace values which be much cleaner with a generic size type that has map and zip methods like Taffy's Size type .
Also, it would be nice to have some sort of GenericSize<Physical> and GenericSize<Logical> for dealing with window resolutions and scalings.
What solution would you like?
Size could be renamed to UiSize and then name the new generic type Size. UiSize is a bit ugly though.
Otherwise, none of the alternative names I came up with like Dimensions, Extent, Measurements, etc seem super intuitive.
Maybe just Size2 would be okay?

I think we could probably get rid of the existing Size type entirely, and just flatten the properties using into directly into Style. So instead of:

size, min_size, max_size, and gap properties

We'd have:

width, height, min_width, min_height, max_width, max_height, row_gap, and column_gap properties

IMO that would be an ergonomic improvement from an end-user perspective.


Error spotify play while spotify isn't running

Trying to run spotify play while spotify app is not running while throw error on the screen
`Unhandled rejection Error: 57:63: execution error: Can’t make «class pAlb» of «class pTrk» of application "Spotify" into type string. (-1700)
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/spotify-cli-mac/node_modules/node-osascript/lib/index.js:39:15)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:920:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:230:5)`

I believe we should not spend time on this issue, and instead work towards 2.0 goals. Closing.


FlutterDriver tests needed

Yeah I know FlutterDriver feels a lot like Selenium-1 (RC) and not much like Selenium-2+ (WebDriver) but it is the only way for now - If we're teaching people we should teach testing best practices too.

I will probably add another post about adding tests to the app. I'm not doing it at the moment because I want the posts to be as small as possible since they are already extremely long. :)

Good plan.


[Bug fix] Feed is not updated when changing filters

The proper fix for this would use @Singleton from dagger, but since we're only adding scopes later (see #573 ) I'm keeping this PR small, just to fix the bug.

My feed (build from a couple days ago) does update when I toggle them (though not as expected).

My feed (build from a couple days ago) does update when I toggle them (though not as expected).

With the master code it wasn't for me. You had to close the app and open the app again to see the feed from the right sources.

What was the bug? This fix makes it look like the filter adapter is recreated (and that it had state that wasn't restored, hence the singleton) whenever a filter is toggled. Is that the case?

What was the bug? This fix makes it look like the filter adapter is recreated (and that it had state that wasn't restored, hence the singleton) whenever a filter is toggled. Was that the case?

Behaviour: when tapping on a filter, the feed doesn't update accordingly. For example, enabling DesignerNews, doesn't lead to DesignerNews items appearing
Root cause: HomeActivity and DataManager are using different instances of the FilterAdapter, therefore, only HomeActivity is notified when something changed. The fix uses only once instance of this.
A proper-proper fix, would be removing the FilterAdapter completely from the DataManager (why would a DataManager know about a RecyclerView.Adapter????) but, until we get there, I want to make sure that at least we don't have this bug.

ahh got it, thank you 🙌
On Wed, 2 Jan 2019, 11:12 Florina Muntenescu<EMAIL_ADDRESS>wrote:

What was the bug? This fix makes it look like the filter adapter is
recreated (and that it had state that wasn't restored, hence the singleton)
whenever a filter is toggled. Was that the case?
Behaviour: when tapping on a filter, the feed doesn't update accordingly.
For example, enabling DesignerNews, doesn't lead to DesignerNews items
appearing
Root cause: HomeActivity and DataManager are using different instances of
the FilterAdapter, therefore, only HomeActivity is notified when
something changed. The fix uses only once instance of this.
A proper-proper fix, would be removing the FilterAdapter completely from
the DataManager (why would a DataManager know about a RecyclerView.Adapter????)
but, until we get there, I want to make sure that at least we don't have
this bug.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/nickbutcher/plaid/pull/585#issuecomment-450838329,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACjfGz-MqHadma-wJpaJBGxuoc1xGHESks5u_JQwgaJpZM4ZmeE8
.


endless transforming modules when running vite build

Describe the bug
I have created simple web app with react, inversify-esm (fork of inversify but with native ESM support), and comlink. It work when running vite. But when execute command vite build, it has endless transforming module.
Reproduction
this link
System Info
System:
    OS: Linux 5.11 Ubuntu 20.04.3 LTS (Focal Fossa)
    CPU: (4) x64 Intel(R) Core(TM) i3-2310M CPU @ 2.10GHz
    Memory: 1.30 GB / 7.68 GB
    Container: Yes
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.13.0 - ~/.nvm/versions/node/v16.13.0/bin/node
    Yarn: 3.1.0 - ~/.yarn/bin/yarn
    npm: 8.1.2 - ~/.nvm/versions/node/v16.13.0/bin/npm
  Browsers:
    Chrome: 95.0.4638.69
    Firefox: 93.0
  npmPackages:
    @vitejs/plugin-legacy: 1.6.2 => 1.6.2
    @vitejs/plugin-react-refresh: 1.3.6 => 1.3.6
    vite: 2.6.13 => 2.6.13

Used Package Manager
yarn
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Not caused by the dependencies. There are too many circular dependencies in your project's own source code. (e.g. src/implementations/remote.ts)
Vite doesn't support the emitDecoratorMetadata because esbuild doesn't https://esbuild.github.io/content-types/#typescript. Please don't rely on this feature.