How do I prepare my input data? I have a folder of pngs, what do I do with them?

I tried putting the images directly in the data/ directory as instructed on the README.md page, but this just leads to the following error:
FileNotFoundError: [Errno 2] No such file or directory: './data/faces_emore/lfw/meta/sizes'

Someone in this issue suggested to use prepare_data.py from the following repository (which btw also is in this repo under backup/):
https://github.com/TreB1eN/InsightFace_Pytorch#323-prepare-dataset--for-training
But that seems to be unable to work with just .pngs either, it seems to be looking for some sort of .rec file:
mxnet.base.MXNetError: [17:27:25] src/io/local_filesys.cc:209: Check failed: allow_null:  LocalFileSystem::Open "data/faces_emore/train.rec": No such file or directory

Any advice? Thanks for your attention.

The code is quite confusing, as it contains various different methods for alignment and normalization. After a lot of experiments, I found out that the pre-trained network IR-152 works best if the images are preprocessed as follows:

Read in image
If your image is gray scale, convert it to 3 channel color image
Perform face detection using the script align/detector.py to obtain a face bounding box
Extend the face bounding box to a square box using the function convert_to_square in script align/box_utils.py
Crop image to square box
Resize image to 128x128
Center crop image to 112x112
If necessary (if image was read in by cv2) convert image from BGR to RGB
Convert image to tensor
Normalize mean and std to the values used in training (for IT-152, that's mean = [0.5, 0.5, 0.5] and std = [0.5, 0.5, 0.5])

That is essentially the procedure implemented in extract_feature_v1.py and extract_feature_v2.py except that these scripts assume that the images have already been cropped to the squared face bounding box. You can use the following code:
from PIL import Image
import detector
import box_utils
def l2_norm(input, axis = 1):
norm = torch.norm(input, 2, axis, True)
output = torch.div(input, norm)
return output
transform = transforms.Compose([
transforms.ToTensor(),
transforms.Normalize( mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])
for inpicfile in inpiclist:
pil_image = Image.open(inpicfile)
MIN_FACE_SIZE = 0.2 * np.float(pil_image.size[0])  # adjust that to your needs
detector.detect_faces(pil_image, min_face_size = MIN_FACE_SIZE)
box = box_utils.convert_to_square(box)
a,b,c,d = np.array(box[0,0:4], dtype = int)
croppedImg = pil_image.crop((a,b,c,d))
croppedImg = croppedImg.resize((128,128), resample = Image.BILINEAR)
croppedImg = croppedImg.crop((8,8,120,120))
inputTensor = transform(croppedImg)
inputTensor = inputTensor.unsqueeze(0)
with torch.no_grad():
embedding = l2_norm(backbone(inputTensor.to('cpu')).cpu())  # change this to you CUDA

Thanks a lot for going through the effort to write this answer. I've decided to use the Azure Face API rather than rolling my own, but your answer might be useful for someone else. I can't edit your answer, can you perhaps add formatting to the Python code?

@JoMe2704 I have question - does
transforms.Normalize( mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) map the pixel values from the 3 channels into the range [0;1] ?
If so then if I want to map in range [-1;+1] should I set the values to 0 ?

@JoMe2704 I have question - does
transforms.Normalize( mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) map the pixel values from the 3 channels into the range [0;1] ?
If so then if I want to map in range [-1;+1] should I set the values to 0 ?

No, transforms.ToTensor() already maps the pixel values to tensor values in the range [0;1]. The subsequent transformation transforms.Normalize( mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) maps each tensor value x to (x - 0.5)/0.5. See https://jhui.github.io/2018/02/09/PyTorch-Data-loading-preprocess_torchvision/ for an explanation. Thus, the resulting tensor has values in the range [-1, 1].
The transform transforms.Normalize( mean=[0, 0, 0], std=[1, 1, 1]) would leave the tensor values unchanged (x -> (x-0)/1), resulting in values in the range [0,1].

No, transforms.ToTensor() already maps the pixel values to tensor values in the range [0;1]. The subsequent transformation transforms.Normalize( mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5]) maps each tensor value x to (x - 0.5)/0.5. See https://jhui.github.io/2018/02/09/PyTorch-Data-loading-preprocess_torchvision/ for an explanation. Thus, the resulting tensor has values in the range [-1, 1].
The transform transforms.Normalize( mean=[0, 0, 0], std=[1, 1, 1]) would leave the tensor values unchanged (x -> (x-0)/1), resulting in values in the range [0,1].

The code is quite confusing, as it contains various different methods for alignment and normalization. After a lot of experiments, I found out that the pre-trained network IR-152 works best if the images are preprocessed as follows:

Read in image
If your image is gray scale, convert it to 3 channel color image
Perform face detection using the script align/detector.py to obtain a face bounding box
Extend the face bounding box to a square box using the function convert_to_square in script align/box_utils.py
Crop image to square box
Resize image to 128x128
Center crop image to 112x112
If necessary (if image was read in by cv2) convert image from BGR to RGB
Convert image to tensor
Normalize mean and std to the values used in training (for IR-152, that's mean = [0.5, 0.5, 0.5] and std = [0.5, 0.5, 0.5])

That is essentially the procedure implemented in extract_feature_v1.py and extract_feature_v2.py except that these scripts assume that the images have already been cropped to the squared face bounding box. You can use the following code:
import torch
import torchvision.transforms as transforms
from PIL import Image
import detector
import box_utils

def l2_norm(input, axis = 1):
	norm = torch.norm(input, 2, axis, True)
	output = torch.div(input, norm)
	return output

transform = transforms.Compose([
		transforms.ToTensor(),
		transforms.Normalize( mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])

for inpicfile in inpiclist:
   pil_image = Image.open(inpicfile)
   if pil_image.mode != 'RBG':
	rgbimg = Image.new("RGB", pil_image.size)
	rgbimg.paste(pil_image)
	pil_image = rgbimg
   MIN_FACE_SIZE = 0.2 * np.float(pil_image.size[0])  # adjust that to your needs
   detector.detect_faces(pil_image, min_face_size = MIN_FACE_SIZE)
   box = box_utils.convert_to_square(box)
   a,b,c,d = np.array(box[0,0:4], dtype = int)
   croppedImg = pil_image.crop((a,b,c,d))
   croppedImg = croppedImg.resize((128,128), resample = Image.BILINEAR)
   croppedImg = croppedImg.crop((8,8,120,120))
   inputTensor = transform(croppedImg)
   inputTensor = inputTensor.unsqueeze(0)
   with torch.no_grad():
      embedding = l2_norm(backbone(inputTensor.to('cpu')).cpu())  # change this to you CUDA

Hi~ I don’t know what is the use of extracting these features. I hope to get the output label of the input image. What should I do?

Hi @JoMe2704 @changxinC ,
I am trying to train a dataset, I am not able to figure out the data format required for training, currently my data is inside
D:/face.evoLVe.PyTorch/data/dataV1/
Inside dataV1 directory the data is as follows:
-> id1/
-> 1.jpg
-> ...
-> id2/
-> 1.jpg
-> ...
-> ...
-> ...
-> ...
Data is already aligned, resized to 112 using the align script provided in repo.
When I run train.py, I am getting file not found error, I saw lot of people are facing the same issue, not being able to get the correct data format.
It would help a lot of people if you can guide how to get the correct dataset format for training. Help would be much appreciated, thank you.

The code is quite confusing, as it contains various different methods for alignment and normalization. After a lot of experiments, I found out that the pre-trained network IR-152 works best if the images are preprocessed as follows:

Read in image
If your image is gray scale, convert it to 3 channel color image
Perform face detection using the script align/detector.py to obtain a face bounding box
Extend the face bounding box to a square box using the function convert_to_square in script align/box_utils.py
Crop image to square box
Resize image to 128x128
Center crop image to 112x112
If necessary (if image was read in by cv2) convert image from BGR to RGB
Convert image to tensor
Normalize mean and std to the values used in training (for IR-152, that's mean = [0.5, 0.5, 0.5] and std = [0.5, 0.5, 0.5])

That is essentially the procedure implemented in extract_feature_v1.py and extract_feature_v2.py except that these scripts assume that the images have already been cropped to the squared face bounding box. You can use the following code:
import torch
import torchvision.transforms as transforms
from PIL import Image
import detector
import box_utils

def l2_norm(input, axis = 1):
	norm = torch.norm(input, 2, axis, True)
	output = torch.div(input, norm)
	return output

transform = transforms.Compose([
		transforms.ToTensor(),
		transforms.Normalize( mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])

for inpicfile in inpiclist:
   pil_image = Image.open(inpicfile)
   if pil_image.mode != 'RBG':
	rgbimg = Image.new("RGB", pil_image.size)
	rgbimg.paste(pil_image)
	pil_image = rgbimg
   MIN_FACE_SIZE = 0.2 * np.float(pil_image.size[0])  # adjust that to your needs
   detector.detect_faces(pil_image, min_face_size = MIN_FACE_SIZE)
   box = box_utils.convert_to_square(box)
   a,b,c,d = np.array(box[0,0:4], dtype = int)
   croppedImg = pil_image.crop((a,b,c,d))
   croppedImg = croppedImg.resize((128,128), resample = Image.BILINEAR)
   croppedImg = croppedImg.crop((8,8,120,120))
   inputTensor = transform(croppedImg)
   inputTensor = inputTensor.unsqueeze(0)
   with torch.no_grad():
      embedding = l2_norm(backbone(inputTensor.to('cpu')).cpu())  # change this to you CUDA

Hi~ I don’t know what is the use of extracting these features. I hope to get the output label of the input image. What should I do?

While the network has been trained to perform classification of the subjects (persons) in the training sets, this doesn't help you, if you look at images of persons that aren't in the training set. In order to use the network for images of any person, you use the features (embeddings) of the finale layer. These can be used to measure the similarity of the faces. Precisely, the euclidean distance between the embeddings of two face images is a measure for the dissimilarity. Depending on the specific variance of the images (face pose, facial expression, illumination, sharpness, ageing), you can set a threshold for the distance to decide if the images depict the same person.

Hi @JoMe2704 @changxinC ,
I am trying to train a dataset, I am not able to figure out the data format required for training, currently my data is inside
D:/face.evoLVe.PyTorch/data/dataV1/
Inside dataV1 directory the data is as follows:
-> id1/
-> 1.jpg
-> ...
-> id2/
-> 1.jpg
-> ...
-> ...
-> ...
-> ...
Data is already aligned, resized to 112 using the align script provided in repo.
When I run train.py, I am getting file not found error, I saw lot of people are facing the same issue, not being able to get the correct data format.
It would help a lot of people if you can guide how to get the correct dataset format for training. Help would be much appreciated, thank you.

Sorry, I have no idea. I used my own images and scripts.

代码相当高，因为它包含了各种不同的卫星和归一化。 经过大量实验，我发现如果对图像进行了如下的理想，则预训练网络IR-152效果最佳：

读入图片
如果您的图像是图像，图像其转换为3幅彩色图像
使用脚本 align/detector.py 进行人脸检测，获取人脸眼框
使用剧本align/box_utils.py
将图像传达到法院
将图像大小调整为 128x128
将图像中心为112x112
如有必要（如果图像被 cv2 读入）将图像从 BGR 转换为 RGB
将图像转换为张量
将均值和标准差归一化为训练中使用的值（对于 IR-152，即均值 = [0.5, 0.5, 0.5] 和标准差 = [0.5, 0.5, 0.5]）

这最后是在extract_feature_v1.py和extract_feature_v2.py中实现的，除了这些假想已经被代码骗到了人脸过程画面。您可以使用以下：
import torch
import torchvision.transforms as transforms
from PIL import Image
import detector
import box_utils

def l2_norm(input, axis = 1):
	norm = torch.norm(input, 2, axis, True)
	output = torch.div(input, norm)
	return output

transform = transforms.Compose([
		transforms.ToTensor(),
		transforms.Normalize( mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])

for inpicfile in inpiclist:
   pil_image = Image.open(inpicfile)
   if pil_image.mode != 'RBG':
	rgbimg = Image.new("RGB", pil_image.size)
	rgbimg.paste(pil_image)
	pil_image = rgbimg
   MIN_FACE_SIZE = 0.2 * np.float(pil_image.size[0])  # adjust that to your needs
   detector.detect_faces(pil_image, min_face_size = MIN_FACE_SIZE)
   box = box_utils.convert_to_square(box)
   a,b,c,d = np.array(box[0,0:4], dtype = int)
   croppedImg = pil_image.crop((a,b,c,d))
   croppedImg = croppedImg.resize((128,128), resample = Image.BILINEAR)
   croppedImg = croppedImg.crop((8,8,120,120))
   inputTensor = transform(croppedImg)
   inputTensor = inputTensor.unsqueeze(0)
   with torch.no_grad():
      embedding = l2_norm(backbone(inputTensor.to('cpu')).cpu())  # change this to you CUDA

hello, When I use the above code you mentioned, I set the inpiclist to the path of my picture: /home/face.evoLVe/max/150.jpg, but when I running this code,it  shows the error that 'box' is not defined and backbone is not defined, how can I solve it? Thank you!

hello, When I use the above code you mentioned, I set the inpiclist to the path of my picture: /home/face.evoLVe/max/150.jpg, but when I running this code,it shows the error that 'box' is not defined and backbone is not defined, how can I solve it? Thank you!

This was just the relevant code for face alignment, not a complete script. You need to initialize and load the model before.
# Load torch model
from model_irse import IR_152  # This example uses IR 152
MODELPATH = '/home/face.evoLVe/model_IR152.pth'  # change this to the path of your model file
backbone= IR_152((112, 112))
backbone.load_state_dict(torch.load(MODELPATH, map_location=torch.device('cpu'))) # change this to CUDA if you use a gpu
backbone.eval()
set_grad_enabled(False)

inpiclist should be a list of file paths, not a single file path.
IMGPATH = '/home/face.evoLVe/images/' # Change this to your image folder
inpiclist = [f for f in os.listdir(IMGPATH) if f.endswith('.jpg')]

There was an error in my code, right in the line before you get the error:
box, points = detector.detect_faces(pil_image, min_face_size = MIN_FACE_SIZE)
So, here is the complete code:

import torch
import torchvision.transforms as transforms
from PIL import Image
import detector
import box_utils

def l2_norm(input, axis = 1):
	norm = torch.norm(input, 2, axis, True)
	output = torch.div(input, norm)
	return output

transform = transforms.Compose([
		transforms.ToTensor(),
		transforms.Normalize( mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])

# Load torch model
from model_irse import IR_152  # This example uses IR 152
MODELPATH = '/home/face.evoLVe/model_IR152.pth'  # change this to the path of your model file
backbone= IR_152((112, 112))
backbone.load_state_dict(torch.load(MODELPATH, map_location=torch.device('cpu'))) # change this to CUDA if you use a gpu
backbone.eval()
set_grad_enabled(False)

IMGPATH = '/home/face.evoLVe/images/' # Change this to your image folder
inpiclist = [f for f in os.listdir(IMGPATH) if f.endswith('.jpg')]
for inpicfile in inpiclist:
   pil_image = Image.open(inpicfile)
   if pil_image.mode != 'RBG':
	rgbimg = Image.new("RGB", pil_image.size)
	rgbimg.paste(pil_image)
	pil_image = rgbimg
   MIN_FACE_SIZE = 0.2 * np.float(pil_image.size[0])  # adjust that to your needs
   box, points = detector.detect_faces(pil_image, min_face_size = MIN_FACE_SIZE)
   box = box_utils.convert_to_square(box)
   a,b,c,d = np.array(box[0,0:4], dtype = int)
   croppedImg = pil_image.crop((a,b,c,d))
   croppedImg = croppedImg.resize((128,128), resample = Image.BILINEAR)
   croppedImg = croppedImg.crop((8,8,120,120))
   inputTensor = transform(croppedImg)
   inputTensor = inputTensor.unsqueeze(0)
   with torch.no_grad():
      embedding = l2_norm(backbone(inputTensor.to('cpu')).cpu())  # change this to you CUDA


Allow new lines

Closes #210
It's just an HTML rendering thing!
I replaced <p> and <span> tags with <pre> and newlines work. Only problem is that styling is now broken cc @grace-fagan

oh lol. TIL about the whitespace property. nice!


Usability/GUI: dont't show full path in ListView, show only file name

Show only file name in ListView.
Create a custom ListCell renderer (which might show an icon, some details such as timestamps, size etc.).
Indicate path in title or extra field.
Consider making the path modifiable using a text field.

Done, there is now also date and time as well as an icon.


Remove ipv6 code-path and other minor fixes

@Luni-4 The TL;DR is: you don't have a valid ipv6 addr assigned on the ESP IDF Wifi interface, yet you are configuring the mDNS responder as if you have one.

Thanks a lot for your fix! Ok, now I can understand the context, thus I was enabling the IPv6 interface without setting it up beforehand.
Do you think we should add your comments as documentation in edge_mdns::bind and edge_mdns::Mdns API? Perhaps they could help other people.
Can I add this example in edge-net as a practical example? I can open a PR without any problem! :)

@ivmarkov Thanks a lot for your fix! Ok, now I can understand the context, thus I was enabling the IPv6 address without setting it up beforehand.
Do you think we should add your comments as documentation in edge_mdns::bind and edge_mdns::Mdns API? Perhaps they could help other people.

I will, shortly.

Can I add this example on edge-net as a practical example? I can open a PR without any problem! :)

You can try but it might be a bit difficult to compile out of the box - you'll need a dep on esp-idf-svc, a build.rs file for the example, config.toml, sdkconfig.defaults... but sure you can try.

You can try but it might be a bit difficult to compile out of the box - you'll need a dep on esp-idf-svc, a build.rs file for the example, config.toml, sdkconfig.defaults... but sure you can try.

Yep, I'm going to try this example and see if I get some problems, and then I will sure add an example


Bug Report: HTML5 Issue on 1.4.1

So basicly i try to port my fnf mod to chromebook/html5 on 1.4.1 but it wont work can someone help me out?

you gave absolutely no information, so there is no way anyone can help you.
also, this should be a discussion as issues are for suggestions/bugs with kade engine itself, not with forks/mods of it.

^


Update version: GiulioSorrentino.Latorredibabele version 3.0

Checklist for Pull Requests

[ ] Have you signed the Contributor License Agreement?
[ ] Is there a linked Issue?

Manifests

[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.6 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

Hi @numerunix,
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 870.)

Automatic Validation ended with:

Installation failed with exit code -1978335187
2024-03-18 15:22:55.826 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(757)\WindowsPackageManager.dll!00007FFC6202C11F: (caller: 00007FFC61DB8D6F) LogHr(1) tid(1fe8) 8A15005E     Msg:[D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(30)\WindowsPackageManager.dll!00007FFC61F32B08: (caller: 00007FFC61FDBC20) Exception(1) tid(1fe8) 8A15005E ]
2024-03-18 15:22:55.826 [REPO] Failed to open available source: msstore
2024-03-18 15:22:58.118 [CLI ] Caught wil::ResultException: D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(30)\WindowsPackageManager.dll!00007FFC61F32B08: (caller: 00007FFC61FDBC20) Exception(1) tid(1fe8) 8A15005E
2024-03-18 15:23:04.686 [FAIL] D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\RepositorySource.cpp(757)\WindowsPackageManager.dll!00007FFC48A5C11F: (caller: 00007FFC487E8D6F) LogHr(1) tid(5fc) 8A15005E     Msg:[D:\a_work\1\s\external\pkg\src\AppInstallerRepositoryCore\Rest\Schema\HttpClientHelper.cpp(30)\WindowsPackageManager.dll!00007FFC48962B08: (caller: 00007FFC48A0BC20) Exception(1) tid(5fc) 8A15005E ]
2024-03-18 15:23:04.686 [REPO] Failed to open available source: msstore
2024-03-18 15:23:49.896 [FAIL] Installer failed security check. Url: https://github.com/numerunix/Solitario.Avalonia/releases/download/3.0/Solitario.Avalonia-3.0-amd64.msi Result: 0x80004005
MSI (s) (A0:18) [15:23:17:443]: Executing op: ComponentRegister(ComponentId={7D8F811F-FA90-5B50-B79B-7BEBC828F0A0},KeyPath=2285\SOFTWARE\Microsoft\Windows\Windows Error Reporting\RuntimeExceptionHelperModules\C:\Program Files\dotnet\shared\Microsoft.NETCore.App\8.0.3\mscordaccore.dll,State=3,,Disk=1,SharedDllRefCount=0,BinaryType=1)
MSI (s) (A0:18) [15:23:19:005]: Executing op: RegOpenKey(Root=-2147483646,Key=SOFTWARE\Microsoft\Windows\Windows Error Reporting\RuntimeExceptionHelperModules,,BinaryType=1,,)
Property(S): ErrorDialog = ErrorDlg

(Automated response - build 870.)

Hi @numerunix,
The package didn't pass a Defender or similar security scan. This might be a false positive and we can rescan tomorrow.
(Automated response - build 870.)

@wingetbot run


React rendering failure when trying to use Media component to do anything at all

I'm unable to use Media component to do anything without getting an error like this:

Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of Temp.

I also see this warning in the console:

Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in. Check the render method of Temp.
in Temp (created by DetailPane)
in div (created by Panel)
in div (created by Panel)
in Panel (created by DetailPane)
in DetailPane (created by Page)
in div (created by Page)
in Page (created by Root)
in Root
in AppContainer

I based Temp on the example component given in the README:
class Temp extends React.Component<{}, {}> {
  public render () {
    return (

          <Media query={{ maxWidth: 599 }}>
            {(matches) => matches ? (

The document is less than 600px wide.

            ) : (

The document is at least 600px wide.

            )}
          </Media>

    );
  }
}

I then try using this within another React component:
  ...
  public render () {
    return (
        <Panel className={`${styles.detailPane}`}>

msg1FF

          {DetailPane.createPropertyRow('Type', 'Tx', true)}
          {DetailPane.createPropertyRow('Template', <FormControl type='text' placeholder='0x FF FF ...'/>)}
          {DetailPane.createPropertyRow('Message ID', <FormControl type='text' placeholder='0x FF ...'/>, true)}
          {DetailPane.createPropertyRow('Repeat rate', <FormControl type='number'/>, true)}

          <Temp/>

Fields

          <BootstrapTable striped hover data={fields}>
            <TableHeaderColumn isKey dataField='name'>Name</TableHeaderColumn>
            <TableHeaderColumn dataField='type' width='25%'>Type</TableHeaderColumn>
            <TableHeaderColumn dataField='startBit' width='12%'>Start Bit</TableHeaderColumn>
            <TableHeaderColumn dataField='size' width='10%'>Size</TableHeaderColumn>
            <TableHeaderColumn dataField='endianness' width='15%'>Endianness</TableHeaderColumn>
            <TableHeaderColumn dataFormat={DetailPane.optionsFormatter} width='60'/>
          </BootstrapTable>
        </Panel>
    );
  }

For the record, I've just tried something very similar with react-responsive and the same issue occurs.

I've discovered the issue; I need to use import * as Media from 'react-media'; instead of import Media from 'react-media' (and ditto with react-responsive).
I'm not sure why this is as you're clearly exporting Media as the default export in your source code. The former should work as well. Might be a transpiling issue on my end.

Yep, sounds like you've got an issue with your compilation step. Good luck!

Just in case someone comes by this and uses cjs imports and gets this. Try
const Media = require('react-media').default;

I think this should be re-opened. I had exactly the same problem. Vanilla react project using parcel builder. never any problems with other packages. At the very least, add it as a tip to the README file? Bad not to have a working hello world example with a 'non-custom' builder


[GameLogic] /item chat command

For all kind of testing propuse i've been working on /item command.
/item Group Number Level Durability Skill Exc Opt Ancient

Nice 👍🏻 Had this in my big todo list, too 😄

In the first version of the command the arguments will be the followings
/item {Group} {Number} {Level} {Exc} {Skill} {Luck} {Opt}
Group (byte): Item Group
Number (sort): Item Number
Level (byte): 0-15
*Exc (byte): Limit the ItemOptions(excellent) collection (sorting comes from db engine) 0-N
*Skill (bool): Add skill to item (excellent override this value) 0-1
*Luck (bool): Add luck to item 0-1
*Opt (byte): add option to item 0-4
(*) Optional Arguments
next release may contain socket and ancient options?


[Feature] Multicall Support

Component
contract
Describe the feature you would like
Similar to ethers-rs, it would be great to port over multicall to alloy.
https://github.com/gakonst/ethers-rs/tree/master/ethers-contract/src/multicall
Additional context
No response

Would like to work on this, but I don't think this is a core implementation that should be in the contract crate... I think it would be more oraganised to create another crate named contract-adapter or alloy-adapter, this could house contracts like;

Multicall
Permit2

and so on...
what do you think? @zilayo

I have a WIP implementation for the core ABI part here https://github.com/alloy-rs/core/pull/492 that may be of interest

I have a WIP implementation for the core ABI part here alloy-rs/core#492 that may be of interest

this is ineresting...

fn basic_builder() {
        let token = Address::with_last_byte(1);

        let builder: MulticallBuilder<Aggregate, ()> = MulticallBuilder::new_aggregate();
        assert_eq!(builder.calls(), &[]);

        let call1 = ERC20::totalSupplyCall {};
        let builder: MulticallBuilder<Aggregate, (ERC20::totalSupplyCall,)> =
            builder.push(&call1, token);
        assert_eq!(
            builder.calls(),
            &[IMulticall3::Call { target: token, callData: call1.abi_encode() }]
        );

        let call2 = ERC20::balanceOfCall { owner: Address::with_last_byte(2) };
        let builder: MulticallBuilder<Aggregate, (ERC20::totalSupplyCall, ERC20::balanceOfCall)> =
            builder.push(&call2, token);
        assert_eq!(
            builder.calls(),
            &[
                IMulticall3::Call { target: token, callData: call1.abi_encode() },
                IMulticall3::Call { target: token, callData: call2.abi_encode() },
            ]
        );

        let encoded_data = builder.abi_encode();
        let expected = IMulticall3::aggregateCall {
            calls: vec![
                IMulticall3::Call {
                    target: token,
                    callData: ERC20::totalSupplyCall {}.abi_encode(),
                },
                IMulticall3::Call {
                    target: token,
                    callData: ERC20::balanceOfCall { owner: Address::with_last_byte(2) }
                        .abi_encode(),
                },
            ],
        };
        assert_eq!(encoded_data, expected.abi_encode());

        let return_data = IMulticall3::aggregateCall::abi_encode_returns(&(
            U256::from(1),
            &[U256::from(2).abi_encode(), U256::from(3).abi_encode()][..],
        ));
        eprintln!("return_data: {:?}", hex::encode(&return_data));
        let decoded = builder.abi_decode(&return_data, true).unwrap();
        assert_eq!(
            decoded,
            (
                U256::from(1),
                (
                    ERC20::totalSupplyReturn { totalSupply: U256::from(2) },
                    ERC20::balanceOfReturn { balance: U256::from(3) }
                )
            )
        );
    }

this seems complete to me.... 👀

Would like to work on this, but I don't think this is a core implementation that should be in the contract crate... I think it would be more oraganised to create another crate named contract-adapter or alloy-adapter, this could house contracts like;

Multicall
Permit2

and so on...
what do you think? @zilayo

yeah I think multicall should be separate from the core contract logic.
The version @DaniPopes built looks great for an initial implementation.
@gakonst mentioned in tg about integrating multicalls with a Tower Layer, so not sure if there's already been discussions around what multicall in Alloy should look like (https://t.me/ethers_rs/34873).
I think long term it would be nice to have to have the multicall task configurable similar to viem's implementation:

user can create a multicall with a slice of x amount of calls, and optionally a batch size.
alloy handles splitting the calls into chunks of the batch size
alloy sends an eth_call message to the multicall contract for each chunk & aggregates the results.
The aggregated results are returned to the end user in a slice in the same order that they provided the calls in.

Would like to work on this, but I don't think this is a core implementation that should be in the contract crate... I think it would be more oraganised to create another crate named contract-adapter or alloy-adapter, this could house contracts like;

Multicall
Permit2

and so on...
what do you think? @zilayo

yeah I think multicall should be separate from the core contract logic.
The version @DaniPopes built looks great for an initial implementation.
@gakonst mentioned in tg about integrating multicalls with a Tower Layer, so not sure if there's already been discussions around what multicall in Alloy should look like (https://t.me/ethers_rs/34873).
I think long term it would be nice to have to have the multicall task configurable similar to viem's implementation:

user can create a multicall with a slice of x amount of calls, and optionally a batch size.
alloy handles splitting the calls into chunks of the batch size
alloy sends an eth_call message to the multicall contract for each chunk & aggregates the results.
The aggregated results are returned to the end user in a slice in the same order that they provided the calls in.

This is interesting...
I would get more context, rollout a POC, and make a draft PR

@DaniPopes would it be possible to merge your WIP? I would like to also add interfaces for Mulitcall1 and Multicall2... Lastly was there a reason this was closed?

Currently have a working initial implementation with Multicall V1/V2/V3 support.
Will hopefully have a draft PR ready within the next day or 2.


"Scan: include embedded subtitles (skip if existing)" not working

This function doesn't seem to work. For me subtitles are downloaded even if an embedded is available.
Tested with version 1.1-rc1 on PMS <IP_ADDRESS> Debian.

Hi.
Just to add my "me too" on this issue.
I have both "Scan: include embedded subtitles (skip if existing)" and "Scan: include external subtitles (skip if existing)" selected but no luck.
I'm using PMS <IP_ADDRESS>  on Mac OS 10.11 with Subliminal.bundle 1.1-RC1.

Is this the case for any video file with embedded subs? Can you post a mediainfo dump of one file please?

I was unable to upload the txt-file so I'll just post the results as text. I only included the "Text" part to keep it short, I hope that's what you need.
Text
ID: 3
Format: UTF-8
Codec ID: S_TEXT/UTF8
Codec ID/Info: UTF-8 Plain Text
Language: English
Default : Yes
Forced: No

OK that should work, I initially thought the embedded sub was an undefined one. I'll look into it, thanks :)

Could you post your plex.agents.subliminal.log* files?

http://pastebin.com/Asqv6A7G
Here is my latest log, it should only contain the scan of one episode with embedded subs.

OK, enzyme finds the embedded subtitle, but with language "und". It doesn't detect its language: "2015-10-02 21:03:02,845 (7fbe2bdb7700) :  DEBUG (logger:21) - subliminal.video: Found embedded subtitle set([<Language [und]>]) with enzyme"
Thanks, looking into it.

I'm considering updating enzyme to the current version. It may not fix that problem, though.
Would this new setting help you: "Treat unknown-language embedded subtitle as found"?

Yeah it would help in most cases I guess. But I assume that would mean no subs in any language will be downloaded if an unknown is detected?

Correct. I may have to have a deeper look into why it doesn't detect its obvious language.

I mainly use english subs and if subs are embedded they are usually english so that setting will be good enough for me for now.

Maybe switching from enzyme to pymediainfo (https://github.com/paltman-archive/pymediainfo/tree/master/pymediainfo) will fix a whole bunch of problems as it can parse any media file available - we currently only support MKV when using enzyme.

Please try https://github.com/pannal/Subliminal.bundle/releases/tag/1.1-rc2

Works perfectly for me, thank you.


nz-avatar scale is incorredct

Reproduction link
[https://stackblitz.com/edit/stackblitz-starters-t4ldds?file=sample-application%2Fsrc%2Fapp%2Fapp.component.ts](https://stackblitz.com/edit/stackblitz-starters-t4ldds?file=sample-application%2Fsrc%2Fapp%2Fapp.component.ts)
Steps to reproduce
https://postimg.cc/HV3qc4Hq
I have nz-avatar and its size is incorrect. Scale is zero. Actually I don't know why. I migrated v14 to v16 and worked directly with components in storybook and didn't see any issues. But once I just started to work with previously existing app, I can see this issue. It also happens if I have sidemenu that is closed by default (that's regular Angular component that uses nz-avatar). And interesting thing that if I have sidebar as default nz-sider, its size is correct, but once I reduce screensize, I operate with closed/opened states and can see this issue. But, if I firstly was on large screen, then reduced it to tablet, so the size of Text inside nz-avatar is correct, but if I reload page as tablet view, can see this issue...
What is expected?
Expected - size is set correctly
What is actually happening?
https://postimg.cc/HV3qc4Hq

Environment
Info

ng-zorro-antd
16.0.0

Browser
Chrome

Actually I just reproduced this on Stakblitz with v17. I think it can be common issue

Hi @HaidarVladyslav,
This is a possible fix for your issue #8365.

In the meantime, you can use this hack to get your problem solved:
component.html:
<nz-modal
  [(nzVisible)]="isVisible"
  nzTitle="The first Modal"
  (nzOnCancel)="handleCancel()"
  (nzOnOk)="handleOk()"
  (nzAfterOpen)="reScaleAvatar()"
>
  <ng-container *nzModalContent>
    <nz-avatar nzText="U S" #avatarComponent></nz-avatar>
  </ng-container>
</nz-modal>

component.ts:
@ViewChild('avatarComponent')
public avatarComponent!: NzAvatarComponent;

public reScaleAvatar(): void {
  this.avatarComponent['notifyCalc']();
}

Not that I am bracket syntax to call notifyCalc because it is a private property inside avatar component and cannot be accessed from outside.

Hi @HaidarVladyslav, This is a possible fix for your issue #8365.

I also tried that. But then other examples are broken. You can check existing 'Change Text' example, its position is incorrect.
I also tried to make 'setTimeout' with bigger value (50ms), but it works for my case. But in general we don't have to do like this.
Calling private method to rerender avatar-component also looks for me non-proper way
But thanks for your quick response!

@ParsaArvanehPA and about your temporary solution. Let's imagine I have avatar-component inside my custom component. My custom component is inside another component. And only then I have modal. This nesting to call 'nzAfterOpen' is strange. And if I have different usages of avatar-component across the app or across multiple apps, I need to call this method everywhere..

Hi @HaidarVladyslav, This is a possible fix for your issue #8365.

I also tried that. But then other examples are broken. You can check existing 'Change Text' example, its position is incorrect. I also tried to make 'setTimeout' with bigger value (50ms), but it works for my case. But in general we don't have to do like this.
Calling private method to rerender avatar-component also looks for me non-proper way
But thanks for your quick response!

So you are saying you checked out my branch and there were some parts not working properly? because that change text part seems to be working fine in #8365

@ParsaArvanehPA and about your temporary solution. Let's imagine I have avatar-component inside my custom component. My custom component is inside another component. And only then I have modal. This nesting to call 'nzAfterOpen' is strange. And if I have different usages of avatar-component across the app or across multiple apps, I need to call this method everywhere..

Yeah it is just a hack, best to wait for the solution to be merged.

Hi @HaidarVladyslav, This is a possible fix for your issue #8365.

I also tried that. But then other examples are broken. You can check existing 'Change Text' example, its position is incorrect. I also tried to make 'setTimeout' with bigger value (50ms), but it works for my case. But in general we don't have to do like this.
Calling private method to rerender avatar-component also looks for me non-proper way
But thanks for your quick response!

So you are saying you checked out my branch and there were some parts not working properly? because that change text part seems to be working fine in #8365

yes, please, look here - I just was spamming 'Change Text', and it's out of container


Implement New Concept Exercise: Enum Pattern

Getting Started
If you have not yet contributed to concept exercises before, this task requires some upfront reading to acquire the necessary background knowledge.
Here you can read about what Concept Exercises are and how they are structured:

What are Concept Exercises?
Concept Exercises
Concepts

Also, be aware of these general guidelines:

Exercism Markdown Specification
Exercism Formatting and Style Guide

Goal
Even though Go doesn't have a formal "enum" type, it is possible to have a type definition and then a block of constants of that type and have those constants act as parts of an enumeration. The goal here is to create a new concept exercise that teaches about this pattern.
That includes writing a concept and creating a new exercise.
Concepts
The following concept needs to be created:

enum-pattern

You can use the introduction.md file of the concept also as introduction.md file of the exercise. No need to create different content at this point. Additionally, if you want to save some time it is ok to not have an extensive about.md at this point. It can also be mainly the instructions.md content, maybe with some additions you would like to make.
Learning Objectives
The student should learn about the following topics and then practice them in the concept exercise:

given a type definition, create blocks of constants with constants of that type that act as an enum
show the use of iota as a helpful way to give values for the constants easily.

Prerequisites

type-definitions
(others might be necessary depending on the concrete exercise)

These prerequisites should be listed in the config.json entry for the exercise.
The prerequisites above are a baseline of the prerequisites that might be needed for the exercise.
When implementing the exercise, feel free to add more prerequisites if the exercise needs them.
Story Idea
It's a good idea for concept exercises to have a story that gives some flair and context to the tasks.
Create a new story for this exercise. The story doesn't need to be highly complex, even a small story goes a long way to make the tasks more interesting. For some inspiration for the story, check the other exercises on the track or the page Exercism docs: Stories for an overview of stories used across tracks.
Resources
Some links that might be helpful as a starting point and/or for the links section of the concept:

[https://www.davidagood.com/go-enum-pattern/](A Pattern For Enums in Go)
Working with Enums in Go
Safer Enums in Go

How to proceed

First accept this issue by saying "I'd like to work on this" (no need to wait for a response, just go ahead).
Use this issue to discuss any questions you have, what should be included in the content and whatnot, and to collect more reference material.
Create a PR and set "exercism/go" as reviewers. Additionally, you can write in #maintaining-go on Slack that your PR is ready for review. Once you incorporated any critical feedback that the reviewer might give you and the PR is approved, it will be merged by a maintainer.

FYI There is a wip exercise in the repo already that covers parts of what is listed above: savings-account, concept constants.
The exercise would probably need quite some improvement so it might be better to start from scratch. I just wanted to mention it.
Nevertheless, it might be worth thinking about sticking with constants as concept name (and adding some non-enum related into about constants) instead of creating enum as a concept which does not exist in the language. In the JavaScript track we also discussed this issue of "concepts the language lacks" and decided to better but the things that exist instead in the concept tree rather then the names of the things that don't exist but people might look for. Both ways have pros and cons of course. WDYT?

Sound good.
I agree with renaming this and making sure we name concepts just after things that are on the language.
If you agree, we can change this issue to be the improvement of that exercise (if any) and we make sure that both constants and this "enum" pattern are well covered.

If you agree, we can change this issue to be the improvement of that exercise (if any) and we make sure that both constants and this "enum" pattern are well covered.

Yes, sounds good.

@andrerfcsantos I updated the issue title and the description. Would be great if you could double check it makes sense. Feel free to make more edit as you see fit.

@junedev Thanks for taking care of this. I took a look and it sounds great!

I'd like to work on this

@saurami You commented on 2 issues that you would like to work on them. Could you decide for one of them and work on that one first and once it is done pick up the next one?

This is going to be my first contribution towards a concept exercise.
Which one would you recommend ?

I'm going to start with the other PR.

Honestly, both tasks have their own difficulties so I couldn't have picked for you. As you made a decision now, I will assign you accordingly.

See also https://github.com/exercism/go/issues/1584


Vagrant Virtualbox NFS / mounting issues

Ran into issues when mounting shares (NFS & not), eventually discovered was caused by differing VirtualboxGuestAdditions that wasn't being detected. Not specifically DrupalVM related, but worth documenting. This could be related to earlier bug report regarding NFS shares also, as it stalls at the same location.
Resolved with installing vbguest plugin via:
vagrant plugin install vagrant-vbguest

I think I may have mounting issues as well, I am running into this issue: https://www.drupal.org/node/2234229
I wonder if replacing NFS with this could help? http://wolfgangziegler.net/auto-rsync-local-changes-to-remote-server#comments

@stefanruijsenaars - I've hit that issue as well, but not with Drupal VM: https://www.drupal.org/node/2234229#comment-9744087
You can always switch to rsync if you would rather try that sync method, but with the out-of-the-box configuration, the Drupal install will be written over if you put files into your local folder that's synced inside the VM.
To use rsync, just set the type of the synced folder to rsync. I'm hoping Vagrant will someday add two-way rsync out of the box, though!
@enapthine - I think I may add a Wiki page with NFS common problems and fixes; enough people have trouble with shared folders of all varieties, and simply keeping my VirtualBox boxes up to date isn't enough all the time (I hate how VirtualBox seems to cause problems every other version upgrade!)

@geerlingguy  I think the solution in the link actually bypasses Vagrant synced folders completely, it's a script by fago that watches a directory for changes using inotify-tools and rsyncs the changes to a remote system via SSH. Supposedly it should be faster than NFS, see https://github.com/drunomics/syncd

I reckon this is some kind of problem with permissions, now I had a Simpletest fail because it couldn't create a directory :)

Which I fixed by adding the following to the synced folders section in the Vagrantfile:
owner: "vagrant",
group: "www-data",
mount_options: ["dmode=775,fmode=664"]

I think I may just set up a Wiki page discussing NFS and Synced Folder troubleshooting, and we can work on adding relevant examples/fixes in there. It seems like half or more of the issues reported so far on this project have to do with synced folders.
Hopefully, someday, Vagrant will support out-of-the-box two-way rsync!

See: https://github.com/geerlingguy/drupal-vm/wiki/Syncing-Folders

It seems that root can write to the sync'd folders but vagrant can't. Is that the intended behaviour?


base_fee_no_hooks doesn't include any fees other than Hook fees.(Version: [2024.9.11-release+985])

Issue Description
The base_fee_no_hooks field included in the return value of the fee command does not include fees other than Hooks fees, such as dynamic fees for Memo fields.
https://github.com/Xahau/xahaud/blob/79d83bd424db07a51fa3d1ea41a01ecfdf7af99c/src/ripple/app/misc/impl/TxQ.cpp#L2079
This is an issue that is not urgent, but I will keep a note of it.
Steps to Reproduce
import { Client, encode } from '@transia/xrpl'

const client = new Client('wss://xahau.org')

const main = async () => {
  await client.connect()

  const tx_json = {
    TransactionType: 'AccountSet',
    Account: 'rQQQrUdN1cLdNmxH4dHfKgmX5P4kf3ZrM',
    Fee: '0',
    SigningPubKey: '',
    Sequence: 0,
    Memos: [{ Memo: { MemoType: '0101', MemoData: '10000000000000000000000000000000000000' } }],
  }

  const tx_blob = encode(tx_json)

  const response = await client.request({
    command: 'fee',
    tx_blob,
  })
  console.log(response.result)
  await client.disconnect()
}
main()

result
{
  current_ledger_size: '13',
  current_queue_size: '0',
  drops: {
    base_fee: '31',
    base_fee_no_hooks: '10',
    median_fee: '15500',
    minimum_fee: '31',
    open_ledger_fee: '31'
  },
  expected_ledger_size: '330',
  fee_hooks_feeunits: '31',
  ledger_current_index: 8807447,
  levels: {
    median_level: '128000',
    minimum_level: '256',
    open_ledger_level: '256',
    reference_level: '256'
  },
  max_queue_size: '6600'
}

Expected Result
It includes all fees other than Hooks execution fees.
base_fee_no_hooks: '31',

Actual Result
base_fee_no_hooks: '10',

Environment
Version: 2024.9.11-release+985
Supporting Files

Its improperly named I agree. The problem is, we cannot switch the field or every current client will break.
base_fee is the base + hooks + memos + hook parameters
base_fee_no_hooks is just the base
We can rename it if you'd like


fix: add back api docs

Changes

#1549  👈 (View in Graphite)
main

This stack of pull requests is managed by Graphite. Learn more about stacking.


feat: error if name of static member equals name of inherited member

Summary of Changes
A class can no longer have a static member with the same name as an inherited member. Otherwise, we would need more complicated @link tags in the documentation and more complicated qualified names.

:tada: This PR is included in version 0.12.0 :tada:
The release is available on:

npm package (@latest dist-tag)
npm package (@latest dist-tag)
v0.12.0
GitHub release

Your semantic-release bot :package::rocket:


Issue with tgan installation in mac

Hi, I am getting the following error while executing the pip install tgan command:
sp$ pip install tgan
Collecting tgan
Using cached tgan-0.1.0-py2.py3-none-any.whl (27 kB)
ERROR: Could not find a version that satisfies the requirement tensorflow<2.0,>=1.13.0 (from tgan) (from versions: 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0)
ERROR: No matching distribution found for tensorflow<2.0,>=1.13.0 (from tgan)
How to fix this?

The OS is mac catalina


Fix flaky TestRamStoreWatchTimeout in Windows CI

We refactor the test to use a virtual clock. The modified test still validates that watcherAddTimeout is enforced correctly. The new version of the test also completes faster (<100ms instead of >500ms).
Fixes #5648

/test-all

/test-e2e
/test-conformance


getting a notification when a training job is done that was started natively inside an Azure Compute VM

I have created a VM using the Azure Compute menu. I am running a Python training code that is long running via tmux directly inside the VM by SSH -i -X into it. However, since these VMs are expensive ($4 an hour), I would like the node to:
1-  send me an email notification when the job is done
or
1-  send me an email notification when the job is done
2-  stop (not delete) the VM so I won't be charged for it.
I have turned on all the notifications as you see below:

However, I have not been getting any email/text notifications for any of my Python jobs that have been finished. I only get email notification when an mlflow related script was run like below.

Thanks a lot for any guidance.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Hi @monajalal, thank you for opening an issue! Is there a particular package from the Azure SDK that you're using in your workflow? If not, you may get a reliable response by asking a question at a VM-specific forum like this Q&A page if you haven't already.
I'll tag the ML team either way in case someone would know how to help, but I would recommend opening an issue at the forum I linked. @luigiw @azureml-github

Hello @monajalal. Have you tried to use compute clusters in AzureML? AzureML compute clusters automatically scale up/down based on your training job requirements. And you can subscribe to events of when the training finishes.
Here're some references.
AzureML compute cluster, https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-attach-compute-cluster?tabs=python
Subscribe to when an AzureML training job finishes, https://learn.microsoft.com/en-us/azure/machine-learning/how-to-use-event-grid

@luigiw for example, my job was killed since VM ran out of space and then the VM didn't exit even though I have enabled "auto shutdown" in "Preview Features" in Azure Compute.
Also, I cannot stop the VM as it is stated "Unusable". I was able to shutdown the VM by ssh-ing to it but am I billed for the duration the VM was Unusable? Also, how do I bring back the VM to usable?

@monajalal to clarify, I was suggesting you to use Azure Machine Learning service and the compute feature comes with AzureML. If your main use case for the VM is ML training, you should definitely checkout features provided by AzureML compute. https://learn.microsoft.com/en-us/azure/machine-learning/how-to-create-attach-compute-cluster?tabs=python

@xiangyan99 for this special case, I decide to run all my jobs as a pipeline using a compute cluster rather than a compute instance node. Since, I am running them as job, natively I get email when the job finishes or fails. However, it still remains true that a stand-alone training job (python train.py) inside azure compute instance would not yield any email upon successful finish or failure.


F32/F64 comparison

This issue was suggested by an anonymous reviewer. Currently, at least we know that a raw wavenumber for F32 causes a slight artificial shift in the lines both for LPF and DIT. Some tests w/ F64 in JAX (non-default) are needed.

see here

For high dynamic range of opacity,  one needs F64. Just add the below to use F64 (not supported for XLA though)
from jax.config import config
config.update("jax_enable_x64", True)

-F32

-F64

erfcx

F32

F64

hjert

F32

F64

trans2E3

F32

F64

#131

MODIT F32 vs F64


Add FAQ section in the navbar

Describe the feature
Add an FAQ section in the nav bar section and add some questions under it.
Add ScreenShots

I want to add FAQ section in this navbar.
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'23 contributor
[X] I want to work on this issue

@MonalikaPatnaik please assign me this issue under gssoc'23


Can you make it Fabric 1.19.2?

Can you make it Fabric 1.19.2?

Fabric support has been dropped in favor of Quilt.  Nearly all Fabric also mods work on Quilt.


how to use comparison operators? Its not working.

It is possible to register custom helpers, as described here: https://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional
Just add your custom helper functions when setting up the exphbs engine in your app.

  app.engine('.hbs', require('express-handlebars')({
    defaultLayout: '',
    extname: '.hbs',
    helpers: require(require('path').join(__dirname, 'lib/helpers.js')).helpers,
    layoutsDir: require('path').join(__dirname, 'templates/layouts'),
    partialsDir: __dirname + '/templates/partials'
  }))

Tks @knoxcard :)


Gene Overview: link to uniprot broken

https://www.beta.patricbrc.org/portal/portal/patric/Feature?cType=feature&cId=PATRIC.83332.12.NC_000962.CDS.15590.17470.rev
UnitProt: I6Y2I5  goes to https://www.uniprot.org/uniprot/I6Y2I5 which doesn't exist.
Change link from https to http.

fixed and available on beta.


Admin console sends referrer everywhere

Found this in functions-html.php <meta name="referrer" content="always" />
As a result the full URL to the admin console is sent every time someone tests a link from there, and this can't be bypassed by HTTP "referrer-policy" headers.
In some circumstances (e.g. no multi factor auth implemented) this can create an attack surface (DDoS, Brute force) by making the admin console address known by the owner of target URL's site.
What are the drawbacks of using <meta name="referrer" content="none" /> in the admin console instead?
Will this break some plugins or core functionalities ?
I've shortened this URL  as a practical test.

Hmmm. I added this because of #1762 but cannot really understand why now...

Maybe the HTML template is used outside the admin console, and maybe some parts of the admin console are intended to be exposed (e.g. multi user environment), and in this case the referrer would matter ?

I can't think of a situation in which it would be desirable to send YOURLS' admin console URL as a referrer. Doesn't mean there exists no such situation, just that I can't imagine it. :smile_cat:
The value "always" is deprecated for <meta name="referrer"> anyway. I think YOURLS shouldn't use it any more.
If passing along the referrer is important for short URLs, I think that's doable by sending another header along with redirections: Referrer-Policy: unsafe-url (header docs). I need to verify that the header applies to 3xx response codes or when a Location header is also sent, but I don't see why it wouldn't.

Referrer-Policy: unsafe-url is the way I chose to go along with not using HSTS so the referrer is properly forwarded with all 3xx responses.
But the /admin/ folder requires exactly the opposite, should this be be taken care of in the core instead of web server rules like I did?

I was thinking of sending no-referrer on admin pages and unsafe-url with redirects, yes. Mostly waiting for @ozh's input before I actually implement anything.

Reading https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy I think unsafe-url are not ideal either.
To be honest I really don't know what I had in mind back then. Now, I think we should not try to enforce anything regarding referrer and let this open to plugin and user choice (ie not send any header but allow plugins to add any via a filter)

Should it be a filter, or an action? A filter implies passing each plugin that registers for the hook an array of headers and allowing removal or modification before YOURLS finally sends the whole batch of headers at once. I think an action is simpler, since it only lets plugins add headers.
Since YOURLS itself will send only basic headers for most requests, allowing plugins to add more should be enough in most cases (and is much simpler to implement than a full-on filter hook). In fact, we already have the admin_headers hook:
https://github.com/YOURLS/YOURLS/blob/3485c271580d88586fae0f7ee5027e5f8ed723fe/includes/functions-html.php#L59-L67
So assuming I didn't miss another hook in my Ctrl-F through the hook list for "head", all that's needed is a hypothetical redirect_headers (or go_headers, etc.) action to let plugins send their own. Thoughts?

The action hook admin_headers is indeed enough to add what's needed if needed on admin pages. Upon redirection, we already have redirect_shorturl:
https://github.com/YOURLS/YOURLS/blob/3485c271580d88586fae0f7ee5027e5f8ed723fe/includes/functions-html.php#L59-L67
And there's even pre_redirect for internal redirection. I think we're covered here then ?

Sounds like it.
I'll close this, since referrer won't be sent from admin console any more except for HTTP-to-HTTP (and hosting YOURLS admin without HTTPS is pretty bad in 2018).

Anyway someone on HTTP can totally have a plugin that blocks referrer then, if needed


Add Timeout Handling to verify() Method with Custom Exception

Description
After meeting with the technical team of SnappPay, want to add a timeout of 60 seconds to the verify() method. If the timeout is reached, the method should then call GetPaymentStatus (handled by the driver's status() method) to retrieve the payment status.
on catch timeout, check status of transaction, if status is VERIFY return Receipt. else throw exception.
To handle this scenario, a new exception named DriverTimeoutException has been introduced. This exception extends from PurchaseFailedException, ensuring that the existing project logic does not require changes.
Here's an example of how the exception can be used:
// At the top of the file.
use Shetabit\Multipay\Payment;
use Shetabit\Multipay\Exceptions\InvalidPaymentException;
use Shetabit\Multipay\Exceptions\DriverTimeoutException;
use Shetabit\Multipay\Exceptions\PurchaseFailedException;

try {
    $receipt = $payment->amount(1000)->transactionId($transaction_id)->verify();

    echo $receipt->getReferenceId();

    ...
} catch (DriverTimeoutException $exception) {
    echo $exception->getMessage();
} catch (PurchaseFailedException $exception) {
    echo $exception->getMessage();
} catch (InvalidPaymentException $exception) {
    echo $exception->getMessage();
}

If DriverTimeoutException is not caught, it will be handled by PurchaseFailedException.
How Has This Been Tested?
The method was tested using the oauth() function. When the timeout was set to 0.01, a GuzzleHttp\Exception\ConnectException was thrown. When the timeout was set to 2 seconds, a driver-specific error was returned.
Screenshots of the testing process are provided:

Types of Changes
Please put an x in the relevant boxes:

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

@khanzadimahdi
it's ready to merge. I changed Exception name.


[Question] Does MindSpore support multi-GPU with auto-parallel strategy?

I built the source from a docker environment based on the dockerfile (docker/mindspore-gpu/devel/Dockerfile) and tried some tests under mindspore/tests/ut/python/parallel. I've modified the tests by adding below two lines,

context.set_context(mode=context.GRAPH_MODE, device_target="GPU")
init('nccl')

I used below command to build the source,

bash build.sh -e gpu -M on -z
pip install build/package/mindspore_gpu-0.1.0-cp37-cp37m-linux_x86_64.whl

I checked the folder where the package were installed, the libgpu_collective.so which was not loaded successfully during nccl initialization is in there.
The tests failed with below error messages. Is there any guide to run MindSpore with multi-GPU and different parallel modes?
Thanks
################## Error Message ####################
elif backend_name == "nccl":

      init_gpu_collective()

E           RuntimeError: mindspore/ccsrc/device/gpu/distribution/collective_init.cc:35 InitCollective] Loading libgpu_collective.so failed. Many reasons could cause this:
E           1.libgpu_collective.so is not installed.
E           2.nccl is not installed or found.
E           3.mpi is not installed or found
../../../../mindspore/communication/management.py:69: RuntimeError
-------------------------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------------------------
[ERROR] ME(102,python):2020-04-19-14:19:19.404.520 [mindspore/ccsrc/device/gpu/distribution/collective_init.cc:35] InitCollective] Loading libgpu_collective.so failed. Many reasons could cause this:
1.libgpu_collective.so is not installed.
2.nccl is not installed or found.
3.mpi is not installed or found
==================================================================================== short test summary info =====================================================================================
FAILED test_matmul_tensor.py::test_two_matmul - RuntimeError: mindspore/ccsrc/device/gpu/distribution/collective_init.cc:35 InitCollective] Loading libgpu_collective.so failed. Many reasons c...
======================================================================================= 1 failed in 0.96s ========================================================================================

@FudanEMWLab Hi, firstly thanks for having a test on MindSpore! Before answering your quesiton, please notice that it's not suggested to directly test MindSpore examples with GPU (especially with nccl) on devel environment. Could you transfer the whl package to mindspore/mindspore-gpu:runtime docker image and retry your code? If the error still goes on, then we will check what's going on.

If you want to try some test code about multi-GPU scenario, please try https://github.com/mindspore-ai/mindspore/tree/master/tests/st/nccl.

@FudanEMWLab  PaddlePaddle Supports Multi-GPU Training pretty well, you can reference https://github.com/PaddlePaddle/Fleet/ for more details?

@FudanEMWLab PaddlePaddle Supports Multi-GPU Training pretty well, you can reference https://github.com/PaddlePaddle/Fleet/ for more details?

Hi @nizhaoqiao , even though your github account is weirdly empty but I guess you are a developer participated in the Paddle community, so you are more than welcomed to join the convo here in MindSpore ! Open source is all about comradery and friendship :)
I'm interested in what you referred to pretty well as in

PaddlePaddle Supports Multi-GPU Training pretty well.

Paddle Bench Numbers

I've looked up some of the benchmark I could find , for example fleet's number, looks like 2000 for 8 card which for the sake of argument, in a linear scaling assumption, fall under 200 for single GPU performance.

Another benchmark suggested that for paddle 1.5 it is around 168 for single GPU perf (the comparison is made with PyTorch v1.1.0 which is not a very new version).

MindSpore Bench Numbers
There is an article written by a developer independently running benchmarks on MindSpore and PyTorch 1.5 with Ascend 910 and 2080TI/Tesla respectively. It shows that MindSpore on single GPU, without any targeted optimization, reaches 200 mark.
On "wellness"
I think for MindSpore, a newly open source framework that could be on par with Paddlepaddle, a great 4 yrs old open source framework on the type of hardware which is not the primal focal point of MindSpore support, probably we could agree that:
MindSpore does really well
Just some thoughts :) Welcome to participate our community more often :)

Please see here:https://github.com/PaddlePaddle/Fleet/#mixed-precision-accelerated-collective-training-throughput

@hannibalhuang Hahaha, Don't be so nervous bro, I mean no malice~ I do agree MinSpore does really well on Ascend 910!  Let's work hard to build more competitive solutions for the community and developers~ :)

@hannibalhuang Hahaha, Don't be so nervous bro, I mean no malice~ I do agree MindSpore does really well on Ascend 910! Let's work hard to build more competitive solutions for the community and developers~ :)

Cannot agree more with the last sentence :) Just a quick response that I don't know where you picked nervous from my reply which is just a standard open source community exchange, and I didn't imply in any way that you acted with somewhat "malevolent" attitude . Malice is too strong a word for open source discussions :)
Anyways welcome to provide your own benchmarks for running MindSpore on multi-GPUs as I suggested, I think it'll run pretty well :P

