LUA Scripting

This is basic LUA scripting. Currently supported is only Audio playback. You can do everything the normal Sound class does. You can currently not add sounds to the SoundManager via the script.
Support for calling functions with arguments have been added. Use the ScriptingTest project. Pressing P plays the Cherno.ogg file. Pressing and holding 1 or 2 decrease and increases the sound.
View the AudioScript.h and AudioScript.cpp files to understand how the Sound class was made.
The script is located in "/scripts/test.lua".

What are the conflicts? How would I be able to tell? So I can fix it.

I would HIGHLY recommend using variadic template instead of template overloads for Scripting::Call.

@KevinW1998 Ok. Will change that. The current Scripting::Call took me around ~1 hour to create so this shouldn't take long as well.

Added Variadic Templates in 18 minutes. :)

What is this Continous-Intergration error about?

Also, what are the conflicts? So I can fix them.

Hey Jacob, thanks so much for putting this together. Since this is quite a large addition, I'll have to check it out and do some proper testing/code review, and this may result in some follow up revisions. I'll try and do this as soon as possible, and get back to you with any actions required on your part.
As for the CI failure, the reason it failed was because you have merge conflicts in your current revision. This is because master has changed since you last merged it into your branch. You'll need to resolve these conflicts before I can test/merge them. Check out something like this article if you're not sure how to do that. :)

Just to help you out, the conflict is in Sandbox.cpp
In b21421a you change line 37 and 40, but Sparky has changed since you created your fork and these lines don't exist now.
The easiest fix I can think of is downloading the current Sandbox.cpp and pushing it on your fork.

Hey :)
After a fair amount of commits, I have successfully merged the code together. While also learning more about git and how annoying it can be at sometimes.
It should all work fine.

All conflicts seemed to have been fixed. I am only going to change 2 files to use a different LUA wrapper maybe due to the current one may be hard to actually implement.

Ahh, good ol' luabind. It is one of my favourite front-end lua binders. It definitely offers a much nicer syntax.

@KevinW1998 yea. i was originally going to use it but didn't want to actually use boost. that was until i found a version that doesn't need boost.

Really only thing that is needed to be added is the ability to add and load materials, layers, text, textures. Basically anything to do with graphics.
Since that isn't as important, I am wondering if this can start under the testing. There is currently no pull errors.
Tell me what might need to be fixed or changed and I will do it.
@TheCherno

Really only thing that is needed to be added is the ability to add and load materials, layers, text, textures.

And that's something we should have a wrapper generator for.
(It's a shame that C++ doesn't support Reflection)

@KevinW1998 I can try to make one (again). Just found this to be easier for now.

Shouldn't we wait until cligen is finished and then extending it with luabind wrapper generation?

@KevinW1998 that might be a great idea. ok. i will just implement the graphics then I will create a new pull request (or you if you wish) that adds a luabind wrapper gen.

I'm extremely busy (as always), so I'm just going to drop my thoughts here and we can discuss them. I haven't had the change to look into this too much, so take everything I say with a grain of salt.

Firstly, Lua should be written as "Lua" rather than "LUA". I have no idea where the latter comes from, but for some reason many people decide to write it incorrectly
I would like to have Lua's source code in the actual Sparky solution, rather than just as a binary
I want to be able to use the latest version of Lua
The previous point means that we can't use LuaJIT. I'm okay with that, and in fact I'm not exactly a huge fan of LuaJIT anyway. It doesn't work properly on many platforms/archs (yes I know it claims otherwise), and it adds extra complexity which isn't worth the benefits in my opinion. It also means that we have to use an old version of Lua. So overall, it is not worth it
As far as wrappers go, I'm okay with one wrapper/binding helper library, however let's not go overboard and use too many
The biggest issue with the current solution we have is the binding. It's incredibly difficult to maintain and requires a separate method for each function, which is unacceptable. Furthermore, the Lua binding should be stored in the actual C++ class file of the class that is being bound, rather than in an additional file (eg. instead of AudioScript.h/.cpp, it should be in Audio.h/.cpp).

I briefly took some time to come up with a better solution for binding, using templates. Here's a rough version of what I came up with:
	template<typename R>
	struct Marshal
	{
		static int Dispatch(lua_State* L, const R& value) { SP_ASSERT(false); return 0; }
	};

	template<>
	struct Marshal<float>
	{
		static int Dispatch(lua_State* L, const float& value)
		{
			lua_pushnumber(L, value);
			return 1;
		}
	};

	template<typename R>
	struct Unmarshal
	{
		static R&& Dispatch(lua_State* L, int index) { SP_ASSERT(false); return 0; }
	};

	template<>
	struct Unmarshal<float>
	{
		static float&& Dispatch(lua_State* L, int index)
		{
			return lua_tonumber(L, index);
		}
	};

	template<>
	struct Unmarshal<String>
	{
		static String&& Dispatch(lua_State* L, int index)
		{
			return lua_tostring(L, index);
		}
	};

	template<typename T>
	struct FunctionWrapper
	{

	};

	template<typename T, typename R, typename... Args>
	struct FunctionWrapper<R(T::*)(Args...)>
	{
		enum { ArgCount = sizeof...(Args) };

		typedef R(T::* FunctionType)(Args...);

		template<FunctionType method, size_t... index>
		static lua_CFunction WrapMethod()
		{
			return [](lua_State *L)
			{
				T* obj = luaW_check<T>(L, 1);
				Marshal<std::remove_const<R>::type>::Dispatch(L, (obj->*method)(Unmarshal<Args>::Dispatch(L, index + 2)...));
				return 1;
			};
		}

		template<FunctionType method, size_t... index>
		static lua_CFunction WrapMethod(std::index_sequence<index...>)
		{
			return WrapMethod<method, index...>();
		}
	};

	template<typename T, typename R, typename... Args>
	struct FunctionWrapper<R(T::*)(Args...) const>
	{
		enum { ArgCount = sizeof...(Args) };

		typedef R(T::* FunctionType)(Args...) const;
		typedef R(T::* FunctionTypeNonConst)(Args...);
		template <FunctionType method, size_t... index> static lua_CFunction WrapMethod()
		{
			return FunctionWrapper<FunctionTypeNonConst>::WrapMethod<(FunctionTypeNonConst)method, index...>();
		}
		template <FunctionType method, size_t... index> static lua_CFunction WrapMethodInternal(std::index_sequence<index...>)
		{
			return FunctionWrapper<FunctionTypeNonConst>::WrapMethod<(FunctionTypeNonConst)method, index...>();
		}
	};

	template<typename T, typename... Args>
	struct FunctionWrapper<void(T::*)(Args...)>
	{
		enum { ArgCount = sizeof...(Args) };
		typedef void (T::* FunctionType)(Args...);

		template<FunctionType method, size_t... index>
		static lua_CFunction WrapMethod()
		{
			return [](lua_State *L)
			{
				T* obj = luaW_check<T>(L, 1);
				(obj->*method)(Unmarshal<Args>::Dispatch(L, index + 2)...);
				return 0;
			};
		}

		template<FunctionType method, size_t... index>
		static lua_CFunction WrapMethodInternal(std::index_sequence<index...>)
		{
			return WrapMethod<method, index...>();
		}
	};

	template<typename T, T method, std::size_t N, typename Indices = std::make_index_sequence<N>>
	lua_CFunction WrapMethod()
	{
		return FunctionWrapper<T>::WrapMethodInternal<method>(Indices());
	}

	template<typename T, T method>
	lua_CFunction WrapMethod()
	{
		return WrapMethod<T, method, FunctionWrapper<T>::ArgCount>();
	}

	#define SCRIPT_METHOD(S) WrapMethod<decltype(&S), &S>()

	Sound* L_Sound_New(lua_State *L)
	{
		String name = lua_tostring(L, 1);
		String filename = lua_tostring(L, 2);
		return spnew Sound(name, filename);
	}

	int L_Register_Audio_Classes(lua_State *L)
	{
		luaL_Reg L_Sound_Table[] =
		{
			{ NULL, NULL }
		};

		luaL_Reg L_Sound_MetaTable[] =
		{
			{ "Play", SCRIPT_METHOD(Sound::Play) },
			{ "Loop", SCRIPT_METHOD(Sound::Loop) },
			{ "Pause", SCRIPT_METHOD(Sound::Pause) },
			{ "Stop", SCRIPT_METHOD(Sound::Stop) },
			{ "Resume", SCRIPT_METHOD(Sound::Resume) },
			{ "GetGain", SCRIPT_METHOD(Sound::GetGain) },
			{ "SetGain", SCRIPT_METHOD(Sound::SetGain) },
			{ NULL, NULL }
		};
		luaW_register<Sound>(L, "Sound", L_Sound_Table, L_Sound_MetaTable, L_Sound_New);
		return 1;
	}

Hopefully you get the idea of what a good solution would look like, however this obviously isn't complete yet (i.e. constructors aren't supported yet).
Anyway, leave your thoughts here; let's talk about this.

I want to be able to use the latest version of Lua

The previous point means that we can't use LuaJIT. I'm okay with that, and in fact I'm not exactly a huge fan of LuaJIT anyway. It doesn't work properly on many platforms/archs (yes I know it claims otherwise), and it adds extra complexity which isn't worth the benefits in my opinion. It also means that we have to use an old version of Lua. So overall, it is not worth it

Well, I had never really issues with LuaJIT (But maybe because I only used it on Windows).

The biggest issue with the current solution we have is the binding. It's incredibly difficult to maintain and requires a separate method for each function, which is unacceptable. Furthermore, the Lua binding should be stored in the actual C++ class file of the class that is being bound, rather than in an additional file (eg. instead of AudioScript.h/.cpp, it should be in Audio.h/.cpp).

I still suggest using a binding generator (like cligen, but for lua bindings).

I'm definitely all for a binding generator, but for that to work there still needs to be the base binding code, such as my example above.

As far as wrappers go, I'm okay with one wrapper/binding helper library, however let's not go overboard and use too many

