Help running on MacOS M1?

Update: For most this should work https://github.com/facebookresearch/audiocraft/issues/13#issuecomment-1588298067
Any chance of getting help and/or updated instructions suitable for running audiocraft on MacOS and M1? At the very least, I think I need to know where to put the models I downloaded from Hugging Face. But, it's likely based on the errors I have some other issues too. My steps + errors follow. Thanks for any tips!
I adapted the instructions here for macOS: https://github.com/facebookresearch/audiocraft#installation
First, I ran each line in my terminal...
conda create -n audiocraft
conda activate audiocraft
pip install 'torch>=2.0'
pip install -U audiocraft
pip install ffmpeg
jupyter notebook

Second, I downloaded these two items from Hugging Face but wasn't sure where to put them: https://huggingface.co/facebook/musicgen-melody

melody: 1.5B model, text to music and text+melody to music - 🤗 Hub
large: 3.3B model, text to music only - 🤗 Hub

Third, when Jupyter opened in Safari I created a new notebook and ran this from here: https://github.com/facebookresearch/audiocraft#api
import torchaudio
from audiocraft.models import MusicGen
from audiocraft.data.audio import audio_write

model = MusicGen.get_pretrained('melody')
model.set_generation_params(duration=8)  # generate 8 seconds.
wav = model.generate_unconditional(4)    # generates 4 unconditional audio samples
descriptions = ['happy rock', 'energetic EDM', 'sad jazz']
wav = model.generate(descriptions)  # generates 3 samples.

melody, sr = torchaudio.load('./assets/bach.mp3')
# generates using the melody from the given audio and the provided descriptions.
wav = model.generate_with_chroma(descriptions, melody[None].expand(3, -1, -1), sr)

for idx, one_wav in enumerate(wav):
    # Will save under {idx}.wav, with loudness normalization at -14 db LUFS.
    audio_write(f'{idx}', one_wav.cpu(), model.sample_rate, strategy="loudness")

Fourth, I got these errors in Jupyter

AssertionError                            Traceback (most recent call last)
Cell In [2], line 5
2 from audiocraft.models import MusicGen
3 from audiocraft.data.audio import audio_write
----> 5 model = MusicGen.get_pretrained('melody')
6 model.set_generation_params(duration=8)  # generate 8 seconds.
7 wav = model.generate_unconditional(4)    # generates 4 unconditional audio samples
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/audiocraft/models/musicgen.py:88, in MusicGen.get_pretrained(name, device)
86 else:
87     ROOT = 'https://dl.fbaipublicfiles.com/audiocraft/musicgen/v0/'
---> 88 compression_model = load_compression_model(ROOT + 'b0dbef54-37d256b525.th', device=device)
89 names = {
90     'small': 'ba7a97ba-830fe5771e',
91     'medium': 'aa73ae27-fbc9f401db',
92     'large': '9b6e835c-1f0cf17b5e',
93     'melody': 'f79af192-61305ffc49',
94 }
95 sig = names[name]
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/audiocraft/models/loaders.py:45, in load_compression_model(file_or_url, device)
43 cfg = OmegaConf.create(pkg['xp.cfg'])
44 cfg.device = str(device)
---> 45 model = builders.get_compression_model(cfg)
46 model.load_state_dict(pkg['best_state'])
47 model.eval()
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/audiocraft/models/builders.py:82, in get_compression_model(cfg)
79         renormalize = renorm is not None
80         warnings.warn("You are using a deprecated EnCodec model. Please migrate to new renormalization.")
81     return EncodecModel(encoder, decoder, quantizer,
---> 82                         frame_rate=frame_rate, renormalize=renormalize, **kwargs).to(cfg.device)
83 else:
84     raise KeyError(f'Unexpected compression model {cfg.compression_model}')
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/nn/modules/module.py:1145, in Module.to(self, *args, **kwargs)
1141         return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None,
1142                     non_blocking, memory_format=convert_to_format)
1143     return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
-> 1145 return self._apply(convert)
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/nn/modules/module.py:797, in Module._apply(self, fn)
795 def _apply(self, fn):
796     for module in self.children():
--> 797         module._apply(fn)
799     def compute_should_use_set_data(tensor, tensor_applied):
800         if torch._has_compatible_shallow_copy_type(tensor, tensor_applied):
801             # If the new tensor has compatible tensor type as the existing tensor,
802             # the current behavior is to change the tensor in-place using .data =,
(...)
807             # global flag to let the user control whether they want the future
808             # behavior of overwriting the existing tensor or not.
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/nn/modules/module.py:797, in Module._apply(self, fn)
795 def _apply(self, fn):
796     for module in self.children():
--> 797         module._apply(fn)
799     def compute_should_use_set_data(tensor, tensor_applied):
800         if torch._has_compatible_shallow_copy_type(tensor, tensor_applied):
801             # If the new tensor has compatible tensor type as the existing tensor,
802             # the current behavior is to change the tensor in-place using .data =,
(...)
807             # global flag to let the user control whether they want the future
808             # behavior of overwriting the existing tensor or not.
[... skipping similar frames: Module._apply at line 797 (2 times)]

File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/nn/modules/module.py:797, in Module._apply(self, fn)
795 def _apply(self, fn):
796     for module in self.children():
--> 797         module._apply(fn)
799     def compute_should_use_set_data(tensor, tensor_applied):
800         if torch._has_compatible_shallow_copy_type(tensor, tensor_applied):
801             # If the new tensor has compatible tensor type as the existing tensor,
802             # the current behavior is to change the tensor in-place using .data =,
(...)
807             # global flag to let the user control whether they want the future
808             # behavior of overwriting the existing tensor or not.
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/nn/modules/module.py:820, in Module._apply(self, fn)
816 # Tensors stored in modules are graph leaves, and we don't want to
817 # track autograd history of param_applied, so we have to use
818 # with torch.no_grad():
819 with torch.no_grad():
--> 820     param_applied = fn(param)
821 should_use_set_data = compute_should_use_set_data(param, param_applied)
822 if should_use_set_data:
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/nn/modules/module.py:1143, in Module.to..convert(t)
1140 if convert_to_format is not None and t.dim() in (4, 5):
1141     return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None,
1142                 non_blocking, memory_format=convert_to_format)
-> 1143 return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_blocking)
File /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/torch/cuda/init.py:239, in _lazy_init()
235     raise RuntimeError(
236         "Cannot re-initialize CUDA in forked subprocess. To use CUDA with "
237         "multiprocessing, you must use the 'spawn' start method")
238 if not hasattr(torch._C, '_cuda_getDeviceCount'):
--> 239     raise AssertionError("Torch not compiled with CUDA enabled")
240 if _cudart is None:
241     raise AssertionError(
242         "libcudart functions unavailable. It looks like you have a broken build?")
AssertionError: Torch not compiled with CUDA enabled

Thanks for this post, following because I'm running into same issues...

Me 2

Seems like cuda issue can be solved by running it on CPU instead of CUDA.
https://stackoverflow.com/a/75049743
I also suggest taking a look at this whisper.cpp project where macOS coreML support was added: https://github.com/ggerganov/whisper.cpp/discussions/126

Try with MusicGen.get_pretrained('melody',device='cpu') it's slow, but it works. I've tried using device='mps' but even when adding PYTORCH_ENABLE_MPS_FALLBACK=1, it fails because the FFT doesn't work with MPS. So, we'll have to wait for newer versions of Torch for MPS.

thanks xavivirio - this does seem to be running
import torchaudio
from audiocraft.models import MusicGen
from audiocraft.data.audio import audio_write

model = MusicGen.get_pretrained('melody',device='cpu')
model.set_generation_params(duration=8)  # generate 8 seconds.
wav = model.generate_unconditional(4)    # generates 4 unconditional audio samples
descriptions = ['happy rock', 'energetic EDM', 'sad jazz']
wav = model.generate(descriptions)  # generates 3 samples.

melody, sr = torchaudio.load('./assets/bach.mp3')
# generates using the melody from the given audio and the provided descriptions.
wav = model.generate_with_chroma(descriptions, melody[None].expand(3, -1, -1), sr)

for idx, one_wav in enumerate(wav):
    # Will save under {idx}.wav, with loudness normalization at -14 db LUFS.
    audio_write(f'{idx}', one_wav.cpu(), model.sample_rate, strategy="loudness")

Did you try MPS with a nightly PyTorch build? Maybe it's supported...
https://developer.apple.com/metal/pytorch/

might have spoken too soon...when I run this in jupyter...
import torchaudio
from audiocraft.models import MusicGen
from audiocraft.data.audio import audio_write

model = MusicGen.get_pretrained('melody',device='cpu')
model.set_generation_params(duration=8)  # generate 8 seconds.
wav = model.generate_unconditional(4)    # generates 4 unconditional audio samples
descriptions = ['happy rock', 'energetic EDM', 'sad jazz']
wav = model.generate(descriptions)  # generates 3 samples.

melody, sr = torchaudio.load('./assets/bach.mp3')
# generates using the melody from the given audio and the provided descriptions.
wav = model.generate_with_chroma(descriptions, melody[None].expand(3, -1, -1), sr)

for idx, one_wav in enumerate(wav):
    # Will save under {idx}.wav, with loudness normalization at -14 db LUFS.
    audio_write(f'{idx}', one_wav.cpu(), model.sample_rate, strategy="loudness")

I get this error...
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/tqdm/auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm

I've tried running the following updates and still no luck...any ideas?
pip install ipywidgets
pip install -U jupyter

I am facing the same issue

It worked for me after changing to cpu. I will post the steps once I get back to my computer.

I bet the notebook is somehow using different version.

That sounds worthy to pay it forward. I will create a Medium post that is very detailed and link to it. The problem is code changes and tutorials will have to change too.