@hannibalhuang Hahaha, Don't be so nervous bro, I mean no malice~ I do agree MindSpore does really well on Ascend 910! Let's work hard to build more competitive solutions for the community and developers~ :)

Cannot agree more with the last sentence :) Just a quick response that I don't know where you picked nervous from my reply which is just a standard open source community exchange, and I didn't imply in any way that you acted with somewhat "malevolent" attitude . Malice is too strong a word for open source discussions :)
Anyways welcome to provide your own benchmarks for running MindSpore on multi-GPUs as I suggested, I think it'll run pretty well :P

👍 加油啦～


refactor: split core library functions for customers

Type of Change

[ ] Bugfix
[ ] New feature
[ ] Enhancement
[x] Refactoring
[ ] Dependency updates
[ ] Documentation
[ ] CI/CD

Description

Currently our file structure looks like this
|--crates
|  |--router/src
|  |  |--core
|  |  |  |--customers.rs

This PR includes changed for inverting it to look like this
|--crates
|  |--router/src
|  |  |--customer
|  |  |  |--core.rs

Additional Changes

[ ] This PR modifies the API contract
[ ] This PR modifies the database schema
[ ] This PR modifies application configuration/environment variables

Motivation and Context

How did you test it?

Checklist

[x] I formatted the code cargo +nightly fmt --all
[x] I addressed lints thrown by cargo clippy
[x] I reviewed submitted code
[ ] I added unit tests for my changes where possible
[ ] I added a CHANGELOG entry if applicable