Well, that was the plan. The easiest binding to use thus far is LuaBind which is what the project is using. It is only one wrapper and no more wrappers are needed.

The biggest issue with the current solution we have is the binding. It's incredibly difficult to maintain and requires a separate method for each function, which is unacceptable.

Noticed you were using an outdated pull. I have changed wrappers to LuaBind. Currently using a version not using boost although there is a boost version which has (some little) additional features. it seems fairly easy to use and so far no problems.

Furthermore, the Lua binding should be stored in the actual C++ class file of the class that is being bound, rather than in an additional file (eg. instead of AudioScript.h/.cpp, it should be in Audio.h/.cpp).

We could do two things here. We can create a generator which reads every file and parses it into one giant .h/.cpp file or we can go through each file and create a module for each. Currently, as of latest commit, it is mostly in one file,non generated.

there still needs to be the base binding code, such as my example above.

LuaBind seems to be working well for that. It is readable and easy enough so if a generator was to be made, no additional binding code would be needed.
I will merge LuaBind into the project next commit.
Jacob

Just wondering if you are thinking about letting us see the CI logs? Seeing it fail yet other pull requests not failing makes me wonder what is the problem.

You can actually see the error if you click on details and then either debug or release.
In this case it's
LINK : fatal error LNK1104: cannot open file 'luabind-deboostified.lib' [C:\projects\sparky\Sparky-core\Sparky-core.vcxproj]

Yea, I think you have to set luabind as dependency so it is buid first

Git did something wierd... It deleted a file which wasnt there...

Hello @TheCherno,
I have been looking into implementing Lua scripting your way and so far, it has been well. I have decided to first implement in a different project (a new one) so I can easily figure if it may be bug with your code or mine easier and so I won't modify files I do not need to. This project can be found at;
https://github.com/Jacob-Mango/MangoLua (Couldn't think of a name)
The amount of work I will be doing will be decreased during these next few weeks due to exams. Sorry.

Alright. Fixed the ScriptGen compile bug. Turns out you have to use LLVM 3.4.1 (I am using windows binaries).

Problem. Function overloading not working.

That was just for debugging. Forgot to remove that.
All that is left from that I see visible is to finish the generator and then it should all work.
Tell me if you see something missing.

Well there are some recommendation I would give:

script.h @ line 35 should call std::forward
instead of:
luabind::call_function<void>(m_State, func, args...);
we can use perfect forwarding:
luabind::call_function<void>(m_State, func, std::forward<Args>(args)...);

script.h @ line 24: I personally recommend using std::vector< std::string > instead of std::vector< const char* >, because this will ensure that the string will be valid through the lifetime of the script object.

script.cpp @ line 8: Why do you push an empty string?

Thank you for the recomendations
. I will use forwarding. I dont know why I didn't considering I did use it last time.
. I had a problem with using a string vector. It was to do with the instance of the string being deleted as it was being pushed into the string. I changed to chars and the problem fixed itself. I will look into why strings didn't work.
. Was one of the things I was doing to try and fix the above problem. Forgot to remove that line.

It was to do with the instance of the string being deleted as it was being pushed into the string.

This sounds very wrong. If you still have issues with it, then I'll try it.

Sorry but I feel that I can not improve this. I will close this pull request now. Feel free to use what I have done.


Add check that each light client block has no skipped blocks

Closes #2
Looking through the tendermint verification, I think this is what we want. Alternatively, we could just check it in the batch so that this light client guest can be re-used for other use cases involving skipping blocks when verifying.
I'll think about this more later, so won't merge yet

closing in favour of #18


No Progress Since 8 Months.. Everything Okay ?????

I havent seen any progress on this project since 8 months.  @jankotek  Everything is fine or not?

I guess it's up to us now to maintain it??

I had some personals troubles, I am back. MapDB 4 update will be today or tomorrow.

I am so glad that you are back. Take care man.

Any news since this blog post on March 14, 2019?


Add test to list OS event details

This adds a simple test that print the system events in a specific scenario. This pr only include a couple scenarios for Unix pipes.
For further discussion in #1087.
/cc @carllerche @asomers

In 0.6, I added some TCP shutdown tests that highlight some of the issues I mentioned.
I think somehow they were never ported to master or got misplaced in the shuffle?

Doesn't seem that pr #944 was ever ported to master.

Logs for some platforms.
MacOS:
TcpStream connected and writable:
	EVFILT_WRITE|EV_ADD|EV_CLEAR|EV_RECEIPT
TcpStream readable:
	EVFILT_READ|EV_ADD|EV_CLEAR|EV_RECEIPT
TcpStream shutdown reading side:
	EVFILT_READ|EV_ADD|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
TcpStream shutdown writing side:
	EVFILT_WRITE|EV_ADD|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
TcpStream shutdown both sides:
	EVFILT_WRITE|EV_ADD|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
	EVFILT_READ|EV_ADD|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
TcpStream remote closed:
	EVFILT_WRITE|EV_ADD|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
	EVFILT_READ|EV_ADD|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS

TcpListener incoming stream:
	EVFILT_READ|EV_ADD|EV_CLEAR|EV_RECEIPT

UdpSocket writable:
	EVFILT_WRITE|EV_ADD|EV_CLEAR|EV_RECEIPT
UdpSocket readable:
	EVFILT_READ|EV_ADD|EV_CLEAR|EV_RECEIPT

Unix pipe sender writable:
	EVFILT_WRITE|EV_ADD|EV_CLEAR|EV_RECEIPT
Unix pipe receiver readable:
	EVFILT_READ|EV_ADD|EV_CLEAR|EV_RECEIPT
Unix pipe sender, receiver closed:
	EVFILT_WRITE|EV_ADD|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
Unix pipe receiver, sender closed:
	EVFILT_READ|EV_ADD|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS

Linux:
TcpStream connected and writable:
	EPOLLOUT
TcpStream readable:
	EPOLLIN
TcpStream shutdown reading side:
	EPOLLIN
TcpStream shutdown writing side:
	EPOLLOUT|EPOLLHUP
TcpStream shutdown both sides:
	EPOLLIN|EPOLLOUT|EPOLLHUP
TcpStream remote closed:
	EPOLLIN|EPOLLOUT|EPOLLHUP

TcpListener incoming stream:
	EPOLLIN

UdpSocket writable:
	EPOLLOUT
UdpSocket readable:
	EPOLLIN

Unix pipe sender writable:
	EPOLLOUT
Unix pipe receiver readable:
	EPOLLIN
Unix pipe sender, receiver closed:
	EPOLLOUT|EPOLLERR
Unix pipe receiver, sender closed:
	EPOLLHUP

FreeBSD:
TcpStream connected and writable:
	EVFILT_WRITE|EV_CLEAR|EV_RECEIPT
TcpStream readable:
	EVFILT_READ|EV_CLEAR|EV_RECEIPT
TcpStream shutdown reading side:
	EVFILT_READ|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
TcpStream shutdown writing side:
	EVFILT_WRITE|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
TcpStream shutdown both sides:
	EVFILT_WRITE|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
	EVFILT_READ|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
TcpStream remote closed:
	EVFILT_WRITE|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
	EVFILT_READ|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS

TcpListener incoming stream:
	EVFILT_READ|EV_CLEAR|EV_RECEIPT

UdpSocket writable:
	EVFILT_WRITE|EV_CLEAR|EV_RECEIPT
UdpSocket readable:
	EVFILT_READ|EV_CLEAR|EV_RECEIPT

Unix pipe sender writable:
	EVFILT_WRITE|EV_CLEAR|EV_RECEIPT
Unix pipe receiver readable:
	EVFILT_READ|EV_CLEAR|EV_RECEIPT
Unix pipe sender, receiver closed:
	EVFILT_WRITE|EV_ONESHOT|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS
Unix pipe receiver, sender closed:
	EVFILT_READ|EV_CLEAR|EV_RECEIPT|EV_EOF|EV_SYSFLAGS

@asomers, @carllerche continuing from the discussion in #1087, lets remove HUP from the name and instead call it disconnected (at least for this discussion). Epoll very inconsistent, while kqueue gives the exact flags you expect, see below.
Event::is_read_disconnected:
epoll:

EPOLLIN (TcpStream shutdown reading side), or
EPOLLIN|EPOLLHUP (TcpStream shutdown both sides, TcpStream remote closed), or
EPOLLHUP (Unix pipe receiver, sender closed).

kqueue (checked on macOS and FreeBSD):

EVFILT_READ|EV_EOF (TcpStream shutdown reading side, TcpStream shutdown both sides, TcpStream remote closed, Unix pipe receiver, sender closed).

Event::is_write_disconnected:
epoll:

EPOLLOUT|EPOLLHUP (TcpStream shutdown writing side, TcpStream shutdown both sides, TcpStream remote closed), or
EPOLLOUT|EPOLLERR (Unix pipe sender, receiver closed).

kqueue (checked on macOS and FreeBSD):

EVFILT_WRITE|EV_EOF (TcpStream shutdown writing side, TcpStream shutdown both sides, TcpStream remote closed, Unix pipe sender, receiver closed).

@carllerche in #1087 you mention that EV_EOF can be set in unexpected scenarios, can you add them to this pr so we can get an idea of what those scenarios are?

I believe for is_read_disconnected, you mean EPOLLRDHUP instead of just EPOLLIN.
My vote is for is_read_eof and is_write_eof.
Re unexpected EV_EOF, I don't have time to write the PR this week (context switching is expensive for me), but I noticed that kqueue would generate EOF events based on syscalls taken on the local machine. So, you call shutdown(...) that resulted in a kqueue event w/ EOF set on the socket.

I believe for is_read_disconnected, you mean EPOLLRDHUP instead of just EPOLLIN.

I took the actual values from what Linux generated, see https://github.com/tokio-rs/mio/pull/1091#issuecomment-535598561. I would expect EPOLLRDHUP as well, but that didn't show in the test.

My vote is for is_read_eof and is_write_eof.

