Permissions: API access still not granted after calling overridePermissions

overridePermissions doesn't appear to be working correctly. According to the permission api, the APIs are granted access (e.g. navigator.permissions.query({name: 'camera'})).state === 'granted'), but trying to use the API prompts the user for permission or the API doesn't work altogether
PPTR version: 1.8.0
Repro:

Run the code below.

Actual: The scripts clicks the "Open camera" button for the user and Chrome prompts to allow camera access.
Expected: Chrome has already been granted camera permission through the API so the demo should just start working. There should be no permission dialog.
const puppeteer = require('puppeteer');
const URL = require('url').URL;

const url = new URL('https://webrtc.github.io/samples/src/content/getusermedia/gum/');

const browser = await puppeteer.launch({headless: false});

const context = browser.defaultBrowserContext();
context.clearPermissionOverrides();
context.overridePermissions(url.origin, ['camera']);

const page = await context.newPage();
await page.goto(url.href);

const granted = await page.evaluate(async () => {
  return (await navigator.permissions.query({name: 'camera'})).state;
});
console.log('Granted:', granted);

await page.$eval('#showVideo', el => el.click()); // clicks the "open camera' button

@ebidel For the first example, it looks like getUserMedia is using a different codepath wrt the one we instrumented :'( Mind filing an upstream bug(and assigning to me)?
For the second demo, Chromium doesn't have keys to use google's geolocation API to figure geolocation from your IP.  So you'd need to use page.setGeolocation to fake it:
const puppeteer = require('puppeteer');
const URL = require('url').URL;

(async () => {
  const url = new URL(`https://google-developers.appspot.com/maps/documentation/javascript/examples/full/map-geolocation`);

  const browser = await puppeteer.launch({headless: false});

  const context = browser.defaultBrowserContext();
  context.clearPermissionOverrides();
  context.overridePermissions(url.origin, ['geolocation']);

  const page = await context.newPage();
  await page.setGeolocation({
    latitude: 51.5074,
    longitude: 0.1278
  });
  await page.goto(url.href);

  const granted = await page.evaluate(async () => {
    return (await navigator.permissions.query({name: 'geolocation'})).state;
  });
  console.log('Granted:', granted);
})();

Any progress about the clipboard-read api?

@ebidel Have tried the clipboard-read API.  Be ok to readText(). But only plaintext, no text/html.

So is it an acknowledged issue that geolocation doesn't work on Chrome right now?

Is it possible for puppeteer to return the actual geolocation data, instead of mocking it via page.setGeolocation?
I don't understand why if I create non-headless Chrome instance without context.overridePermissions and manually confirm permissions for geolocations, it returns my actual geo - and if I use context.overridePermissions to enable this automaticaly, the success callback is never invoked. I'm on 1.20.0 currently.

Thanks! I'll file that bug for getUserMedia.
For geolocation, can we mention that in the docs?
I also tried Canary but it still doesn't produce a result.
const puppeteer = require('puppeteer');
const URL = require('url').URL;

const url = new URL(`https://google-developers.appspot.com/maps/documentation/javascript/examples/full/map-geolocation`);

(async() => {

const browser = await puppeteer.launch({
  headless: false,
  executablePath: '/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary',
});

const context = browser.defaultBrowserContext();
context.clearPermissionOverrides();
context.overridePermissions(url.origin, ['geolocation']);

const page = await context.newPage();

await page.goto(url.href, {waitUntil: 'networkidle0'});

const granted = await page.evaluate(async () => {
  return (await navigator.permissions.query({name: 'geolocation'})).state;
});
console.log('Granted:', granted);

const pos = await page.evaluate(() => {
  return new Promise(resolve => {
    navigator.geolocation.getCurrentPosition(position => {
      resolve({lat: pos.coords.latitude, lng: pos.coords.longitude});
    });
  });
});
console.log(pos); // never gets here.
})();

Even just running this in the console does nothing:
navigator.geolocation.getCurrentPosition(success => {
  console.log(success);
}, failure => {
  console.log(failure, failure.message);
});

Is as if the API goes dead when you use clearPermissionOverrides / overridePermissions. If I remove those calls and run the snippet above using Canary, the demo works again.

overridePermissions doesn't appear to be working correctly. According to the permission api, the APIs are granted access (e.g. navigator.permissions.query({name: 'camera'})).state === 'granted'), but trying to use the API prompts the user for permission or the API doesn't work altogether
PPTR version: 1.8.0
Repro:

Run the code below.

Actual: The scripts clicks the "Open camera" button for the user and Chrome prompts to allow camera access.
Expected: Chrome has already been granted camera permission through the API so the demo should just start working. There should be no permission dialog.
const puppeteer = require('puppeteer');
const URL = require('url').URL;

const url = new URL('https://webrtc.github.io/samples/src/content/getusermedia/gum/');

const browser = await puppeteer.launch({headless: false});

const context = browser.defaultBrowserContext();
context.clearPermissionOverrides();
context.overridePermissions(url.origin, ['camera']);

const page = await context.newPage();
await page.goto(url.href);

const granted = await page.evaluate(async () => {
  return (await navigator.permissions.query({name: 'camera'})).state;
});
console.log('Granted:', granted);

await page.$eval('#showVideo', el => el.click()); // clicks the "open camera' button

I'm seeing the same thing above on Puppeteer 2.0.0
It seems like if you set --use-fake-ui-for-media-stream then you can access Webcam without setting permission override. If you don't use --use-fake-ui-for-media-stream then NO MATTER WHAT YOU DO, you cannot access the Webcam.
In @ebidel's example above, the WebRTC page fails with a DOMException if --use-fake-ui-for-media-stream is not set.

Another one that doesn't work is the clipboard-read API.
async function readClipboard(page, text) {
  return page.evaluate(() => navigator.clipboard.readText());
}
...
context.overridePermissions(url.origin, ['clipboard-read']);

The API returns undefined from readClipboard so it may require a user gesture. Do we handle that case?

This works now ,BTW

Hi,
I'm having what looks like the same issue, trying to 'puppeteer' a jitsi session.
Here's my puppeteer script - it downloads the fake video and audio, and drops into https://meet.jit.si/test-puppeteer
It doesn't work in puppeteer, but when I use the chromium command the script writes to stdout, it works perfectly. I'm checking and apparently have camera access granted, so I'm at a loss to what the issue is.
Any help greatly appreciated. (node v14.1.0, puppeteer 3.0.2)
const fs = require('fs');
const https = require('https');
const puppeteer = require('puppeteer');

let server = `https://meet.jit.si`;
let room = `test-puppeteer`;

(async () => {
    await download_file(
        'https://media.xiph.org/video/derf/y4m/akiyo_cif.y4m',
        `${__dirname}/video.y4m`);
    await download_file(
        'https://upload.wikimedia.org/wikipedia/commons/b/b6/Strauss_Blue_Danube.wav',
        `${__dirname}/audio.wav`);

    let args = [
        "--disable-gpu",
        "--use-fake-device-for-media-stream",
        "--use-fake-ui-for-media-stream",
        `--use-file-for-fake-video-capture="${__dirname}/video.y4m"`,
        `--use-file-for-fake-audio-capture="${__dirname}/audio.wav"`
    ];

    console.log("command line equivalent:");
    console.log(`chromium ${args.join(" ")} ${server}/${room}`);

	const browser = await puppeteer.launch({
		headless: false,
        defaultViewport: {
            width: 800,
            height: 600
        },
        args: args
	});

	const context = browser.defaultBrowserContext();
	await context.overridePermissions(server, ['camera','microphone']);
	const page = await browser.newPage();
	await page.goto(`${server}/${room}`);
	await sleep(8000);
	const granted = await page.evaluate(async () => {
		return (await navigator.permissions.query({name: 'camera'})).state;
	  });
	console.log('Granted:', granted);

    await page.screenshot({path: 'example.png'});
	console.log('closing');
	await browser.close();
})();

// check that a file exists, download it if it doesn't
async function download_file(url, filename) {
    if (await file_exists(filename)) {
        return true;
    }
    var file = fs.createWriteStream(filename);
    return new Promise(function(resolve) {
        https.get(url, function(response) {
            response.pipe(file);
            file.on('finish', function() {
                file.close(function(err) {
                    resolve(err);
                });  // close() is async, call cb after close completes.
            });
        }).on('error', function(err) { // Handle errors
            fs.unlink(filename); // Delete the file async. (But we don't check the result)
            resolve(err);
        });
    });
}

// async file_exists returns true if the file exists,
// false otherwise
async function file_exists(filename) {
    return new Promise(function(resolve) {
        fs.stat(filename, function(err, stats) {
            if (err) {
                resolve(false);
            } else {
                resolve(true);
            }
        });
    });
}

// simple sleep function
function sleep(ms) {
	return new Promise(function(resolve) {
		setTimeout(function() {
			resolve(true);
		}, ms);
	});
}

Hello, I am try get microphone access for the following website but apparently failing. after lot of trying still cannot figure out why!
Can anyone help me please? Thanks in advance! <3 :)
`const puppeteer = require("puppeteer");
const URL = require('url').URL;
const fs = require('fs');
const url = new URL('https://login.leaddesk.com/r82.0.1/?page=agent_call');
console.log(url);
async function main() {
const browser = await puppeteer.launch({ headless: false });
const context = browser.defaultBrowserContext();
context.clearPermissionOverrides();
context.overridePermissions(url.origin, ['microphone']);
const page = await context.newPage();
await page.goto('https://login.leaddesk.com/r82.0.1');
await page.type('#username', 'blabla');
await page.type('#password', 'blabla');

await page.click('#login-button');

await page.waitForNavigation();
const granted = await page.evaluate(async () => {
    return (await navigator.permissions.query({ name: 'microphone' })).state;
});
console.log('Granted:', granted);

}
main();`

I am also experiencing this issue with headless chrome puppeteer version 5.2.1 for geolocation api so the code:
const puppeteer = require('puppeteer');
const URL = require('url').URL;

const url = new URL(`https://google-developers.appspot.com/maps/documentation/javascript/examples/full/map-geolocation`);

const browser = await puppeteer.launch({
    headless: true,
    args: [
        '--no-sandbox',
        '--disable-gpu',
        '--disable-dev-shm-usage',
        '--disable-setuid-sandbox',
        '--no-first-run',
        '--no-zygote',
        '--single-process',
        "--proxy-server='direct://'",
        '--proxy-bypass-list=*'
      ],
    timeout: 0,
});

const context = browser.defaultBrowserContext();
context.clearPermissionOverrides();
context.overridePermissions(url.origin, ['geolocation']);

const page = await context.newPage();
await page.goto(url.href);

const granted = await page.evaluate(async () => {
  return (await navigator.permissions.query({name: 'geolocation'})).state;
});
console.log('Granted:', granted);