Closing the PR as it is not required


Initial prototype with CI and test placeholder

Close:

#1

add a request to return the full texture of the cube (6 faces collected in texture format)

It will be better to do it in a separated PR. Please, write to me an issue with additional requirements because right now I don't fully understand it.

I mean some like UV Mapping
In this ref explain not bad - http://ilkinulas.github.io/development/unity/2016/05/06/uv-mapping.html

To put it simply, I want to be able to return a full cube texture with a texture map

Looks good. Please, describe preferable API for it in a new issue. What params it should receive and what type of image it should return.


Bundle required in wrong order

Hi,
I was playing around with es6ify. When I use it with browserify everything works as expected, but when I use it with watchify then the bundles are required in the wrong order (yielding a dependency error).
I originally suspected the error in es6ify but maybe it's in watchify:
https://github.com/thlorenz/es6ify/issues/34
I extracted my original code into this demo repository:
https://github.com/sebastiandeutsch/es6ify-test
I also added a seperate branch where you can see the difference between browserify and watchify:
https://github.com/sebastiandeutsch/es6ify-test/commit/6ee42763973efb5fd5ee442763226dee3f0573cb
Any ideas where this behavior comes from?
Best
Sebastian

It's been a long time so I'm going to assume you figured this out. If you're still having problems, please open a new issue.