Isn't eof too confusing? I know in Unix everything is a file and all, but "end of stream" or something would be more accurate, especially since Windows doesn't use the everything is a file terminology.

Re unexpected EV_EOF, I don't have time to write the PR this week (context switching is expensive for me), but I noticed that kqueue would generate EOF events based on syscalls taken on the local machine. So, you call shutdown(...) that resulted in a kqueue event w/ EOF set on the socket.
IIRC, if you do shutdown(WRITE), that will result in getting an event EVFILT_WRITE | EV_EOF.

Yes if you call shutdown(Shutdown::Write) you'll get an event with EVFILT_WRITE and EV_EOF see (see https://github.com/tokio-rs/mio/pull/1091#issuecomment-535598561), but that is what we want. The EOF is a bit misleading, but it means (in combination with EVFILT_WRITE) that you can't write any more.

We could do is_write_closed? I don't care that much, i'm happy to go w/ whatever.

I'm ok with is_read_closed and is_write_closed.

@Thomasdezeeuw have you made any progress on is_read_closed/is_write_closed? I'm looking to update Tokio to mio 0.7 soon and I think this is one of the last things that needs to get done for that. If you haven't had the chance yet, I may start working on it if that is okay!

@kleimkuhler I created these tests to see what epoll/kqueue events where created in which scenarios to determine what events should trigger is_read_closed/is_write_closed and haven't been able to spend more time on it since. I was planning on working on it this weekend, but feel free to work on it.

@Thomasdezeeuw Sounds good. I should have some time this week to start working on it.
Meanwhile, this PR of course seems helpful for that. Was it just opened to show the events for each platform, or would you like a quick review as well? I don't see any major blockers on it.