returns nothing.
I have searched all over but have not found a solution. Did this used to work for a previous version of puppeteer?? Any information to shed some light on this issue would be greatly appreciated!

When I try to grant clipboard-write permissions in headless mode it changes it to 'denied' instead (if I don't call it is it 'prompt'):
context.overridePermissions(url.origin, ['clipboard-write'])

const page = await context.newPage()
await page.goto(url.origin)
const state = await page.evaluate(async () => {
  return (await navigator.permissions.query({name: 'clipboard-write'})).state;
});
console.log(state) // denied

macOS: 10.15.7
puppeteer: 5.4.1

When I try to grant clipboard-write permissions in headless mode it changes it to 'denied' instead (if I don't call it is it 'prompt'):
context.overridePermissions(url.origin, ['clipboard-write'])

const page = await context.newPage()
await page.goto(url.origin)
const state = await page.evaluate(async () => {
  return (await navigator.permissions.query({name: 'clipboard-write'})).state;
});
console.log(state) // denied

macOS: 10.15.7
puppeteer: 5.4.1

I'm not an expert in this regard, but at least when limiting the scope of this discussion to clipboard-write and clipboard-read, it seems to me that there is a bug/mistake in the overridePermissions() method. As per its documentation

An array of permissions to grant. All permissions that are not listed here will be automatically denied.

So, if you specify either clipboard-write and clipboard-read as permissions then both will be mapped to clipboardReadWrite. By looking at the Chrome DevTools Protocol (which overridePermissions() uses to override permissions) I found that there are actually two permissions related to the clipboard: clipboardSanitizedWrite and clipboardReadWrite. When I mimicked overridePermissions()'s CDP call manually using 'clipboardSanitizedWrite' as permissions I was able to use navigator.clipboard.writeText and your snipped returned "granted" (instead of "denied"). More specifically, the following snippet should work:
await context._connection.send('Browser.grantPermissions', {
  origin: url.origin,
  browserContextId: this._id || undefined,
  permissions: ['clipboardReadWrite', 'clipboardSanitizedWrite'],
});

const page = await context.newPage()
await page.goto(url.origin)
const state = await page.evaluate(async () => {
  return (await navigator.permissions.query({name: 'clipboard-write'})).state;
});
console.log(state) // granted

It's not pretty and should probably be fixed in overridePermissions(), but it gets the job done.

I'm seeing the same thing above on Puppeteer 2.0.0 It seems like if you set --use-fake-ui-for-media-stream then you can access Webcam without setting permission override. If you don't use --use-fake-ui-for-media-stream then NO MATTER WHAT YOU DO, you cannot access the Webcam. In @ebidel's example above, the WebRTC page fails with a DOMException if --use-fake-ui-for-media-stream is not set.

if you are using pptr on windows, it may be the upstream issue. if you try to launch chrome from cmd, you will not able to access webcam either. because you do launch chrome as the child process of pptr, not launch it directly. I guess it cause some low level privacy control from system to terminate the webcam access.
electron/electron#23281 may have same issue.
Did it worth to report to upstream?

Howdy y'all, in case you're looking for something to copy and paste to enable clipboard permissions, some code that worked to do what @ericcornelissen did, but in the latest version of Puppeteer, is to create a separate CDP session to grant yourself sanitized clipboard permissions. While someone should probably make a PR to expose the clipboardSanitizedWrite permissions to overridePermissions() this still gets the job done. Note that I couldn't find a way in which puppeteer exposes the BrowserContextID, so this only works for the default browser context.
const client = await page.target().createCDPSession();
await client.send('Browser.grantPermissions', {
  origin: "https://command.verkada.com",
  permissions: ['clipboardReadWrite', 'clipboardSanitizedWrite'],
});

Alternatively, we can use the CDP API Browser.setPermission. As a side note, it looks like this is the API you'd want to use for panTiltZoom cameras and userVisibleOnly push notifications.
const client = await page.target().createCDPSession();
await client.send('Browser.setPermission', {
  origin: "https://command.verkada.com",
  permission: {
    name: 'clipboard-write',
    allowWithoutSanitization: true
  },
  setting: 'granted',
});

Howdy y'all, in case you're looking for something to copy and paste to enable clipboard permissions, some code that worked to do what @ericcornelissen did, but in the latest version of Puppeteer, is to create a separate CDP session to grant yourself sanitized clipboard permissions. While someone should probably make a PR to expose the clipboardSanitizedWrite permissions to overridePermissions() this still gets the job done. Note that I couldn't find a way in which puppeteer exposes the BrowserContextID, so this only works for the default browser context.
const client = await page.target().createCDPSession();
await client.send('Browser.grantPermissions', {
  origin: "https://command.verkada.com",
  permissions: ['clipboardReadWrite', 'clipboardSanitizedWrite'],
});

Alternatively, we can use the CDP API Browser.setPermission. As a side note, it looks like this is the API you'd want to use for panTiltZoom cameras and userVisibleOnly push notifications.
const client = await page.target().createCDPSession();
await client.send('Browser.setPermission', {
  origin: "https://command.verkada.com",
  permission: {
    name: 'clipboard-write',
    allowWithoutSanitization: true
  },
  setting: 'granted',
});

thank you so much, I literally spent hours finding the reason. Please make a PR with the fix you're mentioning, I could probably make a PR myself, but I didn't completely understand what were you mentioning. And I'm just an intern right now, so I think it's a little too advanced for me.

@rmichnovicz-verkada i want to answer your question puppeteer exposes the context id under
Browser.BrowserContextID
Type: string

It looks like the original issue has been resolved in the latest versions.


Added visualizations for difference in dbh between 2013-2018

Great job! Could you make small fixes and update branch?

Great, I'm going to merge your pull request into master!


Export package parameters in the format needed for import

(I couldn't find an issue where this had already been discussed, I apologise if this is a duplicate or I'm creating noise)
My use case: copying parameters from one action to another

when you add a database and refresh the package list, the parameters you want are on the wrong package and it's tedious to get them from one place to another
when I wanted to test some changes to my openwhisk package without hurting what's already live, I wanted to copy the package - it's easy to redeploy but I needed the package parameters.

To get the parameters from a package, we do: wsk package get [packagename] parameters which outputs something like:
ok: got package firstpackage, displaying field parameters
[
    {
        "key": "slackURL",
        "value": "https://hooks.slack.com/blah/blah"
    },
    {
        "key": "cloudantURL",
        "value": "https://wibble-squeak-bluemix.cloudant.com"
    },
    {
        "key": "dbname",
        "value": "awesomedb"
    }
]

To supply these parameters to another package (e.g. for testing, or allowing another team member to match my config) the format I want is:
{
    "slackURL": "https://hooks.slack.com/services/blah/blah",
    "cloudantURL": "https://wibble-squeak-bluemix.cloudant.com",
    "dbname": "awesomedb"
}

With the above in a file called params.json I can then to wsk package create mypackage -P params.json.
Would it be desirable to offer this format (ideally without the extra verbose output as the first line as we have now) as an option?  It's a small thing and I appreciate that patches are probably welcome, but is this a useful addition for anyone other than myself?

Related to https://github.com/openwhisk/openwhisk/issues/2062 for quiet mode requirement.

We have in the last considered changing the representation of parameters (and annotations) to a dictionary instead of the current array of key-value pairs. This in the one hand would also resolve this issue, but on the other is a breaking API change better left for "v2" perhaps.

A forward compatible switch in v1 would be nice so that the v1 users can migrate to the v2 format before going to v2? (Unless of course, v2 is imminent…)

Definitely not suggesting a breaking change, but an additional option for formatting this output.  Especially if we would consider doing this for v2, then having it behind a switch to have people try it and offer feedback in the current version seems valuable.  I'm just hesitating to create a patch if it won't be accepted.

This is a tooling issue. It's true we can make an API change but that's not what's being requested here. Going to close/transfer to the CLI repo.


Bump up min_ram value default for services

Codecov Report

Merging #1125 (86a3a21) into master (cdaa9e5) will increase coverage by 0.02%.
The diff coverage is 100.00%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@            Coverage Diff             @@
##           master    #1125      +/-   ##
==========================================
+ Coverage   76.84%   76.87%   +0.02%
==========================================
  Files         134      134
  Lines       12976    12976
==========================================
+ Hits         9972     9975       +3
+ Misses       3004     3001       -3

Impacted Files
Coverage Δ

assemblyline/odm/models/config.py
99.56% <ø> (ø)

assemblyline/odm/models/service.py
100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Set-Alias : Cannot bind argument to parameter 'Value' because it is null.

how do i fix this. explain in with monkey mode on please (if its possible😅). i'm not that expert.

Hi @itsRealGray, This issue is a duplicate of Issue 4. Please checkout the solution proposed in that issue.

Hi @itsRealGray, Could you please tell me something about "monkey mode"? Also, Is this the first look after you installed the script?

thanks man it worked.

 Now Please close this issue.


Remove dead link

Motivation
Update dead link on the documentation about PushNotificationIOS s
Test Plan
Not required for this PR since is a .md update.

This has been fixed by https://github.com/facebook/react-native/commit/0c9b41f2c0b67fa77f428e3855ac76648420d512. In the future please update the sources in markdown JS and not the generated .html files.


AV Detection

I work in an IT department of a small business.
I find it annoying that this is detected by our AV, because it means extra config time to get it deployed to our employees.
We need to keep track of what they do at work, to prevent workplace mischief.

Dude Virus Scanner is not a problem!
You can run an encrypted payload like QRat and you can Execute it from memory Invoke might help you to find it but you can replace Invoke with your own C++ or ASM loader to place your payload on systems without triggering any Security Traps.
But keep in mind doing this will defently an security breech in your company!
So do not do this!!!

From a business standpoint, usage of this application can open up some security issues if not configured properly. I think it makes sense to require manual configuration- no secure business computer should be able to run a RAT on it without some configuration, or I would definitely question the security side of that IT department.


Multi-GPU training error

Hi, Kai,
I'm doing training on four GPUs using the following code: ./tools/dist_train.sh configs/faster_rcnn_r101_fpn_1x.py 4
However, after the first epoch iteration, the training exit unexpected with the following error:
File "./tools/train.py", line 108, in
main()
File "./tools/train.py", line 104, in main
logger=logger)
File "/mmdetection/mmdet/apis/train.py", line 58, in train_detector
_dist_train(model, dataset, cfg, validate=validate)
File "/mmdetection/mmdet/apis/train.py", line 186, in _dist_train
runner.run(data_loaders, cfg.workflow, cfg.total_epochs)
File "/miniconda/envs/py36/lib/python3.6/site-packages/mmcv/runner/runner.py", line 358, in run
epoch_runner(data_loaders[i], **kwargs)
File "/miniconda/envs/py36/lib/python3.6/site-packages/mmcv/runner/runner.py", line 274, in train
self.call_hook('after_train_epoch')
File "/miniconda/envs/py36/lib/python3.6/site-packages/mmcv/runner/runner.py", line 229, in call_hook
getattr(hook, fn_name)(self)
File "/miniconda/envs/py36/lib/python3.6/site-packages/mmcv/runner/utils.py", line 37, in wrapper
return func(*args, **kwargs)
File "/miniconda/envs/py36/lib/python3.6/site-packages/mmcv/runner/hooks/checkpoint.py", line 25, in after_train_epoch
self.out_dir, save_optimizer=self.save_optimizer, **self.args)
File "/miniconda/envs/py36/lib/python3.6/site-packages/mmcv/runner/runner.py", line 252, in save_checkpoint
mmcv.symlink(filename, linkpath)
File "/miniconda/envs/py36/lib/python3.6/site-packages/mmcv/utils/path.py", line 49, in symlink
os.symlink(src, dst, **kwargs)
OSError: [Errno 95] Operation not supported: 'epoch_1.pth' -> '/mmdetection/files/trained_model/faster_rcnn_r101_fpn_1x/latest.pth'
Traceback (most recent call last):
File "/miniconda/envs/py36/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/miniconda/envs/py36/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/miniconda/envs/py36/lib/python3.6/site-packages/torch/distributed/launch.py", line 246, in
main()
File "/miniconda/envs/py36/lib/python3.6/site-packages/torch/distributed/launch.py", line 242, in main
cmd=cmd)
subprocess.CalledProcessError: Command '['/miniconda/envs/py36/bin/python', '-u', './tools/train.py', '--local_rank=3', 'configs/faster_rcnn_r101_fpn_1x.py', '--launcher', 'pytorch']' returned non-zero exit status 1.
Can you give me some hints on solving it?
Thank you!