when I run pip freeze it looks like this, if something fails, perhaps a pip package is missing:
antlr4-python3-runtime==4.9.3
appdirs==1.4.4
audiocraft==0.0.1
audioread==3.0.0
av==10.0.0
blis==0.7.9
catalogue==2.0.8
certifi==2023.5.7
cffi==1.15.1
charset-normalizer==3.1.0
click==8.1.3
cloudpickle==2.2.1
colorlog==6.7.0
confection==0.0.4
cymem==2.0.7
Cython==0.29.35
decorator==5.1.1
demucs==4.0.0
diffq==0.2.4
docopt==0.6.2
dora-search==0.1.12
einops==0.6.1
filelock==3.12.1
flashy==0.0.2
fsspec==2023.6.0
huggingface-hub==0.15.1
hydra-colorlog==1.2.0
hydra-core==1.3.2
idna==3.4
Jinja2==3.1.2
joblib==1.2.0
julius==0.2.7
lameenc==1.4.2
langcodes==3.3.0
lazy_loader==0.2
librosa==0.10.0.post2
llvmlite==0.40.1rc1
MarkupSafe==2.1.3
mpmath==1.3.0
msgpack==1.0.5
murmurhash==1.0.9
mypy-extensions==1.0.0
networkx==3.1
num2words==0.5.12
numba==0.57.0
numpy==1.24.3
omegaconf==2.3.0
openunmix==1.2.1
packaging==23.1
pathy==0.10.1
pooch==1.6.0
preshed==3.0.8
pycparser==2.21
pydantic==1.10.9
pyre-extensions==0.0.29
PyYAML==6.0
regex==2023.6.3
requests==2.31.0
retrying==1.3.4
safetensors==0.3.1
scikit-learn==1.2.2
scipy==1.10.1
sentencepiece==0.1.99
six==1.16.0
smart-open==6.3.0
soundfile==0.12.1
soxr==0.3.5
spacy==3.5.2
spacy-legacy==3.0.12
spacy-loggers==1.0.4
srsly==2.4.6
submitit==1.4.5
sympy==1.12
thinc==8.1.10
threadpoolctl==3.1.0
tokenizers==0.13.3
torch==2.0.1
torchaudio==2.0.2
tqdm==4.65.0
transformers==4.30.1
treetable==0.2.5
typer==0.7.0
typing-inspect==0.9.0
typing_extensions==4.6.3
urllib3==2.0.3
wasabi==1.1.2
xformers==0.0.20

Thanks @dataf3l! I too tried mps but had no luck.
I didn't have to install as many packages:
python3 -m venv env
source env/bin/activate

pip install 'torch>=2.0'
pip install -U<EMAIL_ADDRESS>python test.py

and then this test.py program worked (it automatically downloaded the models and generated wav files):
import torchaudio
from audiocraft.models import MusicGen
from audiocraft.data.audio import audio_write

model = MusicGen.get_pretrained('small', device='cpu') # note cpu not cuda or mps
model.set_generation_params(duration=8)  # generate 8 seconds.
wav = model.generate_unconditional(4)    # generates 4 unconditional audio samples
descriptions = ['happy rock', 'energetic EDM', 'sad jazz']

wav = model.generate(descriptions)  # generates 3 samples.

for idx, one_wav in enumerate(wav):
    # Will save under {idx}.wav, with loudness normalization at -14 db LUFS.
    audio_write(str(f'{idx}'), one_wav.cpu(), model.sample_rate, strategy="loudness", loudness_compressor=True)

Pre-requisites

Downloaded and installed Miniforge3 (to use Conda) https://github.com/conda-forge/miniforge
Installed XcodeTools in your terminal with this command xcode-select --install (so that you can use git)
Note: I assume it requires Python 3.9 per the instructions so I install that in the next steps but perhaps it just needs something >=3.9

Audiocraft install instructions
conda create --name audiocraft python=3.9
conda activate audiocraft
pip install ffmpeg
pip install 'torch>=2.0'
pip install -U<EMAIL_ADDRESS>
Copy this to a text file in your current working directory and name it test.py
_Note: if you don't know your current working directory in terminal type pwd_
import torchaudio
from audiocraft.models import MusicGen
from audiocraft.data.audio import audio_write

model = MusicGen.get_pretrained('small', device='cpu') # note cpu not cuda or mps
model.set_generation_params(duration=8)  # generate 8 seconds.
wav = model.generate_unconditional(4)    # generates 4 unconditional audio samples
descriptions = ['happy rock', 'energetic EDM', 'sad jazz']

wav = model.generate(descriptions)  # generates 3 samples.

# haven't tried the melody stuff yet

for idx, one_wav in enumerate(wav):
    # Will save under {idx}.wav, with loudness normalization at -14 db LUFS.
    audio_write(str(f'{idx}'), one_wav.cpu(), model.sample_rate, strategy="loudness", loudness_compressor=True)

Run the program in your terminal making sure to call the right version of Python and it should start downloading all the necessary files / generate audio
python3.9 test.py
This should generate the following files
3.scd
2.wav
2.scd
1.wav
1.scd
0.wav

Now you can tweak the program as you wish (diff prompts, longer audio, etc)
Thanks for the tips @redblobgames

I get :raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled"  when I try to run python app.py on my Mac M1, any work around ?

I followed the instruction above from redblobgames and was getting an error
TypeError: audio_write() got an unexpected keyword argument 'loudness_compressor'

I then removed the loudness_compressor=True argument and I was able to get audio output.
So this code worked for me
import torchaudio
from audiocraft.models import MusicGen
from audiocraft.data.audio import audio_write

model = MusicGen.get_pretrained('small', device='cpu') # note cpu not cuda or mps
model.set_generation_params(duration=8)  # generate 8 seconds.
wav = model.generate_unconditional(4)    # generates 4 unconditional audio samples
descriptions = ['happy rock', 'energetic EDM', 'sad jazz']

wav = model.generate(descriptions)  # generates 3 samples.

for idx, one_wav in enumerate(wav):
    # Will save under {idx}.wav, with loudness normalization at -14 db LUFS.
    audio_write(str(f'{idx}'), one_wav.cpu(), model.sample_rate, strategy="loudness")

I was able to get python app.py runnig on my M1 by modifying code in  app.py  to this
def load_model(version):
print("Loading model", version)
return MusicGen.get_pretrained(version, device='cpu')

Here are install instructions that should work for folks who wanna run the gradio interface on their Mac
Pre-requisites

Download and install Miniforge3 (to use Conda) https://github.com/conda-forge/miniforge
Install XcodeTools in your terminal with this command xcode-select --install (so that you can use git)

Audiocraft install instructions (in your terminal)
git clone https://github.com/facebookresearch/audiocraft.git
conda create --name gen python=3.9
conda activate gen
pip install ffmpeg
pip install 'torch>=2.0'
cd audiocraft
pip install -r requirements.txt