I would like to get this merged in some form, but the code as is is quick
and dirty (e.g. file descriptors aren't closed). But most of these can be
used as tests for is_reaf_closed/is_write_closer after a bit of cleanup.
On Wed, Oct 23, 2019, 20:41 Kevin Leimkuhler<EMAIL_ADDRESS>wrote:

@Thomasdezeeuw https://github.com/Thomasdezeeuw Sounds good. I should
have some time this week to start working on it.
Meanwhile, this PR of course seems helpful for that. Was it just opened to
show the events for each platform, or would you like a quick review as
well? I don't see any major blockers on it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/tokio-rs/mio/pull/1091?email_source=notifications&email_token=AAYDIGEHVNS62MULPQNBXOTQQCLFVA5CNFSM4IYJFDDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECCOTCQ#issuecomment-545581450,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAYDIGGIXCEBUV3VPKIWHFLQQCLFVANCNFSM4IYJFDDA
.

@Thomasdezeeuw I've opened #1110 as a draft PR to show an initial implementation of is_read_close and is_write_close methods on all platforms.
kqueue platforms are fairly straight forward as expected.
epoll platforms require explicit registration of EPOLLRDHUP when registering interest in the socket. Because mio only supports edge triggered notifications this should be expected from reading EPOLLRDHUP documentation.
The main reason this is a draft is because the windows implementation needs to be changed and tests still need to be added. I'd like for this PR to be merged, but it will probably require some more significant changes to use this functionality as part of tests. I may plan on opening a PR against your branch so that this can merge first?

@kleimkuhler I think you're right about EPOLLRDHUP, I've updated my comment above (https://github.com/tokio-rs/mio/pull/1091#issuecomment-535598561).

Closing this as its implemented in #1110.


Exception: Passing policy configuration parameters to agent.train(...) is not supported anymore.

Rasa Core version: 13.3
Python version: 3.6
Operating system (windows, osx, ...): Windows 10
Issue:i have tried to configure the rasa policy to resolve this but no effect so far i am keep getting this error, please help.
Exception: Passing policy configuration parameters to agent.train(...) is not supported anymore. Specify parameters directly in the policy configuration instead. More info https://rasa.com/docs/core/migrations.html
Content of domain file (if used & relevant):
intents:
    - schedule_meeting
    - search_for_meeting
    - greet

entities:
    - meeting
    - time

slots:
    size:
         type: text
    toppings:
        type: text

templates:
    utter_greet:
        - 'Hello, how can I help you?'
        - 'Hi, I am here to help.'
    utter_ask_meeting_day:
        - 'What time would you like me to schedule your meeting?'
    utter_ask_meeting_time:
        - 'What time would you like me to schedule your meeting?'
    utter_get_meeting_time_place:
        - 'here are your meetings for today'
actions:
    - utter_greet
    - utter_ask_meeting_time
    - utter_ask_meeting_day
    - utter_get_meeting_time_place
    - actions.ActionShowMeeting

**Content of dialogue_model.py **
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals

import logging
from rasa_core.agent import Agent
from rasa_core.domain import Domain
from rasa_core.featurizers import MaxHistoryTrackerFeaturizer, BinarySingleStateFeaturizer
from rasa_core.policies.keras_policy import KerasPolicy
from rasa_core.policies.memoization import MemoizationPolicy

if __name__ == '__main__':
    logging.basicConfig(level='INFO')
    dialog_training_data_file = './data/stories.md'
    path_to_model = './models/dialogue'
    # domain = Domain()
    featurizer = MaxHistoryTrackerFeaturizer(BinarySingleStateFeaturizer(), max_history=5)
    agent = Agent('chat_domain.yml',  policies=[MemoizationPolicy(max_history=5),
                        KerasPolicy(featurizer)])

    agent.train(
        dialog_training_data_file,
        augmentation_factor=50,
        max_history=2,
        epochs=500,
        batch_size=10,
        validation_split=0.2)
    agent.persist(path_to_model)

Hi, as the error message says, you have to add policy configuration to the .yml file used to specify policies now, please take a look at our documentation for more info


Fix MY_EXTERNAL_IP_RANGE explanation

Fix MY_EXTERNAL_IP_RANGE explanation by moving it to the correct section

@RicardoNiepel : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off

@ktoliver : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Reduce memory consumption on 32bit python

by running tox -e py39d
================================ leaks summary =================================
tests/test_install.py::test_install[cmd0-linux-desktop-1.2.3-0-197001020304---linux_x64/desktop/tools_qtcreator/Updates.xml-archives0-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nDownloading qt.tools.qtcreator...\\nFinished installation of tools_qtcreator-linux-qt.tools.qtcreator.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [42, 43, 44, 45], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd1-linux-desktop-1.2.3---linux_x64/desktop/tools_qtcreator/Updates.xml-archives1-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nWarning: The command 'tool' is deprecated and marked for removal in a future version of aqt.\\nIn the future, please use the command 'install-tool' instead.\\nDownloading qt.tools.qtcreator...\\nFinished installation of tools_qtcreator-linux-qt.tools.qtcreator.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [52, 53, 54, 55], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd2-windows-desktop-5.14.0-win32_mingw73-mingw73_32-windows_x86/desktop/qt5_5140/Updates.xml-archives2-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nWarning: The command 'install' is deprecated and marked for removal in a future version of aqt.\\nIn the future, please use the command 'install-qt' instead.\\nDownloading qtbase...\\nFinished installation of qtbase-windows-win32_mingw73.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [62, 63, 64, 65], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd3-windows-desktop-5.14.2---windows_x86/desktop/qt5_5142_src_doc_examples/Updates.xml-archives3-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nWarning: The parameter 'target' with value 'desktop' is deprecated and marked for removal in a future version of aqt\\.\\nIn the future, please omit this parameter\\.\\nDownloading qtbase\\.\\.\\.\\nFinished installation of qtbase-everywhere-src-5\\.14\\.2\\.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [72, 73, 74, 75], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd4-windows-desktop-5.14.2---windows_x86/desktop/qt5_5142_src_doc_examples/Updates.xml-archives4-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nDownloading qtbase\\.\\.\\.\\nFinished installation of qtbase-everywhere-src-5\\.14\\.2\\.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [82, 83, 84, 85], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd5-windows-desktop-5.9.0-win32_mingw53-mingw53_32-windows_x86/desktop/qt5_59/Updates.xml-archives5-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nWarning: The command 'install' is deprecated and marked for removal in a future version of aqt.\\nIn the future, please use the command 'install-qt' instead.\\nDownloading qtbase...\\nFinished installation of qtbase-windows-win32_mingw53.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [92, 93, 94, 95], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd6-windows-desktop-5.9.0-win32_mingw53-mingw53_32-windows_x86/desktop/qt5_59/Updates.xml-archives6-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nDownloading qtbase...\\nFinished installation of qtbase-windows-win32_mingw53.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [102, 103, 104, 105], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd7-windows-desktop-5.14.0-win32_mingw73-mingw73_32-windows_x86/desktop/qt5_5140/Updates.xml-archives7-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nDownloading qtbase...\\nFinished installation of qtbase-windows-win32_mingw73.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [112, 113, 114, 115], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd8-windows-desktop-5.14.0-win64_mingw73-mingw73_64-windows_x86/desktop/qt5_5140/Updates.xml-archives8-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nDownloading qtbase...\\nFinished installation of qtbase-windows-win64_mingw73.7z in .*\\nDownloading qtcharts...\\nFinished installation of qtcharts-windows-win64_mingw73.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [122, 123, 124, 125], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd9-windows-desktop-6.2.0-win64_mingw73-mingw73_64-windows_x86/desktop/qt6_620/Updates.xml-archives9-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nDownloading qtlocation...\\nFinished installation of qtlocation-windows-win64_mingw73.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [132, 133, 134, 135], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd10-windows-desktop-6.1.0-win64_mingw81-mingw81_64-windows_x86/desktop/qt6_610/Updates.xml-archives10-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nDownloading qtbase...\\nFinished installation of qtbase-windows-win64_mingw81.7z in .*\\nDownloading qtcharts...\\nFinished installation of qtcharts-windows-win64_mingw81.7z in .*\\nFinished installation\\nTime elapsed: .* second]: leaked references: [142, 143, 144, 145], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install[cmd11-windows-android-6.1.0-android_armv7-android_armv7-windows_x86/android/qt6_610_armv7/Updates.xml-archives11-^aqtinstall\\(aqt\\) v.* on Python 3.*\\nDownloading qtbase...\\nFinished installation of qtbase-windows-android_armv7.7z in .*\\nPatching .*/bin/qmake.bat\\nFinished installation\\nTime elapsed: .* second]: leaked references: [152, 153, 154, 155], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_nonexistent_archives[install-qt windows desktop 5.16.0 win32_mingw73-None-Specified Qt version is unknown: 5.16.0.\nFailed to locate XML data for Qt version '5.16.0'.\n==============================Suggested follow-up:==============================\n* Please use 'aqt list-qt windows desktop' to show versions available.\n]: leaked references: [162, 163, 164, 165], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_nonexistent_archives[install-qt windows desktop 5.15.0 bad_arch-windows-5150-update.xml-Specified target combination is not valid or unknown: windows desktop bad_arch\nThe packages ['qt_base'] were not found while parsing XML of package information!\n==============================Suggested follow-up:==============================\n* Please use 'aqt list-qt windows desktop --arch 5.15.0' to show architectures available.\n]: leaked references: [172, 173, 174, 175], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_nonexistent_archives[install-qt windows desktop 5.15.0 win32_mingw73 -m nonexistent foo-windows-5150-update.xml-Some of specified modules are unknown.\nThe packages ['foo', 'nonexistent', 'qt_base'] were not found while parsing XML of package information!\n==============================Suggested follow-up:==============================\n* Please use 'aqt list-qt windows desktop --arch 5.15.0' to show architectures available.\n* Please use 'aqt list-qt windows desktop --modules 5.15.0 <arch>' to show modules available.\n]: leaked references: [182, 183, 184, 185], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_nonexistent_archives[install-doc windows desktop 5.15.0 -m nonexistent foo-windows-5152-src-doc-example-update.xml-Warning: The parameter 'target' with value 'desktop' is deprecated and marked for removal in a future version of aqt.\nIn the future, please omit this parameter.\nThe packages ['doc', 'foo', 'nonexistent'] were not found while parsing XML of package information!\n==============================Suggested follow-up:==============================\n* Please use 'aqt list-doc windows 5.15.0 --modules' to show modules available.\n]: leaked references: [192, 193, 194, 195], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_nonexistent_archives[install-doc windows 5.15.0 -m nonexistent foo-windows-5152-src-doc-example-update.xml-The packages ['doc', 'foo', 'nonexistent'] were not found while parsing XML of package information!\n==============================Suggested follow-up:==============================\n* Please use 'aqt list-doc windows 5.15.0 --modules' to show modules available.\n]: leaked references: [202, 203, 204, 205], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_nonexistent_archives[install-example windows 5.15.0 -m nonexistent foo-windows-5152-src-doc-example-update.xml-The packages ['examples', 'foo', 'nonexistent'] were not found while parsing XML of package information!\n==============================Suggested follow-up:==============================\n* Please use 'aqt list-example windows 5.15.0 --modules' to show modules available.\n]: leaked references: [212, 213, 214, 215], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_nonexistent_archives[install-tool windows desktop tools_vcredist nonexistent-windows-desktop-tools_vcredist-update.xml-Specified target combination is not valid: windows tools_vcredist nonexistent\nThe package 'nonexistent' was not found while parsing XML of package information!\n==============================Suggested follow-up:==============================\n* Please use 'aqt list-tool windows desktop tools_vcredist' to show tool variants available.\n]: leaked references: [222, 223, 224, 225], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_nonexistent_archives[install-tool windows desktop tools_nonexistent nonexistent-None-Specified target combination is not valid: windows tools_nonexistent nonexistent\nFailed to locate XML data for the tool 'tools_nonexistent'.\n==============================Suggested follow-up:==============================\n* Please use 'aqt list-tool windows desktop' to show tools available.\n]: leaked references: [232, 233, 234, 235], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_nonexistent_archives[install-tool windows desktop tools_nonexistent-None-Failed to locate XML data for the tool 'tools_nonexistent'.\n==============================Suggested follow-up:==============================\n* Please use 'aqt list-tool windows desktop' to check what tools are available.\n]: leaked references: [242, 243, 244, 245], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_pool_exception[RuntimeError()-../aqt/settings.ini-===========================PLEASE FILE A BUG REPORT===========================\nYou have discovered a bug in aqt.\nPlease file a bug report at https://github.com/miurahr/aqtinstall/issues.\nPlease remember to include a copy of this program's output in your report.-254]: leaked references: [252, 253, 254, 255], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_pool_exception[KeyboardInterrupt()-../aqt/settings.ini-Caught KeyboardInterrupt, terminating installer workers\nInstaller halted by keyboard interrupt.-1]: leaked references: [262, 263, 264, 265], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_pool_exception[MemoryError()-../aqt/settings.ini-Caught MemoryError, terminating installer workers\nOut of memory when downloading and extracting archives in parallel.\n==============================Suggested follow-up:==============================\n* Please reduce your 'concurrency' setting (see https://aqtinstall.readthedocs.io/en/stable/configuration.html#configuration)\n* Please try using the '--external' flag to specify an alternate 7z extraction tool (see https://aqtinstall.readthedocs.io/en/latest/cli.html#cmdoption-list-tool-external)-1]: leaked references: [272, 273, 274, 275], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_pool_exception[MemoryError()-data/settings_no_concurrency.ini-Caught MemoryError, terminating installer workers\nOut of memory when downloading and extracting archives.\n==============================Suggested follow-up:==============================\n* Please free up more memory.\n* Please try using the '--external' flag to specify an alternate 7z extraction tool (see https://aqtinstall.readthedocs.io/en/latest/cli.html#cmdoption-list-tool-external)-1]: leaked references: [282, 283, 284, 285], memory blocks: [16, 16, 16, 16]
tests/test_install.py::test_install_installer_archive_extraction_err: leaked references: [292, 293, 294, 295], memory blocks: [16, 16, 16, 16]
===================== 253 deselected, 26 leaked in 59.25s ======================

got leaks.
Signed-off-by: Hiroshi Miura<EMAIL_ADDRESS>

aqtinstall(aqt) v2.0.5.dev2 on Python 3.8.10 [CPython GCC 9.3.0]
Downloading qtdeclarative...
Downloading qtbase...
Downloading qtsvg...
Downloading qttools...
Redirected: ftp.yz.yamagata-u.ac.jp
Redirected: ftp.yz.yamagata-u.ac.jp
Redirected: ftp.yz.yamagata-u.ac.jp
Redirected: ftp.yz.yamagata-u.ac.jp
Finished installation of qtsvg-Linux-RHEL_8_2-GCC-Linux-RHEL_8_2-X86_64.7z in 2.60510967
Downloading qttranslations...
Redirected: ftp.yz.yamagata-u.ac.jp
Finished installation of qttranslations-Linux-RHEL_8_2-GCC-Linux-RHEL_8_2-X86_64.7z in 3.21526386
Downloading qtwayland...
Redirected: ftp.yz.yamagata-u.ac.jp
Finished installation of qtwayland-Linux-RHEL_8_2-GCC-Linux-RHEL_8_2-X86_64.7z in 2.56931843
Downloading icu...
Finished installation of qtbase-Linux-RHEL_8_2-GCC-Linux-RHEL_8_2-X86_64.7z in 10.53259105
Redirected: ftp.yz.yamagata-u.ac.jp
Finished installation of icu-linux-Rhel7.2-x64.7z in 5.68351661
Finished installation of qttools-Linux-RHEL_8_2-GCC-Linux-RHEL_8_2-X86_64.7z in 14.26440995
Finished installation of qtdeclarative-Linux-RHEL_8_2-GCC-Linux-RHEL_8_2-X86_64.7z in 21.55817779
Patching /tmp/6.2.1/gcc_64/bin/qmake
Finished installation
Time elapsed: 23.34612258 second

When running with -E /usr/bin/7z

From par-process analysis,  most  raising of memory consumption are by child process.
aqtinstall use multiprocessing for downloading and extracting of  archives.
There are 7 downloads in 4 child processes. There are also  2 unknown child processes.

When maxtasksperchild=1,

Explicit trigger for garbage collection

Overall after tuning on 64bit

According to fil-profiler, 27% 3.9MB is requests, 13% 1.8MB is bs4, and 13% 1.9MB is py7zr for peak memory usage 14.2MB in main process. 22% 3MB is Cli class.


[AutoPR domainservices/resource-manager] Domain Services Swagger: Fix Put and Patch Domain Service Input

Created to sync https://github.com/Azure/azure-rest-api-specs/pull/4353

This PR has been merged into https://github.com/Azure/azure-sdk-for-go/pull/3225


Molecule tests are broken

Describe the Issue
molecule converge fails due to changes..
Expected Behavior
molecule converge
molecule converge -s localhost
molecule converge -s wsl
Actual Behavior
Authselect breaks the tests due to your assumptions.
Control(s) Affected
What controls are being affected by the issue
All, cannot run RHEL8-CIS in test scenarios.
Environment (please complete the following information):

branch being used: devel
Ansible Version: core 2.16.3
Host Python Version: [e.g. platform-python 3.6.8 ]
Ansible Server Python Version: python version = 3.12.6
Additional Details:

Additional Notes
Anything additional goes here
Possible Solution
Enter a suggested fix here

TASK [RHEL8-CIS : PRELIM | AUDIT | Check authselect package versions | set fact] ***
Monday 25 November 2024  14:39:19 +0000 (0:00:00.012)       0:00:19.807 *******
fatal: [ubi8]: FAILED! => {"msg": "The conditional check 'ansible_facts.packages.authselect[0].version is version(authselect_pkg_version, '>=')' failed. The error was: error while evaluating conditional (ansible_facts.packages.authselect[0].version is version(authselect_pkg_version, '>=')): 'dict object' has no attribute 'authselect'. 'dict object' has no attribute 'authselect'\n\nThe error appears to be in '/home/vagrant/RHEL8-CIS/tasks/prelim.yml': line 204, column 9, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n  block:\n      - name: \"PRELIM | AUDIT | Check authselect package versions | set fact\"\n        ^ here\n"}


Bugfix: check if in 3D mode when loading widget (WIP)

Closes: https://github.com/napari-threedee/napari-threedee/issues/169
Closes: https://github.com/napari-threedee/napari-threedee/issues/170
WIP

wait, still WIP? can you convert to draft?

It works, but if you have a layer in 2D mode, open the widget, then switch to 3D mode auto-activates because of:
https://github.com/napari-threedee/napari-threedee/blob/bf781477db969023891833a6bcc26acea0be1112/src/napari_threedee/manipulators/base_manipulator.py#L297-L302
I'm trying to work a way to not actually instantiate the manipulator from widget if in 2D mode

Hmm, it's not easy to fix and maybe it's OK? Let's see what it looks like that way.

OK, points mania is working, but layer is giving some errors. I'll poke around tomorrow.

So this sort of works, for the simple widgets, like manipulators. Basically check in the init and don't even initialize the model and buttons if 2D. But it's a bit annoying I think to try to generalize and there is some moving of the elements.
I've made a similar alternative: https://github.com/napari-threedee/napari-threedee/pull/239

closing in favor of #239


Drop support for theindex.io

Found here: https://metaboss.rs/snapshot.html#indexed-data
As far as I know that service doesn't exist anymore.

You are correct. I'll add this to the to-do list, thank you!

This was accomplished in the snapshot refactoring a month or so ago.


Move to agile API broke search and potentially other interfaces

It seems this change https://github.com/softprops/goji/pull/20 changed the base url for all endpoints. Some interfaces like search are not supported by the agile API. Let's find a way to accommodate both

I'm using a JIRA instance which doesn't have the agile API, so I have to patch Goji locally in order to be able to even work with my company's JIRA.
We can have an enum to control whether Goji should use agile or api, but if we don't implement any agile specific features, then shouldn't Goji just use api everywhere, and only use agile in the future, when Agile specific features are implemented?

I think where youre going with this. If you have some ideas I'd be up for pull requests I myself only use the default API endpoints so I have less visibility into other jira installations. I'm wondering if it makes sense to export separate interfaces for both. Besides the path do parameters and response structures differ between the two?

Sorry for taking long to respond. I am not the maintainer of JIRA where I work, but I think we also use the default API, we just don't seem to have the agile API ready.
It probably makes sense ti export seperate interfaces for both of them. I just don't know what are the unique methods of the Agile API.


Update update-strategies.md

fixes #295 in response to #292
A bit unsure if this still applies @NekR or it should be removed

With this strategy enabled, index.html (or other files without dynamic name) should be placed in main section of the cache, otherwise they won't be revalidated.

For ServiceWorker this means that only new files will be downloaded and missing files deleted from the cache.
For AppCache it's basically the same as previous strategies since AppCache revalidates all the assets. (HTTP status 304 rule still applies).

@GGAlanSmithee Btw, do you have a vacation of something like that? A lot of docs work today by you :-)

Thanks for the excellent feedback @NekR, I will address it when I get some time.
No vacation :) just some spare time while compiling large C++ project xD

No vacation :) just some spare time while compiling large C++ project xD

