Adds cancellation token support for long running work grains.

Description

CancellationTokens now provided to sync work grain execution through a Start overload.
Old Start method is still available, and just news up a cancellation token for backwards compatibility.
Grain implementations can decide what to do (or not) when a cancellation signal is received.

This could be to return an intermediate (but perhaps incomplete?) result, or throw.

Fixes #50
Type of Change
Use an x in between the [ ] for each line applicable to the type of change for this PR

[ ] Bug fix
[x] New Feature
[x] Documentation
[x] Code improvement
[x] Breaking change - if a public API changes, or any change that DOES or MAY require a major revision to the NuGet package version due to semver.
[x] Unit tests
[x] Code samples
[ ] Added your repository URL to the readme because you make use of this super cool package! ;)
[ ] Other

Describe testing that was performed for your change
New unit tests against cancellation token support

Can return a value as handling for cancellation
Can throw as handling for cancellation

Checklist

[x] Read the https://github.com/OrleansContrib/Orleans.SyncWork/blob/main/CONTRIBUTING.md
[x] Ran unit tests and ensured they passed
[x] Added unit tests where applicable
[x] Referenced an issue where applicable
[x] Ran dotnet-format locally

This unfortunately is a breaking change in that the original abstract method to be implemented:
protected abstract Task<TResult> PerformWork(TRequest request);

has been changed to:
protected abstract Task<TResult> PerformWork(
  TRequest request, GrainCancellationToken grainCancellationToken);

This should be a minimally breaking change, but it is a breaking change nonetheless.
Not totally sure what to do regarding breaking changes in relationship to package versioning, since a breaking change warrants a major version increment, but was trying to keep the major version in line with the Orleans version... :X

Added some a poll to https://github.com/OrleansContrib/Orleans.SyncWork/discussions/54.
Don't know if it will get any responses since not really sure who is using the package, but will at a minimum wait a while to hear feedback.


use dedicated objects for output to avoid faulty values

now if an exception occurs for some scrapers the previous object's content will be published

closed by #217


custom viewer template to add title/text

Ramon, Great work with the library.
Is there a way to make a text only post or be able to make custom template viewer like adding title and description with a background image maybe.

Hi Dhiraj,
Currently there's no method to add custom markup into the stories, since the script manage the "story timer" too. It may be added on future versions :)
Thanks!


Allow the master / worker proclines to be configured by the app

We have some scenarios where we run multiple applications deployed onto the same servers each with their own master chore process.  Currently it's not possible to easily differentiate between these chore processes since they're all named the same.  This configuration would give applications the power to control the procline so that we can have different proclines and more easily monitor the processes.
/to @gregorysabatino @dankleiman @geoffreyclark

LGTM


Update esp-hal etc.