I think I find the problem. My storage folder is a shared folder which causes the os.symlink error.

我想我发现了问题。我的存储文件夹是一个共享文件夹，导致os.symlink错误。
是需要改训练命令吗

我想我发现了问题。我的存储文件夹是一个共享文件夹，导致os.symlink错误。
是需要改训练命令吗

存在一个Local FOLDER就好。不用修改训练命令。

subprocess.CalledProcessError: Command '['/home/lxx/anaconda3/envs/mmlab/bin/python', '-u', './tools/train.py', '--local_rank=1', 'configs/lxx/mask_rcnn_x101_64x4d_fpn_1x.py', '--launcher', 'pytorch']' returned non-zero exit status 1.
Same problem.May I ask what is the meaning of the existence of a Local FOLDER?thank you

File "/miniconda/envs/py36/lib/python3.6/site-packages/mmcv/runner/runner.py", line 252, in save_checkpoint
Find the runner.py ,line 252.Comment the code ' # mmcv.symlink(filename, linkpath) '


fix: stop writeout from deadlocking when fsync submission fails

hook up beatree to NOMT (rough)

#267  👈
master

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

Join @rphmeier and the rest of your teammates on  Graphite

Merge activity

Aug 15, 12:44 PM EDT: @pepyakin started a stack merge that includes this pull request via Graphite.


ReadFile and WriteFile require unsafe code

Actual behavior
In order to use PInvoke.ReadFile and PInvoke.WriteFile, I am required to use unsafe and fixed logic for the NativeOverlapped parameter. This is in contrast to PInvoke.GetOverlappedResult which uses an in flag on the parameter.
For example:
unsafe
{
    fixed (byte* ptr = buffer)
    fixed (NativeOverlapped* overlapped = &_writeOverlapped)
    {
        if (PInvoke.WriteFile(_handle, ptr, (uint)count, &bytesWrote, overlapped))
            return;
    }
}

// handle overlapped behavior
if (Marshal.GetLastWin32Error() is not ERROR_IO_PENDING)
    throw new Win32Exception();

if (!PInvoke.GetOverlappedResult(_handle, _writeOverlapped, out bytesWrote, true))
    throw new Win32Exception();

OR
unsafe
{
    fixed (byte* ptr = buffer)
    fixed (NativeOverlapped* overlapped = &_writeOverlapped)
    {
        if (PInvoke.WriteFile(_handle, ptr, (uint)count, &bytesWrote, overlapped))
            return;

        // handle overlapped behavior
        if (Marshal.GetLastWin32Error() is not ERROR_IO_PENDING)
            throw new Win32Exception();

        if (!PInvoke.GetOverlappedResult(_handle, *overlapped, out bytesWrote, true))
            throw new Win32Exception();
    }
}

Expected behavior
Ideally, I would be able to pass the NativeOverlapped objects as in parameters like I can with GetOverlappedResult:
if (PInvoke.WriteFile(_handle, buffer, (uint)count, out bytesWrote, _writeOverlapped))
    return;

// handle overlapped behavior
if (Marshal.GetLastWin32Error() is not ERROR_IO_PENDING)
    throw new Win32Exception();

if (!PInvoke.GetOverlappedResult(_handle, _writeOverlapped, out bytesWrote, true))
    throw new Win32Exception();

Repro steps

NativeMethods.txt content:

ReadFile
WriteFile

Context

CsWin32 version: 0.2.188-beta
Target Framework: net7.0

Ideally, I would be able to pass the NativeOverlapped objects as in parameters like I can with GetOverlappedResult

The ReadFile and WriteFile methods define lpOverlapped with [Optional][In][Out] attributes, which is why CsWin32 surfaces it as a pointer: it's optional. Using ref would force you to pass a value in (except for one very poorly known and syntax-heavy technique). It's just a limitation of the C# language that ref parameters cannot also be optional.
The buffer pointer might have been changed to Span<byte> for the friendly overload that CsWin32 generates, but because it is typed as void* instead of byte*, that precludes that as well.

ClearCommError is also the same way

Same answer: these out parameters are optional.

That makes sense. However, I think nNumberOfBytesToWrite should still be an out uint. If the user doesn't want the "optional, out" parameter, they could just use a discard (out _).
I would possibly suggest generating overloads (one with a ref NativeOverlapped and one without), but that seems clunky and prone to breakage or manual tweaking per method.
A ref NativeOverlapped parameter would still work; I could just pass ref Unsafe.NullRef<NativeOverlapped>() if I wanted a NULL for the parameter.

I could just pass ref Unsafe.NullRef<NativeOverlapped>() if I wanted a NULL for the parameter.

Yes, that's the true but very undiscoverable solution.
Additional overloads could fix this, and it's something you could actually do within your own project since the PInvoke class is partial. Doing it within CsWin32 would typically need a general policy for handling so we can solve 'the whole problem' rather than just two methods that happened to get noticed. Knowing when it makes sense to treat an optional parameter as mandatory so that out can be used isn't something we can generally do given what's in the metadata today. And while out _ works, it passes a non-NULL pointer into the native method, and for some methods, that changes behavior and/or perf characteristics of the method.

Doing it within CsWin32 would typically need a general policy for handling so we can solve 'the whole problem' rather than just two methods that happened to get noticed.

Hence, my remark about it being "clunky and prone to breakage".

I'm going to close the issue as By Design. If you have further insights on this, feel free to add comments here for review.


Restrict translation Center for Active Admin

Hello
I would like to know is there some way I can restrict Translation Center for Active Admin. Right now it is generating the translation for active admin also. It would be great to have some configuration to restrict translation_center in some specific area.
Thanks

You can use a route constraint. Assuming you have an 'admin?' method on users, add this in routes.rb
  admin = lambda do |request|
    request.env['warden'].authenticate? && request.env['warden'].user.admin?
  end

  constraints admin do
    mount TranslationCenter::Engine => "/translation_center"
    ActiveAdmin.routes(self)
  end

Then add a link from within ActiveAdmin.
PS - it is better to ask such questions on StackOverflow.


No differences found

I am trying to compare two images (in base64 string format) with the following code:
this.images = {
   ref: '<BASE64 STRING>',
   src: '<BASE64 STRING>'
};

async compare() {
    try {
      this.rembrandt = new Rembrandt({

        imageA: this.images.ref,
        imageB: this.images.src,
        thresholdType: Rembrandt.THRESHOLD_PERCENT,
        maxThreshold: 0.01,

        // Maximum color delta (0...255):
        maxDelta: 20,

        maxOffset: 0,

        renderComposition: true,
        compositionMaskColor: Rembrandt.Color.RED
      });

      this.result = await this.rembrandt.compare();
    } catch (err) {
      console.error(err);
    }
  }

When I run this code with rembrandt.js version 0.1.3 (build from the master branch) or installed it via NPM, I get no results (both images are identical, which is not true), but when I try this same code with rembrandt.js code copied from rembrandt.com, I get the same results as when I try the example of that same website. Attached are both libraries. Who can spot the difference?
rembrandt.zip

The README here was wrong. The maxDelta value needs to be specified as a percentage instead of an 8 bit integer. Thanks for pointing this out!


Allow user to select the datepicker dropdown position

It seems the dropdown position is hardcoded to :below-left.
(See https://github.com/Day8/re-com/blob/master/src/re_com/datepicker.cljs#L252)
The problem I have with this is that if I want this datepicker to be on the left of the screen, the dropdown overflows outside the window.
Would it be possible to let the user select the position?

We would be happy to take a PR on this one.

I have made a fix for this that adds the keyword argument position to the datepicker-dropdown component. The position keyword can be any position supported in the popover component.
Attaching it below.


Office League- Sample data

We have a way to generate random team names, in random-names.js.
We need something similar for player names, and league names.
And ideally a way to generate random images (e.g. gravatar style) or import random images from some internet service.
An idea is to get the default icons for player and league, which are SVG, and generate random variations by changing the colors. This can easily be done with a search/replace pattern in the svg xml.

Thomas proposed to have superheroes as sample players. I found some lego superhero pictures under creative commons and imported them.


Weird code for defining get method

Hi. I'm creating a library that can be used to write universal code and mount it easily in Express on the server and have it run standalone on the web: uexpress so I'm reading the Express code and I noticed that the way the get function (that returns the application settings) is defined is (imho) really weird.
First of all, it seems the actual code for Application.get is in the set function:
app.set = function set(setting, val) {
  if (arguments.length === 1) {
    // app.get(setting)
    return this.settings[setting];
  }

  // ....

application.js#L354
And then later the actual Application.get method is created as an exception in the code that generates the convenience functions for the HTTP methods:
methods.forEach(function(method){
  app[method] = function(path){
    if (method === 'get' && arguments.length === 1) {
      // app.get(setting)
      return this.set(path);
    }

    // ...
  };
});

application.js#L473
Can anyone explain why it is done this way? Or is this just for historical / back. compat reasons?

@dougwilson would probably be the right person to answer the history of this.  But if you are interested, I was working with something similar, and made a feature compatible setting module.  I actually opened an issue here:
https://github.com/pillarjs/discussions/issues/14
Never hurts to share work :)

I found the commit where tj added it. It doesn't give much of a reason.
https://github.com/expressjs/express/issues/842

@wesleytodd Ah yes that would be nice!
Would it be interesting to have a module like uexpress in pillarjs? Because I see you guys have also decoupled the router... so it may end up not being that difficult to assemble a web version of express to facilitate isomorphic/universal code that makes use of the same core modules as the real express does.

@jordonias I looked a bit more at it and as far as I can gather the dual nature of get() (as shortcut method to mount only for GET requests and as settings getter) was refactored a bit, ending up with 'abusing' set to do the settings get. :) Thanks for your help looking up the commit!