Haha, this is how people find time on OSS 😄

@NekR Fixed your comments. Sorry that it took so long 🙇

Looks great, thank you! If something we can just change it later 👍

@NekR thank you


Endpoints with SSL errors

The endpoints https://www.msftconnecttest.com and https://www.msftncsi.com have issues with SSL certificates (ERR_CERT_COMMON_NAME_INVALID).
Are actual connections performed over SSL?
Don't certificates need to be fixed then?
Thanks.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 4273a259-c3c7-dca7-6353-954068d740a7
Version Independent ID: 1084ea77-95c4-4e4a-da6c-f4d8668f9ebf
Content: Enrolling devices in Windows Analytics (Windows 10)
Content Source: windows/deployment/update/windows-analytics-get-started.md
Product: w10
Technology: windows
GitHub Login: @jaimeo
Microsoft Alias: jaimeo

@officedocsbot assign @e0i

Hello, @juanand
The issue is under investigation and you will be notified with any changes on the way.
Thank you for providing feedback.

Hello, @juanand
It has been found that the mentioned domains have never been connected to via SSL, but only HTTP; and that WER is no longer dependent on these endpoints to check connectivity.
The document has thus been updated accordingly via the following commit,
[d23376d] removing two endpoints per Albert
Thank you for bringing this issue to attention.

@officedocsbot close


Adds example command

Title says it all

Looks good! I left a small suggestion which makes clear what the example command actually does.


on login see: googlevoice.util.LoginError

when I try and run the sms.py example, it fails with error <googlevoice.util.LoginError>.
could it be that google has changed the login url?

Same issue for me.

Is this still being actively developed? I can begin looking into this issue tonight.

The way this package is implemented, I don't it'll ever work with application specific passwords as google does not allow you to use those passwords to login to the web google voice site.

http://www.androidpolice.com/2013/11/04/merging-of-google-voice-and-hangouts-will-result-shutting-down-all-3rd-party-voice-apps-in-may-2014/
It appears that this may not work anymore at all, sadly. The Voice API looks like it has been shut down. I wonder if there are alternatives.

I don't think this uses an API. I think this simulates logging in through the browser and sending a text through the web interface. It's a hack :)

That's 100% accurate. This was a hack to basically simulate login and scrape the web UI specifically because there was no API. I found a long-dead version on googlecode in like 2009 and fixed the existing bugs at the time and put it up here. But since then I think google logins have become so much more complicated and changed that the login stuff is now seriously broken. But I don't think the voice UI has changed significantly, so if you're up to it, feel free to make some PRs. But for now, I'm not actively developing this.

On Feb 6, 2015, at 2:05 PM, Nathan Van Gheem<EMAIL_ADDRESS>wrote:
I don't think this uses an API. I think this simulates logging in through the browser and sending a text through the web interface. It's a hack :)
—
Reply to this email directly or view it on GitHub.

Oh, it still works. Just doesn't work with application specific passwords--that was my problem.

So if you have 2-factor auth on the google account you want to interface with, you'll need to do the whole sms auth code thing. Which means, you can't use this library to automate any api level stuff with an application specific generated password.

And the reason it doesn't work with application passwords is a google restraint, not a library one. You simply can't login through the web UI with application passwords.

Whoa, neat! I was unaware. @vangheem, I see what you're saying now. Would it be possible to work with a separate account strictly for your purpose without Two-Factor?

Yes.

I get a LoginError today when I didn't yesterday. Has anything changed?

I can check tonight. Are you using the most recent version from this repository?

Downloaded it yesterday morning, it should be.

Great. I'm travelling right now, so I'm on a lot of different wifi networks. Last night there was a brief period in which logins didn't work on my hotel wifi but did using my phone's service (through the Pythonista iOS app). Now it doesn't work either through my phone or on the airport's wifi, nor from a computer in my house that I access through SSH.

Solved! The issue was in the fact that I was signing in while traveling. The fact that I'm in Houston instead of NY was flagged as "suspicious activity" and therefore as soon as I logged in graphically I was prompted to confirm by entering what city I normally logged in from. This was also likely the difference between hotel wifi and my phone.


Update action_container_image_analyze specs for MiqAction

Currently the specs for action_container_image_analyze violate partial double verification. Specifically, they try to call scan on an object that doesn't actually implement that method. Consequently, these specs are not actually testing anything:
expect(container_image_registry).to receive(:scan).exactly(0).times
We know it's called zero times because if it were called, it would blow up with a NoMethodError. That doesn't really test the internal logic, either.
Looking at the code, we can see that if it's not a ContainerImage then it logs an error and returns. Likewise, even if it is a ContainerImage it will log a warning and return if the event name is "request_containerimage_scan" in order to avoid an infinite loop.
So, I've updated the specs to reflect the actual logic, including policy log messages, including one fix where the wrong argument was being passed. I also changed the outer describe block to RSpec.describe for future compliance with rspec4.

@miq-bot add_label test, refactoring

@miq-bot add_reviewer @moolitayer, @Fryguy

@miq-bot add_reviewer @Fryguy

On a side note, maybe instead of doing a type check, an interface check should be made instead, i.e. does it respond to scan?

@miq-bot add_label changelog/no, hammer/no


Swap Rosenbrock23 for Rodas5 and use StaticArrays

Hey, someone cued me into this benchmark. Rosenbrock23 should only be used for high tolerance problems, so it's not the appropriate algorithm here. It's going to be slow at 1e-8 as the documentation mentions: a better fit would be Rodas5. And for a small problem like that, it's recommended that one uses static arrays. The final time I am seeing is 75μs, but my computer seems a little slower than yours so I would expect somewhat of a difference. Overall nice work but just gotta amend that!

Thanks! I will further update this a bit to reflect rober results with static arrays, and with the analytical jacobian. Looks like Rodas5 + static arrays + analytical jacobian it is a factor of 2 or 3 faster than NumbaLSODA on my computer.