GLTF Texture not working

Describe the bug
With a specific GLTF file, texture is not rendered when it should
To Reproduce
Steps to reproduce the behavior:
0. BoxTextured.gltf.zip

Open the file using f3d --dry-run BoxTextured.gltf

Expected behavior

System Information:

OS: Linux and Windows

F3D Information
Paste the content of f3d --version: 1.3.1 and master
Notes
This data is from assimp dataset, there are other versions of this dataset
BoxBadNormals-glTF-Binary/              BoxTextured-glTF-Binary/                BoxTextured-glTF-techniqueWebGL/
BoxTexcoords-glTF/                      BoxTextured-glTF-Embedded/              BoxWithInfinites-glTF-Binary/
BoxTextured-glTF/                       BoxTextured-glTF-pbrSpecularGlossiness/

Most of them works perfectly

Sister VTK issue: https://gitlab.kitware.com/vtk/vtk/-/issues/18816


Can jax.random.PRNGKey work with jax_transfer_guard?

It seems that PRNGKey isn't compatible with jax_transfer_guard? I'm getting a Disallowed host-to-device transfer error regardless of whether I'm passing in a np or jnp seed.

Is there a way to use PRNGKey together with jax_transfer_guard? Otherwise, would this be feasible to add?
As a workaround, can I just replace PRNGKey by creating an array of shape (2,) that contains two uniform random int32 values myself on the outside, or are there more restrictions on what PRNGKey returns?