Hi everyone, I know the issue is already closed, but I just wanted to see if I could shed some more light. I can't really explain the exact history on it, as the changes were made before I became deeply involved, but I can explain what it is at least doing.
See, some time long ago, app.set(name, value) was the way to set a setting to a value and app.get(name) was the way to get a setting value. The problem is that app.get is also the method for creating a GET route, which leads to a weird duel-use method. Back in the PR referenced above, the idea was to move that getting behavior into app.set as app.set(name), with the understanding that set was now a shortened word for "setting", not "set" as in to set something. For back-compat app.get(name) still lives on, and has not really been revisited since there was talk right after 4.0 that perhaps they should both be moved to app.settings.get and app.settings.set or similar.

@dougwilson Thanks for clarifying!


Projektin käyntiin uuteen osoitteeseen

Yks mun frendi halus käyttää tätä lol

Codecov Report
Base: 86.02% // Head: 86.02% // No change to project coverage :thumbsup:

Coverage data is based on head (6993eb7) compared to base (b5f2089).
Patch has no changes to coverable lines.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #62   +/-   ##
=======================================
  Coverage   86.02%   86.02%
=======================================
  Files           8        8
  Lines         458      458
  Branches       62       62
=======================================
  Hits          394      394
  Misses         49       49
  Partials       15       15

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


alt-tags key naming

My mental model of this configuration option was "the default is latest+timestamp, but you can override if you want to", while the alt-tags: name sounds more like "latest+timestamp is the recommended way to tag, but you can swap it out for an alternative method". I'll make an issue about this too.
image-tags: was the name I originally suggested for this key, but I understand that might be confusing, as we also have image-version:.
What do y'all think?

To be completely honest, I came up with that name without going back to the original thread. Now that you brought it up, I don't think image-tags: would have been clear enough. Since we haven't released official documentation for this property, I'm fine with renaming it to something else.

After conversations on discord, we're going to keep this as alt-tags for now and just proceed with working on recipe V2 (https://github.com/blue-build/cli/issues/180)


Integration Test - Release - 2022/03/07 09:19:52

Auto create for integration test. IssueCommandFlow

#pri1

#pri2

#pri3

#assign PRMergerTest1

#assign NonAllowedUser

The following users don't have valid GitHub IDs, or are not collaborators on this repo: nonalloweduser

#reassign PRMergerTest2

The following users don't have valid GitHub IDs, or are not collaborators on this repo: nonalloweduser

#please-close

GitHub user PRMergerTest1 has been removed from the MicrosoftDocs organization, so they were automatically removed as an assignee.

#unassign PRMergerTest1

#unassign NonAllowedUser


Fr/migrate to curried

This PR is a copy of #201 which tracks #200
Migration list:

[x] Alt
[x] Alternative
[ ] Applicative
[ ] Apply
[ ] Array
[ ] Bifunctor
[ ] Chain
[ ] ChainRec
[x] Comonad
[x] Console
[x] Const
[ ] Contravariant
[ ] Either
[ ] EitherT
[ ] Exception
[ ] Extend
[x] Field
[ ] Filterable
[ ] Foldable
[ ] Free
[ ] Functor
[ ] HKT
[ ] IO
[ ] Identity
[ ] IxIO
[ ] IxMonad
[x] Monad
[x] Monoid
[ ] Monoidal
[ ] NaturalTransformation
[ ] NonEmptyArray
[ ] Option
[ ] OptionT
[x] Ord
[x] Ordering
[ ] Pair
[x] Plus
[ ] Profunctor
[x] Random
[ ] Reader
[ ] ReaderT
[x] Ring
[x] Semigroup
[x] Semigroupoid
[x] Semiring
[x] Setoid
[ ] State
[ ] StateT
[ ] Store
[ ] StrMap
[ ] Task
[ ] These
[ ] Trace
[ ] Traversable
[ ] Tuple
[ ] Unfoldable
[ ] Validation
[ ] Witherable
[ ] Writer
[ ] function

@raveclassic With the current order of arguments I think we should keep Functor.map uncurried otherwise type inference will suffer
export interface Functor<F> {
  readonly URI: F
  map: (f: (a: A) => B, fa: HKT<F, A>) => HKT<F, B>
}

the fa argument here helps ts to infer the type A, otherwise you have to always add type annotations to the argument f.
If you want to curry map, we should swap the arguments (as in Scala)
export interface Functor<F> {
  readonly URI: F
  map: (fa: HKT<F, A>) => (f: (a: A) => B) => HKT<F, B>
}

The problem is that in a real world scenario you likely want to apply the f argument. Now if we swap the arguments, you can't still do that, hence we end up with a breaking change with no apparent gain

@gcanti Agree. What about leaving such cases as is and currying everything else where possible?

Yep, we can carry on for now and come back to this topic in a second phase

@gcanti Ok I'll try to mark all problematic places

Note (to myself): do not curry function.tuple :)

Note (to myself): do not curry function.tuple :)

Just noticed there are actually two tuple functions - uncurried in function.ts and curried in Monoidal.ts :)

The function.tuple is an handy helper because ts infers [1, 'a'] as (string | number)[]  instead of [number, string] (I should add a comment)
p.s. working on the Array module

@raveclassic Working on Chain, ChainRec, Either, EitherT

Working on Exception, Extend, Filterable, Foldable, Functor

@gcanti Noticed a cast eq(alt(none as Option<number>)(some(2)), some(2)). We need to add some overloads to Option's alt:
// overload here to support 'none' as first argument
export function alt(fx: Option<never>): (fy: Option) => Option
export function alt(fx: Option): (fy: Option) => Option
export function alt(fx: Option): (fy: Option) => Option {
  return fy => fx.alt(fy)
}

Fixed it here

Ah.. I thought they were vestigial. Maybe there's no need for special casing though, usually you get an Option rather than a None:
import { alt, none, some, Option } from '../src/Option'

function f(): Option<number> {
  return none
}

alt(f())(some(1))
// or even
eq(alt<number>(none)(some(2)), some(2))

Ok I think we're done here!

@raveclassic I left the Trace module uncurried intentionally, that's because it's supposed to be a quick and dirty way to debug the code, what's your opinion?

Ok I reverted that change

For what concerns the left bits, this is my proposal
Legend:

TCR: type constraint rule: all type constraints are grouped together
TI: currying will cause bad type inference
TU: is not curried because of the typical usage

Functions

Applicative.getApplicativeComposition Won't fix: TCR
Apply.ap Won't fix: TI
Bifunctor.bimap Won't fix: TU
Chain.chain Won't fix: TI
ChainRec.chainRec Won't fix: TI
ChainRec.tailRec Won't fix: TI
Either.fromPredicate Won't fix: TU
Extend.extend Won't fix: TI
Filterable.partitionMap Won't fix: TI
Foldable.reduce Won't fix: TI
Foldable.getFoldableComposition Won't fix: TCR
Foldable.foldMap Won't fix: TCR
Foldable.foldr will fix
Foldable.intercalate Won't fix: TCR
Foldable.traverse_ Won't fix: TCR
Foldable.sequence_ Won't fix: TCR
Functor.map Won't fix: TI
Functor.flap is already curried
IxMonad.ichain Won't fix: TI
Profunctor.promap will fix (only the fbc argument)
StrMap.mapWithKey Won't fix: TU
These.concat Won't fix: TCR
Traversable.traverse Won't fix: TI
Traversable.sequence Won't fix: TCR
Tuple.getSetoid Won't fix: TCR
Tuple.getOrd Won't fix: TCR
Tuple.getSemigroup Won't fix: TCR
Unfoldable.replicateA Won't fix: TCR
Unfoldable.singleton will fix
Validation.fromPredicate Won't fix: TU
Witherable.wither Won't fix: TCR + TI
Witherable.wilted Won't fix: TCR
Witherable.withered Won't fix: TCR

Let me know if you agree or want to change something


Show how to enable custom_lint's plugin in Getting Started

I'm quite out of my element here and just tried to follow the examples of other files and code blocks to create this change. Feel free to let me know if something isn't right.

I've done it on my own. Thanks again~

I've done it on my own. Thanks again~

Sounds good! I would've done it if you hadn't gotten to it first 👍
I'm glad I know now how to update it!


feat(logging): using init-fluent-bit images

Migrate to Init Process of AWS for Fluent-Bit Image.
We now use the official image and bootstrap it with centralized configs that support our use case (json and envoy logs).
Context: https://github.com/aws/aws-for-fluent-bit/tree/develop/use_cases/init-process-for-fluent-bit

Not stale

@thisismana I pushed a proposal which allows dynamic configuration of S3 or image local init config files on the clients side including (least priviledge) IAM permission for S3 config files.
Example usage on the client side:
init_config_files = [
      "arn:aws:s3:::config-${var.account_id}-${var.region}/ecs/fluent-bit/service-custom.conf",
      "arn:aws:s3:::config-${var.account_id}-${var.region}/ecs/fluent-bit/filters-custom.conf",
      "arn:aws:s3:::config-${var.account_id}-${var.region}/ecs/fluent-bit/parsers-custom.conf",
      "arn:aws:s3:::foo-${var.account_id}-${var.region}/ecs/fluent-bit/parsers-custom.conf",
      "/ecs/s3.conf"
    ]

What do you think?


Unable to connect to server

Your issue seems related to #11.
I can't reproduce it... are you using an administrator account or a normal user account ?
I need to do some testing

I was able to reproduce the bug, when the last release 1.1.54 will be build you should be able to connect correctly.

I am using admin and normal account also but same issue here
On Thu, 16 Sep, 2021, 5:21 pm Thomas SOHIER, @.***>
wrote:

Your issue seems related to #11
https://github.com/Thomas-Sohier/jellyflut/issues/11.
I can't reproduce it... are you using an administrator account or a normal
user account ?
I need to do some testing
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Thomas-Sohier/jellyflut/issues/13#issuecomment-920834012,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AONJ3UF7M3NG4LEJNTA2UVLUCHK4ZANCNFSM5EDUD2PQ
.

Are you having the same issue on latest version v1.1.54 ?

Yes, it is.
On Fri, 17 Sep, 2021, 12:12 pm Thomas SOHIER, @.***>
wrote:

Are you having the same issue on latest version v1.1.54
https://github.com/Thomas-Sohier/jellyflut/tree/v1.1.54 ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Thomas-Sohier/jellyflut/issues/13#issuecomment-921540623,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AONJ3UEHAWPPNBRBEBURAJTUCLPO3ANCNFSM5EDUD2PQ
.

V1.1.52
On Fri, 17 Sep, 2021, 12:13 pm Ajay Dabas, @.***> wrote:

Yes, it is.
On Fri, 17 Sep, 2021, 12:12 pm Thomas SOHIER, @.***>
wrote:

Are you having the same issue on latest version v1.1.54
https://github.com/Thomas-Sohier/jellyflut/tree/v1.1.54 ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Thomas-Sohier/jellyflut/issues/13#issuecomment-921540623,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AONJ3UEHAWPPNBRBEBURAJTUCLPO3ANCNFSM5EDUD2PQ
.

Now working add live tv channel options
On Fri, 17 Sep, 2021, 12:14 pm Ajay Dabas, @.***> wrote:

V1.1.52
On Fri, 17 Sep, 2021, 12:13 pm Ajay Dabas, @.***> wrote:

Yes, it is.
On Fri, 17 Sep, 2021, 12:12 pm Thomas SOHIER, @.***>
wrote:

Are you having the same issue on latest version v1.1.54
https://github.com/Thomas-Sohier/jellyflut/tree/v1.1.54 ?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Thomas-Sohier/jellyflut/issues/13#issuecomment-921540623,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AONJ3UEHAWPPNBRBEBURAJTUCLPO3ANCNFSM5EDUD2PQ
.

ok perfect.
"live tv channel options" is a different issue.


zimi.powerstrip.v2 doesn't report its power state

Power state is reported as false always, even if power strip is on.
% miio inspect "48625285"
INFO  Attempting to inspect 48625285
Device ID: 48625285
Model info: zimi.powerstrip.v2
Address: 192.168.xx.xx
Token: 757fc2f9b6379e4a0d2007018c083f08 via auto-token
Support: At least basic
Type info: miio:power-strip, miio, power-strip
Capabilities: switchable-mode, mode, switchable-power, restorable-state, power, state
Firmware version: 1.2.4_50
Hardware version: MW300
WiFi: xxxxxx RSSI: -57
WiFi firmware version: SD878x-14.76.36.p84-702.1.0-WM
Remote access (Mi Home App): TCP
Properties:

power: false

#https://github.com/aholstenson/miio/pull/149 probably solves the issue

Tried to manually apply PR above. Doesn't help to solve this issue.

news About this item?


Alarm clock Game

🎮 Game Request
The game is an "Alarm Clock Game" created using JavaScript. It combines the functionality of an alarm clock with a game that starts after the specified alarm time.
Point down the features
Game points:
The game is presented in a web browser. The user interface includes an input field where the user can set the alarm time using a time picker. Once the desired alarm time is set, the user can click the "Set Alarm" button. When the "Set Alarm" button is clicked, the JavaScript code handles the functionality. It calculates the time difference between the current time and the alarm time set by the user.
The game can be further enhanced by adding more features, graphics, sound effects, or levels of gameplay based on your imagination and programming skills.
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @ojKunal !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

I want to work in this issue . So can you assign me this issue.

/assign

Hey @ojKunal 👋!
@kunjgit here,
We have this annoucement to make 📢!!
We have updated our README 🚀
Make sure you follow proper guideline to raise your next issues !!
Make sure you join our Discord🕹 if you haven't 😇
Thank you 💗!

Hello @ojKunal, Time's Uppp!⏰
Sorry for closing your issue!
But it's more than a week since we haven't received anything from your side 😢 .
Come up with new ideas, create a new issue and make sure you finish it within a week! 🔥
All the best! 🚀
Happy Hacking! 💗

Hey @ojKunal ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


Use getter for graphQL queries

LGTM, but maybe Kevin should take a look?

@khawkins or @sfdctaka I don't have write access to merge this. Would be great if either of you could do it. Thanks !!


Don't use GitHub actions to run the backports

We can just use the server the webhook listener is running on

Closes #8

One somewhat unintentional benefit we've had is we haven't had to redeploy each time to fly.io, as it just triggered the GH action on main.
Perhaps if we merge this we also want an action set up to do that deploy, even better if it was only on tags.
tl;dr LGTM, but gonna hold off on merging for a bit and get a deploy workflow set up.

If I had infrastructure access I could set it up. Otherwise, I can wait for a TOC member to set it up

TBH I'd prefer to keep it using GitHub actions (at least for now), as we can manually trigger actions, when fly deploys happen they are using ephemeral disks so if a backport is in flight then it'll disappear into the ether. As well, fly doesn't yet (https://community.fly.io/t/access-token-scopes/11419) have access token scopes, so fly apps from non-gitea orgs could be affected (I almost wiped all my personal apps when writing the PR preview cleanup script, so I'm a touch nervous about this last point).
I think probably packaging this up into a docker container, that we can throw on a server and use watchtower (like we do for try.gitea.io) is the preferable direction, as fly is somewhat of a stopgap to limit our infra spend. This PR would also help for going in this direction.

I added docker


⚠ ETF has degraded performance