Yeah, the only reason why static arrays are needed here is because OpenBLAS seems slow on these small matrices, making all of the time spent in a triangular solve. So surprisingly your hand-rolled linear solver is beneficial here, and we should finish up a pure Julia BLAS in a few weeks that would remove the need for it but no reason to wait. And the analytical Jacobian was mostly needed because of a small lacking optimization that was just merged (https://github.com/JuliaDiff/SparseDiffTools.jl/pull/143). Overall, fun and useful benchmark that we should return to when the Julia BLAS merges.


Can't fold split window, if folds not ready before splitting

Neovim version (nvim -v | head -n1)
NVIM 0.7.2
Operating system/version
Linux
How to reproduce the issue
cat mini.lua
-- Use Vim packages install the plugin, also work with some plugins manager such as packer.nvim
vim.o.packpath = '~/.local/share/nvim/site'
vim.cmd('packadd promise-async')
vim.cmd('packadd nvim-ufo')

-- Setting
vim.o.foldcolumn = '1'
vim.o.foldlevel = 99
vim.o.foldlevelstart = -1
vim.o.foldenable = true

local ufo = require('ufo')
ufo.setup()
vim.keymap.set('n', 'zR', ufo.openAllFolds)
vim.keymap.set('n', 'zM', ufo.closeAllFolds)

nvim --clean +'so mini.lua'

:edit test.cpp
<C-w>v (should action before folds get created)
zM
<C-w>l
zM

Expected behavior
Both windows can be folded
Actual behavior
The second window don't fold after zM

Can't reproduce. Two windows are folded as expected.

Can't reproduce. Two windows are folded as expected.

I guess you did step 2 too late, otherwise your machine is too fast.
You need to split the window, before it shows the fold column.

Sorry, I omitted the content in the bracket in step2. The behavior is expected for now. The data is based on the buffer, but applying folds is based on the window.
It's hard to fix the issue for ufo. If you have an idea to handle the logic, feel free to share it here.

I think an event emit for WinEnter could be enough.

I think an event emit for WinEnter could be enough.

Actually, I don't think we even need autocmd. I just need it to create fold every time I press zM.

ufo get window by using bufwinid(bufnr). If the two windows are with the same buffer and in the second window currently, bufwinid will give you the first window. And if we change the buffer in second window, and the first window will apply fold.
The real issue is keeping folds consistent for all windows with the same buffer.

I understand that the API bufwinid only returns the first window displaying that buffer. But I don't think it should create folds for all windows with that buffer or keep consistent.
The really important thing is, when I press zM, I need it act. I don't mind it calculate or query folds from language server again.

The really important thing is, when I press zM, I need it act. I don't mind it calculate or query folds from language server again.

Make sense, I will try to fix it.

If the window in 1st step has applied folds, the second window created by vsp will inherit the folds.
If the window in 1st step hasn't applied folds, fire InsertLeave or BufWritePost event will reapply folds.

The second condition is not perfect, but I don't think it's worth spending too much time handling this edge case.

@kevinhwang91 Seems the issue in OP still exists.

The second condition is not perfect, but I don't think it's worth spending too much time handling this edge case.

Type i<Esc>

The second condition is not perfect, but I don't think it's worth spending too much time handling this edge case.

Type i<Esc>
Could zM do the same work?

I mean, could the five steps in OP just work without any other steps to bear in mind?

I mean, could the five steps in OP just work without any other steps to bear in mind?

No, depending on the state of 2nd step. This is an edge case for your workflow. ufo just make multiple windows with the same buffer as normal as possible (Although it is impossible to be perfect). You should use WinEnter to check out whether the windows in the current tabpage with same buffers and do your post action.

open_fold_hl_timeout work fine now.

You should use WinEnter to check out whether the windows in the current tabpage with same buffers and do your post action.

Thanks for your reply.
To be honest, I don't think it's an edge case. Let me make it clear.
In my opinion, closeAllFolds() should always check whether Ufo could but didn't create folds in this window.
For another case(not tested though), when closeAllFolds() is called in a window where the folds are created from indent(fallback), but the language server provider is ready, Ufo should refresh folds from languages server.
To sum up, I think I'm asking for a force-refresh method. Why does it need to manually fire an additional InsertLeave event?


Refrain from using ACIDANTHERA_PRIVATE

Please refrain from using ACIDANTHERA_PRIVATE. It is not private because we are jerks, but because you have to be aware of Lilu internals to use it safely.
Your kext causes a race condition, which may result in bad memory corruptions. The reason for that is that you cannot use symbolic patches outside of patcher context, it will result in crashes that are very hard to debug.
Please do routing on patcher load as suggested here:
https://github.com/acidanthera/RestrictEvents/blob/1.0.6/RestrictEvents/RestrictEvents.cpp#L452

The API is entirely dropped as of Lilu 1.6.0.

@vit9696 Thanks for the suggestion. I'm not good at writing kext / Lilu plugin, so I need some time to learn but I'll try to fix it.

@vit9696 I changed the code like this, but not worked. https://github.com/b00t0x/CpuTopologyRebuild/commit/435de18e85fec868661f14c43079c9b154ab2144
Since x86_validate_topology is called early in the boot before the non-master CPUs start, it looks like the onPatcherLoadForce couldn't route in time.
Any idea to fix this? Or, would you wait to drop this feature until the solution found?

You can declare the x86_validate_topology import like this to solve the symbol with OpenCore:
extern "C" void x86_validate_topology(void)

Afterwards you can patch the method directly like this:
uint8_t patchData[6 + sizeof(uintptr_t)] = {0xFF, 0x25};

void (*fn)(void) = rebuild_cache_topology;
lilu_os_memcpy(&patchData[6], &fn, sizeof(fn));

if (UNLIKELY(MachInfo::setKernelWriting(true, KernelPatcher::kernelWriteLock) != KERN_SUCCESS)) {
	SYSLOG("ctr", "failed to obtain write permissions for f/r");
	return false;
}

lilu_os_memcpy((void *)x86_validate_topology, patchData, sizeof(patchData));

if (UNLIKELY(MachInfo::setKernelWriting(false, KernelPatcher::kernelWriteLock) != KERN_SUCCESS)) {
	SYSLOG("ctr", "failed to restore write permissions for f/r");
}

@vit9696 Thanks for the advice.
I confirmed the solution working and fixed in #5.
Much appreciated!


Any example of mixing QThreadPool and asyncio?

As the title mention. Exactly it do not need to be QThreadPool, I just need a way to dispatch the request I received from the websockets into a thread pool. What is the correct way to do that?
I would like to use QWebSocket and QWebSocketServer directly so I could use the Qt way to handle the events and multi-thread tasks, but QWebSocketServer  of PySide2 do not work with ssl(on windows), you can check this link if you were interested.
ps : I am sure the c++ and python version load the same dll, both of them are Qt5.12.2

Hi, so I was kinda interested in the same topic.
Does this gist solve what you are looking for: https://gist.github.com/Bomberus/0000ef0d56ee0aac285d9e2045452b0b ?

Here is an example using asyncio with QThreadExecutor. For each thread a new event loop is created. If you need to make UI updates, trigger them over main loop.
https://gist.github.com/Bomberus/0000ef0d56ee0aac285d9e2045452b0b

Closing as an example has been provided, thanks @Bomberus


Need timer function inside Chat class

I have been studying how to do this but I have not found a working example. I am using the Chat script to receive messages from a variable number of clients. The messages are synchronized to arrived at about the same time. A timer shall be set or its value recorded on the first message. If after 3 seconds there are no more messages, received messages will be concatenated into one message and sent to a destination client. I think I would like to use either addPeriodicTimer() or addTimer().
For example I found this but it seems out of date. https://github.com/ratchetphp/Ratchet/issues/171
$loop is already defined so I get:
PHP Fatal error:  Uncaught TypeError: Argument 1 passed to MyApp\Chat::__construct() must be an instance of MyApp\React\EventLoop\LoopInterface, instance of React\EventLoop\StreamSelectLoop given, called in /usr/bin/chat-server.php on line 9 and defined in /usr/src/MyApp/Chat.php:40

you are probably using the wrong $loop since it's not an instance of the required interface.
Also, for your usecase addTimer() is probably the right choice.

MyApp\React\EventLoop\LoopInterface should be React\EventLoop\LoopInterface.

I removed the MyApp namespace, moved everything to the base directory, and got around the problem above identified by WyriHaximus. But now when I try to follow the idea given in the #171 above, I have a new problem.
PHP Recoverable fatal error:  Object of class React\EventLoop\StreamSelectLoop could not be converted to string in /root/vendor/cboden/ratchet/src/Ratchet/Server/IoServer.php on line 59
Here is line 59 of IoServer.php. I think my code attempting to insert a timer is interfering with the variable $loop.
       $socket = new Reactor($address . ':' . $port, $loop);
Here is chat-server.php. I have added $loop variable as per example #171
`use Ratchet\Server\IoServer;
//use MyApp\Chat;
require 'Chat.php';
require 'vendor/autoload.php';

    $loop = React\EventLoop\Factory::create();

    $server = IoServer::factory(
        new Chat($loop),
        47870,
        $loop
    );
    $server->run();`

Here are the relevant lines of Chat.php. I added timer code inside __construct()
`//namespace MyApp;
use Ratchet\MessageComponentInterface;
use Ratchet\ConnectionInterface;

require 'vendor/autoload.php';

class Chat implements MessageComponentInterface {

    public function __construct(React\EventLoop\LoopInterface $loop) {
        $loop->addPeriodicTimer(1, function () {
            echo "Tick\n";
        });
        $this->clients = new \SplObjectStorage;
    }`

I solved this by using the example code on
https://prodevsblog.com/questions/158171/how-do-i-use-a-ratchet-server-ioserver-object-after-run-executed/
In chat-server,php I replaced $server = IoServer::factory( and now my code is
    $loop = React\EventLoop\Factory::create();

	$socket = new \React\Socket\Server('[address:port]', $loop);

	$server = new \Ratchet\Server\IoServer(
	    new Chat($loop),
	    $socket,
	    $loop
	);

    $server->run();

In Chat.php __construct is this, where keepTime is my callback function.
    public function __construct(React\EventLoop\LoopInterface $loop) {

        $loop->addPeriodicTimer(1, function (\React\EventLoop\Timer\Timer $timer) {
            $this->keepTime();
        });
        $this->clients = new \SplObjectStorage;
    }

If anything could be done better, please comment.


Can't alter markup plugin

I add this:
Prism.languages.markup.tag.inside['attr-socket'] = /\s*socket=?/i;
Then  hook:
Prism.hooks.add('wrap', (env) => {
      console.log(env.type);

and execute:
 Prism.highlight(doc.documentElement.outerHTML, Prism.languages.html, 'html')
However env.type "attr-socket" is never present in hook calls :/

@Golmote tnx, will try this soon.


Add subcommand to compile list of licenses as JSON

Similarly to license-hound it would be good to have a sub-command that compiles a JSON object containing all of the crates/sources and under which license(s) they are being licensed with according to the user's config.
This JSON output could then be transformed into whatever the user likes through others tools, but the intended use case would be for something like a static HTML page similarly to what Firefox does in about:license

I'm interested to take a look.

Cool!
I need to land #29 first, but the idea after that would be...

Perform a license gather like the check subcommand already does, using the user supplied configuration
For each license requirement that the configuration says the user accepts, add that crate to a list keyed by the license id.
For each unique SPDX license id (note that Apache-2.0 WITH LLVM-exception would be different from Apache-2.0), get the full license text. There are a couple of ways you could do this

Just add reqwest (using rustls) and grab them from https://github.com/spdx/license-list-data
Shell out to git and clone the same repo, grab the texts then nuke the repo
We already store match data for license text in the askalono store which is a part of the binary, but not the full license text. You could update spdx_cache.bin.gz to include the full license text by cloning askalono, and doing cargo run -- cache load-spdx --store datasets/spdx-json && cp askalono-cache.bin.gz ../cargo-deny/spdx_cache.bin.gz and then grabbing the license text by decompressing and deserializing the LicenseEntry::text entry manually.

Serialize each unique license as an object with the full text and an array of objects with the crate name, version, and link to the repository and/or crates.io

This sounds like it could be really helpful, and I can't really find any crates right now that get me this close to generating a NOTICE/Acknowledgements/EULA file, save e.g. cargo-license --json, which still requires some work after that, AFAIK.

Moving this to a separate utility -> https://github.com/EmbarkStudios/cargo-about


Compiled code increase performance by more than 20%

dxcam.cp39-win_amd64.zip

(region shape is 640*640)
You are welcome

Thank you, this pyd is indeed more efficient than the original version, but how you merge multiple .py into one .pyd? I want to compile a pyd myself to use in python 3.7 :)

dxcam_compiled.zip
Compiled version for python 3.7/3.8/3.9/3.10

Could you detail how you compiled these pyd? I tried using nuitka but can't get binaries as fast as yours.
I have been using python -m nuitka --lto=yes --module dxcam --include-package=dxcam. I've tried MinGW and MSVC compilers with and without extra performance options like -march=native for MinGW.


Working examples

Has this library been integrated anywhere? I looked for package dependents, and there aren't any.
As I asked here:

wait, so do I understand correctly, this not only generalizes to different models - it also speeds them up by almost 3 times??

You replied with "affirmative", so I suppose you must have actually tested it?
I'm really eager to see this in action. 😊
(FYI, I'm just a developer, not an ML expert - so in this context, I'm just and end user hoping for a truly useful LLM to help me organize and research details for a project I'm working on.)
Has this technique been implemented anywhere else?

@mindplay-dk Hey perhaps my implementation has not leveraged a 3x speedup but the paper reports a 3x speedup!
I have implemented the speculative decoding
https://github.com/kyegomez/zeta/blob/main/zeta/nn/architecture/auto_regressive_wrapper.py

for zetascale, I see two dependents on libraries.io but apparently they don't list python dependents. do you know that they are?
(btw the zeta website is down.)

are there any projects implementing this yet? (why not?)

@kyegomez any news?
for all the hype this paper received, how come no one is implementing this?
I figured we'd have unbounded context everywhere by now. 😌


how to track milli-seconds elapsed time

currently the player track the state every second of playback, however, I couldn't find a way to track the change every milli-second, so that the playback UI component (slider or UIProgressView for ex.) will update the visual track smoother than a 1 second threshold.

For now you can set player.timeEventFrequency = .everyQuarterSecond and try to animate your progress indicator. Might not achieve exactly what you want, but I will later add a case to TimeEventFrequency where you can pass in a custom CMTime and receive updates as often as you want 👍


Find a certain element node return panic nil

What versions are you running?
$ go list -m github.com/chromedp/chromedp
github.com/chromedp/chromedp v0.7.3
$ google-chrome --version
92.0.4515.107
$ go version
go version go1.16.4 windows/amd64

What did you do? Include clear steps.

	chromedp.ListenTarget(ctx, func(v interface{}) {
		switch ev := v.(type) {
		case *dom.EventChildNodeInserted:
			class, ok := ev.Node.Attribute("class")
			if ok {
				var projects []*cdp.Node
				if err := chromedp.Nodes(class, &projects, chromedp.AtLeast(0)).Do(ctx); err != nil {
					fmt.Println(projects)
				}
			}
		}
	})

What did you expect to see?
I want to get the node and child nodes of an element
What did you see instead?
panic: interface conversion: interface is nil, not cdp.Executor
exception code
panic: interface conversion: interface is nil, not cdp.Executor

goroutine 356 [running]:
github.com/chromedp/cdproto/cdp.ExecutorFromContext(0x183cfc0, 0xc0000e11a0, 0x0, 0x0)
	/go_warehouse/pkg/mod/github.com/chromedp/cdproto@v0.0.0-20210526005521-9e51b9051fd0/cdp/types.go:41 +0x9e
github.com/chromedp/chromedp.(*Selector).Do(0xc000488300, 0x183cfc0, 0xc0000e11a0, 0x0, 0x0)
	/go_warehouse/pkg/mod/github.com/chromedp/chromedp@v0.7.3/query.go:157 +0x6a
octopus/core.(*Crawler).form.func1.1(0xc000620000, 0x183cfc0, 0xc0000e11a0)
	/go_warehouse/src/octopus/core/form.go:82 +0x2ee
created by octopus/core.(*Crawler).form.func1
	/go_warehouse/src/octopus/core/form.go:77 +0xc9

You pass the wrong context to Do. Here is an example that shows how to run  actions in the chromedp.ListenTarget callback:
https://github.com/chromedp/chromedp/blob/b04145ce79fe1919930a241b98a21f872bedb3d1/example_test.go#L324-L335

Your answer is wrong, I need to reopen the question


Contribution

Hi, Jason sorry that I am contacting you via issue I failed to find your email, we talked on fiware community meeting regarding how to add to this list I was representing NgsiConnectorTools. Do you have any information on how to move forward with this list and what is expected from us? You can contact me via email<EMAIL_ADDRESS>and remove this issue since it is more question that problem.
Thanks.

To move forward just fork the repo and open a PR to add something to the list. Its very early days and only the top half of the list is properly formatted, so please follow that section as a guideline.
Thanks.

Dear Jason,
Do you have any news about our PR?
Should we make some additional changes in order for our tool to be included in the list?
Please let us know if anything is needed.
Sorry for contacting you this way.
Thank you.
Best regards,
Marija Borisov

Thanks for the reminder. I've somehow missed the PR request over the holidays.
Now Merged - Fixed by #3


Ensure data collections don't have repeated items

Under some conditions Graph API may return the same item multiple times while traversing the items in a container. Currently this will result in the collection pulling the data for the item multiple times and presenting the item to kopia multiple times which will lead to duplicate items in the backup. Collections should be updated to dedupe items prior to pull data and handing them to kopia
Conditions under which items can be seen multiple times usually involve beginning to traverse the container, modifying an item in the container that has already been seen, and then continuing container traversal

Received bug reports of this causing incremental backups after the one with duplicates to fail because more items are pulled from the base snapshot than expected when merging backup details. Sample error output:
No backups available
Error: 1 error occurred:
        * Failed to run Exchange backup for user<EMAIL_ADDRESS>2 errors occurred:
        * errors prevented the operation from processing
        * merging backup details: incomplete migration of backup details: found 126 of 123 expected items


Generic interface from another project not fully qualified

My setup is like this:
// Project A
namespace A;
public interface Interface<T, U>{}

// Project B
namespace B;
public abstract class BaseClass<T, U, V>
{
    private readonly Interface<T, U> _interface;
    public Class(Interface<T, U> i) => _interface = i;
}

[AutoConstruct]
public sealed class Class : BaseClass<object, int, string>
{
}

Which generates the interface parameter unqualified (Interface<qualifiedName, qualifiedName> instead of global::A.Interface<...>)

Your example doesn't compile properly.

You're not including the namespace in Project B.
You need to add partial to Class

Here's a working example.
// Project A
namespace A;
public interface Interface<T, U>{}

// Project B
using A; // <--- this is missing
namespace B;
public abstract class BaseClass<T, U, V>
{
    private readonly Interface<T, U> _interface;
    public Class(Interface<T, U> i) => _interface = i;
}

[AutoConstruct]
public sealed partial class Class : BaseClass<object, int, string> // <--- this was missing partial
{
}

This test covers your example. https://github.com/distantcam/AutoCtor/blob/main/src/AutoCtor.Tests/Issue73.cs

I did do it in my code, just forgot to type it out here. I might be hitting some other edge case.

Your test is not completely accurate, you might need to simulate separate projects as well. Like a solution with teo projects, a reference from one to the other. I'm not sure if creating a new compilation simulates that completely.
Also note that the project with the interface does not have a reference to the attributes.

What happens if you change the line
public Class(Interface<T, U> i) => _interface = i;
to
public Class(A.Interface<T, U> i) => _interface = i;

See https://github.com/distantcam/AutoCtorIssue73 for a complete example.
Without a more accurate example of what's going wrong there's not much I can do here.


tests

The file test_cb/test_regressions.py should be generalized to take any module (e.g. cb) and generate the tests. The boilerplate should be moved into the test infrastructure.
We should strive to build a clean test infrastructure so that it is easy for developers to run common tests on their modules.

Makes sense, here's a proposed initial interface.
test(genesis_circuit, functional_model)
We can generate the tests based on the functional model, but there's one subtle detail with the configuration logic. There's a sequence of pokes that have to occur before each test to setup the circuit, and the functional_model configuration method needs to be called. We could abstract this into a reusable test component for configurable modules, so maybe something like
test_configurable(genesis_circuit, function_model, config_vectors) and the user has to provide the configuration sequence using the Tester.poke model.

Good catch. Yes, we should write a special version of the test infrastructure that correctly handles configuration.
Maybe something like
test(configuration, genesis_circuit, functional_model)

I propose we use uppercase for acronyms. So connect_box would become CB (not Cb). Similarly, FPGA should not be spelled Fpga.


Add lab on new module system

This lab describes Cryptol's new module system, which has not yet been merged.  To test it requires a workspace in which one can build Cryptol from source and access different Git branches.  With these prerequisites, assuming cryptol-course and cryptol-specs are cloned or downloaded to the same directory, the following should work:
$ cd ~/workspace  # or whatever
$ git clone https://github.com/GaloisInc/cryptol
$ git clone https://github.com/GaloisInc/cryptol-specs
$ git clone https://github.com/weaversa/cryptol-course
$ cd cryptol-course
$ git switch new-module-system
$ cd ../cryptol
$ git switch functors-merge
$ ./cry build
...
$ CRYPTOLPATH=../cryptol-course:../cryptol-specs ./cry run
Cryptol> :m labs::NewModuleSystem::NewModuleSystemAnswers
labs::NewModuleSystem::NewModuleSystemAnswers>

This PR proposes tweaking the suggested lab order for the overall course, swapping in a Module System landing page that comprises two labs: our existing lab for basic Parameterized Modules around the Simon/Speck block ciphers, and another for Cryptol 3's New Module System (interfaces, submodules, etc.) around block cipher modes.  Key Wrapping becomes an optional (but strongly recommended) lab to weave most of the concepts taught in the course in preparation for the Capstone.

On second thought, we should keep Key Wrapping in the recommended path, as Capstone uses material from it and key wrapping is an important concept.


2.6.11 动态参数 无法大小写混合使用

Version
2.6.11
Reproduction link
https://codepen.io/fushengruomengzhang/pen/RwWKpzw
Steps to reproduce

click

var app = new Vue({
 el: '#app',
data:{
attributeName:'href',
url:'www.baidu.com'
}
})

Property or method "attributename" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property

What is expected?
属性可以大小写混合使用
What is actually happening?
大小写字母无法混合使用

It doesn't work when you use template directly in html file. But for example in SFC it works properly. Also you could use the template as a string in JS. See:

https://codepen.io/Jinjiang/pen/eYpgWdL
https://codepen.io/Jinjiang/pen/PoPWmbb

见文档：https://cn.vuejs.org/v2/guide/syntax.html#对动态参数表达式的约束


Make generics work

As of writing the issue, yew-autoprops does not support generics.
Example 1:
#[autoprops_component]
pub fn Example<T: PartialEq + 'static>() -> Html {
    html! {
    }
}

#[function_component]
pub fn App() -> Html {
    html! {
        <Example<u64> />
    }
}

Errors:
struct takes 0 generic arguments but 1 generic argument was supplied

Probable reasons:

The generic clause is ignored altogether, and it is unable to build component struct generated by `#[function_component].
It fails to build Props instance with the supplied generic clause.

Example 2:
#[autoprops_component]
pub fn Example<T: PartialEq + 'static>(t: &T) -> Html {
    html! {
    }
}

#[function_component]
pub fn App() -> Html {
    html! {
        <Example<u64> t={ 0 } />
    }
}

Errors:
cannot find type `T` in this scope

Probable reasons:

Props struct is not supplied with the generic clause, so it does not know about the type T.

Possible solution
This appears to be solvable by copying the generic clause (<T: PartialEq + 'static>) over to both generated component fn (as-is) and generated Props struct (if individual generic parameters are used); as well as copying the clause to the component fn Props param's type, modified to contain only the type names (<T>).
Example 1:
#[derive(PartialEq, Properties)]
pub struct ExampleProps {
    // alternatively, `pub struct ExampleProps<T: PartialEq + 'static>`,
    // but then it would need `#[prop_or_default] pub T: PhantomData<T>` as a hack
}

#[function_component]
pub fn Example<T: PartialEq + 'static>(ExampleProps {}: &ExampleProps) -> Html {
    html! {
    }
}

#[function_component]
pub fn App() -> Html {
    html! {
        <Example<u64> />
    }
}

Example 2:
#[derive(PartialEq, Properties)]
pub struct ExampleProps<T: PartialEq + 'static> {
    t: T,
}