Example 1:
import jax
import jax.numpy as jnp

jax.config.update('jax_transfer_guard', 'disallow')

seed = jax.device_put(42)
key = jax.random.PRNGKey(seed)

Traceback (most recent call last):
  File "/Users/danijar/temp/example.py", line 7, in <module>
    key = jax.random.PRNGKey(seed)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/random.py", line 128, in PRNGKey
    key = prng.seed_with_impl(impl, seed)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/prng.py", line 262, in seed_with_impl
    return random_seed(seed, impl=impl)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/prng.py", line 555, in random_seed
    return random_seed_p.bind(seeds_arr, impl=impl)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/core.py", line 325, in bind
    return self.bind_with_trace(find_top_trace(args), args, params)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/core.py", line 328, in bind_with_trace
    out = trace.process_primitive(self, map(trace.full_raise, args), params)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/core.py", line 686, in process_primitive
    return primitive.impl(*tracers, **params)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/prng.py", line 567, in random_seed_impl
    base_arr = random_seed_impl_base(seeds, impl=impl)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/prng.py", line 572, in random_seed_impl_base
    return seed(seeds)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/prng.py", line 807, in threefry_seed
    lax.shift_right_logical(seed, lax_internal._const(seed, 32)))
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/lax/lax.py", line 500, in shift_right_logical
    return shift_right_logical_p.bind(x, y)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/core.py", line 325, in bind
    return self.bind_with_trace(find_top_trace(args), args, params)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/core.py", line 328, in bind_with_trace
    out = trace.process_primitive(self, map(trace.full_raise, args), params)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/core.py", line 686, in process_primitive
    return primitive.impl(*tracers, **params)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 113, in apply_primitive
    return compiled_fun(*args)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 198, in <lambda>
    return lambda *args, **kw: compiled(*args, **kw)[0]
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 825, in _execute_compiled
    in_flat = flatten(device_put(x, device) for i, x in enumerate(args)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/util.py", line 113, in concatenate
    return list(it.chain.from_iterable(xs))
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 825, in <genexpr>
    in_flat = flatten(device_put(x, device) for i, x in enumerate(args)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 1115, in device_put
    return device_put_handlers[type(x)](x, device)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 1126, in _device_put_array
    return (backend.buffer_from_pyval(x, device),)
jaxlib.xla_extension.XlaRuntimeError: INVALID_ARGUMENT: Disallowed host-to-device transfer: type=<class 'numpy.ndarray'>, shape=(), dtype=int32, dst_device=TFRT_CPU_0

Example 2:
import jax
import jax.numpy as jnp

jax.config.update('jax_transfer_guard', 'disallow')

seed = 42
key = jax.random.PRNGKey(seed)

Traceback (most recent call last):
  File "/Users/danijar/temp/example.py", line 7, in <module>
    key = jax.random.PRNGKey(seed)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/random.py", line 128, in PRNGKey
    key = prng.seed_with_impl(impl, seed)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/prng.py", line 262, in seed_with_impl
    return random_seed(seed, impl=impl)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/prng.py", line 552, in random_seed
    seeds_arr = jnp.asarray(np.int64(seeds))
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/numpy/lax_numpy.py", line 1921, in asarray
    return array(a, dtype=dtype, copy=False, order=order)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/numpy/lax_numpy.py", line 1902, in array
    out = lax_internal._convert_element_type(out, dtype, weak_type=weak_type)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/lax/lax.py", line 579, in _convert_element_type
    return convert_element_type_p.bind(operand, new_dtype=new_dtype,
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/core.py", line 325, in bind
    return self.bind_with_trace(find_top_trace(args), args, params)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/core.py", line 328, in bind_with_trace
    out = trace.process_primitive(self, map(trace.full_raise, args), params)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/core.py", line 686, in process_primitive
    return primitive.impl(*tracers, **params)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 113, in apply_primitive
    return compiled_fun(*args)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 198, in <lambda>
    return lambda *args, **kw: compiled(*args, **kw)[0]
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 881, in _execute_trivial
    return [_copy_device_array_to_device(x, device) if device_array.type_is_device_array(x)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 882, in <listcomp>
    else h(None, *device_put(x, device)) for h, x in zip(handlers, outs)]
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 1115, in device_put
    return device_put_handlers[type(x)](x, device)
  File "/Users/danijar/homebrew/lib/python3.9/site-packages/jax/_src/dispatch.py", line 1126, in _device_put_array
    return (backend.buffer_from_pyval(x, device),)
jaxlib.xla_extension.XlaRuntimeError: INVALID_ARGUMENT: Disallowed host-to-device transfer: type=<class 'numpy.ndarray'>, shape=(), dtype=int32, dst_device=TFRT_CPU_0

Thanks, @froystig!

Thank you for filing the issue!


xen: mark 4.16 as EOL

Xen 4.16 has reached its end of life. We don't build it, but considering the generic nature of the Xen builder, it's good to let downstreams using our builder know that their custom build of Xen 4.16 is now unsupported.
Things done

Built on platform(s)

[ ] 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
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 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.

Add a :+1: reaction to pull requests you find important.

nice, jj accidentally leaked my top secret upcoming strictDeps diff
Commit has been fixed.

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:
https://discourse.nixos.org/t/prs-already-reviewed/2617/2144


npm audit brought 82 (!) high risk warnings for webpack or webpack-cli

Bug report
What is the current behavior?
npm audit brought 82 high risk warnings for webpack or webpack-cli, referring, in particular, to:
mixin-deep (20 high risk issues)
set-value (62 high risk issues)
If the current behavior is a bug, please provide the steps to reproduce.
Run npm audit
What is the expected behavior?
No high risk warnings
For both faulty dependency packages in advisory section there are list of patched versions. Is npm wrong?
Other relevant information:
"webpack": "4.39.1",
"webpack-cli": "3.3.6"
Node.js version: 10.16.1
Operating System:  Win 8-64

Please update your lock file, you you old deps

Do you mean I have to update webpack deps manually?
Both mentioned packages are used by webpack only - I never installed them separately
Why webpack install didn't update them during upgarde to new version if the are vulnerable?
Moreover - they don't appear when I fire npm outdated
Please clarify

Nothing in webpack deps is not vulnerable. You have oudated deps and/or lock file and need update this, or you use invalid audit register, install latest webpack and run npm audit (no problems)

Once again:

I never installed them separately

both were installed as webpack deps. So I expected that webpack during new version install will take care of updating them. Other packages do.
Regarding vulnerability - excerpt from just fired npm audit for latest webpack:
High            Prototype Pollution

  Package         mixin-deep

  Dependency of   webpack [dev]

  Path            webpack > watchpack > chokidar > readdirp > micromatch >
                  snapdragon > base > mixin-deep

  More info       https://npmjs.com/advisories/1013

  High            Prototype Pollution

  Package         mixin-deep

  Dependency of   webpack-cli [dev]

  Path            webpack-cli > findup-sync > micromatch > snapdragon > base >
                  mixin-deep

  More info       https://npmjs.com/advisories/1013

@greenais problem on register side, latest npm register doesn't have audit problems

@evilebottnawi I have latest node and therefore npm.
Probably you should look into webpack/-cli install scripts to eliminate such cases - that's why I filed bugreport.
What helped:
1) removing webpack and webpack-cli
2) deleting package-lock.json
3) intsalling both once again