Download ffmpeg and ffprobe binaries (https://evermeet.cx/ffmpeg/) and place in /usr/local/bin
sudo cp /Users/yourUsername/Downloads/ffmpeg /usr/local/bin
sudo cp /Users/yourUsername/Downloads/ffprobe /usr/local/bin
sudo chmod 755 /usr/local/bin/ffmpeg
sudo chmod 755 /usr/local/bin/ffprobe

Update path to the binaries in your profile vi ~/.zshrc
export PATH="/usr/local/bin/ffmpeg:$PATH"
export PATH="/usr/local/bin/ffmprobe:$PATH"

Optional: Confirm binaries are installed
ffmpeg -version
ffmprobe -version

In the file audiocraft/app.py update/replace the first function so it falls back to CPU
def load_model(version):
    print("Loading model", version)
    return MusicGen.get_pretrained(version, device='cpu')

Finally, you should now be able to run the Gradio interface in your browser
python3.9 app.py

In the file audiocraft/app.py update/replace the first function so it falls back to CPU
def load_model(version):
    print("Loading model", version)
    return MusicGen.get_pretrained(version, device='cpu')

Thank you! This was very helpful. I didn't do this and it still loads and works but realize I need to because it's slooooow. I don't see this, exactly, in app.py so just want to, quite literally, ask... Am I replacing this (the only thing I see)
def load_model(version='melody'):
    global MODEL
    print("Loading model", version)
    if MODEL is None or MODEL.name != version:
        MODEL = MusicGen.get_pretrained(version)

With this?
def load_model(version):
    print("Loading model", version)
    return MusicGen.get_pretrained(version, device='cpu')

In the file audiocraft/app.py update/replace the first function so it falls back to CPU
def load_model(version):
    print("Loading model", version)
    return MusicGen.get_pretrained(version, device='cpu')

Thank you! This was very helpful. I didn't do this and it still loads and works but realize I need to because it's slooooow. I don't see this, exactly, in app.py so just want to, quite literally, ask... Am I replacing this (the only thing I see)
def load_model(version='melody'):
    global MODEL
    print("Loading model", version)
    if MODEL is None or MODEL.name != version:
        MODEL = MusicGen.get_pretrained(version)

With this?
def load_model(version):
    print("Loading model", version)
    return MusicGen.get_pretrained(version, device='cpu')

Yes!!

Yes!!

Thank you! Ok so now it says
def load_model(version):
    print("Loading model", version)
    return MusicGen.get_pretrained(version, device='cpu')

But – and again I know there's not GPU Here – I can't say it's anymore faster (M1 Max, 64GB of RAM), still quite slow... Being thick here but, should it be?

But – and again I know there's not GPU Here – I can't say it's anymore faster (M1 Max, 64GB of RAM), still quite slow... Being thick here but, should it be?

Yes, it's slow, taking around 15–20 min to generate the three 8-second sample files.
I think the models are saved in ~/.cache/huggingface


Preferences filter text does not work for all settings

System information:

Ubuntu 21.04
DBeaver <IP_ADDRESS>109181446
Additional extensions: none

Describe the problem you're observing:
Preferences "type filter text" field does not work for filter settings. #10979 may have been related
Steps to reproduce, if exist:

Go to Window > Preferences
In "type filter text" field on top left, enter "DDL", or "case", or "case-sensitive", etc
Some results may come up, but
Under Connections > Metadata is a setting "Use case-sensitive names in DDL statements", and
This setting never shows up, regardless of which words you put in the filter test

Include any warning/errors/backtraces from the logs
There is nothing in the error log

@timbze Thank you for the suggestion. It is a really good feature, but it is actually pretty huge to implement. So it is planned, but actual release for it can't be estimated for now.


add prop types dep and stop using React.PropTypes

React.PropTypes will be deprecated in next version of React.

Thank you!


ESP32 Compilation Error

Hi, I'm trying to compile for ESP32 s2 and use pin 14 as SBUS input to display sbus output. I'm using the sbus_example script as is and it isn't working. Any help would be greatly appreciated. Thanks!
Error: sbus_example.ino:30:22: error: 'Serial2' was not declared in this scope
bfs::SbusRx sbus_rx(&Serial2);
^~~~~~~

Looks like ESP32 doesn't have Serial2. You need to pass the correct Serial bus to the SBUS constructor. Also, please review the library documentation for ESP32. You'll see that the constructor for ESP32 requires the pointer to the serial bus object along with the pin numbers and a boolean specifying whether to use an inverted SBUS signal.

Thanks a lot! Got it to work. Had to use 3.3v logic and updated the following for the esp32 s2 mini
#include "sbus.h"
#include <HardwareSerial.h>
HardwareSerial SBUSS(1);
/* SBUS object, reading SBUS /
bfs::SbusRx sbus_rx(&SBUSS, 14, 15, true);
/ SBUS object, writing SBUS /
bfs::SbusTx sbus_tx(&SBUSS, 14, 15, true);
/ SBUS data */
bfs::SbusData data;


Disable update notification

Microsoft PowerToys version
0.71.0
Installation method
WinGet
Running as admin
None
Area(s) with issue?
Settings
Steps to reproduce
Powertoys will notify when an update is available, and there is no setting to disable this.
I already update the application externally (winget), so I would like to disable this behaviour of the app updating itself.
✔ Expected Behavior
No response
❌ Actual Behavior
No response
Other Software
No response

There's a way to achieve this through GPO:
https://learn.microsoft.com/en-us/windows/powertoys/grouppolicy

Does this help? /needinfo

Yes, this solves my problem. Altough I think it is not obvious how a new user would find it.

I just received an update notification even with the group policy enabled

Still an issue

@viperML
For your information this only suspends the notification for 3 minor releases. But I am working on a new GPO and ui setting.

This is acting as designed and you should be notified after 3 months without an update basically.  The larger notification question would be part of /dup https://github.com/microsoft/PowerToys/issues/25717


Complex validation for query parameters doesn't work

Description
I have write come custom validator for UUID type validation, and declared following statements:
uid_path:
  description: Some unique identifier of some entity
  in: path
  name: uid_path
  required: true
  schema:
    format: x_uid
    type: string

Expected behaviour
It would validate my path parameter, and deny such strings as "abcd"
Actual behaviour
It wouldn't and such string as "abcd" will get to the View
Steps to reproduce
Even following simple code doesn't work:
uid_path:
  description: Some unique identifier of some entity
  in: path
  name: uid_path
  required: true
  schema:
    enum: ["A", "B", "C", "D"]
    type: string

It allows ANY string to pass through . But not integer to be honest
Additional info:
Output of the commands:

Python 3.7.3
Version: 2018.0.dev1

Hi @lovesuper ,
Have you followed the cookbook from this page: https://connexion.readthedocs.io/en/latest/cookbook.html#custom-type-format ?
Please notice the part that mention:

Keep in mind that the format checkers should be defined and registered before you run your application server.

That means you need to register your custom format before instantiating FlaskApp.
If you don't manage to get it to work, would be nice to get to see some of your code that is not working. Maybe you can isolate in a simple example (minimal lines of code) how to reproduce what you are experiencing?

@rafaelcaricio , Hello.
Have you read the text above? I wrote that even classic enum does not work for me. Not only x_uid (custom validator) but even re pattern or similar type checker additions. This is working for json body validation, but not for path parameters. That's the thing.

Hi @lovesuper,
Have you read the text above? I need to see a minimal reproduction of this problem so I can try to help you.

I just realized that you're trying to use custom formatters on "url" type parameter. Indeed, it will not work. It won't work because custom format is a feature of JSON, thus it only work on JSON payloads.

You can use regular expressions there and then it should work. Example: https://github.com/zalando/connexion/blob/44ea9336fe79ddb9592942b405a663d2e3aa612c/examples/openapi3/sqlalchemy/openapi.yaml#L91

Please close this ticket if this works for you.

@rafaelcaricio yes! This is really works! Sorry 4 bothering.


fragnix -checkout

We want to write
>fragnix -checkout Data.Tree Data.Set

and have Data.Tree.hs and Data.Set.hs in a reasonable default folder. We need to maintain a Map ModuleName [Slice] to know which slices to put into the files. Imports from Data.Tree and from Data.Set should be from those modules. The folder should not contain any more files.

This needs rethinking and will be done differently


Add DMA queue support and minor Civilization BE fixes

Fixes as discussed in #16

Maybe exposing both DMA and timer queue families with a count of 0 should be enough to get the game to boot.

I did some investigating. The game boots with 4 families and count of 0 for DMA and TIMER queues, however even if the DMA queue count is 0 the game still requests it in the device creation and the game doesn't seem to check for success, so if we return an error for the DMA queue request the game crashes.
Should I drop the TIMER quirk and return 0 for a count there instead?

Another question, how bad would it be to expose another queue as the DMA queue as a fallback in case a transfer only queue isn't supported?

Should I drop the TIMER quirk and return 0 for a count there instead?

Yes please.

Another question, how bad would it be to expose another queue as the DMA queue as a fallback in case a transfer only queue isn't exposed by vk?

I think that's what we'll have to do. Luckily, the official driver only exposes one queue of each family so we should be able to use any extra graphics or compute queue exposed by the Vulkan drivers to act as a DMA queue.

we should be able to use any extra graphics or compute queue exposed by the Vulkan drivers to act as a DMA queue.

Yep, after I added DMA queue selection from compute queue family (I'm using RADV), BF4 started to launch without crashing. Though I have problems with image presentation as application crashes after window resize.

OK I think I have a robust fallback. I will clean it up and push shortly.
I have BF4 on my origin account I will try to get it installed on my Linux box with RADV

Well, at least you can try launching bf4 after these fixes.
It still will either crash or you'll get graphical artifacts instead of proper menu UI.

@Cherser-s the BF4 crash is caused by the last commit that advertises the DMA extension as supported. The game works without it. Also I have a (super terrible) workaround for an invalid SRV read in the shader, looks like a game bug, the menus are rendering correctly now.

the BF4 crash is caused by 8f8b6dc that advertises the DMA extension as supported. The game works without it.
Oh, didn't know that. Anyway that is fixed in the code snippet, that I've posted above. Though this functionality (which is selecting DMA queue from compute family) must be used as a quirk, as it's probably required only by BF4 (it shouldn't really demand DMA queue if it isn't present).

Ok I ran this with BF4 and get very fantasticly glitched UI with both amdvlk and radv. I also have a linux box with a priorietary nvidia driver I am super curious to try that out too.
@libcg I went for a fallback implementation that doesn't assume single queues which is a bit more complex, I'm happy to change this at your direction.

@dougvj I didn't take a look at your code, but I know that the official Mantle driver only exposes one queue of each type. Most Vulkan drivers seem to expose more than 3 queues so should be fine.

I pushed a more general alternative (but slightly less performant) to 5b3c70a: 2522ee1. Closing now that everything has been merged.


Allow Teamspeak Parser to deal with IPv6 IPs

Just so the functional tests are better could we add this line to the .tests log and redo the parser assert?
This will ensure any changes moving forward will not affect this compatibility.

Just pushed something, can you check please ?
I did not run it locally.


docs(readme): add Greenkeeper badge

https://greenkeeper.io/

Changes Unknown when pulling 8b103f52f08594106e52873ae93322dbb3cde4bf on greenkeeper/initial into ** on master**.


Create Satisfiability of Equality Equations.java

Please read the new Contributing.md and make changes in your PR accordingly. Thank you


Create --formatter=silent

All silent. Use amount of failing examples as exit status.

Done in v0.11.0


Yap reporting phone numbers that are missing Twilio Call Status Changes Callback status.php webhook.

Describe the bug
Our test number in Twilio is reporting phone numbers that are missing Twilio Call Status Changes Callback status.php webhook.
however the number is configured and does have the same status configured as our main number.
What version are you running?
3.9.9
Did this happen on prior versions to the one you are running?
No
To Reproduce
Steps to reproduce the behavior:
Tried unconfiguring the number to disassociate it altogether with our production YAP but the error still remains.
Checked against existing correctly configured numbers
Expected behavior
the error should clear after the webhook url is added.
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Also tried unconfiguring the number but the error remains.

Closing this - the issue has resolved itself.


Dubbo 3.0 cannot find service provider in k8s

[x] I have searched the issues of this repository and believe that this is not a duplicate.
[x] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 3.0-snapshot
Operating System version: linux
Java version: jdk 8

Steps to reproduce this issue
Did you try to deploy Dubbo 3 on k8s? I have deployed it now, but I can't consume the service. Now I provide the server log. When I read the source code, I found that I didn't look for the pod annotated with 'io. Dubbo/metadata' when the consumer started
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
What do you expected from the above steps？
Actual Result
What actually happens?
No provider available for the service com.m1ngyuan.api.service.HelloService
If there is an exception, please attach the exception trace:
The server startup log is as follows: https://github.com/apache/dubbo/files/6652524/logs.11.txt

Any update?

https://github.com/apache/dubbo-samples/blob/master/dubbo-samples-kubernetes/README.md
Please try follow this

Try it with the latest version and follow the example above.


How do I FOO?

Overview
I tried to create a video encoder to get a h264 steam,while pyav always reports '[libx264] dimensions not set'.
Expected behavior
It should return the encoder with right arguments given.
I use this to test my own mp4 mux library.
Actual behavior
I have confirmed that argments given are right,but it still can't create the encoder
Traceback:
Traceback (most recent call last):
  File "d:/programworkspace/research/reserch_magewell/RSH_VPN/SSH_GIT/magewellsdkv3/test_codes/AVCapture/mp4filesave.py", line 58, in <module>
    test()
  File "d:/programworkspace/research/reserch_magewell/RSH_VPN/SSH_GIT/magewellsdkv3/test_codes/AVCapture/mp4filesave.py", line 55, in test
    t_encoder.create_mp4('1.mp4',1920,1080,166667)
  File "d:/programworkspace/research/reserch_magewell/RSH_VPN/SSH_GIT/magewellsdkv3/test_codes/AVCapture/mp4filesave.py", line 26, in create_mp4
    self.create_video_encoder()
  File "d:/programworkspace/research/reserch_magewell/RSH_VPN/SSH_GIT/magewellsdkv3/test_codes/AVCapture/mp4filesave.py", line 43, in create_video_encoder
    t_b_ret = self.m_ctx_video_codec.open()
  File "av\codec\context.pyx", line 253, in av.codec.context.CodecContext.open
  File "av\codec\context.pyx", line 275, in av.codec.context.CodecContext.open
  File "av\error.pyx", line 336, in av.error.err_check
av.error.ValueError: [Errno 22] Invalid argument; last error log: [libx264] dimensions not set

Investigation
I cheked the params and check the code of ffmpeg
Research
I have done the following:

[x] Checked the PyAV documentation
[x] Searched on Google
[x] Searched on Stack Overflow

Additional context
Here is my test code.
import av
from av import format,codec
from av.video.codeccontext import *
import av.video.format
import fractions

class CMWMp4Save(object):
    def __init__(self):
        super().__init__()
        self.m_video_codec = 0
        self.m_ctx_video_codec = 0
        self.m_audio_codec = 0
        self.m_ctx_audio_codec = 0
        self.m_n_cx = 1920
        self.m_n_cy = 1080
        self.m_fps = 60

    def create_mp4(self,
        filename,
        cx,
        cy,
        frame_dur):
        self.m_n_cx = cx
        self.m_n_cy = cy
        self.m_fps = 10000000/frame_dur
        self.create_video_encoder()

    def destory_mp4(self):
        pass

    def create_video_encoder(self):
        self.m_video_codec = codec.Codec('h264','w')
        print(self.m_video_codec)
        self.m_ctx_video_codec = self.m_video_codec.create()
        self.m_ctx_video_codec.bit_rate = 400000
        self.m_ctx_video_codec.width = self.m_n_cx
        self.m_ctx_video_codec.height = self.m_n_cy
        self.m_ctx_video_codec.framerate = fractions.Fraction(int(self.m_fps),1)
        self.m_ctx_video_codec.gop_size = 60
        self.m_ctx_video_codec.format = av.VideoFormat('nv12')
        print(self.m_video_codec.frame_rates)
        t_b_ret = self.m_ctx_video_codec.open()
        if t_b_ret == True:
            print('create video codec successfully')
        else:
            print('create video codec failed')

t_encoder = CMWMp4Save()

def test():
    global t_encoder
    print('test')
    t_encoder.create_mp4('1.mp4',1920,1080,166667)

if __name__ == '__main__':
    test()

I ran into a similar issue with hevc encoding. Try ether setting the format attribute immediately after creating the context, or just use .pix_fmt = "nv12" instead.

This is a very descriptive subject, I really feel like working on it..

I ran into a similar issue with hevc encoding. Setting the format attribute as you are doing resets the width and height attributes. Try ether setting the format attribute immediately after creating the context, or just use .pix_fmt = "nv12" instead.

Thanks a lot, it works.


tests/mock_vws/test_query.py::TestMaximumImageFileSize::test_png[Real Vuforia] FAILED

See https://github.com/VWS-Python/vws-python-mock/runs/1628674699?check_suite_focus=true
        with pytest.raises(requests.exceptions.ConnectionError):
82
>           query(
83
                vuforia_database=vuforia_database,
84
                body=body,
85
            )
86
E           Failed: DID NOT RAISE <class 'requests.exceptions.ConnectionError'>

On GitHub actions we get 413 Request Entity Too Large with the following content:
'\r\n<title>413 Request Entity Too Large</title>\r\n\r\n
413 Request Entity Too Large
\r\n
nginx\r\n\r\n\r\n'

I am yet to figure out what is different between CI and my local machine where everything passes.

The test fails on my Mac in an Ubuntu container.

Next step: Try the request without requests.

Next step also: Create a minimal reproducible script which displays different behaviour on macOS vs Linux.

SOLVED!
The original test was really just testing a bug in urllib3 which was fixed in version 1.26.0 with https://github.com/urllib3/urllib3/pull/1524.


Fix userenv.json loading

Userenv directory are in the for ./userenvs/<name>/userenv.json
Change the loading path to avoid errors like:
Working on stream8 userenv
Sourcing container image for userenv 'stream8' and benchmark/tool 'iperf'; this may take a few minutes
ERROR: Could not load userenv JSON file for 'stream8' due to non-zero return code 8.  Are you sure this is a supported userenv?
Perl exited with active threads:
        0 running and unjoined
        1 finished and unjoined
        0 running and detached
Skipping run post-processing due to error(s) [rc=2]

I didn't get this
https://github.com/perftool-incubator/rickshaw/blob/master/userenvs/README#L3
sorry for the noise, closing


Yes I have to do this in a specific order.


Automatizar teste coverage

Automatizar test coverage.

https://facebook.github.io/react-native/docs/testing.html


Structure type Errors in TensorFlow

Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
System information

Have I written custom code (as opposed to using a stock
example script provided in TensorFlow):  YES
OS Platform and Distribution (e.g.,
Linux Ubuntu 16.04): Mac OS Catalina
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if
the issue happens on mobile device:
TensorFlow installed from (source or
binary): binary
TensorFlow version (use command below): 2.1
Python version: 3.7.2
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from
source):
CUDA/cuDNN version: 10.2
GPU model and memory: 4gb ram   Graphics:  Intel HD Graphics 4000 1536 MB

Describe the current behavior
I am attempting to build a stock prediction model using LSTM
Here are a list of my import statements:
import requests
import math
import numpy as np
import pandas as pd
import pandas_datareader as web
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras import layers
from tensorflow.keras.models import Sequential, load_model
from tensorflow.keras.layers import LSTM, Dense
from sklearn.preprocessing import MinMaxScaler
from bs4 import BeautifulSoup
import matplotlib.pyplot as plt
from datetime import datetime, date

Here is the code for the model itself:

#split the data into x-train and y-train datasets
x_train = []
y_train = []

for i in range(20, len(train_data)):
    x_train.append(train_data[i-20:i, 0])
    y_train.append(train_data[i, 0])

    if i<= 20:
        print(x_train)
        print(y_train)

#convert x-train and y-train to numpy arrays to train models
x_train, y_train = np.array(x_train), np.array(y_train)

#reshape the data, LSTM model expects 3D dataset
x_train = np.reshape(x_train, (x_train.shape[0], x_train.shape[1], 1))

#Build LSTM MODEL
model = tf.keras.Sequential([
    tf.keras.layers.Bidirectional(tf.keras.layers.LSTM(64)),
    tf.keras.layers.Dense(25, activation='relu'),
    tf.keras.layers.Dense(1, activation='sigmoid')
])

model.compile(loss='mean_squared_error',
              optimizer=tf.keras.optimizers.Adam(1e-4),
              metrics=['accuracy'])

model.fit(x_train, y_train, batch_size=1, epochs=1)

#create testing data set
#creat new array containing scaled values
test_data = scaled_data[training_data_len - 20: , :]

#create the datasets x-test and y-test
x_test=[]
y_test=dataset[training_data_len:, :]
for i in range(20, len(test_data)):
    x_test.append(test_data[i-20:i, 0])

#convert data to numpy array
x_test = np.array(x_test)

#reshape data to 3D
x_test = np.reshape(x_test, (x_test.shape[0], x_test.shape[1], 1))

#Get predicted price values
predictions = model.predict(x_test)
predictions = scaler.inverse_transform(predictions)

#get root mean squared error
rmse=np.sqrt(np.mean(((predictions- y_test)**2)))
print(rmse)

Executing this code returns the error:
Traceback (most recent call last):
  File "/Users/owner/Desktop/algo/predict.py", line 98, in <module>
    x_test = np.reshape(x_test, (x_test.shape[0], x_test.shape[1], 1))
IndexError: tuple index out of range

Describe the expected behavior
print(rmse) should return the average.
I am new to tensorflow and neural programming so I am not completely sure what to do here.
If I try x_test = np.reshape(x_test, (x_test.shape[0]))
I get this error:
Traceback (most recent call last):
  File "/Users/owner/Desktop/algo/predict.py", line 103, in <module>
    predictions = model.predict(x_test)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training.py", line 1013, in predict
    use_multiprocessing=use_multiprocessing)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 498, in predict
    workers=workers, use_multiprocessing=use_multiprocessing, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 475, in _model_iteration
    total_epochs=1)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2.py", line 128, in run_one_epoch
    batch_outs = execution_function(iterator)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py", line 98, in execution_function
    distributed_function(input_fn))
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 568, in __call__
    result = self._call(*args, **kwds)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 615, in _call
    self._initialize(args, kwds, add_initializers_to=initializers)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 497, in _initialize
    *args, **kwds))
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 2389, in _get_concrete_function_internal_garbage_collected
    graph_function, _, _ = self._maybe_define_function(args, kwargs)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 2703, in _maybe_define_function
    graph_function = self._create_graph_function(args, kwargs)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/function.py", line 2593, in _create_graph_function
    capture_by_value=self._capture_by_value),
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/framework/func_graph.py", line 978, in func_graph_from_py_func
    func_outputs = python_func(*func_args, **func_kwargs)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/eager/def_function.py", line 439, in wrapped_fn
    return weak_wrapped_fn().__wrapped__(*args, **kwds)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py", line 85, in distributed_function
    per_replica_function, args=args)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/distribute/distribute_lib.py", line 763, in experimental_run_v2
    return self._extended.call_for_each_replica(fn, args=args, kwargs=kwargs)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/distribute/distribute_lib.py", line 1819, in call_for_each_replica
    return self._call_for_each_replica(fn, args, kwargs)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/distribute/distribute_lib.py", line 2164, in _call_for_each_replica
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/autograph/impl/api.py", line 292, in wrapper
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py", line 212, in _predict_on_batch
    result = predict_on_batch(model, x)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/training_v2_utils.py", line 556, in predict_on_batch
    return predict_on_batch_fn(inputs)  # pylint: disable=not-callable
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/base_layer.py", line 737, in __call__
    self.name)
  File "/usr/local/lib/python3.7/site-packages/tensorflow_core/python/keras/engine/input_spec.py", line 177, in assert_input_compatibility
    str(x.shape.as_list()))