In 6758b64, ETF (https://markets.hankyung.com/equity-product/etf) experienced degraded performance:

HTTP code: 200
Response time: 7433 ms

Resolved: 한경메인 performance has improved in 7c3e48f.


Invalid KeyboardEvent type when triggering autocomplete

When using on:keydown on a form element (or likely any input), the event is currently typed as leptos::ev::KeyboardEvent.
However, in the cause of input autocomplete (selecting a historic value from a browser suggestion), the event is actually a leptos::ev::Event, as there is no event.key(). This is a bit of an unfortunate browser quirk, at least in the latest chrome.
Reference issue:
https://github.com/gaucho-labs/leptos-hotkeys/issues/94

Oof.
Is there a reason to think this might be a Chrome bug, or Chrome being spec-non-compliant? Comparison with other browsers would be good. The W3C UI Events spec is pretty explicit that keydown is a KeyboardEvent.

Hmm on closer inspection it looks like it like a keydown event, but crucially missing the code/key fields.
On autocomplete:

On "real" keydown:

This is only happening on chrome, firefox works correctly


Аvoid mental mapping

https://github.com/ryanmcdermott/clean-code-javascript#avoid-mental-mapping
Remove or edit rule as:
Bad:
doSomeStuffWithLocation(location);

function doSomeStuffWithLocation(l) {
  doStuff();
  doSomeOtherStuff();
  // ...
  // ...
  // ...
  dispatch(l);
}

Good:
doStuff();
doSomeOtherStuff();
doSomeStuffWithLocation(location);
dispatch(location);

function doSomeStuffWithLocation(location) {
  // ...
  // ...
  // ...
}

I can't think of straight away how to reflect this correctly, but the way it is brought up is confusing.
This lambda rule is misleading.
const locations = ["Austin", "New York", "San Francisco"];
  // This code is not clean.
locations.forEach(location => {
  // This code is not clean, too.
  doStuff();
  doSomeOtherStuff();
  // ...
  // ...
  // ...
  dispatch(location);
});

In fact, in this case, we have to move the function out by making it named. Or apply a different refactoring.
const locations = ["Austin", "New York", "San Francisco"];
locations.forEach(doSomeStuff);

A correct example would be something like:
Bad:
const locations = [{ id: 1, name: "Austin" }, { id: 2, name: "New York" }, { id: 3, name: "San Francisco" }];
const locationIds = locations.map(location => location.id);

Good:
const locations = [{ id: 1, name: "Austin" }, { id: 2, name: "New York" }, { id: 3, name: "San Francisco" }];
const locationIds = locations.map(x => x.id);

In this case, we consider functions as a workflow, and it does not matter to us exactly how the parameter is named.
locations // map locations
  .map(x => x.id) // to id

Or a more complex example:
Bad:
users // map users
  .flatMap(user => user.orders) // to flat user orders
  .flatMap(order => order.payments) // to flat order payments

And the developers read it as:
users
 .flat ... user => user.orders
 .flat ... order => order.payments

Good:
users // map users
  .flatMap(x => x.orders) // to flat orders
  .flatMap(x => x.payments) // to flat payments

And the developers read it as:
users
 .flat ... .orders
 .flat ... .payments

Or just:
users.orders.payments

Using an abstract x reduces the read overhead since the beginning of the expression x => x. ignored.
Many developers may find this strange, but we never actually read the names of variables in lambda functions, and we almost never write lambda functions longer than a couple of lines.
They also usually ask what to do with nested functions. It all depends on the situation here, but my adherence is that if nesting appears, it is wise to move it out of the chain. As in https://github.com/ryanmcdermott/clean-code-javascript#functions-should-do-one-thing

Good

It's strange to see so many dislikes. I constantly see people using meaningful names in lambdas don't change them when refactoring because they don't really mean anything.

locations.forEach(l => {
  doStuff();
  doSomeOtherStuff();
  // ...
  // ...
  // ...
  dispatch(l);
});

Anyone knows any ESLINT rule to prevent single character in arguments?

locations.forEach(l => {
  doStuff();
  doSomeOtherStuff();
  // ...
  // ...
  // ...
  dispatch(l);
});

Anyone knows any ESLINT rule to prevent single character in arguments?

http://astexplorer.net/
https://eslint.org/docs/rules/no-restricted-syntax

I think you could do something similar to this:
{
    "rules": {
        "no-restricted-syntax": [
            "error",
            {
                "selector": "ArrowFunctionExpression[params[0] && params[0].name && params[0].name.length == 1]",
                "message": "Single character arguments names are not allowed for arg[0]."
            },
            {
                "selector": "ArrowFunctionExpression[params[1] && params[1].name && params[1].name.length == 1]",
                "message": "Single character arguments names are not allowed for arg[1]."
            }
        ]
    }
}

if u use Typescript ast:

            {
                "selector": "ArrowFunctionExpression[parametrs[0].getText().length == 1]",
                "message": "Single character arguments names are not allowed for arg[0]."
            },
            {
                "selector": "ArrowFunctionExpression[parametrs[1].getText().length == 1]",
                "message": "Single character arguments names are not allowed for arg[1]."
            },

TS ast:
                 // for ArrowFunctionExpression: (a, { a, b, c }) => {...}
                 // if { name: Identifier } then .getText() === "a"
                 // if { name: ObjectBindingPattern } then .getText() === "{ a, b, c }"

Babel/eslint ast:
                 // for ArrowFunctionExpression: (a, { a, b, c }) => {...}
                 // if { name: "a" }
                 // if { name: undefined  }

I must warn you that I disclaim responsibility for suffering from this rule.


[deprecated = true] does nothing

Hello!
In our proto we have some field which marked [deprecated = true], for example:
  bool live = 5 [deprecated = true];
But when we generate swift files via protoc there is no @available message for this generated property.
Are we doing something wrong or don't you support deprecated?

Duplicate of #151
Basically Swift's support doesn't really allow without the generated code itself triggering warnings, thus limiting the usefulness.


[CSL-59] Come up with better name for Dynamic State SSC, rename

@gromak
@shersh you need to come up with name, I don't know about actual renaming now, we'll do it later, after finishing POS-40 (dunno who will do it). So name is also not very urgent. More details later (if necessary).

@shersh
@gromak I'm not so fluent with pos paper primitives. Could you describe purposes of this data type and give link on it? And then I will come up with cool naming :sunglasses:

@gromak
@shersh as you probably know (if you don't know, make sure to read about it), paper starts with presenting Static State version where list of slot leaders is known for all slots in advance and then expands to Dynamic State where list of slot leaders is known only for limited amount of time, i. e. epoch. Dynamic State is achieve using two procedures: 1) obtaining secure randomness which is same for all parties and 2) follow-the-satoshi. The first part was abstracted into something that we call SSC (i. e. shared seed calculation) and there are two implementation for it, one of them is as described in paper. Currently it's called Dynamic State, but it's bad name, because Dynamic State is not only SSC, but more something general. Also it's long.

@shersh
@gromak Btw, in paper it is called Dynamic Stake (typo?). Am I right, that ''described in paper'' implementation of '''1) obtaining secure randomness''' is NIST Beacon? If so, why not call it somehow related to Trusted Beacon?

@gromak

Btw, in paper it is called Dynamic Stake (typo?).

Hmm, yes, typo, there is static state and dynamic stake.

Am I right, that described in paper implementation of 1) obtaining secure randomness is NIST Beacon?

 ''Described in paper'' is more smart.

@shersh
Okay, in that case I'm proposing next name replacements for DynamicState (that should be DynamicStake):
TrustStake
Trust(ed)Seed
SecSeed
SecStake
SecSSC
Trust(ed)SSC
StrongSSC
SafeSSC
SafeStake
SpicyStake (sorry, all this ''stakes'' and ''beacon'''s make me think in different direction)

@gromak
I don't like versions with Trust, because Trust usually means trusted third party, but this SSC is the opposite.
Does Sec mean Secure? If yes, then why not full word? It's not so long. Anyway, now my favorite name is SecureSeed or SecureSSC (or maybe SecureSsc, because we may want to have SecureSSCStorage and 4 capital letters in a row are not allowed by style guide).
As I understood from recent discussions, proper name for this SSC is Coin tossing with guaranteed output delivery. Unfortunately, this name is too big, so ideally we need a short name which reflects this name.

@shersh

Does Sec mean Secure?
Yes. But SecureStake is not much shorther than DynamicStake :)

Okay, taking '''Coin tossing with guaranteed output delivery''' into account I can add next names:
CoinToss(ing)
CoinDelivery
SecureTossing
SecureCoins
Among these ones my favourite is SecureTossing. But SecureSeed or SecureSsc is shorter and follows style guide. But anyway, I can't fit too many words in one name. Probably, it is better to choose smth among these proposals and just add comment with SSC transcript and '''coing tossing...''' thing.

@gromak
My vote is for SecureSsc. @neongreen what do you think?

@gromak
What about GodTossing? Where GOD = Guaranteed Output Delivery.

@neongreen
I'm fine with SecureSsc. I'm also fine with CoinTossing or CoinToss (or even Tossing) because it's more specific than SecureSsc and doesn't have Ssc in it (we have too many things with Ssc in them already and I'm afraid that SecureSsc would get confused with one of the SSC typeclasses).

@gromak
Or maybe GodCoinToss which is still shorter than DynamicSta{t,k}e :)

@shersh
@gromak GodTossing is awesome :sunglasses:
Also I'm okay with GodCoinToss. And this is really more specific than SecureSsc. I agree with @neongreen here.

@gromak
Let's assume that this issue is only to come up with name. Renaming will be done as part of CSL-105. I am closing this issue, name is GodTossing.


Add support orders, geo_distance

Add support orders, geo_distance

You don't need to keep close and reopen your PR.
There are no tests so the workflow will fail. I also don't see the link between the Geo distance syntax and adding orders, can you elaborate more on your PR reasoning?

Currently, I see that your library does not have query by location and sort by location. I'm working with localtion so I want to contribute and better support the following projects.
Here are the docs for the old version => https://www.elastic.co/guide/en/elasticsearch/guide/current/sorting-by-distance.html
This is version ^8.* =>


Add alert message for when tracks are added to the queue

This adds the ability to tell the user that the song of their choice was added to the queue. Feel free to leave me some feedback as this is my first time programming in Rust, and making an open-source contribution.

@jholdnak If you want an even trickier challenge, you'll find that some of the alert messages don't disappear when added in succession. I think there's some issue with the debounce time. Each notification needs a timer that will cause it to vanish after it appears.


Ship rust application with libjulia

It'd be very useful if we can ship a rust application with libjulia get included, I assume this should be possible if there is some kind of fake -src crate created for libjulia and let it finds local Julia and copy the shared library?

I don't think such a crate is necessary, rather the binary needs to be able to find the libraries it depends on at runtime, either through environment variables or by setting an rpath. I have never tested this, though.

do we have something that finds libjulia at runtime already? so that we can ship a binary and link to system julia (or whatever other available) directly

As I understand it, libjulia is dynamically linked, so as long as it can be found at runtime (via the Path environment variable on Windows, or LD_LIBRARY_PATH on Linux) it should be possible to use a binary compiled on another machine.
The only major limitation I expect is that the version of Julia must be compatible with jlrs, and that this version is used at compile time and runtime. It won't be possible to compile against Julia 1.6 and link against 1.8 at runtime, for example.

Is this because Julia doesn't have a stable ABI yet?

Yes. In my experience there are minor, but backwards-incompatible, changes
every version. Sometimes it's the signature of a function, sometimes it's
the layout of a type.
It would be nice if Julia had something similar to NAPI (I'm more familiar
with that than Python FFI), but I've never really thought about what that
should look like.
Op vr 7 apr. 2023 17:19 schreef Rogerluo @.***>:

Is this because Julia doesn't have a stable ABI yet?
—
Reply to this email directly, view it on GitHub
https://github.com/Taaitaaiger/jlrs/issues/79#issuecomment-1500383030,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOQBHH44EVOC3BQZGU437PLXAAWALANCNFSM6AAAAAAWVUUHPU
.
You are receiving this because you commented.Message ID:
@.***>


Bump dependencies

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

Comparison is base (288cf35) 0.00% compared to head (7307878) 0.00%.

:exclamation: Current head 7307878 differs from pull request most recent head bb8a09e. Consider uploading reports for the commit bb8a09e to get more accurate results

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@          Coverage Diff           @@
##           master     #39   +/-   ##
======================================
  Coverage    0.00%   0.00%
======================================
  Files          18      18
  Lines        1246    1277   +31
======================================
- Misses       1246    1277   +31

Files
Coverage Δ

src/mpi/CubedSphereDistributedDiscreteModels.jl
0.00% <0.00%> (ø)

... and 7 files with indirect coverage changes

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


Move unused dependencies to devDependencies

Minor thing but these 4 deps not used by the addon at run time hence don't need to be listed in dependencies.
Not a big deal but for large apps with tons of dependencies this matters as it affects build time (when  ember-functions-as-helper-polyfill would be included multiple times in the graph)

@NullVoxPopuli FYI this is similar to https://github.com/NullVoxPopuli/ember-functions-as-modifiers-polyfill/pull/15

thank you!!!


Inline Add hidden

onControlAdd will add tr with inline add, but with class "datagrid-row-inline-add-hidden" and the row is therefore invisible

Same issue here


Dashboard: Template Preview Focus Resets

When you're using a keyboard to navigate the single template views in the dashboard the focus resets in a less than ideal way. Morten outlined it as such:
When using the keyboard to navigate between templates on the single template view (the right-most or left-most arrow buttons), focus is reset to the close button. Focus should remain on the same button. Focus should only move to the close button the first time the single template page is loaded, not every time the single page template changes to a different template
which is pretty on spot. We can improve this.

Verified in QA


Test command output before eror status in signing integration tests

If executing the command fails, the output to stderr is more useful than
the exit code, so test the output first.

It's weird to check the output first but that's simply me so I'm fine with this if you are


Unable to do anything

I am using the latest build in release and the example config with two monitors but none of the keybindings works. Also Alt+H opens Help menu in vscode.

Is wwm still running, but just not responding?
Did you try entering work mode via the following shortcut?
type: ToggleWorkMode
key: Alt+Control+W

Because work_mode is set to true you should be able to use the keybindings right away, maybe I somehow broke the initial loading of this setting.

 You have to click more info to run the program.

Closing this as the author has not responded in a long time and I can't reproduce the issue.


No support for proxified WebPage Callbacks?

Some more feedback, might look into this myself in a while but right now time does not permit it.
I need to set page.onConsoleMessage = function (msg) { console.log(msg); }; but from what I can tell it is not supported to set any callbacks on the proxified WebPage object in node?
onConsoleMessage is most important to me, but I can see some use for all of the following callbacks:
onAlert
onConsoleMessage
onInitialized
onLoadFinished
onLoadStarted
onResourceRequested
onResourceReceived

Hiya,
To my knowledge those are all supported and working in phantom at the moment using the .set(key, val) syntax. Quoting from the unit tests:
"can register an onConsoleMessage handler":
  topic: t (page) ->
    test = this
    page.set 'onConsoleMessage', (msg) -> test.callback null, msg
    page.evaluate (-> console.log "Hello, world!")

  "which works correctly": (msg) ->
    assert.equal msg, "Hello, world!"

I don't currently test the others (because the code path for all of them is the same) but if you run into any issues please let me know.


fixes build warning

Goal
Get rid of build warning. Which is a minor annoyance, but nice to get rid of anyway.

PR for issue https://github.com/bugsnag/bugsnag-react-native/issues/359

Closing as this is a duplicate of #303


Improve mutelinks textarea coloring and prevent messages with links from being sent if mutelinks is on

Doing this with a regex would be omega slow, but it's possible to just check for "http://" or "https://" or "www." or something. Not a perfect solution, but a decent one NODDERS
Thanks to Stardog for the idea!

Done! #29


move to support 1271 fallback

Codecov Report
Base: 99.51% // Head: 99.05% // Decreases project coverage by -0.46% :warning:

Coverage data is based on head (26dafc1) compared to base (859070c).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##              1.2     #756      +/-   ##
==========================================
- Coverage   99.51%   99.05%   -0.47%
==========================================
  Files          45       20      -25
  Lines        2283     1165    -1118
  Branches      354      210     -144
==========================================
- Hits         2272     1154    -1118
  Misses          1        1
  Partials       10       10

Flag
Coverage Δ

production
?

reference
99.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

contracts/lib/SignatureVerification.sol

contracts/lib/Verifiers.sol

contracts/lib/TokenTransferrer.sol

contracts/lib/Consideration.sol

contracts/lib/BasicOrderFulfiller.sol

contracts/lib/CriteriaResolution.sol

contracts/lib/Assertions.sol

contracts/lib/OrderValidator.sol

contracts/lib/AmountDeriver.sol

contracts/conduit/Conduit.sol

... and 15 more

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Casbin Auth Middleware's sample code has compilation error

The code below has a compilation error:
e := echo.New()
e.Use(casbin_mw.Middleware(casbin.NewEnforcer("casbin_auth_model.conf", "casbin_auth_policy.csv")))

$ go build src/server.go
# command-line-arguments
src/server.go:46:27: too many arguments in call to "github.com/labstack/echo-contrib/casbin".Middleware
        have (*"github.com/casbin/casbin".Enforcer, error)
        want (*"github.com/casbin/casbin".Enforcer)

We have to change this code like this:
e := echo.New()
enforcer, err := casbin.NewEnforcer("casbin_auth_model.conf", "casbin_auth_policy.csv")
e.Use(casbin_mw.Middleware(enforcer))

I sent a PR. Please take a look!


minimal install lacks package that allows determining size of audit partition

With a minimal install (i.e., kickstart with '%packages --nocore'), the role initially falls back to the default minimum of space_left=51, rather that being 25% (75%?) of the partition size.  Running the role a second time corrects this to the correct value, which indicates that one of the packages being installed causes ansible to be able to determine the partiton size correctly.
I have not found out which package this is.  Once this is determined, that package should be installed prior to gathering disk facts, to allow ansible to make the correct size_left determination the first time around.

Hello,
I wanted to reach out and let you know that this issue is being closed. We have re-worked the role and want to start with a fresh issues list with this latest version. There was a post in the Ansible-Lockdown google group (https://groups.google.com/g/ansible-lockdown) with the details of the changes that are coming. Please checkout the thread titled RHEL 7 CIS and STIG Changes for all of the details, I also have the message pasted at below.
Please as you use the latest version and open issue tickets as you find them, it is the best way for us to improve the role for everyone. Thank you for being part of the community and providing awareness of problems or advice on improvement. Reporting is a huge part of improving this project.

Hello,
Thank you to everyone in the Ansible-Lockdown community who has contributed to RHEL7 STIG/CIS. Our team at MindPoint Group has been working with the entirety of the Ansible-Lockdown project, and we have some significant updates for both RHEL 7 STIG and CIS. With these updates, some larger changes have been made. I have these changes/updates outlined below.
Testing:

CI/CD - We have implemented some automated testing pipelines to test pull requests into the devel and main branches. With the current workflow, the community will PR into the devel branch (never the main branch) for review by the administrators. When your PR is created, the first check will remain the DCO check. The second check is a functional testing pipeline that will automatically perform a functional test of the branch the PR is initiated from. Once both tests pass, someone from the Administrator Team will review the changes and merge them into the devel branch. From there, an additional review is completed before the devel branch is merged into the main branch. Only the Admin Team will perform PRs/merges into the main branch. There is also an automated pipeline for PRs from devel to main. Please do not edit the .github/workflows files since those are used as part of the pipeline.
Compliance Checking – MindPoint Group has been working to create our own compliance audit scan tool. The tool uses a goss framework executable to run custom checks that we have created. The goal is to provide a more thorough check for control compliance and decrease the number of false positives/negatives. For example, it will check the configuration file related to the control and as well as checking if that configuration is active. With a smarter scan, we can hopefully identify attempts to trick scanners as well (for example stacking a parameter in a config file where the first instance is enabled and second disabled. Most audit tools search for the first instance but the application might look for the last instance of the parameter, thus making the scanning tool think it's enabled). In testing, we have found that our audit scan runs significantly faster than other audit tools, reducing audit times. Our audit tool and profiles will have their own repositories in the Ansible-Lockdown org, but within the remediation role there will be an integrated way to incorporate the audit. Keep an eye out for the audit tools as they are released. We plan on developing a goss audit profile for each current remediation role. Going forward, we plan to release a remediation role and goss audit tool profile simultaneously.
Role Updates:
RHEL 7 STIG/CIS – We have re-written much of the RHEL 7 STIG and CIS roles to increase clarity and readability and address some functionality items. We performed these updates while creating our goss testing framework for each of these roles. We plan on pushing our update to the devel and main branches. We will move the current devel and master branches to a devel_stable_ and master_stable_ branch in the respective repositories. Accordingly, community members who rely on the current version can still use that version going forward; this process will not remove what is currently there. The latest versions of the roles have also been updated to comply with the latest benchmarks.
Role Architecture – All roles will change with regard to the structure in the tasks folder. Taking CIS as an example, there will be a folder per section and yaml files for each sub-section. For example control 1.2.1 in CIS will be located in RHEL7-CIS/tasks/section_1/cis_1.2.x.yml. The cis_1.2.x.yml file will contain all controls related to section 1.2.x. This will hopefully make updates to roles a bit easier with less risk. This matches the architecture of our audit tool, creating consistency across remediation and audit platforms. The end goal is to repeat this architecture (the best we can) on STIG roles, but we are starting with CIS.
Existing PRs and Issues – With all of these changes comes the task of cleaning up existing PR’s and issues. Our plan is to close all of the existing PR’s and issues because of the re-work. Our team is growing and should be able to stay on top of the new issues and PRs as they come in.
Again, I would like to thank the community for your involvement in this project. The input and work from the community has contributed significantly to the success of this project. Please keep an eye out for these changes, which will be rolling out in the coming weeks.


create GH actions for json

seems that it is implemented https://github.com/cheminfo/cheminfo-types/blob/main/.github/workflows/createJSON.yml


Update Google Fonts implementation

This pull request covers 2 issues:

Single-weight font-families throw 400 error when weight subclasses are included in the request.
Since there is no way to determine the available weights, I have removed them from the request entirely. See additional notes below.
Example:
https://fonts.googleapis.com/css2?family=Twinkle+Star:wght@100;300;500;700&display=swap (not loading)
https://fonts.googleapis.com/css2?family=Twinkle+Star&display=swap (loading)

Added link tags to preconnect to Google API
(see: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel/preconnect)

Additional notes: Pages seem to load faster, even when a complete font-family is loaded (I tested with Ubuntu, which contains 8 styles). I assume this is because the page only loads the required weight/subset. When multiple weights are used on a page, the size of the font file is larger, but it only uses 1 request as opposed to multiple requests per weight.

Thanks for the PR!


chore(assertion): migrate all tests to assertions library

Issue #, if available:
Description of changes:
Remove the deprecated @aws-cdk/assert completely
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: 5f314bd981c6805f7b2207634cd9048903b41292
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: 778435da90b5769c0c625b26f55b1084c3c2f42d
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: b27251adae47da69d2eee21a3dfbd1afcf8f3baa
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: 40f97f8502255580c35a6af71018ba1b4c735586
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: e57bac924caa3ba0278e2d635cfd11df52b35723
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: 1d3f49cc48e62f6ec26f24296e6025e05ee3677d
Result: FAILED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: githubautobuild-for-cdk-v2
Commit ID: 6b90b60c38dac9d341179feb8ed4842f9d80a50a
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository


Sqlx 1 to many example

Hi @LukeMathWalker . I'm following along with your tutorial with my own use case but I can't seem to find a straight forward answer about sqlx support for One to Many deserialization.
I have a one to many relation between two tables:
CREATE TABLE consumable (
    id UUID NOT NULL DEFAULT uuid_generate_v1(),
    name VARCHAR(255),
    PRIMARY KEY (id)
);

CREATE TABLE serving (
    id SERIAL PRIMARY KEY,
    consumable_id UUID NOT NULL,
    amount DECIMAL(12,4) NOT NULL,
    kcal DECIMAL(12,4) NOT NULL,
    CONSTRAINT fk_consumable
          FOREIGN KEY(consumable_id)
    	  REFERENCES consumable(id)
    	  ON DELETE CASCADE
);

And these are the corresponding structs
#[derive(serde::Serialize, serde::Deserialize, sqlx::FromRow)]
#[sqlx(rename = "consumable")]
pub struct Consumable {
    pub id: Uuid,
    pub name: String,
    pub servings: Vec<Serving>
}

#[derive(sqlx::FromRow, serde::Serialize, serde::Deserialize, sqlx::FromRow)]
#[sqlx(rename = "serving")]
pub struct Serving {
    pub id: String,
    pub amount: BigDecimal,
    pub kcal: BigDecimal
}

Do you know of a way to write a query that will directly write to an instance of Consumable. Is the code below something that is possible with sqlx, or would I have to query all the tables separately and then compose the structs programmatically?
pub async fn consumable_by_id(path: web::Path<String>, pool: web::Data<PgPool>) -> impl Responder {
    let  id = path.0;
    let consumable_or_error = sqlx::sqlx::query_as!(Consumable,
        r#"
        <SOME_QUERY_NOT_SURE_WHAT>
        WHERE consumable.id = $1
        "#,
        id
    )
    .fetch_one(connection.get_ref())
    .await;

    match consumable_or_error {
        Ok(consumable) => HttpResponse::Ok()
            .content_type("application/json")
            .json(consumable),
        Err(_) => HttpResponse::InternalServerError().finish(),
    }
}

Hey @flopshot!
I believe this a question better suited for sqlx's repository than this one :grin:
We won't be covering one-to-many relationships in the book I am afraid.

@LukeMathWalker No problem. And thanks for a great Rust backend book.


How to use Optimistic Lock in bookshelf?

How to use Optimistic Lock in bookshelf?

Since transactions are used for concurrency control, and Bookshelf doesn't do anything with transactions but pass them to Knex, this is a Knex question rather than a Bookshelf question. It's also highly database-specific: different databases handle concurrency control differently.
For example, in Postgres, you would need to use a
SELECT ... FOR UPDATE (NOWAIT | SKIP LOCKED)

query, inside a transaction that you've
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ

or SERIALIZABLE on. If you need to do this in Bookshelf, you'll need to use Knex and raw queries.


Document the new scalable k8s metadata collector

/area documentation
What would you like to be added:
Starting from Falco 0.37.0 we are offering a new scalable approach to monitor k8s metadata; many users that have attempted to use the previous mechanism have experienced performance issues which we wish to resolve. However, adopters must be informed about how to opt in and configure it and which fields will be available once it is enabled. The helm chart greatly helps here.
See details here: https://github.com/falcosecurity/falco/issues/2973

/assign @alacuku

Here: https://github.com/falcosecurity/charts/tree/master/charts/falco#k8s-metacollector
falcosecurity/charts#601

@LucaGuerra: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.


SWC enhancments

Take the good stuff from the SWC branch and put it in here

create issues for each problem


question about embedding visualization in the Fig.4

Hi, @diegovalsesia ,
Could you also provide the code for generating the embedding visualization illustrated in the Fig.4? Or could you give some hints or steps for implementing this embedding visualization?
Thanks~

Hi @amiltonwong ,
we simply used the Umap embedding method with hyperbolic distance:
umap.UMAP( output_metric="hyperboloid", random_state=13)


fix(masked-input): avoid passing overrides to MaskOverride

Avoid passing overrides to MaskOverride. These overrides do nothing here and show up in the DOM and cause React warnings.
Note that the snapshot MaskedInput - basic functionality: Masked input has correct props 1 now matches Input - basic functionality: input has correct props 1.
Also:

Still allows for {Input: {style}} overrides
Export MaskedInputPropsT type
Remove weak Flow type

Scope

[x] Patch: Bug Fix
[ ] Minor: New Feature
[ ] Major: Breaking Change

Thank you @leyanlo 🤗


Feature extraction for CORNet-S

Hi guys,
I am using your library to extract features from different models including the cornet family. With all of the models my results make sense (RSA with human data) except for CORNet-S. I did a test where I use the model pre-trained vs not and couldn't see a systematic difference in the outcome. It's strange because everything seems to work perfectly well for the features extracted from the other models (i.e. other two cornets, vgg16, alexnet, resnet50).  So I wanted to ask if anyone else has had some issues with the CORNet-S features and if you have any suggestions on what could be the problem?

I'm sorry, I didn't understand what problem you were referring to. What's the issue? Being specific is great, as it allows us to check the code and run tests and hopefully identify a problem.

Alex

Hi,
Thank you for your reply. I think that CORNet-S might not have the right
pretrained weights when I am calling the model. The reason why I am
thinking this might be so is that the RSA analysis I am doing with the
features extracted from this model just don't make sense, but the results
for all of the other models are aligned to their behavioural performance.
Additionally I apply SVM on the extracted features and as I go deeper in
layers the SVM's performance gets better - that's the case with all other
models I've used, except for CORnet-S. So I am trying to figure out why
this is so. Moreover, when I look at the final performance of the models on
the images I have, CORnet-S is one of the best performing models, so I am
super confused as to why when I try to do decoding based on its features
the performance is so poor.
Please don't hesitate to ask me further questions if something is unclear.
Any insight on the matter would be greatly appreciated. Also potential
suggestions on what I can do differently would be helpful as well. I want
to use your library for all feature extraction as it keeps it very
consistent.
Best,
Antoniya
On Wed, 1 Feb 2023 at 19:44, Alex Murphy @.***> wrote:

I'm sorry, I didn't understand what problem you were referring to. What's
the issue? Being specific is great, as it allows us to check the code and
run tests and hopefully identify a problem.
—
Reply to this email directly, view it on GitHub
https://github.com/ViCCo-Group/thingsvision/issues/128#issuecomment-1412546473,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUVDWE7B4DJAES4PJM3ZV63WVKVKNANCNFSM6AAAAAAUOCO4FQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hi Antoniya,
I checked our code for the different CORnet versions, and all models, including CORnet-s, correctly pull pretrained state dicts from the official AWS bucket and load their weights from them. This is more or less identical to the official CORnet repository. Model outputs also differ between pretrained and random weight initialization and resulting RDMs for some images I had lying around look significantly different.
For me, this suggests that on our side things should work as intended. Could you maybe post the code you used to do your feature extraction and analyses? Also, what version of thingsvision do you use?
Best,
Johannes

Could this be for some reason related to #46?

Hi,
Thanks for your reply and help! Attached you will find my code for the
extraction + SVM. The thingsvision I am using is: 2.2.18. I do apply PCA to
the features once I extract them for storage purposes - could this be
causing a weird effect on the features?
Best,
Antoniya
On Mon, 6 Feb 2023 at 15:47, Johannes Roth @.***> wrote:

Hi Antoniya,
I checked our code for the different CORnet versions, and all models,
including CORnet-s, correctly pull pretrained state dicts from the official
AWS bucket and load their weights from them. This is more or less identical
to the official CORnet repository https://github.com/dicarlolab/CORnet.
Model outputs also differ between pretrained and random weight
initialization and resulting RDMs for some images I had lying around look
significantly different.
For me, this suggests that on our side things should work as intended.
Could you maybe post the code you used to do your feature extraction and
analyses? Also, what version of thingsvision do you use?
Best,
Johannes
—
Reply to this email directly, view it on GitHub
https://github.com/ViCCo-Group/thingsvision/issues/128#issuecomment-1419201037,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AUVDWEZUPFS5ZGTF45JCH4TWWEFHHANCNFSM6AAAAAAUOCO4FQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

@antoniyaaboyanova, you'll have to post the code into the Github issue, I don't think you can attach files when answering by mail! 🙂

I think this is not an issue on our end. @andropar, can we close this?

Yes, I think so too.


Build is failing on OS X 10.11

It looks like there are issues when semantic-rs gets built on OS X 10.11 and up because of openssl.

Possible solutions:

brew link --force openssl

OPENSSL_INCLUDE_DIR=brew --prefix openssl/include OPENSSL_LIB_DIR=brew --prefix openssl/lib  cargo run -- -p ../test-project

> brew link --force openssl
Warning: Refusing to link: openssl
Linking keg-only openssl means you may end up linking against the insecure,
deprecated system OpenSSL while using the headers from Homebrew's openssl.
Instead, pass the full include/library paths to your compiler e.g.:
  -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib

Hmpf, I have openssl. The folks at hyper had similar problems. I will lookup how the decided to work around this.

I did some research and found these two options:
OPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include DEP_OPENSSL_INCLUDE=/usr/local/opt/openssl/include

and:
OPENSSL_ROOT_DIR=/usr/local/opt/openssl/


Choose an asset based on a value in .env

In the assets folder, I have an audios folder containing audios and a videos folder containing videos. The idea here is to be able to compile an application containing the audios and anothers without audios by using product flavor and react-native-config.
I think I followed the react-native-config correctly.
When I try to compile the app without audios after deleting the audio files I get an error message saying that it can't find the audio files and yet I control this.
My code for the control.
import Config from "react-native-config";
...

const has_audio = Config.HAS_AUDIO === "true";
const audios = [
  { uri: undefined },
  { uri: has_audio ? require("../../../assets/audios/path_to_audio/audio_1.mp3") : undefined },
...
]

Is there a cleaner way to do this?
Also I would like to know if there is a way to integrate the good audios using product flavor.

Does anyone have an idea?


Collapsable sidebar

Description
The sidebar takes up a lot of space that could be used for more recommendations.
Desired Behavior
Add a toggle to collapse the sidebar
Additional Context
Current:

Very rough idea (only 4 changes to CSS and remove the sidebar text!!):

(For those using ublock, you can add this to get some of the way there.  I haven't figured out how to get rid of the text to make the icons appear, at least not programmatically).
<IP_ADDRESS>#$#.w-64 {width: 4.5rem !important;}
<IP_ADDRESS>#$#.lg\:left-64 {left: 4.5rem !important;}
<IP_ADDRESS>#$#.lg\:ml-64 {margin-left: 4.5rem !important;}
<IP_ADDRESS>#$#.mr-3 {margin-right: 0 !important;}

Code of Conduct

[X] I agree to follow Overseerr's Code of Conduct

Do you mean like how it works on mobile?
https://user-images.githubusercontent.com/98979876/199125256-ba7debfa-b0cf-494a-a595-c2bb9f2e636a.mp4

Did anything ever come of this request? The mobile method would be great on desktop version.

If someone wants to implement this, feel free to submit a pull request. But this is not something we'll work on, since it doesn't interfere at all with using the app.


IntegerLookup with XLA Compilation Fails to Enable JIT in TensorFlow 2.16.1 and Keras 3.2.1

System information

Custom code: Yes
OS Platform and Distribution: Google Colab
TensorFlow installed from: Binary
TensorFlow version: 2.16.1
Keras version: 3.2.1
Python version: 3.10.12
GPU model and memory: Colab default GPU setup
Exact command to reproduce: See the Colab notebook and source code provided below.

Describe the problem:
The issue with IntegerLookup layer not properly utilizing XLA when jit_compile=True is set persists in TensorFlow 2.16.1 and Keras 3.2.1. The expectation is for the model to be compiled with XLA to enhance training efficiency, but the system defaults to disabling XLA despite explicit JIT compilation settings.
Describe the current behavior:
When jit_compile=True is set, the Keras backend appears to disable XLA, and training proceeds without the expected XLA optimization, leading to a less efficient training process.
Describe the expected behavior:
The model should honor the jit_compile=True setting and compile with XLA, resulting in a significantly more efficient training process.
Standalone code to reproduce the issue:
Here is a Colab Notebook demonstrating the issue. Below is the minimal code to reproduce the behavior:
import tensorflow as tf
import keras

def make_dataset():
    # Dataset creation code
    pass

def make_model():
    vocabulary = list(range(1, 11))
    return keras.Sequential([
        keras.layers.IntegerLookup(vocabulary=vocabulary),
        keras.layers.Embedding(len(vocabulary) + 2, 8, input_length=1),
        tf.keras.layers.Dense(1, activation='sigmoid')
    ])

# Model and training setup
dataset = make_dataset()
model = make_model()
model.compile(loss=keras.losses.BinaryCrossentropy(), optimizer=keras.optimizers.AdamW(), metrics=['AUC'], jit_compile=True)
model.fit(dataset, steps_per_epoch=100, epochs=2, verbose=1)

Source code / logs:
Please refer to the provided Colab notebook for full logs and traceback. The key message indicating the problem is:
UserWarning: Model doesn't support `jit_compile=True`. Proceeding with `jit_compile=False`.

Additional context:
This problem was previously reported at #418 and believed to be resolved; however, further testing shows that the issue still exists, indicating a need for re-evaluation by the development team.

@jacob-talroo,
I tried with both tensorflow v2.15 & v2.16 and observed that on v2.15 there was no warning while execution but whereas on v2.16, the warning is displayed. I suspect this is happening with keras 3.0 version which is default to the 2.16. With tensorflow 2.15 the default keras version is 2.15(keras). Kindly find the gist for the reference and proceed creating the new request on keras-team/keras repo, since it is happening on keras3. Thank you!

Thank you - I just filed https://github.com/keras-team/keras/issues/19521 to track.

@jacob-talroo,
Could you please move this issue to closed status, as it has been tracked there. Thank you!


Add cumulativity for λ-abstractions' bodies

I decided to allow cumulativity in the body of a λ, maybe it doesn't make sense, but I don't see why we should forbid it.
It is also useful for me to have it, so this PR also contains useful "consequences" of this change.

That was my reasoning yes. It is also more uniform with respect to tLetIn, which is nice when manipulating it_mkLambda_or_Letin.