No issues now, but it shouldn't be this way, my guess

deleting package-lock.json

I written above about removing lock file, it is expected, because you have old deps

When you upgrade webpack you have no idea if its only deps are old or not.
Install scrip should check it - that's what I'm talking about.
Or - to be honest - one should add to install instructions: "Hey guys, we can''t manage it - so delete package-lock.json anyway, just in case"

Install scrip should check it - that's what I'm talking about.

What is script? Npm script or yarn script? Or we should update your transitive dependencies and potentially break app/library?

Hey guys, we can't manage it - so delete package-lock.json anyway, just in case

What? Are you sensuously? It is lock files, and we can't manage transitive dependencies, only way is update lock file, this is how package managers work.

its only deps


VIH-7308 Update emails and Case Type Generic

JIRA link (if applicable)
https://tools.hmcts.net/jira/browse/VIH-7308
Change description
Update emails and Case Type Generic
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[X] No

/azp run


feedback table in database

the feedback table has been created and the foreign key has been created and linked


For CrossReplicaBN, may take the convenient from NVIDIA/apex which support sync BatchNorm

https://github.com/NVIDIA/apex


Add an ability to rollback the import on validation error

Problem
Inability to roll back a transaction in case of ValidationError. Currently, the lib only supports rolling back on exceptions other than ValidationError
Solution
Provide a mechanism to roll back on ValidationError without breaking the current design.
This PR Implements support for the rollback_on_validation_error argument being passed to the import_data method that controls the flow. Defaults to False.
Acceptance Criteria