Prepare to use the unified esp-hal
Keeping it draft for now (until there's a crates.io release)

LGTM! Is there anything pending?

There is a problem with S2 I discovered when testing https://github.com/esp-rs/esp-hal/pull/1255
I will double check if it's really just caused by the TRNG implementation in esp-hal.
Would be good to have an esp-wifi release however. Hopefully we can have a patch release to make S2 work again

Can this be merged since the latest esp-hal is currently broken with the latest esp-wifi and https://github.com/esp-rs/esp-hal/pull/1255 has been merged?

Can this be merged since the latest esp-hal is currently broken with the latest esp-wifi and esp-rs/esp-hal#1255 has been merged?

There is still an issue with ESP32-S2 which we hopefully get fixed today. Once that is done I will do the release (hopefully today)


[stable/newrelic-infrastructure] Update image version to 1.21.0

Signed-off-by: Alejandro Do Nascimento<EMAIL_ADDRESS>
Is this a new chart

NOTE: We're experiencing a high volume of PRs to this repo and reviews will be delayed. Please host your own chart repository and submit your repository to the Helm Hub instead of this repo to make them discoverable to the community. Here is how to submit new chart repositories to the Helm Hub.

What this PR does / why we need it:
Update the integration to v1.21.0
Which issue this PR fixes
(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

fixes #

Special notes for your reviewer:
Checklist
[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

[ ] DCO signed
[ ] Chart Version bumped
[ ] Variables are documented in the README.md
[ ] Title of the PR starts with chart name (e.g. [stable/mychartname])

/ok-to-test

/lgtm


CORS issue on a reverse proxy

Describe the bug
I access the Speedtest tracker through http:\\speedtest.unraid.nas, and I'm having issues on Firefox (Librewolf actually) and Brave (Chrome too) because the charts.js library is trying to be retrieved from http:\\unraid.nas:10030 thus, getting an error.
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource http://unraid.nas:10030/js/filament/widgets/components/chart.js?v=<IP_ADDRESS> (Reason: CORS header 'Access-Control-Allow-Origin' missing).
https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin
ALSO: The "Admin panel" button that takes you to the login screen also has the wrong URL, it's pointing to http://unraid.nas:10030/admin rather than http://speedtest.unraid.nas/admin.
Once in the admin panel, the left menu items correctly have the right URL
I suspect the cause for both issues is the same.
Environment:

OS: Unraid
Architecture: amd64
Browser Brave, Librefox
Version 0.13.3

Screenshots

Setting the container variable APP_URL to speedtest.unraid.nas did not work.

Setting the container variable APP_URL to speedtest.unraid.nas did not work.

Did you set it to https://speedtest.unraid.nas?

No, i set it as speedtest.unraid.nas. Let me try that.

After changing the variable did you restart the container?

Unraid stops and starts the container whenever you change something, but regardless of that, I manually restarted it and same deal.

@Deses I am also using Unraid, Chrome, and have the speedtest running behind a reverse proxy (Nginx Proxy Manager), and have no issues. CORS or the admin panel button described.
My guess is it's how you're accessing the web service / have configured the reverse proxy.
In your screenshot in the first post, the current URL is missing. That would help rule out some issues.

Hm, interesting.
This is how I configured access to mine, pretty simple stuff:

How does yours look?

@Deses This will be very dependent on your network configuration. How you have it configured in Unraid, and your DNS resolutions
Personally, I have all web traffic pointing to NPM, and all DNS records for my domain pointing to NPM.
So speedtest.internal.mydomain.com -> <IP_ADDRESS> which is NPM. NPM forwards the speedtest domain to <IP_ADDRESS>, which is the IP of the speedtest docker container.
NPM config:

Unraid config:

Without anything else, make sure the NPM port (10030 from your screenshot) is the HTTP port variable in the unraid config.
It seems like you're viewing unraid.nas:10030 in your browser instead of speedtest.unraid.nas, and are not hitting NPM. But again, can't be sure without more info.

The main difference I'm seeing between our configurations is that you are using a bridge network (br0) and I'm not.
Otherwise speedtest.unraid.nas is also pointing to unraid.nas:80 which is the port my NPM docker is listening to, then NPM forwards to speedtest.unraid.nas maped to unraid.nas:10030.
I tried ro replicate your setup using the br0 network with no luck. :/ Are you accessing the webUI using a local-only hostname like my unraid.nas or are you using something else?
The thing is that I'm hosting lots of other things exactly using the same method and nothing else broke with a CORS problem after reverse-proxying them.

https://github.com/alexjustesen/speedtest-tracker/issues/752#issuecomment-1865383915


Adds planner task reference list command. Closes #3284

Closes #3284

Awesome @MathijsVerbeeck, we'll review this ASAP. 👍

Hi @MathijsVerbeeck, I see a test case is failing in our pipeline. Before we review the PR, could you look at the failing test? If you don't get it running successfully, don't hesitate to call in help.
 1) planner task reference list
       successfully handles item found:

      AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:

  assert(loggerLogSpy.calledWith(referenceListResponse))

      + expected - actual

      -false
      +true

@martinlingstuyl I've fixed the test. Could you please let the pipeline run the tests again?

Fantastic, thanks for such a quick response. Let's see if it runs successfully now.

Apparently the tests have failed due to a timeout. Could someone please retrigger the test?

Thank you all for your contribution. Manually merged.


DEVELOPERS: Upgrade your workstations to SHFB 03-2020

@marcusbooyah and @johncburns1:
I've upgraded the Sandcastle Help File Builder (SHFB) to the March 2020 release.  We're using this in neonKUBE to build the API documentation site (the $/WebSites/CodeDoc project).  You guy should update as well, when you have the chance.

Go to Windows Apps & Features and uninstall Sandcastle Helper File Builder
Follow the instructions in DEVELOPER.md to install the new version.

[x] Jack
[ ] Marcus

Last one to do this can close this issue.

@marcusbooyah: I know that Jack did this, did you upgrade as well already,  Please close this when you have?


vitest.config.ts with ternary condition relying on env var deleted the entire repo

Describe the bug
Running vitest run --coverage --reporter=junit deleted all files in the directory including .git.
The cause appears to be the ternary condition I have in vitest.config.ts that checks an environment variable:
import { defineConfig } from "vitest/config";

export default defineConfig({
  test: {
    globals: true,
    root: "src",
    setupFiles: ["src/tests/setup.ts"],
    reporters: ["default", "junit"],
    outputFile: "coverage/junit.xml",
    coverage: {
      include: ["src"],
      exclude: [
        "src/tests",
        "src/types",
        "src/datasources/cosmos/defaults.ts",
        "**/*/types.ts",
        "**/*/operations.ts",
        "**/*/*.graphql.ts",
        "**/*/*.test.ts",
        "**/*/__test__",
      ],
      reportsDirectory: process.env.CI ? "coverage" : undefined,
      reporter: process.env.CI ? "cobertura" : undefined,
    },
  },
});

Running the command recursively deleted the entire repo and logged the following output:
❯ npm run test:unit

><EMAIL_ADDRESS>test:unit
> vitest run --coverage --reporter=junit

 MISSING DEP  Can not find dependency 'c8'

⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ Unhandled Error ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/thisisxvr/powercredit/node_modules/vitest/dist/vendor-index.665a6ba4.js' imported from /Users/thisisxvr/powercredit/node_modules/vitest/dist/chunk-utils-base.68f100c1.js
    at new NodeError (internal/errors.js:322:7)
    at finalizeResolution (internal/modules/esm/resolve.js:308:11)
    at moduleResolve (internal/modules/esm/resolve.js:731:10)
    at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:842:11)
    at Loader.resolve (internal/modules/esm/loader.js:89:40)
    at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
    at Loader.import (internal/modules/esm/loader.js:177:28)
    at importModuleDynamically (internal/modules/esm/translators.js:114:35)
    at exports.importModuleDynamicallyCallback (internal/process/esm_loader.js:30:14)
    at ensurePackageInstalled (file:///Users/thisisxvr/powercredit/node_modules/vitest/dist/chunk-utils-base.68f100c1.js:179:19) {
  code: 'ERR_MODULE_NOT_FOUND'
}

Reproduction
import { defineConfig } from "vitest/config";

export default defineConfig({
  test: {
    globals: true,
    root: "src",
    setupFiles: ["src/tests/setup.ts"],
    reporters: ["default", "junit"],
    outputFile: "coverage/junit.xml",
    coverage: {
      include: ["src"],
      exclude: [
        "src/tests",
        "src/types",
        "src/datasources/cosmos/defaults.ts",
        "**/*/types.ts",
        "**/*/operations.ts",
        "**/*/*.graphql.ts",
        "**/*/*.test.ts",
        "**/*/__test__",
      ],
      reportsDirectory: process.env.CI ? "coverage" : undefined,
      reporter: process.env.CI ? "cobertura" : undefined,
    },
  },
});

System Info
System:
    OS: macOS 11.6
    CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
    Memory: 1.32 GB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.18.2 - ~/.asdf/installs/nodejs/14.18.2/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.4.0 - ~/.asdf/plugins/nodejs/shims/npm
  Browsers:
    Chrome: 92.0.4515.107
    Firefox: 89.0.2
    Firefox Developer Edition: 98.0
    Safari: 15.0
  npmPackages:
    vitest: 0.5.9 => 0.5.9

### Used Package Manager

npm

### Validations

- [X] Follow our [Code of Conduct](https://github.com/vitest-dev/vitest/blob/main/CODE_OF_CONDUCT.md)
- [X] Read the [Contributing Guidelines](https://github.com/vitest-dev/vitest/blob/main/CONTRIBUTING.md).
- [X] Read the [docs](https://vitest.dev/guide).
- [X] Check that there isn't [already an issue](https://github.com/vitest-dev/vitest/issues) that reports the same bug to avoid creating a duplicate.
- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vitest-dev/vitest/discussions) or join our [Discord Chat Server](https://chat.vitest.dev).
- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.

you don't describe what env variables you have set when you run it. Are you sure the bug isn't just the undefined ?
And it's also more likely that passing undefined to reportsDirectory is what's really causing the problem.


Add precipitation type to ERA5

Requires https://github.com/ESMValGroup/ESMValCore/pull/263

Thanks!


Automate CDS UI Skeleton

:nut_and_bolt: Description: What code changed, and why?
Create a rough UI page that lists all the content from the AllContent API.
Below is a link to the current mockup for the UI.
https://www.figma.com/file/GDSho2KUaRW7qXEDPZ9JED/iteration-0.1?node-id=536%3A69
:chains: Related Resources
https://github.com/chef/automate/issues/3911
:athletic_shoe: How to Build and Test the Change

build component/automate-ui-dev && start_all_services && start_automate_ui_backgroud && ui_logs
Go to https://a2-dev.test/cds

:white_check_mark: Checklist

[x] I have read the CONTRIBUTING document.
[ ] Tests added/updated?
[ ] Docs added/updated?
[x] All commits have been signed-off for the Developer Certification of Origin.

:camera: Screenshots, if applicable

is this rfr? it's still in draft mode?

@vjeffrey Yes Sorry, I forgot to switch it.


torch. load model_state

I have this error No such file 'model_state.python' , I don't find this file. who can help me plz

hi syrin,
you implemented this algorithm with your own data? If so, can you help me??


Show only logentries about errors

Add this option.
Edit 2024-11-04:
Explanation of the purpose or this issue:
In the login area it's possible to view the applications log. This allows to check if tasks are executed properly and to debug in case of problems.
Currently it's only possible to see all log messages. This includes a lot of status messages.
Preferred solution:
An option (maybe link or checkbox) which shows only the error relates messages.

Note: wait until available in test

@IvdL22 @PixlTracer
Can you review this?
Urls:

https://test-dhcr.clarin-dariah.eu/logentries
https://test-dhcr.clarin-dariah.eu/logentries/errors

hi @patrickakk
I checked this - just a curious question: is it on purpose that there is no 'Log Entry' Tile available in the dashboard?
(This is a very nice to have, to check back whether - for instance - a course maintainer was notified; or whether a respective national mod was notified/cc'd)
I have no objections and set the label to done, thank you for this!!

@PixlTracer
cc @IvdL22
The feature "Log Entries" existed before, and should be available for you, as admin, in the Category Lists dashboard, here:
https://test-dhcr.clarin-dariah.eu/dashboard/category-lists
The purpose of this issue was to add
https://test-dhcr.clarin-dariah.eu/logentries/errors
This will be the place where errors are logged when the communication with Mailman / Mailing list gives errors. So preferably this list should stay empty forever ;) But now there is a place to check if there were problems.
As well the explanation on the top, about the different logtypes, on top of the page has been added.
Could you confirm if the Dashboard entry for Log Entries is also available to you? And then change to label to done again?

@patrickakk cc @PixlTracer I can view the log entries in the test instance.

@PixlTracer REMINDER: Could you confirm if the Dashboard entry for Log Entries is also available to you? And then change to label to done again?
You should be able to find it here?
https://test-dhcr.clarin-dariah.eu/dashboard/category-lists
See also:
https://github.com/acdh-oeaw/dhcr-main/issues/81#issuecomment-2478662391

Implemented in 2024-11


Update the build intrsuctions

When I tested the build instructions on my Ubuntu server computer, it failed to build.
I realized that the paho-mqtt-c build process was unusual, and I found how to make it work on my computer.
So I propose here some build instructions compatible with Ubuntu, and most probably it should be compatible with any Linux distribution. CMakeLists.txt has been simplified and include and library dirs have been explicitely mentionned.
However, as I don't know at all ESP32 NodeMcu, I have no idea whether those new instructions are compatible. And even how to build/compile. I made it clear in the README that the build instructions were tested on two Ubuntu computers.
If something was done the wrong way, I apologize in advance and ask you to share with me your comments, so that I fix what I can.

Thanks for your help.


DUMP if DB table's keys are in a include instead of directly in the DB

In case there's a DB table where its key fields are inside an include and the whole include is flagged as KEY the wizard DUMPS because in method _get_fieldlist it deletes all non key fields so there are no fields in mt_fieldlist and later on it DUMPS while trying to create the corresponding methods.

Some way I have to figure out how to retrive full keys even if DB is build upon includes.


Add Python3 compatibility

This PR allows zschema to function under Python 2 and Python 3. It updates CI to run tests on both versions.
See individual commit messages (although the Python 3 change is pretty big, the message is more descriptive)

This looks solid.


Resolve iOS deployment target version warning

Using the ReSwift library, Xcode permanently shows the following warning at build time:

To resolve this warning, I raised the minimum iOS platform version to v9 since this is the official least minimum version available to set (according to the error message above).

It'd be great to change it in the Xcode project as well. Also, do you have info about Apple removing v9 officially?

Good point. Because this issue seems to be just related to Apples swift-tools since v5.3 (shipped with Xcode 12), I left the iOS 8 minimum target setting in the Xcode project, so iOS 8 can still be targeted e.g. via CocoaPods or Carthage.
Unfortunately, I could not find any information yet that Apple is going to drop v9 support officially. On the other hand, the percentage of the worldwide distribution of iOS versions < v10.3 is extremely small (~1.66%), so who knows.

@dani-mp @DominicSchiller-IBM-CIC
I think it will be solved by modifying the file below.
https://github.com/ReSwift/ReSwift/blob/master/Package.swift
platforms: [.iOS(.v9), .macOS(.v10_11), .tvOS(.v10)],
Other libraries
https://github.com/onevcat/Kingfisher/blob/master/Package.swift
https://github.com/firebase/firebase-ios-sdk/blob/master/Package.swift

I still think we need to apply this change everywhere: Xcode proj, CocoaPods configuration, SPF configuration. And it'll be a breaking change for projects <9.0, which I understand won't be many, of course, but it will be a breaking change nevertheless. What do you think @mjarvis, @DivineDominion?

My comment on the associated issue that recently came up:
https://github.com/ReSwift/ReSwift/issues/448#issuecomment-700088255

This warning is showing up because as of the current release, we still support iOS 8.0 as a valid target, by using an older version of Xcode.
We are committed to maintaining a sizeable amount of backwards compatibility, but understand this is pushing it a bit far.
I plan to do another assessment of minimum targets + swift versions before we do a 6.0.0 release (which already drops support for a number of Swift versions)

Basically: I'm okay with us bumping this up as long as we do our due diligence and ensure that its updated everywhere in the project. We already have breaking changes in the pipeline for the next release by dropping certain swift versions anyways.

I think dropping iOS 8 for the v6.0.0 release is fine. I'm doing the rest in the release branch. Thanks @DominicSchiller-IBM-CIC !


Merge 0.5-rc to 0.5

Checked the EKG things again. Looks good. I don't think it'll be disruptive.

Just in case: before merging it I explicitly asked @fersel and he didn't mind merging it.


Reduce the time it takes for enclave inspect to print user services

What's your CLI version?
0.78.4
Description & steps to reproduce
Run a hundred node avax cluster with node_count set to 100
Run kurtosis enclave inspect. It will take close to 25 seconds to print the user services.
Desired behavior
User service printing should be instant
What is the severity of this bug?
Painful; this is causing significant friction in my workflow.

This is almost definitely because we're using Docker/k8s as a database, and it's really slow for that. We should fix this by pushing metadata into the APIC's own database (which also helps us with restartable enclaves)


Remove overridden Accept header to prevent HTML response

Changes Made
Removed the overridden Accept header to prevent receiving HTML responses.
Context
The overridden Accept header was causing the server to respond with HTML, which is not the expected behavior. By removing this override, we ensure that the server responds with the appropriate content type.
Related Issues

#353

v2.36


sol::protected_function does not return data correctly

I've a problem with sol::protected_function, i can't get it to return anything useful, i'm trying to use methods close to your documentation for test cases.
http://sol2.readthedocs.io/en/latest/api/protected_function.html
Program/compiler : VS2015 VC++
Lua version : tested with Luajit 2.1.0 beta2 aswell as Lua 5.3.3
Sol version : 2.14.8 release, single header sol.hpp
No other engines/libraries, empty project
Using a lua function directly works fine, the variables are sent to lua and data gets returned without any problem.
However using a sol::protected_function returns either 0 (when trying to return a number from Lua to C++) or an empty string (if error or when returning a string from Lua to C++) if a sol::protected_function_result is used to store the returned data.
If  sol::optional<T>is used to get the returned data from the sol::protected_function then it seems to always fail, even if Lua was called correctly and tried to correctly return data.
Code example for all three test cases:
//setup sol/lua
	sol::state lua;
	lua.open_libraries(sol::lib::base, sol::lib::string);

	lua.script("function ErrorHandler(msg) print('Lua created error msg : ' ..  msg) return msg end");
	lua.script("function stringtest(a)  print('Lua recieved content : ' .. a) return a end");

// test normal function
	std::string str = lua["stringtest"]("normal test");
	std::cout << "Back in C++, direct call result is : " << str << std::endl;

//test protected_function
	sol::protected_function Stringtest(lua["stringtest"]);
	Stringtest.error_handler = lua["ErrorHandler"];
	sol::protected_function_result stringresult = Stringtest("protected test");

	if (stringresult.valid())
	{
		std::string s = stringresult;
		std::cout << "Back in C++, protected result is : " << s << std::endl;
	}
	else
	{
		sol::error err = stringresult;
		std::string msg = err.what();
		std::cout << "error :" << msg << std::endl;
	}
//test optional
	sol::optional<std::string> opt_result = Stringtest("optional test");
	if (opt_result)
	{
		std::string s = opt_result.value();
		std::cout << "Back in C++, opt_result is : " << s << std::endl;
	}
	else
	{
		std::cout << "opt_result failed" << std::endl;
	}

Output :
Lua recieved content : normal test
Back in C++, direct call result is : normal test
Lua recieved content : protected test
Back in C++, protected result is :
Lua recieved content : optional test
opt_result failed

As you can see, sol::protected_function_result stringresult is valid, so Lua correctly recieves the string and sends it back to C++, however the result has no string content, resulting in an empty message on the printout. If i try to retrieve numbers instead, C++ gets always 0's back, regardless what number Lua tries to return.
Contrary to that, a check if sol::optional<std::string> opt_result is valid just fails, even if Lua seems to properly have recieved the data, so there seems to be something wrong during Lua returning data to C++ when using a sol::protected_function.
If i cause a deliberate error by changing the lua function name to call from stringtest to something like string______test, aka something that causes lua to not find the function, in order to provoke an error message return then the normal function call crashes the program (obviously, no problem here). However both the protected_function calls seem to correctly create the error message in Lua, but again, nothing valid gets returned, to C++, not even the error message (or it's an empty string). So calling Lua functions and working with data in Lua is no problem, getting the data back to C++ has a problem when using protected_functions.
Here is an output when deliberately calling an invalid function with both the protected_function calls (i left the crashing direct function call away, this is only the output for both protected_function calls):
Lua created error msg : attempt to call a nil value
error :
Lua created error msg : attempt to call a nil value
opt_result failed

This happens with both LuaJit 2.1.0 beta 2 aswell as Lua 5.3.3

Bizarre: I've got no idea what's going on. I'm going to set up a testbed with this code and then put it through the wringer to see what's going on, but it'll take me a ibt.

Fiiiiiiixed: https://github.com/ThePhD/sol2/releases/tag/v2.14.9


OneHotEncoder Verifier Tests

Can one of the admins verify this patch?

Can one of the admins verify this patch?

@jenkins-droid test this please

@jenkins-droid test this please

Can one of the admins verify this patch?

@jenkins-droid test this please

Jenkins Linux s390x Build #4610 [push] OneHotEncoder Verifier T... started at 18:23

Jenkins Linux ppc64le Build #3730 [push] OneHotEncoder Verifier T... started at 18:26

Jenkins Linux amd64 Build #4593 [push] OneHotEncoder Verifier T... started at 17:23

Jenkins Linux s390x Build #4610 [push] OneHotEncoder Verifier T... passed after 44 min

Jenkins Linux ppc64le Build #3730 [push] OneHotEncoder Verifier T... passed after 55 min

Jenkins Linux amd64 Build #4593 [push] OneHotEncoder Verifier T... passed after 1 hr 1 min


Focus and open state remains even after element is selected

Description of the bug
This is likely due to the index of a map-function is used as the keys on the list of elements, which is not ideal.
Indexes should be unique.
Steps To Reproduce

Go to Choose API or Choose org
Choose the first API/Org in the list
The chosen element is added to theright list and removed from the left
Observe that the hover-state for the add-button on the next element is now active, even though this particular element was never interacted with

Note: The same is true for the open-state

Additional Information
No response

Sjekket, ser bra ut.


How to directly rebuild the model from saved zip file?

Currently I want to rebuild the stable baseline model in keras and pytorch. It seems that the model cannot directly save to a h5 file. Thus I want to rebuild from the zip file save in this code.
log_dir = "test_save/"
model_dqn.save(log_dir + "pong")

This file contains the model structure in parameter_list, and weights in parameters. However, I cannot rebuild the model from these two files with the code below:
# load json and create model
json_file = open('parameter_list', 'r')
loaded_model_json = json_file.read()
json_file.close()
loaded_model = model_from_json(loaded_model_json)

loaded_model.load_weights("parameters")

The error is:
`---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
 in
4 loaded_model_json = json_file.read()
5 json_file.close()
----> 6 loaded_model = model_from_json(loaded_model_json)
7
8 loaded_model.load_weights("parameters")
~/anaconda3/envs/distillation/lib/python3.7/site-packages/keras/engine/saving.py in model_from_json(json_string, custom_objects)
490     config = json.loads(json_string)
491     from ..layers import deserialize
--> 492     return deserialize(config, custom_objects=custom_objects)
493
494
~/anaconda3/envs/distillation/lib/python3.7/site-packages/keras/layers/init.py in deserialize(config, custom_objects)
53                                     module_objects=globs,
54                                     custom_objects=custom_objects,
---> 55                                     printable_module_name='layer')
~/anaconda3/envs/distillation/lib/python3.7/site-packages/keras/utils/generic_utils.py in deserialize_keras_object(identifier, module_objects, custom_objects, printable_module_name)
167     else:
168         raise ValueError('Could not interpret serialized ' +
--> 169                          printable_module_name + ': ' + identifier)
170
171
TypeError: can only concatenate str (not "list") to str`

Seems like a duplicate of #699

Just to add here: The model files do not store the architecture of the network (this is only available as a pickled Python function, which creates a TF graph). You have to manually build a corresponding network, load the parameters from the file and assign them correctly.
Note to self: For v3, I should look into a possible common format for saving the model architecture as well, if in any way possible (in a convenient way).

Note to self: For v3, I should look into a possible common format for saving the model architecture as well, if in any way possible (in a convenient way).

ONNX export ? or tracing using pytorch jit?

Just to add here: The model files do not store the architecture of the network (this is only available as a pickled Python function, which creates a TF graph). You have to manually build a corresponding network, load the parameters from the file and assign them correctly.
Note to self: For v3, I should look into a possible common format for saving the model architecture as well, if in any way possible (in a convenient way).

Thanks, Maffyli. I tried to build a model in Keras and load weights for this model. However, it still did not work. Could you please kindly have a brief look at the error and share your expert opinion?
The code is below:
`from keras import optimizers
from keras import backend as K
from keras.losses import kullback_leibler_divergence,mean_squared_error
from keras.callbacks import ReduceLROnPlateau, EarlyStopping
from keras.models import Sequential
from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D, Dropout, Activation, BatchNormalization
method = 'dqn'
game   = 'Pong'
with open("trained_agents/{}/{}NoFrameskip-v4.pkl".format(method,game), 'rb') as file:
pickle_model = pickle.load(file)
weights = pickle_model[-1]
model1 = Sequential()
model1.add(Conv2D(32, (8, 8), strides=(4, 4), input_shape=(84, 84, 4)))
model1.add(Activation('relu'))
model1.add(Conv2D(64, (4, 4), strides=(2, 2)))
model1.add(Activation('relu'))
model1.add(Conv2D(64, (3, 3), strides=(1, 1)))
model1.add(Activation('relu'))
model1.add(Flatten())
model1.add(Dense(512))
model1.add(Activation('relu'))
model1.add(Dense(6))
model1.set_weights(weights)`

Another way would be: extracting the dqn model from the build TF graph and save it independently. I did not check whether it is possible. In that case, we may need to change the source code a lot.

Please take a look at the documentation on exporting models. You have to get the parameters as numpy arrays with get_parameters, and map these to correct Keras layers. I had a mapping like this for Keras model to stable-baselines. The key tells stable-baselines parameter name, and value is a lambda function that retrieves corresponding layer from a Keras model.
# Mapping from stable-baselines agent variable
# name to a function that takes in keras model
# and assigns right variables
CNN_PARAMS = {
    "model/cnn1/w:0": lambda model: model.get_layer("conv2d_1").get_weights()[0],
    "model/cnn1/b:0": lambda model: model.get_layer("conv2d_1").get_weights()[1][None, :, None, None],
    "model/cnn2/w:0": lambda model: model.get_layer("conv2d_2").get_weights()[0],
    "model/cnn2/b:0": lambda model: model.get_layer("conv2d_2").get_weights()[1][None, :, None, None],
    "model/cnn3/w:0": lambda model: model.get_layer("conv2d_3").get_weights()[0],
    "model/cnn3/b:0": lambda model: model.get_layer("conv2d_3").get_weights()[1][None, :, None, None],
    "model/cnn_fc1/w:0": lambda model: model.get_layer("dense_1").get_weights()[0],
    "model/cnn_fc1/b:0": lambda model: model.get_layer("dense_1").get_weights()[1]
}

Another way would be: extracting the dqn model from the build TF graph and save it independently.

This is planned for v3 with PyTorch backend.

Please take a look at the documentation on exporting models. You have to get the parameters as numpy arrays with get_parameters, and map these to correct Keras layers. I had a mapping like this for Keras model to stable-baselines. The key tells stable-baselines parameter name, and value is a lambda function that retrieves corresponding layer from a Keras model.
# Mapping from stable-baselines agent variable
# name to a function that takes in keras model
# and assigns right variables
CNN_PARAMS = {
    "model/cnn1/w:0": lambda model: model.get_layer("conv2d_1").get_weights()[0],
    "model/cnn1/b:0": lambda model: model.get_layer("conv2d_1").get_weights()[1][None, :, None, None],
    "model/cnn2/w:0": lambda model: model.get_layer("conv2d_2").get_weights()[0],
    "model/cnn2/b:0": lambda model: model.get_layer("conv2d_2").get_weights()[1][None, :, None, None],
    "model/cnn3/w:0": lambda model: model.get_layer("conv2d_3").get_weights()[0],
    "model/cnn3/b:0": lambda model: model.get_layer("conv2d_3").get_weights()[1][None, :, None, None],
    "model/cnn_fc1/w:0": lambda model: model.get_layer("dense_1").get_weights()[0],
    "model/cnn_fc1/b:0": lambda model: model.get_layer("dense_1").get_weights()[1]
}

Another way would be: extracting the dqn model from the build TF graph and save it independently.

This is planned for v3 with PyTorch backend.

Thanks for your reply. This mapping looks like ignore the last fully connected layer (i.e., from 512 hidden nodes to the action outputs). It would be soooo nice if you can share one example for loading from pkl file and then converting weights to a keras model. In that way, I think people can also save models to other formats (e.g., .h5 that is mentioned by ChunJyeBehBeh). However, this is based on your team has such an extension plan. Thanks so much for your help anyway:)

Please take a look at the documentation on exporting models. You have to get the parameters as numpy arrays with get_parameters, and map these to correct Keras layers. I had a mapping like this for Keras model to stable-baselines. The key tells stable-baselines parameter name, and value is a lambda function that retrieves corresponding layer from a Keras model.
# Mapping from stable-baselines agent variable
# name to a function that takes in keras model
# and assigns right variables
CNN_PARAMS = {
    "model/cnn1/w:0": lambda model: model.get_layer("conv2d_1").get_weights()[0],
    "model/cnn1/b:0": lambda model: model.get_layer("conv2d_1").get_weights()[1][None, :, None, None],
    "model/cnn2/w:0": lambda model: model.get_layer("conv2d_2").get_weights()[0],
    "model/cnn2/b:0": lambda model: model.get_layer("conv2d_2").get_weights()[1][None, :, None, None],
    "model/cnn3/w:0": lambda model: model.get_layer("conv2d_3").get_weights()[0],
    "model/cnn3/b:0": lambda model: model.get_layer("conv2d_3").get_weights()[1][None, :, None, None],
    "model/cnn_fc1/w:0": lambda model: model.get_layer("dense_1").get_weights()[0],
    "model/cnn_fc1/b:0": lambda model: model.get_layer("dense_1").get_weights()[1]
}

Another way would be: extracting the dqn model from the build TF graph and save it independently.

This is planned for v3 with PyTorch backend.

Hi Miffyli, I have built a keras model and load the weights from the pkl file. The code for doing so is shown as:
## Load the existing pkl models (trained by stable baselines)
import pickle
method = 'dqn'
game   = 'Pong'
with open("trained_agents/{}/{}NoFrameskip-v4.pkl".format(method,game), 'rb') as file:
    pickle_model = pickle.load(file)
pkl_weights = pickle_model[-1]

#### Build keras model
from keras import optimizers
from keras import backend as K
from keras.losses import kullback_leibler_divergence,mean_squared_error
from keras.callbacks import ReduceLROnPlateau, EarlyStopping
from keras.models import Sequential
from keras.layers import Dense, Flatten, Conv2D, MaxPooling2D, Dropout, Activation, BatchNormalization
import numpy as np

keras_model = Sequential()
keras_model.add(Conv2D(32, (8, 8), strides=(4, 4), input_shape=(84, 84, 4)))
keras_model.add(Activation('relu'))
keras_model.add(Conv2D(64, (4, 4), strides=(2, 2)))
keras_model.add(Activation('relu'))
keras_model.add(Conv2D(64, (3, 3), strides=(1, 1)))
keras_model.add(Activation('relu'))
keras_model.add(Flatten())
keras_model.add(Dense(512))
keras_model.add(Activation('relu'))
keras_model.add(Dense(6))

### transfer the weights from pkl model to keras model
j_list = [0,2,4,7,9]
for i in range(5):
    w1 = np.squeeze(pkl_weights[2*i+1])
    w2 = np.squeeze(pkl_weights[2*i+2])
    layer_weights = [w1, w2]
    keras_model.layers[j_list[i]].set_weights(layer_weights)
### Test the performace of the saved keras model
from stable_baselines.common.cmd_util import make_atari_env
from stable_baselines.common.policies import CnnPolicy
from stable_baselines.common.vec_env import VecFrameStack
env = make_atari_env('{}NoFrameskip-v4'.format(game), num_env=1, seed=0)
env = VecFrameStack(env, n_stack=4)
obs = env.reset()
while True:
    actions = keras_model.predict(obs)
    action = np.argmax(actions[0])
    obs, rewards, dones, infos = env.step([action])
    episode_infos = infos[0].get('episode')
    if episode_infos is not None:
        print("Atari Episode Score: {:.2f}".format(episode_infos['r']))
        print("Atari Episode Length", episode_infos['l'])
        break

The model weights can be converted, but the performance indicate that the there is still some issues. The accumulated reward of such converted keras model is -20.
Could you please share your insight on this?

It seems your forgot to normalize the image... (cf doc) by dividing by 255

It seems your forgot to normalize the image... (cf doc) by dividing by 255

Thanks. It finally works. Will update the code here.


Silence g++ 7.0.1 -Wimplicit-fallthrough warnings

This is accomplished by explicitly marking the fallthrough
using the C++17's [[fallthrough]] attribute.
Although [[fallthrough]] is C++17, it is supported by
clang++ and g++ >= 7 even if you use, e.g., -std=c++11.
This is a good thing because it allows us to easily silence
these warnings regardless of the used -std flag. (Otherwise
we would have to use __attribute__((fallthrough)) for g++;
luckily there is no need to do so.)

My understanding is that this change would break compiling with -ansi: https://godbolt.org/g/wwm9Rs
A few alternative options that I see to fix this:

Move ast_variable case inside default (just use an if, e.g. if (_type == ast_variable && _rettype == xpath_type_boolean) ...;)
Extract type conversion logic into a separate member function, e.g. eval_boolean_convert and the like, and call it from both ast_variable and default cases)

I am not sure if this is related but in curl which is C there are a few /* FALLTHROUGH */ to signal intended fallthroughs and apparently it works to silence gcc7, according to a recent PR. See curl/curl@cbff751

@jay Interesting; this does seem to work in gcc7 - appears to work for both C-style and C++-style comments, as long as fallthrough is the entirety of the comment text (but it can be lowercase). So I guess a simpler short-term fix for the warning would be to change the existing "fallthrough to type conversion" comment to just say "fallthrough".

Yes, the other variants are possible and are probably better than adding the keyword.
However, I checked with several g++ and clang++ versions and different -std flags, as well as with MSVC which simply ignores the setting. I don't know what godbolt is doing; my g++ 7.0.1 is only some days older.
I am not sure why __has_cpp_attribute(fallthrough) is true when [[fallthrough]] is not available?
The /* FALLTHROUGH */ switch does not work. Also, the lines were already commented by some // fallthrough [...] comment which should also be acknowledged by the compiler if /* FALLTHROUGH */ worked.

godbolt fallthrough example in C++: https://godbolt.org/g/wAekCz

Okay it seems the fallthrough code in g++7 is under heavy development ;D

Ah, but it only works if it's in the same scope as the case statement, so the comment would have to stay outside of braces.

You don't need the scope anyway in many cases. Do you have them as some kind of coding style?

I just updated my PR to use the simplest change. The information "to type conversion" is lost.

Thank you!
I think braces are here for symmetry with other complicated (multi-line) cases, most of which require variable declaration which require scopes. There's no specific code style rule for pugixml that defines whether they should be used in this case.


completion callback called too many times

When I start it from gulp i get the following:
[09:25:10] 'start:web' errored after 719 ms
[09:25:10] Error: task completion callback called too many times
  at finish (C:\dev\myapp\Web\node_modules\orchestrator\lib\runTask.js:15:10)
  at cb (C:\dev\myapp\Web\node_modules\orchestrator\lib\runTask.js:29:3)
  at C:\dev\myapp\Web\tasks\server.js:34:5
  at Socket.<anonymous> (C:\dev\myapp\Web\node_modules\nginx-server\lib\nginx.js:69:17)
  at emitOne (events.js:95:20)
  at Socket.emit (events.js:182:7)
  at readableAddChunk (_stream_readable.js:153:18)
  at Socket.Readable.push (_stream_readable.js:111:10)
  at Pipe.onread (net.js:529:20)

here is the setup:
gulp.task('start:web', function(done){

  var server = nginx({
    config: path.resolve(__dirname, '../', 'conf/nginx.conf')
  });

  var isDone = false;
  server.start(function () {
    console.log('started');
   done();
  });

  server.stop(function () {
    console.log('stopped');
  });
});

Long shot: you've got an nginx.conf with worker_processes 2; or even more?
I've been running this in a custom test setting only, with a single worker process. The code triggering the callback is a bit naïve. :children_crossing:
Can you try to change to a single worker process and see if it works? If so, then it's easy for me to fix that bug here.

I have mine set to auto, however, that should not affect the gulp callback I don't think?

Oh yes it will: the server.start callback will be called multiple times, each time calling gulp's done callback... and that makes gulp throw up.

@dewe what changed? its really hard to tell with the whitespace diff.

FYI - This did fix it! did not fix #3 though.

Oh, that's an ugly diff. :scream_cat: Great to hear it worked for you.
Basically, this is a one line change in server.start: https://github.com/dewe/nginx-server/blob/master/lib/nginx.js#L68 along with a new test: https://github.com/dewe/nginx-server/blob/master/test/nginx_server.js#L54.
Rest is mostly plumbing to have tests run in a Docker container.


Can't read data from Pulse HAN with Kaifa meter

A while back the energy meter or the tibber pulse started sending a 24 byte prefix to the normal message. It functions as before for a while when rebooting the pulse or if sending the following mqtt command

Topic:
tibber-pulse-[my pulse id]/receive
Payload:
batching_disable 900

After that the pulse will send messages as normal for 900 sec. After that it starts prepending 24 bytes again.
Anyone else experiencing this behaviour? Or even better, does anyone know what kind of data the prefix actually contain?

This is all news for me. The messages from the AMS meter is strictly defined by NEK and should never change. Your local electric power supplier is the sole entity controlling your AMS meter.  To exclude any doubt about the source of this issue, you could ask your power supplier if any updates are done to your AMS meter.
mqtt-relay is an ElWiz companion tool, which is convenient for routing MQTT messages to another destination for inspection/debugging without distrubing your current installation.
https://github.com/iotux/mqtt-relay
However, a username and password to an outside MQTT broker is needed to take advantage of this tool.
Join this discord to get the required credentiuals:
https://discord.gg/v9tHCBMd

Seems most logical that this is something that is happening in Tibber Pulse and not in the AMS meter since the behaviour can be disabled (temporarily) by sending an mqtt message to the Pulse. The actual port on the AMS meter is read only (I guess). I've sent a question to my power supplier and to Tibber and asked if they have made any changes recently. Haven't gotten any response from Tibber but my power supplier said that no changes has been made.
Example messages when batching is enabled (HEX):
08DCD90212AE010945E7140500000000120348414E1A9D017EA09B01000110561BE6E7000F40000000090C07E7090401151100FF800000021209074B464D5F30303109103733343031353730313134383434363709084D413330344834440600000AAB0600000000060000000006000001CB0600002940060000052806000003C006000008E5060000090106000008F5090C07E7090401151100FF80000006035F0C230600000000060000F672060132DACC84E27E
08DCD90212AE01094D21150500000000120348414E1A9D017EA09B01000110561BE6E7000F40000000090C07E709040115110FFF800000021209074B464D5F30303109103733343031353730313134383434363709084D413330344834440600000AC10600000000060000000006000001CE060000295E060000053406000003CB06000008EB060000090306000008FD090C07E709040115110FFF80000006035F0C2E0600000000060000F672060132DACEB0057E
08DCD90212AE0109825C150500000000120348414E1A9D017EA09B01000110561BE6E7000F40000000090C07E709040115111EFF800000021209074B464D5F30303109103733343031353730313134383434363709084D413330344834440600000ABF0600000000060000000006000001CF060000295A060000052706000003BE06000008F0060000090706000008FC090C07E709040115111EFF80000006035F0C3A0600000000060000F672060132DAD01B377E
And when batching is disabled:
7EA09B01000110561BE6E7000F40000000090C07E7090401151300FF800000021209074B464D5F30303109103733343031353730313134383434363709084D41333034483444060000027B0600000000060000000006000001C2060000071A060000052B06000003BC06000008FF06000008FC06000008F6090C07E7090401151300FF80000006035F0C640600000000060000F672060132DADC38417E
7EA09B01000110561BE6E7000F40000000090C07E709040115130FFF800000021209074B464D5F30303109103733343031353730313134383434363709084D4133303448344406000002850600000000060000000006000001F506000007B6060000052D06000003B706000008FD06000008FB06000008F4090C07E709040115130FFF80000006035F0C660600000000060000F672060132DADDF3EA7E
7EA09B01000110561BE6E7000F40000000090C07E709040115131EFF800000021209074B464D5F30303109103733343031353730313134383434363709084D4133303448344406000002820600000000060000000006000001F206000007AF060000052B06000003CC06000008FA06000008F806000008EE090C07E709040115131EFF80000006035F0C690600000000060000F672060132DAE01E317E
Tibber Pulse firmware is 1.2.3
At the moment I keep sending "batching_disable"-commands on regular basis to keep getting data in a readable format for ELWiz.

Unfortunately I don't have the possibility to test this on my own single Tibbber Pulse, as I have an quite old beta firmware release.
This is a hack that may or may not work. Other surprices may come into play.
In the file "elwiz.js", try to replace the "run()" function with the following code:
run() {
  this.client.on('message', (topic, message) => {
    if (topic === config.topic) {
      let buf = Buffer.from(message);

      // Find the first occurrence of 0x7E
      const indexOf7E = buf.indexOf(0x7E);

      // If 0x7E is found, slice the buffer from that position onward
      if (indexOf7E !== -1) {
        buf = buf.slice(indexOf7E);
      }

      this.processMessage(buf);
    }
  });
}

A report about how this plays out, is appreciated

@burken-
A new version of "elwiz.js" is pushed, but the modification is done on the "processMessage()" function. Please disregard the previous message.
Still, it would be tremendously helpful i you join the discord to discuss how ElWiz with your knowledge can be improved to fit new versions of Pulse.
https://discord.gg/GwGnbta82K


Facing issues with some MP4 files (Possibly beacause of bigger file size)

I am able to play video and audio is available for MP4 files,
but for some video with bigger size having mp4 extensin only audio is there no video.
only black box and sound no video, tested in 2 browsers IE8 and Chrome
Please help me..

@jaynotani Closing old issues. If you'd like to reopen this, let us know. Thanks!


DO NOT MERGE: example audit trail service

CLB-751 for context.
this PR is only an example on how we could use the new audit trail service in OP
This service works a bit like the privacy service, but logs the dcterms:identifier of the logged in user (vo-id on acmidm).
In order to test it, you would need to login with an user that has a dcterms:identifer in its foaf:OnlineAccount.
MOCK LOGIN users don't have it, so you would need to add it manually (through a migration, or directly on virtuoso)
Once logged in, copy the Cookie, then you can use curl to try it out.
Example for getting the family-name and given-name of person with id fa346447ef3262f90217c8534e49e9f7 and reason 3aeec145-acf3-4b6e-9c00-5b8e285736e0 :
curl 'http://localhost/access-with-audit-trail/people/fa346447ef3262f90217c8534e49e9f7?reasonId=3aeec145-acf3-4b6e-9c00-5b8e285736e0&include=given-name,family-name' \
-H 'Accept: application/vnd.api+json'   --compressed  \
-H  'Cookie: proxy_session=<your-session-cookie>

Result:
{
  "data": {
    "type": "people",
    "id": "7daa61fcd543c33f63014dd97db0950d0e6475ac40ed553346a9ce58d7775a95",
    "attributes": {
      "given-name": "the given name",
      "family-name": "the family name"
    },
    "relationships": {}
  }
}

Audit log:
PREFIX sh:   <http://www.w3.org/ns/shacl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX mu: <http://mu.semte.ch/vocabularies/core/>
PREFIX persoon: <https://data.vlaanderen.be/ns/persoon#>
PREFIX ext: <http://mu.semte.ch/vocabularies/ext/>
PREFIX person: <http://www.w3.org/ns/person#>
PREFIX session: <http://mu.semte.ch/vocabularies/session/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX besluit: <http://data.vlaanderen.be/ns/besluit#>
PREFIX dcterms: <http://purl.org/dc/terms/>
<http://data.lblod.info/id/node-paths/a6cc40d2-adbe-11ef-b5f4-fd38d66e2101>
        a        <http://www.w3.org/1999/02/22-rdf-syntax-ns#List>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#first>
                foaf:givenName;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest>
                <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>;
        mu:uuid  "a6cc40d2-adbe-11ef-b5f4-fd38d66e2101" .

<http://data.lblod.info/id/node-shapes/a6cc40d3-adbe-11ef-b5f4-fd38d66e2101>
        a        sh:NodeShape;
        mu:uuid  "a6cc40d3-adbe-11ef-b5f4-fd38d66e2101";
        sh:path  <http://data.lblod.info/id/node-paths/a6cc40d4-adbe-11ef-b5f4-fd38d66e2101> .

<http://data.lblod.info/id/node-shapes/a6cc40d1-adbe-11ef-b5f4-fd38d66e2101>
        a        sh:NodeShape;
        mu:uuid  "a6cc40d1-adbe-11ef-b5f4-fd38d66e2101";
        sh:path  <http://data.lblod.info/id/node-paths/a6cc40d2-adbe-11ef-b5f4-fd38d66e2101> .

<http://data.lblod.info/id/node-paths/a6cc40d4-adbe-11ef-b5f4-fd38d66e2101>
        a        <http://www.w3.org/1999/02/22-rdf-syntax-ns#List>;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#first>
                foaf:familyName;
        <http://www.w3.org/1999/02/22-rdf-syntax-ns#rest>
                <http://www.w3.org/1999/02/22-rdf-syntax-ns#nil>;
        mu:uuid  "a6cc40d4-adbe-11ef-b5f4-fd38d66e2101" .

<http://data.lblod.info/id/audit-trail-entries/a6cc40d0-adbe-11ef-b5f4-fd38d66e2101>
        a                   ext:AuditTrailEntry;
        mu:uuid             "a6cc40d0-adbe-11ef-b5f4-fd38d66e2101";
        ext:code            <http://data.lblod.info/id/information-request-reason/3aeec145-acf3-4b6e-9c00-5b8e285736e0>;
        ext:requester       <http://data.lblod.info/id/account/cd52ed34-7bcd-41df-a7d4-c805c1d1a197>;
        ext:shape           <http://data.lblod.info/id/node-shapes/a6cc40d3-adbe-11ef-b5f4-fd38d66e2101> , <http://data.lblod.info/id/node-shapes/a6cc40d1-adbe-11ef-b5f4-fd38d66e2101>;
        ext:subject         <http://data.lblod.info/id/personen/fa346447ef3262f90217c8534e49e9f7>;
        dcterms:created     "2024-11-28T19:26:22.556Z"^^xsd:dateTime;
        dcterms:identifier  "b838f67c-6c4c-44b2-8297-c9eefccc5e35" .

Very nice! So now the idea would be use it to access certain data for a specific goal, a bit like the privacy service and in that case called by the frontend right? Could it later on be used in a more systematic way, like the dispatcher would redirect the calls to the audit service so we log access to all resources we want?
I also added @mirdono to the reviewers, he's taking care of OP more than I do lately :grin:

@claire-lovisa @mirdono yes, it still requires to provide a reason tho, but if needed I can adapt the service to proivde a default reason id (based on an environment variable), so if it's missing we use the default one, that way you no longer need to show the extra form select to provide the reason before being able to access the sensitive data. let me know if that's something you would have if you decide to implement it on OP


(#929) support filtering events by namespace

Related to #929.
In this PR we make it possible to users to specify on which namespace(s) the operator would run/manage spark applications. The k8s client, allows listing/watching either on one single namespace or all namespaces. Though, we use a FilteringResourceEventHandler handler to filter on a specific namespaces using compiled regexp supplied to the operator. This is similar to the behavior of predicates in kubebuilder. This fits well the requirement if we want to separate logically our kubernetes cluster assuming that it must run both dev and uat environments within the same cluster. Or, if we want to test different releases of the operator within the same cluster. Hence, running two instances of the same operator with different namespace-filter option becomes possible (i.e. one to cover *-uat and the other *-dev).
If the PR is fine, I can update the documentation as well and explains how we can have seperate instances of the operator running within the same cluster and make sure that the webhook1 of operator1 does not handle mutation of Pods handled by operator2.
If namespace-filter is not specified or namespace is specified, then we should have the same behavior as before.

Regarding your comment : "instead of using a regex filter, can't we just filter by some label(s) on the namespaces? ... you can attach a label to the namespaces to indicate which environment they belong to...".
This would be really interesting. However, to make sure I correctly understood :
1- Do you mean "a label we attach to a namespace" is like doing:
kubectl label namespaces spark-dev  deploy-spark-dev=true
or a label we attach to objects within these namespaces ?
2- Is it a kind of filter where we filter events with FilteringResourceEventHandler or at the creation of the informer with the function tweakListOptionsFunc ? I tried the latter with the label attached to the namespace (i.e. deploy-spark-dev=true): It did not work and the controller do to catches anything. However, when setting the label (deploy-spark-dev=true) on the SparkApplication/Pod objects. Then, it works and this should be fine for me since I can automate and attach this label to all spark deployments where I have a namespace that matches : *-dev.
This being said, I updated the PR with a newlabels-filteroption, where I can filter on objects with custom labels. Does this sounds good for you ? Shall we keep either on labels-filter or namespace-filter or keep on both and then let the end-user choosing what fits his requirement ? Both seems to be fine to me. As I said, I will update the documentation with respect to what we will agree on. Thanks !

1- Do you mean "a label we attach to a namespace" or a label we attach to objects within these namespaces ?

Labels attached to the namespace resources.

2- Is it a kind of filter where we filter events with FilteringResourceEventHandler or at the creation of the informer with the function tweakListOptionsFunc ? I tried the latter with the label attached to the namespace (i.e. deploy-spark-dev=true): It did not work and the controller do to catches anything. However, when setting the label (deploy-spark-dev=true) on the SparkApplication/Pod objects. Then, it works and this should be fine for me since I can automate and attach this label to all spark deployments where I have a namespace that matches : *-dev.

If this is the case, putting the labels on the SparkApplication objects is fine as long as it serves the filtering purpose.

This being said, I updated the PR with a newlabels-filteroption, where I can filter on objects with custom labels. Does this sounds good for you ? Shall we keep either on labels-filter or namespace-filter or keep on both and then let the end-user choosing what fits his requirement ? Both seems to be fine to me. As I said, I will update the documentation with respect to what we will agree on. Thanks !

I don't think we need both the label-filter and namespace-filter. If the label-filter serves your purpose, we can keep that and drop the namespace filter.

I will close this pull request since it is a duplicate. The other PR is more simple.


Initial stab at a React refactoring of the School Finder.

Prototype: Don't merge!
This is an initial stab at refactoring the School Finder to be built in React.js. React is great for the school finder, because it helps us render the interface without constantly juggling state transitions with messy jQuery code.
I also started to build a little "component library" of React wrappers for some of our existing patterns that could easily be reused throughout the codebase. These components could also easily be something we bundle with Neue in the future.
This is not functionally complete, but the basics are there so feel free to take a look see! :smile:
/cc @DoSomething/front-end

:hocho: for the stabbing

This is likely never happening. :wave:


create flashbots research section

not sure it makes sense to have a research section in docs unless there's actual technical documentation to add in there

closing for now


support :python3

Since the Python in this project is pretty simple and clean, I think it takes little effort to support vim users with +python3 or +python3/dyn. If you are interested in that, see the diff.

This is a reasonable enhancement. Thanks.


Support for signals

Hello
Reading the https://github.com/rust-lang-nursery/rust-cookbook/issues/501, I think the background thread is a bit suboptimal solution. Working, yes, but not nice.
So I wonder if it was possible to have some signal-compatible channels. Writing into the channel inside the signal handler is currently not safe AFAIK, because the Waker uses locks. Do you think it could be possible to devise some way to wake threads that doesn't include locks? I know only of the self-pipe trick, but that might be too slow for the wakeup in crossbeam-channel?

Do you think it could be possible to devise some way to wake threads that doesn't include locks?

Maybe, but I can't think of a way of doing this properly at the moment. :( Note that even thread::unpark() uses locks so that rules it out.

I know only of the self-pipe trick, but that might be too slow for the wakeup in crossbeam-channel?

I suppose a lock-free wakeup mechanism would have to use select and pipes to park/unpark threads. Moreover, listener registration in Waker would have to avoid locks. And avoiding locks often implies allocation, but allocators internally use locks (not sure if that really is a problem, though).
Long story short, my feeling is that this is a solvable problem in theory, but would be incredibly difficult to do in practice. I'd have to think about it a bit more...

I guessed it might be a hard problem and that it probably isn't as desired to warrant making the usual case significantly harder or something like that. So, these are more like brainstorming ideas that might lead nowhere, just in case:

Yes, allocation is also disallowed inside the signal handler. Actually, the list of things one might do is very limited.
However, the allocation is disallowed only inside the signal handler. In other words, the lockfreeness might be asymmetric ‒ allocation in the registration would be fine so long the signal handler could do a wakeup without it.
It probably wouldn't even have to wake up all the threads, just one of the waiting ones ‒ if that one could be somehow told to wake up the others.

Anyway, yes, pipe(s) and either some kind of select or read is the canonical way to wake something from signal handlers. The other is doing IO in the thread and relying on getting EINTR from one of them to wake up or checking in between the IO  ‒ the signal handler just sets some kind of flag and leaves it up to EINTR to wake whatever is needed.

What if SyncWaker used a RwLock rather than Mutex? Is it then safe for the signal handler to do a .read() lock?

Hmm. I just found one thing. The sem_post is signal-safe (pthread_cond_notify isn't). So it could be possible to do the blocking/wakeup using that.

Question: is the use of mutexes and condvars allowed inside signals if we make sure that they are not used at the same time within two concurrent invocations of the signal handler? For example:
static SIGNALS: [AtomicBool; ...] = ...;
static LOCK: AtomicBool = ...;

fn handler(sig_id: usize) {
    if SIGNALS[sig_id].swap(true, SeqCst) {
        return;
    }

    // This simple lock makes sure mutexes and condvars are not used at the
    // same time within two concurrent invocations of this signal handler.
    if LOCK.swap(true, SeqCst) {
        return;
    }

    let mut repeat = true;
    while repeat {
        repeat = false;

        for (id, sig) in SIGNALS.enumerate() {
            if sig.swap(false, SeqCst) {
                repeat = true;

                // Might use real mutexes and condvars.
                send_message_over_channel(id);
            }
        }
    }

    LOCK.store(false, SeqCst);
}

The POSIX whitelists certain functions as async-signal-safe. Using anything outside this whitelist is generally considered UB, but systems may whitelist additional functions (but their use in a signal handler is not portable then). Notably, neither mutexes nor condvars are in this list. So you might get away with it on some OSes and in certain situations, but generally no, they are not allowed de-jure.
Furthermore, the problem is not as much concurrent signal handlers (well, these too are problematic), but the fact that a signal handler „hijacts“ an arbitrary thread to run on. So if you hold a mutex in a the normal thread and a signal comes, sits on top of its stack and tries to lock it too, then you get a deadlock.
In general, I don't think it worth the risks and complexity. I know the code above is just a general suggestion, not fully debugged and final, but still, I suspect there's a race condition when it won't wake up in certain situation, and I'm not 100% sure about not being deadlocky in some cases either.
But I want to get to trying out replacing the Waker internals with the semaphore, which notably is async-signal-safe (well, waking it is). It is however buried deep in my TODO list.

Here is an example of "messaging" in the context of signal handling and interrupted threads:
https://github.com/servo/servo/blob/5d479109ef3bdbf0d937f6ea318e9cce8bbde2b3/components/background_hang_monitor/sampler_linux.rs#L186
The corresponding signal handler is found at https://github.com/servo/servo/blob/5d479109ef3bdbf0d937f6ea318e9cce8bbde2b3/components/background_hang_monitor/sampler_linux.rs#L268
The code is actually based on another project: https://bitbucket.org/nikhilm/vignette/src/master/
Both codebases are using techniques from the C++ equivalent: https://dxr.mozilla.org/mozilla-central/rev/3d88030030a181816e5fe300b6b8d66cb718d8ba/tools/profiler/core/platform-linux-android.cpp#320
Further background info can be found at https://medium.com/programming-servo/programming-servo-a-background-hang-monitor-73e89185ce1

The setup uses a semaphor from libc::sem_t for sending "wake-up" messages,  as well as AtomicPtr for sending "messages containing data", one could say.
In this setup the flow is like:

Have a thread A send a signal to thread B. We are now in the "critical section" where no allocations can take place and so on.
A blocks on a "wake-up" message from B, received via the semaphore.
B handles signal sent by A, writes some data to shared-state atomically.
B sends the "wake-up" message to A with the semaphore. Finally it blocks on a "wake-up" message that will later be sent by A.
A wakes-up, and reads the data in the shared-state.
A does some work with the shared-state.
A sends a "wake-up" message back to B, and blocks on receiving a final message back from B.
A  receives a final message from B, that B has "resumed", and we leave the "critical section" once that message has been received.

So if you're not in control of sending the signal(maybe you want to handle signals sent from other processes or the system itself), like in the above setup, I can imagine a slightly different setup:

Have thread A block on receiving a message via a semaphore.
Have thread B handle signals(not sure how you would do that if that thread isn't running otherwise, maybe just setup the handlers and sleep for a long time?).
And let's say there is another thread C that is blocking on a crossbeam receiver.
Each time thread B handles a signal, it writes something to a piece of atomic shared state(if necessary), and  "wakes-up" thread A via the semaphore, itself blocking on another message from the same semaphore. We are now in a "critical section".
Each time thread A wakes-up, it inspects the shared-state, copies it's content or otherwise processes it as necessary, perhaps resets it, and finally sends a wake-up message back to thread B.
Thread A then waits for a final "continue" message from Thread B.
Thread B wakes-up, sends the "continue" message to Thread A with the semaphore, and leaves the signal handler.
When that final "continue" message is received by thread A, we have exited the "critical section" and we can have Thread A forward the data you obtained from the shared-state to thread C, by sending a matching message over a crossbeam channel.

So if you hold a mutex in a the normal thread and a signal comes, sits on top of its stack and tries to lock it too, then you get a deadlock.

Note that in such a setup, any other thread running in the same process could very well deadlock during the "critical section", but so long as thread A and B do not deadlock, we will be able to successfully exit the critical section and so we are guaranteed "liveliness"...

I'll probably have to read this suggestion few more times to understand exactly what you propose here. Anyway, my impression is that this is not what I'm looking for. I may not have stated it explicitly, but my goal here is not to spawn any additional threads for signal handling.
If I relaxed that requirement and allowed for a „shovel“ thread, it could be done in much simpler way. For example, there's probably no reason for the signal handler to wait for the thread A to finish processing ‒ it can simply bump the semaphore and the thread can just keep eating from the semaphore and pumping these „tokens“ into the channel.
Furthermore, there seem to be a lot of little details that can turn this into a hornet's nest. In particular, you have to mask the signal out from A's signal mask (the signal handler just must not be run inside A, or it'll deadlock). If you want to be able to hand multiple signals, you'll either need to know all the signals at once (to mask them all in shared A), or start multiple threads. But the threads won't be able to mask each other's signals (they don't know of each other) so it can happen that they get to handle each other's signals at the same time ‒ again, creating a deadlock. Mandating to know all signals in advance at one place may be suitable for end application, but not for a library.
As for my experiments… I've tried to read crossbeam-channel's code. Unfortunately, the code is quite complex and I'm not sure where to start modifying it. It's no longer a crate friendly for a drive-by contributor that just wants to do this one little thing ☹. I'm still confident this should work in theory, I'm just not sure about performance implications.

there's probably no reason for the signal handler to wait for the thread A to finish processing

The signal-handling thread B needs to wait for the "shovel" thread A to tell it the shared-state is ready for manipulation. If thread A would still be busy with that shared-state due to a previous signal, thread B would have to wait for thread A to be ready for "the next dance".
On second thoughts, I think actually the concept of "waiting" I introduced wouldn't work in practice, because  the problem is that once a thread is suspended by a signal(and now inside the signal-handler), you've entered a "critical section" and shouldn't do any allocations. So the "shovel" thread could still be doing work, while another thread would have been suspended and be "waiting" for it to finish. That doesn't work because by then we're already in a critical section, and the shovel thread could deadlock doing any allocations, meaning the signal-handler could then be stuck waiting as well...
So the example in Servo and elsewhere I linked to above only works because thread A is the one sending the signal to thread B, so the "shovel" thread A knows when the critical section starts, because it is the one sending the signal, after which it just needs to wait for the first message on the semaphore coming from the signal-handler.
So in other words, the "shovel" thread can't do any allocations either, unless it knows exactly when the "critical section" started, and it can only know that with regards to signals it sent itself...


KeyError: 'access_token'

Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/aiohttp-3.8.1-py3.9-linux-x86_64.egg/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.9/dist-packages/aiohttp-3.8.1-py3.9-linux-x86_64.egg/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.9/dist-packages/aiohttp-3.8.1-py3.9-linux-x86_64.egg/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/components/http/forwarded.py", line 220, in forwarded_middleware
return await handler(request)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/components/http/ban.py", line 79, in ban_middleware
return await handler(request)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/components/http/auth.py", line 219, in auth_middleware
return await handler(request)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/components/http/view.py", line 137, in handle
result = await result
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/components/config/config_entries.py", line 164, in post
return await super().post(request, flow_id)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/components/http/data_validator.py", line 62, in wrapper
result = await method(view, request, *args, **kwargs)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/helpers/data_entry_flow.py", line 111, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 252, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/home/knutas/.local/lib/python3.9/site-packages/homeassistant/data_entry_flow.py", line 325, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/home/knutas/.hass/custom_components/tesla_custom/config_flow.py", line 63, in async_step_user
info = await validate_input(self.hass, user_input)
File "/home/knutas/.hass/custom_components/tesla_custom/config_flow.py", line 182, in validate_input
result = await controller.connect(test_login=True)
File "/home/knutas/.hass/deps/lib/python3.9/site-packages/teslajsonpy/controller.py", line 393, in connect
cars = await self.get_vehicles()
File "/home/knutas/.hass/deps/lib/python3.9/site-packages/backoff/_async.py", line 133, in retry
ret = await target(*args, **kwargs)
File "/home/knutas/.hass/deps/lib/python3.9/site-packages/teslajsonpy/controller.py", line 523, in get_vehicles
return (await self.api("VEHICLE_LIST"))["response"]
File "/home/knutas/.hass/deps/lib/python3.9/site-packages/teslajsonpy/controller.py", line 171, in wake_up
result = await wrapped(*args, **kwargs)
File "/home/knutas/.hass/deps/lib/python3.9/site-packages/teslajsonpy/controller.py", line 1754, in api
return await self.__connection.post("", method="get", data=kwargs, url=uri)
File "/home/knutas/.hass/deps/lib/python3.9/site-packages/teslajsonpy/connection.py", line 162, in post
access_token=auth["access_token"], expires_in=auth["expires_in"]
KeyError: 'access_token'

auth contains: {'error': 'unsupported_grant_type', 'error_description': 'The authorization grant type is not supported by the authorization server.'}

Update to the latest.

I'm on 1.7.0 is there a later version?
Den lör 26 mars 2022 18:22Alan Tse @.***> skrev:

Closed #174 https://github.com/alandtse/tesla/issues/174.
—
Reply to this email directly, view it on GitHub
https://github.com/alandtse/tesla/issues/174#event-6312198953, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABRU2ST3HFJW26AOHDOWUTVB5BWVANCNFSM5RW6AR3Q
.
You are receiving this because you authored the thread.Message ID:
@.***>

That code doesn't exist in 1.7.0. https://github.com/zabuldon/teslajsonpy/blob/dev/teslajsonpy/connection.py#L162
Ensure you don't have a custom copy of teslajsonpy and are using 1.10.0.


fix bitseq set race condition

This change will fix bitseq set race condition.  h.Lock() should
include pushReservation func, if not, another bitseq set maybe use
same h.head which will lead to generate two different containers use
same container ip in bridge network at the same time.
related: https://github.com/docker/libnetwork/issues/1740
Signed-off-by: liutianwei<EMAIL_ADDRESS>

thanks @tianweidut for the patch. ping @aboch

Thanks @tianweidut for the issue.
This issue happens because the IPAM backing bitsequence for local scope drivers is no longer using a kv store.
I had pushed #1625 for this. But given no issues were reported about this, I guess that is the reason it was not being looked closely by other maintainers.
We intentionally did not want to lock the header in the set() function, because the atomicity is provided by the datastore. So we just acquire a copy of the header, if somebody else was able to push an update to the store in the meantime, our push will fail with the retry error and we will repeat the procedure on top of the up-to-date state.
#1625 is therefore serializing the access to the handle only in case the datastore is missing.
It would be great if you could run your parallel test with #1623 changes. (In that PR I verify the parallel allocation via unit test over id manager)

@aboch  thanks for your reply.  I can reproduce different containers use same ip issue. more details is here: https://github.com/docker/libnetwork/issues/1740

@aboch  https://github.com/docker/libnetwork/pull/1625 is the better solution, could other maintainers review and merge it?  It will fix https://github.com/docker/libnetwork/issues/1740

Fixed in https://github.com/docker/libnetwork/commit/a7df5629fdf345d9269372aec6cfc5431d9fc31b

@tianquan23 closing this one not anymore relevant


StaticValue constructor not returning nullable DateTime

Describe the bug
https://github.com/aws/aws-sdk-net/blob/37492aabe9e9bab68f5ed548eb444ea75b405181/sdk/src/Services/QuickSight/Generated/Model/TimeRangeFilterValue.cs#L90
AWSSDK.QuickSight
TimeRangeFilterValue.StaticValue
When retrieving the object via the SDK, the constructor is not returning a nullable DateTime. It gets initialized as new DateTime() and if you have set the RollingDate property also, then a validation error is returned when using the object in CreateDashboardAsync()
_{"4 validation errors detected: Value 'TimeRangeFilterValue(staticValue=Mon Jan 03 00:00:00 UTC 1, rollingDate=RollingDateConfiguration(dataSetIdentifier=null, expression=*** REDACTED ***), parameter=null)' at 'definition.filterGroups.11.member.filters.1.member.timeRangeFilter.rangeMaximumValue' failed to satisfy constraint: Only 1 member of [staticValue, rollingDate, parameter] should be provided for structure TimeRangeFilterValue; Value 'TimeRangeFilterValue(staticValue=Mon Jan 03 00:00:00 UTC 1, rollingDate=RollingDateConfiguration(dataSetIdentifier=null, expression=*** REDACTED ***), parameter=null)' at_
Regression Issue

[ ] Select this option if this issue appears to be a regression.

Expected Behavior
A Nullable DateTime value is allowed
Current Behavior
Initialised as a new DateTime
Reproduction Steps
Create the Dashboard via the CLI or UI with a rollingDateTime filter configured
Retrieve the Dashboard via the SDK DescribeDashboardDefinitionAsync
Publish the Dasboard (change its name to pass naming validation) using CreateDashboardAsync
Catch Validation Error Exception
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.QuickSight 3.7.411.5
Targeted .NET Platform
.NET 8
Operating System and version
Windows

@colmkavs Good morning. Thanks for opening the issue. You are perhaps affected by the side effect of AWS SDK for .NET v3 where such properties, although having Nullable backing field, always return GetValueOrDefault(). This behavior would be fixed in next major version v4 of AWS .NET SDK (which is currently in preview), please check code here.
Thanks,
Ashish

Thank you @ashishdhingra the v4 generated models have it addressed.


fix link to twitter profile

Grazie!

wow i did not think i would ever get a pull request on this one.


Deal with additionnal (and exotic) image formats

I found that to convert, for example, the GIF images to png (without the animation, though the SO thread mention also other possibilities). For example,
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{convert gif:#1 png:\OutputFile}
\AppendGraphicsExtensions{.gif}

It only requires to use convert from the imagemagic toolbox (which is multi-platform), so I think it worth it. And it offers the possibility to use an external tool to convert SVG as well.

Using convert is reasonable for us. Could you please include this in the class for all the most common image formats?
We need to support at least png, gif and jp(e)g as input, and they should show up in the PDF.

What about svg ? It seems possible.

Yes, the bare minimum is support for png, gif and jp(e)g.

PNG and JP(E)G are supported by default.

Good, then please add support for gif, then we'll close this issue.

How would you deal with SVGs since they are user-provided and could contain malicious code?

Turn them into PNG, as we do in ZdS ? :)

PDF being a vector format it wouldn't be optimal.

Indeed. On the other hand, cairosvg allow to transform SVG to PDF, which LaTeX understand, but it adds a dependencies and requires to write some python (or use python -c "..."). Inkscape also possesses such command-line option.

Which one if these would be safer than using ImageMagick's convert?

convert will rasterize the image (even if we request a PDF conversion), so that in my mind, this is the safer option (thought, indeed, not the best idea), and I don't understand your question. On the other hand, I'm not aware on what Inkscape exactly uses (but I think it is cairosvg). Plus, I hope that cairosvg is safe, since we use it in ZdS.

I didn't know convert would rasterize between two vector formats, good to know.
cairosvg seems to be safe, that's probably what we'll use, zds-side though.

"Bad" news here: from what I tried until now, cairosvg still rasterize the SVG before including it into PDF. But there is a tool, rsvg-convert,based on cairo, that does not rasterize the SVG (or, according to the comments "not entirely"). So I will still dig into cairo to see if I can get a better output, but I have an alternative.


patch dart SDK to be compatible with 3.12 and future versions of Python

when running blutter with Python 3.12, there's an error once tools/utils.py of dart SDK is executed:

ModuleNotFoundError: No module named 'imp'

this has nothing to do with blutter or dart SDK but with the new changes of Python 3.12 release, as one of them is the migration of imp module: https://docs.python.org/3.12/whatsnew/3.12.html#imp
there are few changes I made to dartvm_fetch_build.py to make it compatible with Python 3.12:

replace some snippets of tools/utils.py (file rewriting) of dart SDK in order to replace imp module with importlib
replace invalid escape strings with raw strings of tools/utils.py (file rewriting) to avoid SyntaxWarning (SyntaxError in future versions) of 3.12 as stated in second paragraph of Other Language Changes

I think it's easier to do this rewriting approach in blutter instead of asking dart SDK managers to fix it in each version that still uses the old imp module, since there are many and blutter fetches their respective tools/utils.py

dart 中的算法逻辑无法识别


Missing icon in windows spotlight

You can add Unicord to windows spotlight lockscreen, but the icon is completely missing.

Definitely fixed this a while ago


Added => Algorithm => Bubble_Sort => CS

Assigned Issue Number ?
#18
Language Opted ?
C#
Number of files added or updated ?
1
Name of these files ?
Algorithm => Bubble_Sort => Bubble_Sort.cs
Checklist

[ X ] I've read the contribution guidelines.
[ X ] I've referred the correct issue number.
[ X ] I've fill up this entire template correctly.

Major merging conflicts :warning:
Can't merge :no_entry:


Colors are too depressing

@KickButtowski80  would like to update the color scheme to something a little less depressing.

This issue is superceded by #9


[fix](inverted index) make error message more friendly when query token is empty

Proposed changes
Issue Number: close #xxx
old: invalid input query_str: 刘先生, please check your query sql
new: token parser result is empty for query, please check your query: '先生' and index parser: english
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

(From new machine)TeamCity pipeline, clickbench performance test result:
the sum of best hot time: 47 seconds
stream load tsv:          505 seconds loaded<PHONE_NUMBER>9 Bytes, about 141 MB/s
stream load json:         20 seconds loaded<PHONE_NUMBER> Bytes, about 112 MB/s
stream load orc:          65 seconds loaded<PHONE_NUMBER> Bytes, about 16 MB/s
stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
insert into select:          29.3 seconds inserted 10000000 Rows, about 341K ops/s
storage size:<PHONE_NUMBER>0 Bytes


Feature request - clockTolerance

Hi
thank you for creating this library. Is there any chance that you could add clockTolerance option from jsonwebtoken lib?
You can learn more here: https://www.npmjs.com/package/jsonwebtoken#:~:text=a value here-,clockTolerance,-%3A number of seconds
Thanks a lot

Here you go v2.5.0 ;)


Unexpected token 'export' with vite dev server

Command
serve
Is this a regression?

[X] Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was
No response
Description
Hi. I am not sure if this related to angular, but vite throws an error and continues to work.
It builds dependency without an issue.
More details, repro: https://github.com/EsotericSoftware/spine-runtimes/issues/2407
Minimal Reproduction
ng serve
Exception or Error
Error when evaluating SSR module /main.server.mjs: failed to import "@esotericsoftware/spine-webgl"
|- C:\ng-spine-vite-bug\node_modules\@esotericsoftware\spine-webgl\dist\index.js:1
export * from "./AssetManager";
^^^^^^

SyntaxError: Unexpected token 'export'
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1178:20)
    at Module._compile (node:internal/modules/cjs/loader:1220:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
    at Module.load (node:internal/modules/cjs/loader:1119:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

Your Environment
Angular CLI: 17.0.0-rc.3
Node: 18.18.1
Package Manager: npm 9.8.1
OS: win32 x64

Angular: 17.0.0-rc.1
... animations, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router, service-worker

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1700.0-rc.3
@angular-devkit/build-angular   17.0.0-rc.3
@angular-devkit/core            17.0.0-rc.3
@angular-devkit/schematics      17.0.0-rc.1
@angular/cdk                    17.0.0-next.6
@angular/cli                    17.0.0-rc.3
@angular/material               17.0.0-rc.0
@angular/ssr                    17.0.0-next.9
@schematics/angular             16.2.5
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.0

Anything else relevant?
No response

This problem is caused by the package itself as while it ships ESM modules, it's not fully valid.
The main problems are;

"type": "module" is missing from it's package.json
Files are imported without an extension, example

export * from "./AssetManager";

Instead of
export * from "./AssetManager.js";

Closing as this is not actionable from our end.


[Bug]使用模型Gpt-3.5-turbo-1106与gpt-4-1106-preview时公式Latex显示不正确 Incorrect display of formula Latex when using model gpt-3.5-turbo-1106 with gpt-4-1106-preview

将'' [ ...] ''改成 ''$$...$$''后可以正确显示。如下...  It can be displayed correctly after changing [ \ ] to $$ $$. As follows...

test

been known this issue, its openai issue

https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/discussions/3351

The problem has now been resolved


Source code for direct line

When I checked webchat source code, It seems it is still dependent on the dirrectline api, Is that correct? https://github.com/Microsoft/BotFramework-WebChat/blob/master/src/directLine.ts
If yes, That means we still have security compliance issue due to whole conversation will pass through DirectLine Api. Is there a plan to release source code?
I am trying to avoid an architecture like this.

Hi @sebnema, yes, the Web Chat file you linked is a Direct Line client, and we will be publishing an NPM package for it soon (although it will likely contain the entire control, not just the Direct Line client). We do not currently have plans to publish the service code.

Yes, all Web Chat messages pass through the Direct Line service. The Direct Line backend is the service used for both the Direct Line and Web Chat channels.

@dandriscoll, @billba Is it possible to extract the DL source code from emulator and package it separately, as mentioned here?
BotFramework-Emulator-Issue 54

Closing as we have addressed the question. Please at-mention or file a new issue if you'd like to discuss further.

@dandriscoll any news about the code? Now we need to pay for using DirectLine Service..


:white_check_mark: implement missing tests

Codecov Report

Merging #4 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master       #4   +/-   ##
=======================================
  Coverage   98.85%   98.85%
=======================================
  Files           1        1
  Lines          87       87
  Branches       21       21
=======================================
  Hits           86       86
  Misses          1        1

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5fbb515...3fd6740. Read the comment docs.


Add CITATION.cff file to match the Contributors information

We should add a CITATION.cff file to match the information from the Contributors section.

Do we want to have a doi zenodo reference for the citation? If that's the case, I cannot link to zenodo from my end.

Let's use the zenodo reference for this repo for the doi key in the CFF file. This will have to be updated with a commit after each release, since you'll need to wait for Zenodo to mint the new DOI.

From @mikemhenry: This is what I meant to link https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md#credit-redirection Where you can add "message: "If you use this software, please cite both the article from preferred-citation and the software itself.""


FileNotFoundError: [Errno 2] No such file or directory

I also encountered this problem
Processing CBS11016_chr1A
Traceback (most recent call last):
File "./GFF2MSS.py", line 146, in
with open(gff_filename, "rt") as gh:
FileNotFoundError: [Errno 2] No such file or directory: '/CBS11016.genome.functional_blast.sorted_gff3sort.gff'

The error message indicates that the location of your GFF file is not correctly specified.
Did you get the demo script working? If it's working, but you may be able to solve it by replacing the files in the example directory with your own files and running it.

I did and got this error
Processing CBS11016_chr1A
Traceback (most recent call last):
File "GFF2MSS.py", line 161, in
product_name = DF_Extract(anno_in, mRNA_ID)
File "GFF2MSS.py", line 31, in DF_Extract
out_DATA= tmp_DF.iat[0,1]
File "/Users/emmannadi/opt/anaconda3/lib/python3.7/site-packages/pandas/core/indexing.py", line 2200, in getitem
return self.obj._get_value(*key, takeable=self._takeable)
File "/Users/emmannadi/opt/anaconda3/lib/python3.7/site-packages/pandas/core/frame.py", line 2826, in _get_value
return com.maybe_box_datetimelike(series._values[index])
IndexError: index 0 is out of bounds for axis 0 with size 0

Meanwhile is there a script you can share to help me convert this GFF3 to anno.txt?

Sure. If you are Mac user. Please use following commands on your terminal.
[Open your terminal]
git clone https://github.com/maedat/GFF2MSS.git
cd GFF2MSS/
python3 GFF2MSS.py -f example/Lj3.0_Chloroplastl.fna -g example/Lj3.0_cp_gene_models.gff3  -a example/Lj3.0_anno.txt -l "PRE_TEST_" -n "Lotus japonicus" -s "MG-20" -o mss.out.txt

You need not only gff3 but also fasta file about the genomic sequence (e.g, example/Lj3.0_Chloroplastl.fna) and gene name file (example/Lj3.0_anno.tx) to make anno.txt

If you have a script that can make anno.txt from gff3 and fasta I would
appreciate if you can share or I can share with you my gff3 and fasta
On Tue, 2 Jun 2020 at 6:37 AM, Taro Maeda<EMAIL_ADDRESS>wrote:

You need not only gff3 but also fasta file about the genomic sequence
(e.g, example/Lj3.0_Chloroplastl.fna) and gene name file
(example/Lj3.0_anno.tx) to make anno.txt
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/maedat/GFF2MSS/issues/10#issuecomment-637289255, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AHVLNZ7WVRRFLMQ4H3HEZADRUSF2JANCNFSM4NQLID2Q
.

--
Nnadi Nnaemeka Emmanuel,Ph.D
Department of Microbiology,
Faculty of Natural and Applied Science,
Plateau State University, Bokkos, Plateau State, Nigeria.
+2348068124819
Publications:
https://www.researchgate.net/profile/Emmanuel_Nnadi/publications

If you send me your fasta, gff3, and gene name files, we will try to call GFF2MSS here. However, please be aware that we are not able to follow up with you if there are problems with the file contents or the sequence itself.

Can I get an email to share the files with you?
On Tue, 2 Jun 2020 at 6:59 AM, Taro Maeda<EMAIL_ADDRESS>wrote:

If you send me your fasta, gff3, and gene name files, we will try to call
GFF2MSS here. However, please be aware that we are not able to follow up
with you if there are problems with the file contents or the sequence
itself.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/maedat/GFF2MSS/issues/10#issuecomment-637297081, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AHVLNZ6OONXNKZG4NOJ767LRUSINHANCNFSM4NQLID2Q
.

--
Nnadi Nnaemeka Emmanuel,Ph.D
Department of Microbiology,
Faculty of Natural and Applied Science,
Plateau State University, Bokkos, Plateau State, Nigeria.
+2348068124819
Publications:
https://www.researchgate.net/profile/Emmanuel_Nnadi/publications


luci-proto-wireguard: change allowed range of mtu

range(1280,1420) => range(0,8940)
default value 1420 keeps unchanged
fix #4282

@hnyman Please take a look at this pull request. Thank you!

cc @zx2c4 who might know better the value of the proposition...

Overhead for wg-over-v6 is 80 bytes. Overhead for wg-over-v4 is 60 bytes. 1420 is thus a sensible default assuming 1500 byte Ethernet.
But as far as a maximum... Shouldn't it be closer to 2**16? Don't people use OpenWRT with jumbo frames and such?

According to https://github.com/torvalds/linux/commit/175f1ca9a9ed8689d2028da1a7c624bb4fb4ff7e, it seems that MTU=0 is "quasi-valid". So I changed the lower bound to 0.
According to wikipedia, super jumbo frame (MTU>9000) is not widely adopted, and has big memory footprint which does not suit most OpenWRT supported devices. So I changed the upper bound to 9000(Ethernet)-20(IPv4)-8(UDP)-32(Wireguard)=8940.
PTAL

I pushed the change directly with https://github.com/openwrt/luci/commit/7206d8fd6aac0708dda6ac17c96709e066f6328b

According to wikipedia, super jumbo frame (MTU>9000) is not widely adopted, and has big memory footprint which does not suit most OpenWRT supported devices. So I changed the upper bound to 9000(Ethernet)-20(IPv4)-8(UDP)-32(Wireguard)=8940.

8940 might be a sensible upper limit for most devices but ultimately, the admin/user should be able to ignore the recommendation if the target hardware can take it. Even that wikipedia article mentions 64k jumbo frames being the next step ;)
That said, I appreciate the higher upper limit now so thanks!


add xcode cmake attrs

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

Coverage data is based on head (a138d5b) compared to base (213a56d).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #28   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            3         3
  Lines           13        13
=========================================
  Hits            13        13

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.


Merge prTesting_201905091027 branch to master branch

Docs Build status updates of commit db9087e:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details
Dependent Files

split/updateTestCon.md
:white_check_mark:Succeeded

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