ValueError: Input 0 of layer sequential is incompatible with the layer: expected ndim=3, found ndim=2. Full shape received: [32, 1]

Any help will be greatly appreciated, I am dying to learn what is wrong!
Thankyou,
RRR.

It seems like your x_test is not of the size you expect it to be. Are you able to provide the following values:
test_data.shape, x_test.shape, scaled_data.shape, training_data_len
Note that .shape does not work on lists. So obtain the values after conversion to numpy.

training_data_len = 50 . This also prints 311 sometimes
test_data.shape = (20, 1)
scaled_data.shape = (311, 1)
x_test.shape = (0,)
Sometimes the model tests with a sample of 30 and sometimes with a sample of 291

training_data_len = 50 . This also prints 311 sometimes
test_data.shape = (20, 1)
scaled_data.shape = (311, 1)
x_test.shape = (0,)
Sometimes the model tests with a sample of 30 and sometimes with a sample of 291

Here, what do you mean by sometimes?
When training_data_len = 311, test_data.shape will be (20,1). If this happens x_test will end up being empty (shape=(0,)), based on your code.
In that case, the error you have is expected.
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-74-83e32771dadc> in <module>
----> 1 x_test = np.reshape(x_test, (x_test.shape[0], x_test.shape[1], 1))

IndexError: tuple index out of range