Testcase added
Docstring updated

See conversation with @matthewhegarty.

Coverage remained the same at 98.063% when pulling e8c6d78bf6a53edf1b619f4aedb91b4ced594580 on striveforbest:feature/support-rollback-on-validation-error into 1ef3252e13f1f3f6c36b58aeb6bc6ee67d440bd5 on django-import-export:main.

Merged.  Thanks @striveforbest and @manelclos.


Question about pretrained weights and evaluation code (NOCS-REAL, LINEMOD).

Thanks for sharing your work.
Do you have a plan to release the pretrained weights and evaluation code on the NOCS and Linemod dataset??  (Include Ablation study)
It will really help me to understand your methods.

Hi, thanks for your interest in our work. I will upload more details about our work soon, thanks for your patience.

Does your method has each model for each category??? (ex, 6 models for 6 categories)

Yes, but for the 2D detection part, we use one YOLO model for all categories.

Hi, thanks for your interest in our work. I will upload more details about our work soon, thanks for your patience.

Thanks for the interesting work! I would also appreciate if you could make it easier to reproduce the results in the paper. A guide for training the model from scratch to testing and generating all the results will be really nice. At the moment this is unfortunately not possible without digging into the code and making sense of it.

Hi, thanks for your interest in our work. I will upload more details about our work soon, thanks for your patience.