#[function_component]
pub fn Example<T: PartialEq + 'static>(ExampleProps { t }: &ExampleProps<T>) -> Html {
    html! {
    }
}

#[function_component]
pub fn App() -> Html {
    html! {
        <Example<u64> t={ 0 } />
    }
}

Should work in HEAD


Multichain Provider

Fixes #1787
Changes proposed in this PR:

Removing restriction of trusted algorithms needing to be on the same chain
Alorithms from other networks can be added in the edit form and they are also displayed in the trusted algorithms section on the asset detail page.
The asset selector now shows the name of the algorithm in it.

So we need to think carefully through how this is going to work in the UI. The current implementation leads to a fairly poor user experience with a lot of metamask popups, we also can't tell if the user has enough tokens for the transactions to succeed as they will be on different networks.
We also need progress on https://github.com/oceanprotocol/provider/issues/572 before this will actually work.

think we can close this PR since it is related to cross chain compute to data ,  which we are not going to do at the current stage.
We'll reopen it once we'll be working on integrating cross chain compute to data into the ocean-market


Feature Request: Clone transaction

One frequent action I do is swipe my credit card for the metro. For this I tend to just search on my phone on my firefly instances website for the last transaction I did this and then just select to clone it. It would be super great if I could do a similar workflow on a companion app. Filtering old transactions is there, but I would like to be able to hold down on a transaction and get a menu to easily just clone it into a new transaction. When doing this action on a firefly instance it creates a new transaction with all the same information except the date is changed to the current date.
Another addition that could be nice if other people have similar workflows when they are out is to have a page of "frequent transactions" or "favorites" and you can easily pull that page up and clone them into new transactions. Could be the place you buy the same coffee every morning, the bus you take to work, etc. This could be a good addition for a companion app, but I'm not sure how generally applicable this aspect would be.