Now the issue is how you compute training_data_len.

This is how I compute training data len:
Regarding the sometimes,  when I printed( training_data_len) the only modification i made to the code was to add print(training_data_len) When I ran the program the length was 291.
I went back to the code and added print(scaled_data.shape) the sample size was 30.

#get closing price
data = df.filter(['Close'])

#get closing price values
dataset = data.values

#set training data length to len of total data set
training_data_len = math.ceil(len(dataset))
print(training_data_len)

#Scale the data
scaler = MinMaxScaler(feature_range=(0,1))
scaled_data = scaler.fit_transform(dataset)

I think there is a problem with your for loop where you are trying to generate a sequence data of window size 20 for the test data. Assuming the training_data_len is 311, Can you run your code by updating, the range of for loop:
for i in range(20, len(test_data)+1):
    x_test.append(test_data[i-20:i, 0])

Otherwise, len(test_data) = 20 and the for loop will not happen.

Okay Thank you,  I ran the code with the update and this error returned.
Traceback (most recent call last):
  File "/Users/owner/Desktop/algo/predict.py", line 103, in <module>
    x_test = np.reshape(x_test, (x_test.shape[0]))
  File "<__array_function__ internals>", line 6, in reshape
  File "/usr/local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 301, in reshape
    return _wrapfunc(a, 'reshape', newshape, order=order)
  File "/usr/local/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 61, in _wrapfunc
    return bound(*args, **kwds)
ValueError: cannot reshape array of size 20 into shape (1,)

Any ideas?

As the error reports... your test data is of size 20, so it cannot be reshaped to size 1. I believe, you should be using the reshape as in the original code you shared:
 x_test = np.reshape(x_test, (x_test.shape[0], x_test.shape[1], 1))

Yes Thank you sir, that fixed the error, however it did present me with a new error.
https://github.com/tensorflow/tensorflow/issues/37159


Return of the bulletproof vest to the bartender

About the PR

This PR fixes the issue that came from PR #17825
I don’t know, maybe for some there’s nothing bad in this, but for me there was a problem after the bartender’s body armor was taken away. The broblem is as follows:

In a regular vest, there is no way to put an item in the item slot that body armor has, which is why I noticed how bartenders began to take warm jackets that have this slot

The reason why the bartender had a body armor was to be able to protect himself from whoever he and his visitors are attacking, so that the bartender does not fall into crit and does not give the opportunity to pick up his gun, there are many dangers that threaten the bar: violent visitors, spiders, slimes, SPIDERS CLOWNS, syndicate agents who want to kill the bartender and who want to get him with a gun.

In general, this PR returns the body armor to the bartender's vending machine and his closet, the bartender still starts with a regular vest, but in his bar he can change it to a body armor.
Media

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

Changelog

:cl:

tweak: Returned body armor to the bartender's vending machine and bartender's closet

In a regular vest, there is no way to put an item in the item slot that body armor has, which is why I noticed how bartenders began to take warm jackets that have this slot

Unless I’m misunderstanding, the old Kevlar they had did this too, as does the new vest? I don’t see how this is now a problem nor how it fixes it.

The reason why the bartender had a body armor was to be able to protect himself from whoever he and his visitors are attacking, so that the bartender does not fall into crit and does not give the opportunity to pick up his gun, there are many dangers that threaten the bar: violent visitors, spiders, slimes, SPIDERS CLOWNS, syndicate agents who want to kill the bartender and who want to get him with a gun.

 Given bulletproof vests are now mapped in armories, there’s no good reason for the barkeep to spawn with one.

In a regular vest, there is no way to put an item in the item slot that body armor has, which is why I noticed how bartenders began to take warm jackets that have this slot

Unless I’m misunderstanding, the old Kevlar they had did this too, as does the new vest? I don’t see how this is now a problem nor how it fixes it.

The reason why the bartender had a body armor was to be able to protect himself from whoever he and his visitors are attacking, so that the bartender does not fall into crit and does not give the opportunity to pick up his gun, there are many dangers that threaten the bar: violent visitors, spiders, slimes, SPIDERS CLOWNS, syndicate agents who want to kill the bartender and who want to get him with a gun.

 Given bulletproof vests are now mapped in armories, there’s no good reason for the barkeep to spawn with one.

The vest with which the bartender is now starting does not have a slot for things in which you can put a gun, the old kivlar had it and in this way it saved space, but as for protection, here you need to understand that he needs protection so that he is not entered into crit and they didn’t take away the gun, also protected from those who want to harm him, in the original SS13 he was with him, why I don’t understand me

I SWEAR the vest gave you a suit slot, I remember testing it and being able to put a gun there. I might have been somehow using the wrong armor, though.

everything has a suit slot

I SWEAR the vest gave you a suit slot, I remember testing it and being able to put a gun there. I might have been somehow using the wrong armor, though.

I double-checked and after the tests I realized that you can put a weapon there, I don’t know what the problem was but everything works, sorry that I spoiled your idea a little, but in general I seriously think that body armor is needed so that the bartender can protect himself from those who wants to jump on his gun, given your PR on a homemade firearm


Add gRPC endpoint to replace HTTP /subscribers endpoint

There's a subscribers endpoint exposed from the HTTP server that retrieves gRPC hardware metadata update subscriptions and lists them as JSON. This endpoint doesn't really have anything to do with the HTTP server and ought to be exposed on the gRPC server given its specific to a gRPC endpoint.

@mmlb @nshalman @displague
Is the /subscribers HTTP endpoint actually used by anyone? It seems like a hack. I'd rather delete it than introduce something in the gRPC API.

I think the subscribers endpoint is documented on our end in troubleshooting guides. It's certainly part of the cacher functionality rather than the tink-server functionality.
I support removal of this stuff in the long term, but we are currently somewhat dependent on that code... @mmlb can hopefully confirm my suspicions.

Gotcha. I'd love to see this changed to a gRPC endpoint rather than served from the HTTP server given it really has nothing to do with.

We're introducing a Hegel metadata API and dropping support for Equinix specific APIs which will see the removal of gRPC endpoints. We'll close this issue and await the Hegel API.


Question: Creating first widget, can't get to show window, throws exception.

I've been following along with the development guide, and I've got it to activate properly, but the window doesn't show. When debugging, I get this error when I try to open the widget:
Exception thrown at 0x77CB4402 (KernelBase.dll) in DailyTracker.exe: WinRT originate error - 0x80040155 : 'Failed to find proxy registration for IID: {FD037AC2-5D3A-438D-BD53-88F0B6B0F399}.'.
Not quite sure what do try at this point. I'm pretty new to this environment too. My project is in C++/CX if that matters. The guide has been in C++/CLI I think? So I've had to modify the code a bit to get different parts to just compile.
The error makes me think the proxy/stub registration I had to add to the manifest is wrong somehow (no idea what this actually does), but I've done exactly what the guide said to add:
<Extensions>
    <Extension Category="windows.activatableClass.proxyStub">
      <ProxyStub ClassId="00000355-0000-0000-C000-000000000046">
        <Path>Microsoft.Gaming.XboxGameBar.winmd</Path>

        <!-- include when using SDK version 5.1+-->
        <Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetAuthHost" InterfaceId="DC263529-B12F-469E-BB35-B94069F5B15A" />
        <Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetControlHost" InterfaceId="C309CAC7-8435-4082-8F37-784523747047" />
        <Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarNavigationKeyCombo" InterfaceId="5EEA3DBF-09BB-42A5-B491-CF561E33C172" />
        <Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetActivatedEventArgsPrivate" InterfaceId="782535A7-9407-4572-BFCB-316B4086F102" />
        <Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetHost" InterfaceId="5D12BC93-212B-4B9F-9091-76B73BF56525" />
        <Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetPrivate" InterfaceId="22ABA97F-FB0F-4439-9BDD-2C67B2D5AA8F" />

        <!-- include when using SDK version 5.3+-->
        <Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetHost2" InterfaceId="28717C8B-D8E8-47A8-AF47-A1D5263BAE9B" />
        <Interface Name="Microsoft.Gaming.XboxGameBar.Private.IXboxGameBarWidgetPrivate2" InterfaceId="B2F7DB8C-7540-48DA-9B46-4E60CE0D9DEB" />

      </ProxyStub>
    </Extension>
  </Extensions>

I've got version 5.1.200402003 of XboxGameBar installed, so shouldn't need the last two InterfaceId lines. But I've tried it with them just to make sure, and still get the error.
Sorry if this isn't the right spot for this, but its the only discussion area I could find!

The last two lines are for when you're using the latest 5.3 pre-release SDK. Your Game Bar version is 5.1 so it's the release version. What version of the NuGet package / SDK are you using? With your version of Game Bar you should be using the latest release (5.1.200402003).
Did you step through your OnActivate and verify everything is being setup correctly there?

Yep, OnActivated() gets hit, and I stepped through it. It goes inside of the IsLaunchActivation if check, and created the frame and activated it. Here is what my OnActivated() looks like.
void App::OnActivated(IActivatedEventArgs ^ e)
{
    XboxGameBarWidgetActivatedEventArgs ^ widgetArgs = nullptr;
    if (e->Kind == ActivationKind::Protocol)
    {
        IProtocolActivatedEventArgs^ protocolArgs = dynamic_cast<IProtocolActivatedEventArgs^>(e);

        if (protocolArgs)
        {
            String^ scheme = protocolArgs->Uri->SchemeName;
            if (scheme->Equals("ms-gamebarwidget")) {
                widgetArgs = dynamic_cast<XboxGameBarWidgetActivatedEventArgs^>(e);
            }
        }
    }
    if (widgetArgs)
    {
        if (widgetArgs->IsLaunchActivation)
        {
            // Game Bar Widget activation work here
            auto rootFrame = ref new Frame();
            rootFrame->NavigationFailed += ref new Windows::UI::Xaml::Navigation::NavigationFailedEventHandler(this, &App::OnNavigationFailed);

            Window::Current->Content = rootFrame;
            rootFrame->Navigate(TypeName(MyPage::typeid));
            Window::Current->Activate();
        }
        else
        {
            // Repeat activation for this widget. Ignore, or respond to URI payload
        }
    }
}

The code steps through to the Activate() call. But while stepping through, the exception gets thrown when I do the dynamic_cast for widgetArgs.