Thanks for the interesting work! I would also appreciate if you could make it easier to reproduce the results in the paper. A guide for training the model from scratch to testing and generating all the results will be really nice. At the moment this is unfortunately not possible without digging into the code and making sense of it.

You can find how to train in the readme. For other relevant materials, since I am busy with my graduation, I will upload them after this busy period.


Update Remove-SPEnterpriseSearchTenantConfiguration.md

Format example

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-server/Remove-SPEnterpriseSearchTenantConfiguration.md
:white_check_mark:Succeeded
View (sharepoint-ps)

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


go/printer: Invalid reformatting of slice type with a /* comment.

Go version
devel go1.23-7492290887
Output of go env in your module/workspace:
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOOS=windows
set GOTOOLCHAIN=auto
set GOVERSION=devel go1.23-...

What did you do?
https://go.dev/play/p/ndVJVdo9nIW
Click format.
A realistic example could be formatting var s [/*<10*/]byte
What did you see happen?
Formatting code with a "/*" comment and line break inside "[" "]" of a slice either fails or produces invalid code.
Clicking format fails with "24:16: expected type, found newline (and 1 more errors)".
Having multiple comments moves them 2 lines down (no error).
Line comments and multi-line comments are moved to the next position after "]" where line breaks don't insert a ";".
Setting a fake position to the same line as the element type before writing "]" changes the behavior. "go/printer/nodes.go:1049"
ast.ArrayType lacks position information about "]".
The closing "]" must be on the same line as the array length ends. On a slice type this implicit positioning spans multiple lines and the chosen line affects ;'s.
What did you expect to see?
Comments not moving across tokens when formatted.
I would also like the ast types to have positions for more tokens. Guessing the position requires different logic for different types: last line for slice "]", first line for map "]", first line for type assert ".", unknown for <- chan "chan".

Specifically, gofmt turns this valid Go code
type Slice = [
	/*a*/]any

into this invalid code:
type Slice = []
/*a*/ any

CC @griesemer

CC @mvdan as well, via https://dev.golang.org/owners

Similar Issues

https://github.com/golang/go/issues/66439

(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)

Fixing this will require additional position information in the go/ast.ArrayType node (position of the ], trivial but requires API change) or better "guessing" of the position of "]" based on the available comment and node positions (hard).

Even with bad position information it seems like the formatter should understand when it is safe to insert a line break and when it isn't; we should always emit valid Go code.


Fix/sprint complete pop up

Functionality:
Pop up on sprint completion
Solution:
made changes in sprint-details component
Risk level:

[ ] high
[x] medium
[ ] low

How to test:
ng serve -o
firebase emulators:start

This PR includes changes from filter page.
Create a fresh branch and then do the changes and raise new PR


feat: add total fees paid / received and funding into Position API (f…

…or console)
closes #2118

superseded by https://github.com/vegaprotocol/specs/pull/2329


Dev Task: Abstract Shared Enemy Code

Currently, the three enemies we have (Sheep, MoldedDruvar, TreeTrunkGuy) share a LOT of code between them. We should be able to abstract this and should do so now that we've hit the "rule of three".
I'm torn on if you should just add the shared code directly to JEnemy2D or if we should extend it and make a new class. I think the right call is to just put the shared code in JEnemy2D, but open to suggestions.

Addendum: Also update NPC  (milklady) to use the shared AI code and finish ripping out the old behavior scripts/setup.

Closing this one as most of the enemy code is now shared with the component system


Brush / sensor life not calculated correctly?

Device model / 设备型号
rockrobo.vacuum.v1
Component version / 插件版本
0.7.15
HA core version / HA版本
2024.01.5
Integrated mode / 集成方式
Token
The problem / 问题详情
The values dont seem to be calculated as per other models.
Not sure, but something like this does not seem to happen. https://github.com/al-one/hass-xiaomi-miot/blob/master/custom_components/xiaomi_miot/core/miio2miot_specs.py#L1061
If I feed the "raw" numbers in HA to that formula I get values that match what is in the app.

Entity attributes / 实体属性
see screen shot above
Home Assistant Logs / 系统日志
No response

Some example logs:
2024-01-16 14:45:19.449 INFO (SyncWorker_52) [custom_components.xiaomi_miot.core.miio2miot] rockrobo.vacuum.v1: Got miio props for miot: {'msg_ver': 8, 'msg_seq': 240, 'state': 8, 'battery': 88, 'clean_time': 1440, 'clean_area': 16545000, 'error_code': 0, 'map_present': 1, 'in_cleaning': 0, 'fan_power': 60, 'dnd_enabled': 0, 'main_brush_work_time': 108396, 'side_brush_work_time': 108396, 'filter_work_time': 108396, 'sensor_dirty_time': 108396, 'fan_mode': 60}


Improve test coverage in checkout views

This is the second part of #1645.
This PR adds new functional tests for ShippingAddressView, PaymentDetailsView and ThankYouView.
I had to use a custom template to be able to test some functionalities of PaymentDetailsView.

Thanks!! I've merged it with some additional pep8 fixes