just updated and it works perfectly thank you @dreautall !


how to work with howlerjs ?

I think there is a way for third party loader to work with resource-loader , but I don't know how to do it , maybe could someone tell me how to make howlerjs work with resource loader as a start point ?

You can load the audio with this module, which will give you an <audio/> element back. You might be able to pass that into howlerjs?
You can also load it via XHR as a blob for use in Web Audio API. You might be able to pass that blob into howlerjs?
hint: I know nothing about howlerjs.

well howlerjs is support url and base64 url , I can use loaded resource to convert to that , but there have decode time , that are not included , in howlerjs it's loaded fires when the sound is loaded and ready to use , and also I load audio it's not give me an audio element , it's give me text , and the resource object's is audio it's false , is there something wrong ?

here's the code I used
PIXI.loader.add([
'assets/audio/sound.mp3',
'assets/images/sprite-com.png',
'assets/images/sprite-p-two.png',
'assets/images/broken.gif',
'assets/images/sprite-p-three.png',
'assets/images/sprite-p-four.png',
'assets/images/sprite-p-five.png',
'assets/images/sprite-brush-face.png',
])
.on('progress',function(loader, resources){
var $pageOne = Zepto('.page.one');
$pageOne.find('.percent').text(loader.progress + '%');
$pageOne.find('.progress-bar').width(loader.progress + '%');
})
.load(function(loader, resources){
changePage('.page.one', '.page.two', pageTwoProcess);
});

You need to tell the library it is audio it needs to load:
PIXI.loader.add([
			{ url: 'assets/audio/sound.mp3', loadType: PIXI.loaders.Resource.LOAD_TYPE.AUDIO },
			'assets/images/sprite-com.png',
			'assets/images/sprite-p-two.png',
			'assets/images/broken.gif',
			'assets/images/sprite-p-three.png',
			'assets/images/sprite-p-four.png',
			'assets/images/sprite-p-five.png',
			'assets/images/sprite-brush-face.png',
		])
		.on('progress',function(loader, resources){
			var $pageOne = Zepto('.page.one');
			$pageOne.find('.percent').text(loader.progress + '%');
			$pageOne.find('.progress-bar').width(loader.progress + '%');
		})
		.load(function(loader, resources){
			changePage('.page.one', '.page.two', pageTwoProcess);
		});

@englercj  resource loader is a very well structured lib after I read the source code , I have a proposal , see if  after load the resource I nedd do some process like audio it's need decode and it's async , so we could use the resource complete event callback , then in that function tell the Loader.prototype._onLoad that the source are really good to go . then change the progress bar ,  I could put a PR if you like , thanks !

I'm honestly not sure what you mean that was pretty difficult to read...


uidProtectedAttributeField

Hi, I was wondering where uidProtectedAttributeField is used and is there a better explination of what it is for?

Hi, the uidProtectedAttributeField is used here. It is meant to be provided when using a top-level driver program like MeasureDatasetFairnessMetrics or MeasureModelFairnessMetrics. If you are using the lower-level APIs, you may not need to make use of this.
LiFT allows users to specify a dataset of interest and another dataset containing just the protected attribute values. In order to join these two datasets, it needs a join key for both datasets. For the dataset of interest, this is given by the uidfield (the 'unique ID field'), and for the protected attribute dataset, this is given by the uidProtectedAttributeField.
For example, if your dataset of interest had the fields (userId, score, label) and the protected attribute dataset had the fields (user_id, gender), uidField would be userId and uidProtectedAttributeField would be user_id.
Hope that helps!


[ISSUE]: It doesn't play anything except the included XRick

Checks

[X] I have checked existing OPL issues for duplicates and found none
[X] I am using either OPL latest stable version, or archived version or OPL beta version

Describe the issue
I can't play any Xbox games, even if I somehow manage to get them to show up in the first place.
Console model
SCPH-79000
OPL version / revision
X2P
In which device(s) have you experienced this issue?
USB
Context and extra information
Why no work?

Oh, its an April Fools Joke! Got 'em!