Hi klong15,
This message in the debug output is a red-herring:
Exception thrown at 0x77CB4402 (KernelBase.dll) in DailyTracker.exe: WinRT originate error - 0x80040155 : 'Failed to find proxy registration for IID: {FD037AC2-5D3A-438D-BD53-88F0B6B0F399}.'.
This means COM couldn't find a proper proxy/stub dll to marshal the interface of that GUID. However, after KernelBase.dll spits out that error, COM proceeds to search for marshaling info via a little known COM feature called Metadata Based Marshaling (MBM).  That's where COM looks for marshaling info in the WinMD file (we payload the winmds with the nuget).  So the issue with your widget not loading lies elsewhere.
Can you clarify what other (if any) exceptions or error you are hitting?  If so, do they reproduce with the CX sample we provide in the sample repo here?

Side note: Our guide is written for C++/WinRT not C++/CLI.  C++/WinRT is the replacement for C++/CX for consuming WinRT APIs.  C++/WinRT is a fully C++ compliant header library with allows apps to consume WinRT.
https://docs.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/
With that said, you can freely write widgets in .NET, C++/CX, or C++/WinRT.  We'll typically only demonstrate advanced SDK features in C# or C++/WinRT, but we are more than happy to help with CX as needed.  Let us know how your next steps go on your widget and we're happy to help!

Ah ok. Well I just switched to using C++/WinRT then. Kind of new to the whole environment, and CX was the only type of project to create in the project creation wizard.
I still had to tweak some of the code from the guide to get it to work, but I got a widget to show! The only little issue I couldn't get passed was when trying to include a settings page with the  tag. The guide says to include another uap3:AppExtension block for the settings, but I get an "App manifest validation error" on the second uap3:AppExtension block. Here is my appxmanifest. It throws the validation error about half way down (marked with a comment).
<Applications>
    <Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="DailyTracker.App">
      <uap:VisualElements DisplayName="DailyTracker" Description="Project for a single page C++/WinRT Universal Windows Platform (UWP) app with no predefined layout"
        Square150x150Logo="Assets\Square150x150Logo.png" Square44x44Logo="Assets\Square44x44Logo.png" BackgroundColor="transparent" AppListEntry="none">
        <uap:DefaultTile Wide310x150Logo="Assets\Wide310x150Logo.png">
        </uap:DefaultTile>
        <uap:SplashScreen Image="Assets\SplashScreen.png" />
      </uap:VisualElements>
      <Extensions>
        <uap3:Extension Category="windows.appExtension">
          <uap3:AppExtension Name="microsoft.gameBarUIExtension"
                             Id="klong0815"
                             DisplayName="Daily Tracker"
                             Description="Temp description"
                             PublicFolder="GameBar\Ext1">
            <uap3:Properties>
              <GameBarWidget Type="Standard">
                <HomeMenuVisible>true</HomeMenuVisible>
                <PinningSupported>true</PinningSupported>
                <SettingsSupported AppExtensionId="klong0815settings" />
                <Window>
                  <Size>
                    <Height>300</Height>
                    <Width>400</Width>
                    <MinHeight>150</MinHeight>
                    <MinWidth>200</MinWidth>
                    <MaxHeight>350</MaxHeight>
                    <MaxWidth>450</MaxWidth>
                  </Size>
                  <ResizeSupported>
                    <Horizontal>true</Horizontal>
                    <Vertical>true</Vertical>
                  </ResizeSupported>
                </Window>
              </GameBarWidget>
            </uap3:Properties>
          </uap3:AppExtension>
          <!--IT ERRORS ON THE LINE BELOW-->
          <uap3:AppExtension Name="microsoft.gameBarUIExtension"
                             Id="klong0815settings"
                             DisplayName="Daily Tracker Settings"
                             Description="My settings"
                             PublicFolder="GameBar\Ext1">
            <uap3:Properties>
              <GameBarWidget Type="Settings">
                <Window>
                  <Size>
                    <Height>300</Height>
                    <Width>300</Width>
                  </Size>
                  <ResizeSupported>
                    <Horizontal>false</Horizontal>
                    <Vertical>false</Vertical>
                  </ResizeSupported>
                </Window>
              </GameBarWidget>
            </uap3:Properties>
          </uap3:AppExtension>
        </uap3:Extension>
      </Extensions>
    </Application>
  </Applications>

Thank you for the help getting me started though! I've got plenty to get started and tinker with stuff. If my issue with the settings option is blatantly obvious issue, feel free to let me know,

Did you add "uap3" to the top of your manifest? It's needed as both a namespace and in the IgnorableNamespaces section.
<Package xmlns="..."
         xmlns:mp="..."
         xmlns:uap="..."
         xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
         IgnorableNamespaces="uap mp uap3">

Hi Klong15,
Looking at your manifest entries I don't see anything obvious right now.  You might do a diff against our Settings Sample on this github repo to double check for any minor syntax errors.
Also, if you share the specific error it might help.
Thanks,
Ben

Turns out the uap3:AppExtension for the Settings needed to be wraped in its own uap3:Extension block. The guide has it as a child of the same uap3:Extension of the main widget. But in the samples has it the other way.
So now I've set up my project to be similar to the WidgetSettingsSample project.
But another hurdle. Clicking the settings button doesn't open up my settings widget.  It never hits App::OnActivated() when I click the settings button. I've even copied the appxmanifest file completely from the sample project, and it still doesn't hit App:OnActivated(). Is there another area other than the appxmanifest to look at to get the settings button to work properly?


Player crouch should work better with colliders

Currently when the player starts or stops crouching, the player body instantly snaps to the new height. Shrinking isn't usually a problem, but growing the player body instantly to be over 2x the height can actually push more than half the players body beneath the floor causing the player to fall through the floor.
Additionally the player body does not check whether there is room to grow, so the player is able to stand up inside a cave. Instead the body should check (probably by move_and_collide test) to see how far the player can grow.

indeed, now it makes sense why i ended up havin always issues in my hidemechanics, as they are built on the idea of scalin the player to crouch and back to standing. Good catch


Build attempts to use ARC, which fails

When building package:objective_c as a dependency of a Flutter plugin, I get:
ARC Restrictions (Xcode): ARC forbids explicit message send of 'dealloc'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:21:9

Semantic Issue (Xcode): 'release' is unavailable: not available in automatic reference counting mode
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:41:11

ARC Restrictions (Xcode): ARC forbids explicit message send of 'release'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:41:11

ARC Restrictions (Xcode): ARC forbids explicit message send of 'dealloc'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:42:9

ARC Casting Rules (Xcode): Implicit conversion of C pointer type 'void *' to Objective-C pointer type 'id' requires a bridged cast
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:56:12

Semantic Issue (Xcode): 'release' is unavailable: not available in automatic reference counting mode
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:58:5

ARC Restrictions (Xcode): ARC forbids explicit message send of 'release'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:58:5

Semantic Issue (Xcode): 'release' is unavailable: not available in automatic reference counting mode
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:86:11

ARC Restrictions (Xcode): ARC forbids explicit message send of 'release'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:86:11

ARC Restrictions (Xcode): ARC forbids explicit message send of 'dealloc'
/Users/bquinlan/dart/native/pkgs/objective_c/src/proxy.m:87:9

Could not build the application for the simulator.
Error launching application on iPhone 15 Pro.

Adding
  s.requires_arc = []

to
pkgs/objective_c/ios/objective_c.podspec
pkgs/objective_c/macos/objective_c.podspec
fixes the issue for me.

You can close this, right?


w: Implement PCPU and JCPU

The w manpage defines JCPU as the total CPU time of all processes under a given tty. The PCPU is defined as being the total time being used by the command in the "what" field.
For the JCPU implementation, the program creates a hashmap of all terminal numbers and their total time by walking the pid folders in /proc. I don't think this is terrible performance-wise, as execution time is still slightly faster than the original w, when built in release mode.
Total time for a process is calculated by taking the sum of time scheduled in both user mode and kernel mode and dividing that by the system's clock tick.
In terms of tests, I've added a couple of unit tests and updated the test_output_format to make sure the JCPU and PCPU fields are populated, these still need to be formatted, so the tests don't check for formatting.

Did you see that some tests fail on macOS? It seems like there is no /proc on macOS.

Did you see that some tests fail on macOS? It seems like there is no /proc on macOS.

Thanks, I've fixed the issue by only enabling /proc based functions on Linux, as I've only tested them there.

Thanks for the detailed and thorough code review sylvestre! I've tested the changes and have committed them.

Could you please add the comments back?
I think your merge brings back the previous issue, the self?

You're talking about the comments that I had before the code review? And I removed the self, as was done in #54, to resolve the conflict, I think that's correct?


Failure: Cmi_format.Error() with bs-platform 7.3.2

plugin version: 0.82.1
Description
I used bs-platform 7.0.1 in my project and everythink worked find. After updeating bs-platform to 7.3.2 i got an error:

Moreover, plugin stop displaying type snippets next to function definitions.

I just realize that i have php storm 2020.2 which is not supported by newest plugin so i have old 0.82.
I noticed that exist issue: https://github.com/reasonml-editor/reasonml-idea-plugin/issues/263
Please update plugin to be compatiable to 2020.2 (i thinkt that in compatible version should be 2020.1+   the newest version of plugin should be more suitable than version which was release year ago)


Disable non-applicable Grafana features

Disables:

Correlations (the page anyway just comes up with "Please contact your administrator to create new correlations.")
Public Dashboards (users anyway doesn't have permissions for that)

/retest

/retest


GitHub templates and code of conduct

Code of conduct (need to add emali address)
Issue template
Pull request template

hey @Illyism
I would like to be a collaborator on the project. I think it would be easier to help with purifycss this way (closing issues, project roadmap, etc...). I started working on a new version of purifycss and it will be better if people interested in purifycss had visibility on what I am currently doing. To get feedback, suggestion, and contributions.


Long-term data storage and querying from Prometheus data

What kind of request is this (question/bug/enhancement/feature request):
Feature Enhancement
Steps to reproduce (least amount of steps as possible):
We're using the Prometheus services built into Rancher 2.2, but in Prometheus' docs, there are several mentions of Prometheus' storage not being durable or recommended for more than an 'ephemeral sliding window'. Phrases like "If your local storage becomes corrupted for whatever reason, your best bet is to shut down Prometheus and remove the entire storage directory." and "Prometheus's local storage is not meant as durable long-term storage." make me nervous to store long term data there. We would like a way to store and report on metrics from Prometheus over longer terms (as in years)
Environment information
Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI):
2.2.1
Installation option (single install/HA):
HA

When enabling monitoring there is a specific section for enabling persistent storage:

There are also docs on this.
https://rancher.com/docs/rancher/v2.x/en/cluster-admin/tools/monitoring/prometheus/#persistent-storage

Talked to the customer and the issue isn't about just enabling persistent volume.
It is about corruption of prometheus when the volume if full.

Sorry, the original issue wasn't clear - Prometheus' documentation itself says: "Prometheus's local storage is limited by single nodes in its scalability and durability. Instead of trying to solve clustered storage in Prometheus itself, Prometheus has a set of interfaces that allow integrating with remote storage systems."
Prometheus recommends several options for external backends:
https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations
There are also a few projects that intentionally provide roll-up archiving and more durable storage for Prometheus, while still maintaining the same interfaces for e.g. Grafana, Alertmanager:
https://github.com/cortexproject/cortex
https://github.com/improbable-eng/thanos
We'd like to see something like this integrated to the product.

It would be awesome to see something like Cortex or Thanos implemented.


Medium-clone frontend website responsive

A frontend medium clone made using html,css without using bootstrap. Made responsive using Media Queries

For contribution, make a PR

@sandipan898 please review my merge request and add hactoberfest-accepted label to it.


How do I make a PR for the docs?

I'd like to add improvements for the docs, but I can't find them in the repo. Is it on Contentful?

Just added you to the contentful 👍


Add support for linters with non-zero exit codes and read from stderr

First of all, thanks for the awesome plugin.
I am trying to add the markdownlint-cli linter to guard.nvim. I encountered two issues:

Currently guard.nvim does not support non-zero exit codes and markdownlint uses other exit codes.
markdownlint outputs linter errors (diagnostics) to stderr, and guard.nvim discards this stream.
markdownlint does not have an error severity, so the attributes.severity key cannot be specified in the lint.from_json function.

Are you planning to support linters with this behaviour? I attempted to fix this adding a valid_error_codes tool option and other changes in the commit https://github.com/gontzalm/guard.nvim/commit/ea999619f3b17deb0fc281337da55eff5b70b1d4.
Now the linter is working with the options
local ft = require("guard.filetype")
local lint = require("guard.lint")

ft("markdown"):lint({
    cmd = "markdownlint",
    args = { "--json" },
    fname = true,
    valid_exit_codes = { 0, 1 },
    source = "markdownlint",
    parse = lint.from_json({
        source = "markdownlint",
        attributes = {
            lnum = "lineNumber",
            col = "lineNumber",
            message = "ruleDescription",
            code = function(d) return d["ruleNames"][1] end,
            severity = function(_) return "warning" end,
        }
    })
})

require('guard').setup()

Thanks for the attention! I am aware of this (#68). What I planned was separating some of the do_fmt and do_lint function into an api module. So ppl could write their own formatting/linting process when their tool it's behaving out of ordinary.
I feel this approach makes guard core less cramped (not having to parse an ever-growing tool specification) and enables users to implement stuff like #76 and #86.
I am going to work on this after the autocmd pr gets merged.

Oh and from_json and from_regex is meant to be a template for a majority of tools so it's natural that it won't fit for some of them.

Just found that Asqlfluff format too sometimes returns formatted text to stdout with a non-zero error code if there's still issues left.

Just found that Asqlfluff format too sometimes returns formatted text to stdout with a non-zero error code if there's still issues left.

Yep, #150 should solve all of these :)


Streaming Task List

[x] Show currently fixed fisheye
[x] Explain planar vs cylindrical projection
[x] Explain correction of fisheye
[x] Enable feature to toggle planar vs cylinder fisheye on / off so we can see the impact
[x] Attempt better aspect ratio / FOV settings https://github.com/lefticus/raycasting/commit/8dbcf7871e61541f877f4cf8edb9841d26fca3f0#r99863042
[ ] Add tests

[x] focus on conversions between things
[x] focus on perfect right angles
[ ] find and fix issues with intersection of perpendicular values

[ ] discuss existing optimizations
[ ] split out renderer so we can target more than one way of drawing
[ ] add proper timing loop
[ ] add a minimap option
[ ] add camera in minimap option
[ ] stabilize texture for walls and properly draw texture with perspective and such
[ ] add walls with windows
[ ] add map actions
[ ] add map objects

I have a PR to fix the perpendicular intersection bug using a Segment intersection test rather than relying on the Line slope intersection.
See: https://github.com/lefticus/raycasting/pull/6/files
Feel free to use as much or as little on stream as you'd like.

@kolbyb you're 100% correct that I should move to segment intersection tests instead. Particularly after I spent today tracking down the existing bugs. I'm going to take a slightly different approach than you, I think.

@lefticus - I ported my Cppyy branch back to Python. I highly suspect you won't be interested in taking any of the changes however, you might be interested in how I structured the code into modules. Perhaps it could be of use if you wanted to restructure the code in any way.
You can check out the commit here: https://github.com/kolbyb/raycasting/commit/7d2efc73de46bf2620bb0bebdeb116786e83d370

@lefticus - I ported my Cppyy branch back to Python. I highly suspect you won't be interested in taking any of the changes however, you might be interested in how I structured the code into modules. Perhaps it could be of use if you wanted to restructure the code in any way.
You can check out the commit here: kolbyb@7d2efc7

I do plan to eventually port all of this to C++, and it would be interesting to keep it in such a way that it can be used as C++/Cppyy/Python/whatever


How to retrieve givenName or familyName (iOS)

I am struggling to find any info on how to actually retrieve the user's givenName and familyName, all I retrieve at the moment via profile is the concatenated name. Which isn't ideal.
Many thanks for your help!
Steps to Reproduce
 GoogleSignin.configure({
     scopes: [
        'email',
        'profile',
        'givenName',
        'familyName'
     ],
    ....
});

Expected Behavior
user: {
    email: string,
    id: string,
    givenName: string,
    familyName: string,
    photo: string,
    name: string
}

Actual Behavior
user: {
    email: string,
    id: string,
    photo: string,
    name: string
}

Environment

react-native: 0.59.1
react-native-google-signin: 1.2.2

Your scopes is not correct, see this : https://developers.google.com/identity/protocols/googlescopes.
To get these informations use one of these scopes :

'https://www.googleapis.com/auth/userinfo.profile',
'https://www.googleapis.com/auth/userinfo.email'
'https://www.googleapis.com/auth/plus.me'

Many thanks for the response @Yose216
This change hasn't returned them sadly. A couple of questions if I may:

Was this poster wrong in that case by directly including the names of the fields in the scope request?
Do I need to get any special approval to use these fields?

Thanks!

For this I don't know, I never use directly fields in scope.
Did you try with an another google account ?

@Yose216 thanks for coming back to me - yes I have but no luck. I must be missing something. Below is the entire call, am I doing something wrong here please?
GoogleSignin.configure({
  scopes: ['https://www.googleapis.com/auth/userinfo.profile',
    'https://www.googleapis.com/auth/userinfo.email',
    'https://www.googleapis.com/auth/plus.me'
  ],
  webClientId: '72398464092-3od0f1183tgpu3jp68psst707oe3q8lp.apps.googleusercontent.com', // client ID of type WEB for your server (needed to verify user ID and offline access)
});

class myClass {

  loginGoogle = async () => {
    try {
      GoogleSignin.configure();
      await GoogleSignin.hasPlayServices();

      GoogleSignin.signIn()
        .then((data) => {
          const credential = firebase.auth.GoogleAuthProvider.credential(data.idToken, data.accessToken); // Create a new Firebase credential with the token
          return firebase.auth().signInWithCredential(credential); // Login with the credential
        })
        .then((user) => {
          // Displaying user object here
        })
        .catch((error) => {
          const { code, message } = error;
          this.setState({ loggingInNow: false });
        });

    } catch (error) {
      if (error.code === statusCodes.SIGN_IN_CANCELLED) {
        // user cancelled the login flow
        this.setState({ loggingInNow: false });
      } else if (error.code === statusCodes.IN_PROGRESS) {
        // operation (f.e. sign in) is in progress already
      } else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
        // play services not available or outdated
        this.setState({ loggingInNow: false });
      } else {
        // some other error happened
        this.setState({ loggingInNow: false });
      }
    }
  };
}

What the output of console.log(data) in your signin request ?

Try to remove GoogleSignin.configure(); in your loginGoogle function

Ahh please ignore me - I was looking in the wrong part of the returned JSON (not in the additionalUserInfo object).
Many thanks for your help @Yose216


Add auto-complete for packages in .cabal files

https://hackage.haskell.org/packages/.json
https://hackage.haskell.org/packages/docs

Alternatively without the .json curl -X GET -H "Content-type: application/json" -H "Accept: application/json" https://hackage.haskell.org/packages/


Create aws-step-functios-kendra-web-crawler-mfa-login

I have created a new repository, with the suggestions made by you. But I didn't understood how to integrate these two Repositories.
I have attached the link to the new repo, as requested by you
aws-step-functions-kendra-web-crawler-mfa-login

Hi Ameya,
Thanks for your interest in the webcrawler and for creating a derivative project!
I’m afraid your tool is outside the scope of the webcrawler sample and so is best suited as a separate entity, and unfortunately I think linking to it might be confusing for users that find the sample code from the blog post.
Best,
Jack

Thank you for your feedback on my PR. I understand that my tool is not directly related to the webcrawler sample and might cause confusion for some users. I appreciate your work on the webcrawler and I wanted to share my derivative project with you and others who might find it useful.
I respect your decision to decline my PR and I will look for another way to showcase my tool. If you have any suggestions or advice on how to do that, I would be grateful to hear them.


Added tests for upstream tracking branches

This is a supplemental PR to #69 which adds in tests. When #69 is landed, this will be squashed/landed on top of it so everyone gets their appropriate attribution. In this PR:

Original patches for #69
Added tests to verify all cases of branches

/cc @rpdelaney

No comments.

Great, thanks =)


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-source-version-target/pull/244 is merged into live branch.
Auto archive content to https://github.com/opstest2/docs-archive-test-source-version-target.git

Docs Build status updates of commit 74d9792:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

.openpublishing.redirection.json
:white_check_mark:Succeeded

versioningArchiveSourceFolder/TOC.yml
:white_check_mark:Succeeded
View (sql-server-2014 || azuresqldb-current || azuresqldb-mi-current || azure-sqldw-latest || >= aps-pdw-2016 || >= sql-server-2016 || >= sql-server-linux-2017 || sql-server-previousversions || sqlallproducts-allversions)

versioningArchiveSourceFolder/docfx.json
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Does it works with Sequel?

I use Squel-rails and sequel-devise  gems. When I run rails g devise_token_auth:install User auth, I have an exception: 'retrieve_connection': No connection pool with 'primary' found. (ActiveRecord::ConnectionNotEstablished) . Is there any way to use devise_token_auth with Sequel?

@unrooty you'll need to be more specific.

Nobody can help with this question?

@unrooty not without more detail. You've refused to elaborate so I'm closing for now.
If I had to guess, you're asking if this gem works with Sequel instead of ActiveRecord, which I don't think it does. Feel free to write a pull request though if you can figure it out!


Xfce updates 2024-03-10

https://github.com/xfce-mirror/libxfce4ui/compare/libxfce4ui-4.18.5...libxfce4ui-4.18.6
https://github.com/xfce-mirror/xfce4-weather-plugin/compare/xfce4-weather-plugin-0.11.1...xfce4-weather-plugin-0.11.2
Things done

Built on platform(s)

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

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

@ofborg test xfce

@ofborg build xfce.xfce4-weather-plugin


Does test.py apply score threshold to predicitions?

It looks like there's score threshold of 0.3 applied to predictions in the images obtain by test.py. My config file uses a score threshold of 0. Is it possible that the model or test.py is overriding this?

the same question. it seems like in /build/lib/mmdet/visualization   def add_datasample  pred_score_thr=0.3


Could you please tell me the version of DGL, PyTorch, and CUDA you were using?

The code constantly yields errors about the devices. Each time I modified the code according to the information, new errors occurred. I think it might help if you can tell me the version of these packages you were using. Thanks.

Sorry about that. Here are the package versions:
transformers==3.0.1
torch==1.2.0
pytorch-pretrained-bert==0.3.0
dgl==0.3.0
I think I was using cuda 10.0.

Sorry about that. Here are the package versions:
transformers==3.0.1
torch==1.2.0
pytorch-pretrained-bert==0.3.0
dgl==0.3.0
I think I was using cuda 10.0.

Hi, can you tell me the version of python you were using


JsonDeserializer may need to be abstract

Currently in order to use the JsonDeserializer using the ProducerConfig API in which you simply pass a String containing the full class name of the deserializer you must extend JsonSerializer to provide the Java entity class (example).   Alternatively the example given by Apache Kafka docs is to use the alternative ProducerConfig API in which you pass an already configured Deserializer object, so therefore support a configure method as shown in the developer guide.  We're currently just relying on the constructor, but it suffers a similar issue of not supporting simple class name String configuration.  There may be other strategies as well.  Needs investigation.

In order to use the JsonDeserializer by passing an already instantiated object we will leave this non-abstract.   No need to limit it's usage possibilities by requiring users to extend it.


could randomizer hold previous values?

I go into the COND menu and pick seed 54, smooth 6, offset 3 and commit to randomizing some parameter of the sequence. Then let's say I want to randomize some other parameter with seed 54, smooth 6, offset 3. I have to start from scratch and redial that in. That's a lot of button pushes and wiggles.
Could the front COND menu have a "redo last params" option, or could the Euclidiean and random generators remember the previous state? (Doesn't have to be persistent after power cycle)
Thanks!

I assume this is a duplicate of #255


♻View Projects when 0

Cc: @ravidhaduk @jimmidier @adamcogan
Pain

As per the email from Adam, Change the text of the "View Projects" button with the number of projects because it should not be a surprise when the user has zero projects.
Change "View Projects" button text
From
"View Projects"
To
"View Projects (5)" - When 5 projects
OR
"View Projects (none)" - When zero projects
Screenshots

Figure: When use has Zero projects.
Tasks

[ ] Update the "View Projects" button text with the number of Projects.

Definition of Done

[ ] All tasks are updated and closed
[ ] No high priority defects/bugs are on that user story
[ ] Code reviewed by one other team member (e.g. Checked by Bill)
[ ] All acceptance criteria have been met
[ ] Deployed to Dev
[ ] Complex code is documented (removing technical debt)
[ ] Deployed to Production
[ ] Add description about the changes for the PBI
[ ] Tick off the definition of done tasks in the PBI
[ ] (Optional) A Done Video, particularly for PBI with multiple stages

Thanks!

Done - Updated View Projects button text with the number of projects.

Figure: View Projects button When use has a number of projects.


Inconsistent values for notify_service in replacement for systemd::service_limits

Affected Puppet, Ruby, OS and module versions/distributions

Puppet: 7.25.0
Ruby: 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-linux]
Distribution: Rocky Linux release 9.2 (Blue Onyx)
Module version: 7.1.0

How to reproduce (e.g Puppet code you use)
The deprecation notice states:

The type systemd::service_limits is deprecated and systemd::manage_dropin or systemd::dropin_file should be used instead.

What are you seeing
Wanting to set LimitNOFILE with the puppet-systemd module, I read the deprecation notice and used systemd::dropin_file as we already have a working example. The limit was set correctly for the service, but on re-review of the module code, I felt using systemd::manage_dropin would be less error prone
When using service_entry in systemd::manage_dropin, the dropin file was correctly created but the service did not have its limit changed. I had to add notify_service: true for the service to be restarted and set the limit correctly
What behaviour did you expect instead
Given the deprecation notice and systemd::manage_dropin or systemd::dropin_file are offered as equal alternatives, I would expect both types to have the same defaults for notify_service, whereas we have different defaults
$ egrep -r 'Boolean.*notify_service' manifests/
manifests/manage_dropin.pp:  Boolean                          $notify_service          = false,
manifests/dropin_file.pp:  Boolean                                     $notify_service          = true,

Any additional information you'd like to impart
I am guessing some of this came from the work in https://github.com/voxpupuli/puppet-systemd/issues/463
Also, I am well aware I could be told to RTFM, which I ended up doing, but in the spirit of the principle of least surprise and people who come after me, it would be nice to have a consistent default for notify_service (and IMHO, that would be true)
Thanks for such a great module, always appreciate your work

+1 for consistent behavior.  IMHO, the default should be to restart what has to be restarted, and offer the possibility to opt-out from restarting services if needed be.


error when some data in mongodb had been updated

when updating data，it throw en exception such as behind:
Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.5/site-packages/mongo_connector/util.py", line 107, in wrapped
func(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/mongo_connector/oplog_manager.py", line 298, in run
entry["o2"]["_id"], entry["o"], ns, timestamp
File "/usr/local/lib/python3.5/site-packages/mongo_connector/util.py", line 33, in wrapped
return f(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/solr_doc_manager-0.1.0-py3.5.egg/mongo_connector/doc_managers/solr_doc_manager.py", line 252, in update
doc.pop('ns')
KeyError: 'ns'
so when debuging the source, I found that there's no ns in doc，so after I comment it, it does work.

did you managed to resolve this problem?

@jekeans it seems that your schema.xml is mis-configured. Make sure that it follows the provided sample.
Particularly these lines should be present:
   <!-- metadata used by mongo-connector -->
   <field name="_ts" type="long" indexed="true" stored="true" required="true" multiValued="false" />
   <field name="ns" type="string" indexed="true" stored="true" required="true" multiValued="false" />

Hope this helps. Thanks!


Import error during using cypress 4.9.0 with cypress-real-events

Could you please fix import issues for old versions of Cypress.
Demo project attached
Archive.zip
Steps to reproduce:

Run 'npm i' into demo project terminal
Run 'npx cypress open'
Try to run one of tests

I wonder if I'm having the same issue- using cypress-6.4.0 and cypress-real-events-1.1.0.
when running a test, I get an error:
/Users/dictionaryadmin/Desktop/CypressTest/node_modules/cypress-real-events/support.js:1
import { realClick } from "./commands/realClick";
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
please let me know if there's any other info I could provide.  thanks

@bliq00 do you use any kind of preprocessors?

do you mean like a minify or babelify?  No i don't use anything like that.

Hi, any further thoughts on what might be causing the issue here?

No idea, for me it works perfectly. If you can create reproduction will be helpful

what platform are you using?  I'm on MacOS catalina.  I wonder if that makes any difference.

I don't care. Make a reproduction with latest cypress -> I will try to fix it

Hello, @dmtrKovalenko , I'm getting same issue with 6.4.0 Cypress and cypress-real-events 1.2.0
"SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'"
I've made all according to installation steps from here https://github.com/dmtrKovalenko/cypress-real-events.

@Kniaziev I understand. But can you provide me a reproduction? Github repository that reproducing the error

@dmtrKovalenko I've sent you a link to your email with a zipped folder.

@dmtrKovalenko as an additional information error is not present if import "cypress-real-events/support"; is not in cypress/support/index.js file, anyway using cypress-real-events is not possible.

Same issue for me
tsconfig
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
 "lib": [
    "DOM",
    "ES6"
],

using
const browserify = require('@cypress/browserify-preprocessor');
options.browserifyOptions.plugin.unshift(['tsify']);
as per cypress setup recommendations

Hello,
I'm using Cypress 6.5 and faced with the same problem:
SyntaxError: 'import' and 'export' may appear only with 'sourceType: module'
I have  on("file:preprocessor", cucumber()); and on("before:browser:launch", in plugins.

@dmtrKovalenko
https://github.com/rupinr/cypress-cucumber-typescript-example/tree/cypress-real-events This branch has the issue,
Please take a look at this.

Under node_modules/cypress-real-events/support.js:
import { realClick } from "./commands/realClick";
import { realHover } from "./commands/realHover";
import { realSwipe } from "./commands/realSwipe";
import { realPress } from "./commands/realPress";
import { realType } from "./commands/realType";
import { realTouch } from './commands/realTouch';
Cypress.Commands.add("realClick", { prevSubject: true }, realClick);
Cypress.Commands.add("realHover", { prevSubject: true }, realHover);
Cypress.Commands.add("realTouch", { prevSubject: true }, realTouch);
Cypress.Commands.add("realSwipe", { prevSubject: true }, realSwipe);
Cypress.Commands.add("realPress", realPress);
Cypress.Commands.add("realType", realType);

This is not a CommonJS file. Anyone importing this library will need some means to transpile them.
I think if cypress is set to work with typescript, this will take care of it. But not for non-typescript projects.
Anyhow, the distribution of this plugin should really not include import.

:tada: This issue has been resolved in version 1.3.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Run the command on the slack channel, only the information of the corresponding cluster is displayed.

This is very useful bot to operate kubernetes cluster.
Thanks for making it.
I suggest an improvement to make this bot better.
This is suggestions:
Running the botkube command on the slack channel, only the information of the corresponding cluster is displayed.

Hey @zodiac12k,
Thanks for using BotKube :). We have a couple of designs in mind for multiple cluster support. We will soon add the support once we finalize the design.

Fixed with https://github.com/infracloudio/botkube/pull/39