Bug #2241 : atan2() function and Vector2 method inconsistent x,y / y,x parameters fix

fixed Vector2.atan2()
fixed atan2(x,y) -> atan2(y,x)
WARNING : this fix may provoke many atan2(x,y) uses elsewhere to work badly

Could you please explain more on benefits of your patch? Just curiois.
On Sat, Jul 11, 2015 at 5:06 PM, Julian Murgia<EMAIL_ADDRESS>wrote:

fixed Vector2.atan2()
fixed atan2(x,y) -> atan2(y,x) WARNING : this fix may provoke many
atan2(x,y) uses elsewhere to work badly

You can view, comment on, or merge this pull request online at:
https://github.com/okamstudio/godot/pull/2260
Commit Summary

bug #2241

File Changes

M core/math/math_2d.cpp
https://github.com/okamstudio/godot/pull/2260/files#diff-0 (2)
M modules/gdscript/gd_functions.cpp
https://github.com/okamstudio/godot/pull/2260/files#diff-1 (2)

Patch Links:

https://github.com/okamstudio/godot/pull/2260.patch
https://github.com/okamstudio/godot/pull/2260.diff

—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260.

This patch fixes the bug related in #2241. I can't tell you more about any 'benefit', except if one is interested in keeping misfunctioning atan2 methods in Godot :-)

Ah, now I understand, thanks!
On Sun, Jul 12, 2015 at 10:47 AM, Julian Murgia<EMAIL_ADDRESS>wrote:

This patch fixes the bug related in #2241
https://github.com/okamstudio/godot/issues/2241. I can't tell you more
about any 'benefit', except if one is interested in keeping misfunctioning
atan2 methods in Godot :-)
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-120699268.

I join a simple project to test this bug.
https://dl.dropboxusercontent.com/u/24823778/2241_atan2-bug.zip

This commit breaks get_angle_to() method. Please wait until I figured it out.

Figured it out and fixed in d05f293.
However, the fix in get_angle_to() seems ugly to me as
(get_global_transform().affine_reverse().xform(p_pos))

should directly return the good vector2. Here I had to use a temporary Vector2 to reverse its components...
Maybe some smarter (thus cuter) solution exists ?

Also,  in Isometric2d + Lighting demo project, cubio.gd:65 line needs to be modified from :
var angle = atan2(abs(speed.x), speed.y)

to :
var angle = atan2(speed.y, abs(speed.x))

Note : the syntax of atan2() function is now atan2(y, x), respectfully to the standard Math function. Documentation needs to be corrected.

Nice catch. I confirm that without this PR, Vector2.angle_to(Vector2) is bugged, as this example from my game shows:
   print("mot ", motion)
   print("dir ", bomb.slide_dir)
   print("angle ", motion.angle_to(bomb.slide_dir))

Example output:
mot -2.666667,0
dir 0,0
angle 0

I built the current PR, and it does not seem to work right, see this code snippet:
	var xplus = Vector2(1,0)
	var xminus = Vector2(-1,0)
	var yplus = Vector2(0,1)
	var yminus = Vector2(0,1)
	var xyplus = Vector2(1,1)
	print(xplus.angle_to(xminus)) # pi
	print(yplus.angle_to(yminus)) # pi
	print(xplus.angle_to(yminus)) # pi/2
	print(xplus.angle_to(xyplus)) # -pi/4 or 7pi/4
	print(xplus.angle_to(xplus))  # 0

It gives:
-1.570796
1.570796
3.141593
2.356194
1.570796

There seems to be some pi/2 offset, unless I'm wrong with my math :)

It also seems to break games such as e.g. the recent https://github.com/Calinou/libre-pinball (with the PR, the paddles don't work properly anymore)

@akien-mga Thanks for reviewing. I corrected the problem (commit fc93ddf)

I'll try it asap.

My test script from above now gives the following, which seems good:
-3.141593
0
-1.570796
-0.785398
0

I'm still getting a weird behaviour with https://github.com/Calinou/libre-pinball (feel free to test it too to see if it might be related to your PR), but it could be because your branch is not in sync with the current git master. I'll see how it behaves if I apply your PR on top of HEAD.

I too have weird behaviours on collisions between KinematicBodies2D.
I don't think it is related to this branch not being sync (I created a second branch on my repo which is in sync, but the bug is present).
This seems to be related in the collisions resolution that probably uses the wrong version of atan() or angle_to() or even get_angle_to(). I'll check this now.

@akien-mga Ok, I think I corrected the problem for good. Feel free to test again.
However, I feel this fix may also impact other applications, still I tested multiple Godot demos projects and I did't remark any new problem... We'll have to wait for reduz to comment here.

I've tested this PR again, and it seems to work just fine. I checked the demos in 040c117 and I confirm that they work properly too.
@StraToN To be sure the change introduces no regression, I'd advise you to check all references to "atan2" in the code base. See e.g.:
$ ack -l atan2
bin/godot.javascript.opt.js
scene/3d/character_camera.cpp
scene/resources/shader_graph.cpp
scene/2d/node_2d.cpp
scene/2d/path_2d.cpp
scene/2d/ray_cast_2d.cpp
tmp/godot.js
tools/editor/spatial_editor_gizmos.cpp
tools/editor/plugins/editor_preview_plugins.cpp
tools/editor/plugins/canvas_item_editor_plugin.cpp
tools/editor/plugins/baked_light_baker.cpp
tools/editor/plugins/spatial_editor_plugin.cpp
tools/editor/io_plugins/editor_scene_import_plugin.cpp
drivers/mpc/mpcmath.h
drivers/squish/maths.cpp
drivers/gles2/shader_compiler_gles2.cpp
core/variant_call.cpp
core/math/math_funcs.cpp
core/math/matrix3.cpp
core/math/math_2d.h
core/math/math_funcs.h
core/math/geometry.h
core/math/quat.cpp
core/math/math_2d.cpp
a.out.js
servers/physics_2d/body_2d_sw.cpp
servers/visual/shader_language.cpp
servers/physics/joints/generic_6dof_joint_sw.cpp
servers/physics/joints/slider_joint_sw.cpp
servers/physics/joints/hinge_joint_sw.cpp
servers/physics/joints/cone_twist_joint_sw.cpp
modules/gdscript/gd_functions.cpp
demos/3d/platformer/player.gd
demos/2d/isometric_light/cubio.gd
doc/core_classes.xml
doc/squirrel.lyx
doc/base/classes.xml
<EMAIL_ADDRESS>doc/html/tutorial01/tutorial.html

@akien-mga Very nice.
I already previously checked for other references to atan2, however a certain number do not correspond to the same atan2 definition that was fixed here. Example : drivers/mpc/mpc_types.h
In many other cases, Math::atan2 is directly called, not its override that was fixed here (assuming that Math::atan2 is already correct, of course, I just hope it is, haha)

I already previously checked for other references to atan2, however a certain number do not correspond to the same atan2 definition that was fixed here. Example : drivers/mpc/mpc_types.h

Indeed, I just gave the full list quickly because I did not have the time to check it myself, but I expect many of them to indeed refer ton non-Godot implemented atan2.

I think Vector2::atant2() needs to be fixed. However, regular atan2() function should be left as is, just swap the argument names.. this way code written other libraries can be ported adequately without unexpected consequences.

I think Vector2::atant2() needs to be fixed.

Indeed, that would remove the need for the hack in 31eb2d4.

angle_to and other functions do not need to be modified IMO.  Even though
atan2() arguments are y,x, it's really up to you to interpret where a
rotation begins from.  In fact, I believe the correct fix would be
something like:

Just leave Math::atan2() as is, simply swap the argument names in the
description.
Vector2::atan2() should be refactored to Vector2::angle() and replaced
in code and demos
Vector2::atan2() should be then added again (maybe after a month, so we
make sure people making projects will fix them)  with swapped axis passed
as parameters

what do you think?
On Wed, Sep 23, 2015 at 12:08 PM, Juan Linietsky<EMAIL_ADDRESS>wrote:

I think Vector2::atant2() needs to be fixed. However, regular atan2()
function should be left as is, just swap the argument names.. this way code
written other libraries can be ported adequately without unexpected
consequences.
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-142633307.

--
OkamStudio

/me likes the idea
On Wed, Sep 23, 2015 at 6:19 PM, Okam Studio<EMAIL_ADDRESS>wrote:

angle_to and other functions do not need to be modified IMO. Even though
atan2() arguments are y,x, it's really up to you to interpret where a
rotation begins from. In fact, I believe the correct fix would be
something like:

Just leave Math::atan2() as is, simply swap the argument names in the
description.
Vector2::atan2() should be refactored to Vector2::angle() and replaced
in code and demos
Vector2::atan2() should be then added again (maybe after a month, so we
make sure people making projects will fix them) with swapped axis passed
as parameters

what do you think?
On Wed, Sep 23, 2015 at 12:08 PM, Juan Linietsky<EMAIL_ADDRESS>
wrote:

I think Vector2::atant2() needs to be fixed. However, regular atan2()
function should be left as is, just swap the argument names.. this way
code
written other libraries can be ported adequately without unexpected
consequences.
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-142633307.

--
OkamStudio
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-142637290.

I am confused. You advise at first not fixing anything about the bug, but rename Vector2.atan2() to Vector2.angle() ? So Vector2.angle() will still return a wrong value, right ?
And after 1 month, re-add fixed Vector2.atan2() ? What will Vector2.angle() become then ?
Just another remark : when correcting core/math/math_2d.cpp:34
real_t Vector2::atan2() const {
	return Math::atan2(x,y);
}

to
real_t Vector2::atan2() const {
	return Math::atan2(y,x);
}

Vector2.look_at() and Vector2.get_angle_to() return false values, breaking many demos such as the Look At Pointer demo and the Kinematic Collision demo. Read commit messages, this was explained.

The value is not "wrong". I just prefer rotations start in the y axis
because it's more straightforward to visualize. What is wrong is just atan2
returning a nonstandard value
On Sep 23, 2015 9:27 PM, "Julian Murgia"<EMAIL_ADDRESS>wrote:

I am confused. You advise at first not fixing anything about the bug, but
rename Vector2.atan2() to Vector2.angle() ? So Vector2.angle() will still
return a wrong value, right ?
And after 1 month, re-add fixed Vector2.atan2() ? What will
Vector2.angle() become then ?
Just another remark : when correcting core/math/math_2d.cpp:34
real_t Vector2::atan2() const {
return Math::atan2(x,y);
}
to
real_t Vector2::atan2() const {
return Math::atan2(y,x);
}
Vector2.look_at() and Vector2.get_angle_to() return false values, breaking
many demos such as the Look At Pointer demo and the Kinematic Collision
demo. Read commit messages, this was explained.
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-142767962.

ok, clarifying because you asked on IRC then left :)
using the function as atan2(x,y): Angle zero is in Y-up and goes clockwise
using the function as atan2(y,x): Angle zero is in X-right and goes
counterclockwise
Using atan(x,y) is way easier to visualize because it just goes like a
clock, so all code in Godot assumes it this way, including the function to
get the angle. If you check, all rotations in Godot are standardized as
clockwise, so Vector2::atan2() also returns a clockwise value. The problem
is that, as noted, the function is passing x to y and y to x, and this
shouldn't be expected. So, the proposed solution is to simply use an
angle() or get_rotation() function that passes the swapped axes, and leave
atan2 (which isn't really used anywhere as an atan2() function in Godot and
demos, but just as a means to get rotation) out for a while so everyone
that is using it can change the code and fix it. Otherwise just swapping
the axes will make a lot of code instantly not work without reason.
On Thu, Sep 24, 2015 at 12:01 AM, Juan Linietsky<EMAIL_ADDRESS>wrote:

The value is not "wrong". I just prefer rotations start in the y axis
because it's more straightforward to visualize. What is wrong is just atan2
returning a nonstandard value
On Sep 23, 2015 9:27 PM, "Julian Murgia"<EMAIL_ADDRESS>wrote:

I am confused. You advise at first not fixing anything about the bug, but
rename Vector2.atan2() to Vector2.angle() ? So Vector2.angle() will still
return a wrong value, right ?
And after 1 month, re-add fixed Vector2.atan2() ? What will
Vector2.angle() become then ?
Just another remark : when correcting core/math/math_2d.cpp:34
real_t Vector2::atan2() const {
return Math::atan2(x,y);
}
to
real_t Vector2::atan2() const {
return Math::atan2(y,x);
}
Vector2.look_at() and Vector2.get_angle_to() return false values,
breaking
many demos such as the Look At Pointer demo and the Kinematic Collision
demo. Read commit messages, this was explained.
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-142767962.

—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-142790131.

--
OkamStudio

Using atan(x,y) is way easier to visualize because it just goes like a clock, so all code in Godot assumes it this way, including the function to get the angle.

This definitely needs to be better documented then. For me it's way more natural when doing mathematical operations on vectors to have angles counted counter-clockwise from Vector2(1,0). I could expect helper functions like "angle" to behave otherwise, but I would expect anything labelled as "Math" to behave like the math we learn in school.

@okamstudio Thanks a LOT for your precisions, it is indeed clearer now.
I have to agree with @akien-mga . The reason of my confusing was that clockwise way to think. I admit it can be easier to beginners to think that way, but I wonder if even the most beginner of beginners thinks that way. Even him should at least have the minimum mathematical knowledge to understand why counter-clockwise exists. As akien-mga precised, counter-clockwise way is simply what we learn at school.
Or, I propose another solution : both ! Simply consider in one hand angle() in degrees from -180° to 180°, clockwise like @reduz and @okamstudio proposed, and in the other hand atan2() in radians, counter-clockwise from -PI to PI. This way, anyone can use the one that fits his own mind.

Degrees are not that good for real world math, I'd vote for radians, which
you can
always convert to degrees if you want to.
On Thu, Sep 24, 2015 at 10:54 AM, Julian Murgia<EMAIL_ADDRESS>wrote:

@okamstudio https://github.com/okamstudio Thanks a LOT for your
precisions, it is indeed clearer now.
I have to agree with @akien-mga https://github.com/akien-mga . The
reason of my confusing was that clockwise way to think. I admit it can be
easier to beginners to think that way, but I wonder if even the most
beginner of beginners thinks that way. Even him should at least have the
minimum mathematical knowledge to understand why counter-clockwise exists.
As akien-mga precised, counter-clockwise way is simply what we learn at
school.
Or, I propose another solution : both ! Simply consider in one hand
angle() in degrees from -180° to 180°, clockwise like @reduz
https://github.com/reduz and @okamstudio https://github.com/okamstudio
proposed, and in the other hand atan2() in radians, counter-clockwise from
-PI to PI. This way, anyone can use the one that fits his own mind.
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-142845003.

Degrees are not that good for real world math, I'd vote for radians

Indeed, and if there are two different atan2() and angle() functions with different conventions, they should both give radians, else it would add up to the already non-negligible confusion.
More generally, though I agree that going clockwise from (0,1) is easy to conceptualize for anyone that knows how to read a clock, as far as math is concerned (and game dev is a lot of math), I find it highly misleading. And if we were to rename the current atan2() to angle(), to then reintroduce an atan2() than respects math convention... I'm not sure it would make it clearer. What the function does should be self-explanatory just by its name, and "angle" does not give an indication whether it's a trigonometric (counter-clockwise from (0,1)) or "clock" angle.
I'd propose to adopt everywhere the math convention that most game devs should be familiar with (what do other engines or libraries do in this regards btw?), or rename the current atan2() to something self-explanatory like clockwise_angle().
Another issue is e.g. how to understand angle_to? Will it give -pi/2 or +pi/2 for Vector2(0,1).angle_to(Vector2(1,0))? In the math world it should be +pi/2, and I guess that's what most users would expect I guess.
One thing that does speak in favour of the current behaviour is that the viewport base system is "flipped" with regard to typical math conventions (i.e. the Y axis points downwards instead of upwards), so that could justify using a different convention for the angle measurement direction.

@StraToN, @akien-mga: That's interesting, I no longer remembered there was a school convention for angles in trigonometry (wonder if it's universal?).  To me it always worked the way I described because it's naturally what you get with [sin(angle), cos(angle)] as the normal way of drawing circles. (Guess it has to do with the fact I learned visual programming before learning trigonometry at school :P)
In any case I suppose it does not change much, the convention in Godot is simply that rotations (from the UI to functions) are clockwise. This is likely not apparent because in the 2D engine the Y axis is flipped anyway so they go counter clockwise :D
In any case, I suppose this then has to be simply documented in the few rotation functions in Matrix32, Matrix3, Transform and Vector2

That's interesting, I no longer remembered there was a school convention for angles in trigonometry (wonder if it's universal?).

https://en.wikipedia.org/wiki/Trigonometric_functions#/media/File:Unit_circle_angles_color.svg
Angles start at 0 on (1,0), then go counterclockwise up to 2pi (modulo 2pi). If going clockwise from (1,0), then angles are negative down to -2pi (modulo 2pi).
And the trigonometric circle is actually described by [cos(angle), sin(angle)] when using the proper definition :) https://en.wikipedia.org/wiki/Unit_circle
cos is on the X axis, sin on the Y axis.

Guess it shows how much I used trigonometry before moving to linear
algebra. We can say that Godot is inspired by Le Corbusier and aims to
apply a human scale factor to it's usability, such just like clocks and
knobs.
What I find kind of funny is that no one even noticed this so far. I
checked the code and the 3D classes use the standard convention so they
need no commenting, The only place where clockwise is used is in Matrix32
and Vector2, so I suppose this should be documented and that's it.
On Thu, Sep 24, 2015 at 9:45 AM, Rémi Verschelde<EMAIL_ADDRESS>wrote:

That's interesting, I no longer remembered there was a school convention
for angles in trigonometry (wonder if it's universal?).
https://en.wikipedia.org/wiki/Trigonometric_functions#/media/File:Unit_circle_angles_color.svg
Angles start at 0 on (1,0), then go counterclockwise up to 2pi (modulo 2pi).
If going clockwise from (1,0), then angles are negative down to -2pi
(modulo 2pi).
And the trigonometric circle is actually described by [cos(angle),
sin(angle)] when using the proper definition :)
https://en.wikipedia.org/wiki/Unit_circle
cos is on the X axis, sin on the Y axis.
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-142917437.

I just tried to find out (at a guess, no pen nor paper) values that atan2(x,y) should return according to what @reduz wants, I just failed.
Will be very difficult for me to use atan2() function in Godot, I can predict. I'll surely define my own atan2() function in my scripts. Until then, I am completely lost between changes to bring or not to these :

Math::atan2(x,y)
Vector2::atan2()
Vector2::angle_to() --> is broken if Vector::atan2() changes
Vector2::get_angle_to() --> same

I am far too much used to anti-clockwise, horizontal axis related way to think.

Will be very difficult for me to use atan2() function in Godot, I can predict. I'll surely define my own

Wait, hold on, you are blowing it our of proportion :P let me be clear on what the changes will be:

Math::atan2(y,x) will work as always
Vector2::atan2() will work as you intend it to, too
angle_to() and get_angle_to() are relative, so just negate the output if you want counter clockwise.

You are also still getting counter clockwise rotation already, because of the Y axis is flipped in 2D. That already should be a bigger change of convention to you..

@reduz I reverted the last changes in my local workspace, so that the only change left is :
--- a/core/math/math_2d.cpp
+++ b/core/math/math_2d.cpp
@@ -31,7 +31,7 @@

 real_t Vector2::atan2() const {

-       return Math::atan2(x,y);
+       return Math::atan2(y,x);
 }

Here is what the my test script outputs, it seems correct to me. Could you please confirm ?
x,y			Vector2.atan2()			Expected
1,0			0			0
1,1			0.785398			0.785398
0,1			1.570796			1.570796
-1,1			2.356194			2.356194
-1,0			3.141593			3.141593
-1,-1			-2.356194			-2.356194
0,-1			-1.570796			-1.570796
1,-1			-0.785398			-0.785398

x,y			atan2(x,y)			Expected (standard)
1,0			1.570796			0
1,1			0.785398			0.785398
0,1			0				1.570796
-1,1			-0.785398			2.356194
-1,0			-1.570796			3.141593
-1,-1			-2.356194			-2.356194
0,-1			3.141593			-1.570796
1,-1			2.356194			-0.785398

x,y			atan2(y,x) value			Expected (standard)
1,0			1.570796			0
1,1			0.785398			0.785398
0,1			1.570796			1.570796
-1,1			2.356194			2.356194
-1,0			3.141593			3.141593
-1,-1			-2.356194			-2.356194
0,-1			-1.570796			-1.570796
1,-1			-0.785398			-0.785398

xplus	xminus	yplus	yminus	xyplus
1,0			-1,0			0,1			0,-1			1,1

xplus.angle_to(xminus)	-3.141593
yplus.angle_to(yminus)	3.141593
xplus.angle_to(yminus)	1.570796
xplus.angle_to(xyplus)	-0.785398
xplus.angle_to(xminus)	0

However now, LookAt demo is broken :

which is why atan2 will be changed to get_rotation()
On Thu, Sep 24, 2015 at 9:49 PM, Julian Murgia<EMAIL_ADDRESS>wrote:

@reduz https://github.com/reduz I reverted the last changes in my local
workspace, so that the only change left is :
--- a/core/math/math_2d.cpp
+++ b/core/math/math_2d.cpp
@@ -31,7 +31,7 @@
real_t Vector2::atan2() const {

  return Math::atan2(x,y);

  return Math::atan2(y,x);

}
Here is what the my test script outputs, it seems correct to me. Could you
please confirm ?
x,y         Vector2.atan2()         Expected
1,0         0           0
1,1         0.785398            0.785398
0,1         1.570796            1.570796
-1,1            2.356194            2.356194
-1,0            3.141593            3.141593
-1,-1           -2.356194           -2.356194
0,-1            -1.570796           -1.570796
1,-1            -0.785398           -0.785398
x,y         atan2(x,y)          Expected (standard)
1,0         1.570796            0
1,1         0.785398            0.785398
0,1         0               1.570796
-1,1            -0.785398           2.356194
-1,0            -1.570796           3.141593
-1,-1           -2.356194           -2.356194
0,-1            3.141593            -1.570796
1,-1            2.356194            -0.785398
x,y         atan2(y,x) value            Expected (standard)
1,0         1.570796            0
1,1         0.785398            0.785398
0,1         1.570796            1.570796
-1,1            2.356194            2.356194
-1,0            3.141593            3.141593
-1,-1           -2.356194           -2.356194
0,-1            -1.570796           -1.570796
1,-1            -0.785398           -0.785398
xplus   xminus  yplus   yminus  xyplus
1,0         -1,0            0,1         0,-1            1,1
xplus.angle_to(xminus)  -3.141593
yplus.angle_to(yminus)  3.141593
xplus.angle_to(yminus)  1.570796
xplus.angle_to(xyplus)  -0.785398
xplus.angle_to(xminus)  0
However now, LookAt demo is broken :
[image: recorded]
https://cloud.githubusercontent.com/assets/1289207/10090458/f0fa5298-632f-11e5-89dc-dcdf24ba66ba.gif
—
Reply to this email directly or view it on GitHub
https://github.com/okamstudio/godot/pull/2260#issuecomment-143091886.

@reduz The bug illustrated above is caused by Node2d.get_angle_to() which I give here :
float Node2D::get_angle_to(const Vector2& p_pos) const {
	return (get_global_transform().affine_inverse().xform(p_pos)).atan2();
}

The fact is that I changed Vector2.atan2() from this :
real_t Vector2::atan2() const {
	return Math::atan2(x,y);
}

to this :
real_t Vector2::atan2() const {
	return Math::atan2(y,x);
}

according to Math::atan2() definition (unchanged, I didn't touch it) :
double Math::atan2(double p_y, double p_x) {
	return ::atan2(p_y,p_x);
}

Therefore, Node2D::get_angle_to() does not return the same value as before because of (get_global_transform().affine_inverse().xform(p_pos)). In this PR, I tried to inverse the xform vector using some dirty hack (d05f293).

@StraToN because godot rotations are clockwise you can't use atan2() in that code. This is why, as said before, atan2() will be wiped from all the engine code and replaced by an angle() function

@StraToN because godot rotations are clockwise you can't use atan2() in that code. This is why, as said before, Vector2.atan2() will be wiped from all the engine code and demos and replaced by an angle() function

I understood ;) (we just talked about it on IRC). I don't intend to touch Math::atan2() which already works fine to me, but Vector2.atan2() which doesn't.
Renaming Vector2.atan2() to Vector2.angle() is a good idea, it will help us differentiating these 2 methods, as we lost a lot of time misunderstanding each other which method we are talking about :)

Where do we stand on this PR again? :)


Branched mvn

The MultivariateCoupledNormal class has had its sampling and prob functions worked on to support batches, as well as the importance_sampling_integrator and _norm family of entropy functions. These are contained in the nsc-test folder.

Have pushed these changes in.


=akka update akka-http version to 10.2.9

update akka-http version to 10.2.9

refs：https://doc.akka.io/docs/akka-http/current/release-notes/10.2.x.html#10-2-9


liquid haskell can't find module

While trying to use liquidhaskell on the following simple Haskell program:
import qualified Data.Text.Lazy as L

main = print $ L.unpack $ L.pack "test"

I am running into the following error:
$ liquid -v test.hs
LiquidHaskell Copyright 2009-14 Regents of the University of California. All Rights Reserved.

Warning: Couldn't do create temp directory: ./.liquid: createDirectory: already exists (File exists)
parseSpec: test.hs
paths = ["/home/wizeman/tmp","/nix/store/hnk52pzwmxbc37kmdph07bwngk46vv3g-haskell-liquidhaskell-<IP_ADDRESS>/share/x86_64-linux-ghc-7.8.4/liquidhaskell-<IP_ADDRESS>/include/"]

**** DONE:  annotate ***********************************************************

**** ERROR: Invalid Source *****************************************************

 test.hs:1:18-31: Error: GHC Error
     Could not find module ‘Data.Text.Lazy’
Perhaps you meant
  Data.Map.Lazy (from containers-<IP_ADDRESS>)
  Data.STRef.Lazy (from base)
Use -v to see a list of the files searched for.

... while simply using ghc works fine:
$ ghc test.hs
[1 of 1] Compiling Main             ( test.hs, test.o )
Linking test ...
./

Any ideas?

Hmm, I suspect the liquid binary needs to be wrapped similarly to ghc so the search paths are set correctly.

As a temporary workaround, try setting
NIX_GHC_LIBDIR=$HOME/.nix-profile/lib/ghc-7.8.4

in your environment.

@gridaphobe I only have a manifest.nix file in $HOME/.nix-profile, but based on your suggestion I came up with this command instead:
(eval "$(grep "export NIX_GHC_LIBDIR" $(which ghc))" && liquid test.hs)
... which seems to work for me.
Thanks!

@wizeman, you should add the following snippet to your ~/.bashrc:
if [ -e ~/.nix-profile/bin/ghc ]; then
  export NIX_GHC="$HOME/.nix-profile/bin/ghc"
  export NIX_GHCPKG="$HOME/.nix-profile/bin/ghc-pkg"
  export NIX_GHC_DOCDIR="$HOME/.nix-profile/share/doc/ghc/html"
  export NIX_GHC_LIBDIR="$HOME/.nix-profile/lib/ghc-$($NIX_GHC --numeric-version)"
fi

@peti Why do I need to do that?
As I said, I don't have anything in ~/.nix-profile (except a manifest.nix file, for some reason), not even when I'm inside a nix-shell.

The $HOME/.nix-profile/bin/ bit needs to be adapted to whatever location your compiler is installed at. The point is that `$NIX_GHC" et al must be defined and must point to valid locations, otherwise your installation won't work properly.


for UITableVIewScroll crash

Describe the bug

I have added CoachMarkControllerDataSource for UITableview which have 5 static cell. I can see visible cells, but crashing for not visible cells. Any thoughts.
To Reproduce

Expected behavior

Screenshots

Environment

Device:
iOS version:
Instructions version:
Dependency Manager:

Additional context

Hello @muga87, sorry for the late response.
I would need a lot more information to be able to help you. Maybe these searches can hep you:
https://github.com/ephread/Instructions/issues?q=is%3Aissue+tableview+
https://github.com/ephread/Instructions/issues?q=is%3Aissue+table+view+

Closing due to inactivity.


SPARK-12948. [SQL]. Consider reducing size of broadcasts in OrcRelation

Size of broadcasted data in OrcRelation was significantly higher when running query with large number of partitions (e.g TPC-DS). And it has an impact on the job runtime. This would be more evident when there is large number of partitions/splits. Profiler snapshot is attached in SPARK-12948 (https://issues.apache.org/jira/secure/attachment/12783513/SPARK-12948_cpuProf.png).

Can one of the admins verify this patch?

Can you add more description to explain how this patch reduces the size of broadcasts? The change isn't obvious to me at first glance, so one or two sentences of description would help me and other reviewers who aren't as familiar with this corner of the code.

Usecase: User tries to map the dataset which is partitioned (e.g TPC-DS dataset at 200 GB scale) & runs a query in spark-shell.
E.g
...
val o_store_sales = sqlContext.read.format("orc").load("/tmp/spark_tpcds_bin_partitioned_orc_200/store_sales")
o_store_sales.registerTempTable("o_store_sales")
..
sqlContext.sql("SELECT..").show();
...
When this is executed, OrcRelation creates Config objects for every partition (Ref: OrcRelation.execute()). In the case of TPC-DS, it generates 1826 partitions. This info is broadcasted in DAGScheduler#submitMissingTasks().  As a part of this, the configurations created for 1826 partitions are also streamed through (i.e embedded in HadoopMapParitionsWithSplitRDD -->f()--> wrappedConf).  Each of these configuration takes around 251 KB per partition.  Please refer to the profiler snapshot attached in the JIRA (mem_snap_shot). This causes quite a bit of delay in the overall job runtime.
Patch reuses the already broadcastedconf from SparkContext.  fillObject() function is executed later for every partition, which internally sets up any additional config details. This drastically reduces the amount of payload that is broadcasted and helps in reducing the overall job runtime.

@JoshRosen - Please let me know if my latest comment on the usecase addresses your question. Can you.

may be worth a holistic design review because I think there are some hacks in Spark SQL to address this problem there and it would be nice to have a unified solution for this

Can you plz provide more details/pointers on this?

Test build #57670 has started for PR 10861 at commit 4da7a22.

Test build #57670 has finished for PR 10861 at commit 4da7a22.

This patch fails Scala style tests.
This patch does not merge cleanly.
This patch adds no public classes.

Build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/57670/
Test FAILed.

Hi @rajeshbalamohan, I think this should be a mergeable state at least and the conflicts and style issues should be resolved. Would you be able to update this for now?

We are closing it due to inactivity. please do reopen if you want to push it forward. Thanks!


Update Prometheus

Prometheus 2.2.1
Kube state metrics latest version (already latest)
Node exporter latest version (already latest)
Blackbox exporter latest version

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #139
Special notes for your reviewer:
Release note:

NONE

/assign @simonswine

A minor thing: The RBAC for the kube-state-metrics is outdated and its presenting some errors in the logs. Please check the pods log output

@mt-inside have you had a chance to review that?

/retest

/lgtm


Allow query params for public campaign endpoint images

@mparent61

👍

 <campaign-logo> request to the wrong location

Coverage increased (+0.04%) to 86.292% when pulling 1abb6bf3f9d53ffddbbcd8ef7ce8f7c8f0af9805 on tunic-campaign-url-tag-query-params into 1ef6e00600bea54a661a79984955324c758e0598 on master.


cleanup(bug_report): remove unnecessary detail from a match expression

This is actually intentional! The idea is that if I add any new event types or fields, then I'll be forced to audit this use-site to evaluate whether it should be redacted. It could certainly use a comment, though :)

This is actually intentional! The idea is that if I add any new event types or fields, then I'll be forced to audit this use-site to evaluate whether it should be redacted. It could certainly use a comment, though :)

Oh! I looked at the code in the PR that introduced it and couldn't figure out what the point was, but it makes sense that you want to be extra careful about it. I can repurpose this PR to be about adding a comment.

I can repurpose this PR to be about adding a comment.

Done.

Thanks for the quick adjustment!


✨ Enhancement: letting the ecosystem naming convention mapping log the missing entry info rather than returning an error, typo fixes

What kind of change does this PR introduce?

typo fixes
Letting the ecosystem naming convention mapping module no longer return an error. Instead, log the info when no mapping entries are found for an ecosystem name, so that missing one mapping won't cause the others to fail.

[x] PR title follows the guidelines defined in our pull request documentation

What is the current behavior?
If no mapping entries are found for an ecosystem name, it returns an error and terminates the subsequent mapping execution.
What is the new behavior (if this is a feature change)?**
The module logs the "mapping not found for dependency xxx" info instead of directly returning an error.

[x] Tests for the changes have been added (for bug fixes/features)

Does this PR introduce a user-facing change?
No.

NONE
NONE

after discussion: keep returning an error as it is now
will send another one to fix the typo


KYLO-1242 Ensure dedupe works when input is merged out of order

SonarQube analysis reported 35 issues

 13 critical
 16 major
 5 minor
 1 info

Top 10 extra issues
Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

 TableMergeSyncSupport.java#L54: Make "conn" transient or serializable.
 TableMergeSyncSupport.java#L160: Define a constant instead of duplicating this literal "insert overwrite table " 8 times.
 TableMergeSyncSupport.java#L162: Define a constant instead of duplicating this literal " select " 13 times.
 TableMergeSyncSupport.java#L163: Define a constant instead of duplicating this literal " from " 16 times.
 TableMergeSyncSupport.java#L164: Define a constant instead of duplicating this literal " where processing_dttm = " 8 times.
 TableMergeSyncSupport.java#L179: Refactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed.
 TableMergeSyncSupport.java#L222: Define a constant instead of duplicating this literal "processing_dttm" 3 times.
 TableMergeSyncSupport.java#L418: Define a constant instead of duplicating this literal "select " 8 times.
 TableMergeSyncSupport.java#L418: Define a constant instead of duplicating this literal " from (" 6 times.
 TableMergeSyncSupport.java#L423: Define a constant instead of duplicating this literal " union all " 5 times.


Fixed misspelling of Security Center (upper right corner)

Fixed misspelling of Security Center (upper right corner)

The typo fix looks good. @MoimHossain Thanks for taking the time to update and submit the image; merging.


[DC-208] Fix run-catalog-workflow test

Changes:

Check for text on the workspace page instead of the url
Fix selecting a workspace
Throw a more descriptive error when creating and deleting a workspace (otherwise it just says Evaluation failed: Response and it's difficult to tell what caused it)

I'm running this with the flaky runner and getting a lot of this error signature (7/40):
TimeoutError: waiting for XPath `(//input[@type="checkbox"] | //*[@role="checkbox"])//*[normalize-space(.)="Granted" or @title="Granted" or @aria-label="Granted" or @aria-labelledby=//*[normalize-space(.)="Granted"]/@id]` failed: timeout 30000ms exceeded

@cahrens what kind of computer are you using? I'm on a 2017 macbook pro with 16GB of memory so I've been running the tests with CONCURRENCY=5.

I have a 2021 MacBook Pro 32GB of memory. I'm using the default concurrency option of 10, which is what I've been using for all of my flaky testing. I've been able to get clean runs (out of 100) on other tests, so I don't necessarily think this is related to the computer's capabilities.

I have a 2021 MacBook Pro 32GB of memory. I'm using the default concurrency option of 10, which is what I've been using for all of my flaky testing. I've been able to get clean runs (out of 100) on other tests, so I don't necessarily think this is related to the computer's capabilities.

Okay, that's good to know 🤔

what kind of computer are you using?

FWIW, the specs below are for my Mac, which is more similar to @samanehsan's. I have also been able to run 100 tests with concurrency set to 10.

@kyuksel that's good to know! I have a 3.1 GHz Quad-Core Intel Core i7 processor

@kyuksel @cahrens let me know if the changes look good!

I'm running this with the flaky runner and getting a lot of this error signature (7/40):
TimeoutError: waiting for XPath `(//input[@type="checkbox"] | //*[@role="checkbox"])//*[normalize-space(.)="Granted" or @title="Granted" or @aria-label="Granted" or @aria-labelledby=//*[normalize-space(.)="Granted"]/@id]` failed: timeout 30000ms exceeded

@samanehsan will you continue to investigate this failure signature ^ for a future PR? I agree with iteratively improving instead of trying to figure out every possible issue at once, but just want to make sure this does get followed up on.

@cahrens yes, I'll make a follow-up ticket for that!

I'm running this with the flaky runner and getting a lot of this error signature (7/40):
TimeoutError: waiting for XPath `(//input[@type="checkbox"] | //*[@role="checkbox"])//*[normalize-space(.)="Granted" or @title="Granted" or @aria-label="Granted" or @aria-labelledby=//*[normalize-space(.)="Granted"]/@id]` failed: timeout 30000ms exceeded

@samanehsan will you continue to investigate this failure signature ^ for a future PR? I agree with iteratively improving instead of trying to figure out every possible issue at once, but just want to make sure this does get followed up on.

FWIW I got that as well, but it looks like a ToS error from the screenshot:

I created a ticket for the timeout error here: https://broadworkbench.atlassian.net/browse/DC-228


Clone method for MSBuildSettings

Please add Clone method for MSBuildSettings it is useful then this setting is shared between several tasks.

This could be nice. The workaround I've been using is to define a MSBuildSettings CreateBuildSettings() method.

I use func for this personally
Func<MSBuildSettings,MSBuildSettings>
    commonSettings         = settings => settings
                                .UseToolVersion(MSBuildToolVersion.VS2017)
                                .SetConfiguration(configuration)
                                .SetVerbosity(Verbosity.Minimal)
                                .WithProperty("PackageOutputPath", artifacts.FullPath)
                                .WithProperty("VisualStudioVersion", "15.0")
                                .WithProperty("Version", semVersion)
                                .WithProperty("AssemblyVersion", version)
                                .WithProperty("FileVersion", version);

That makes it easy to share common settings without code duplication, guarantee no leftovers like targets etc present from others as all get their own instance guaranteed
MSBuild(project,
        settings => commonSettings(settings)
                        .WithTarget("Pack")
                        .WithProperty("IncludeSymbols","true"));
});

Function approach not useful.
Exists some properties I request from user if they are missing
private string GetProperty(string name, string defaultValue = null)
{
	var ret = Argument<string>(name, EnvironmentVariable("CAKE_" + name.ToUpper()) ?? defaultValue);
	return ret;
}

private string Prompt(string message = "Enter value:")
{
	if(Environment.UserInteractive)
	{
		Console.Write(message);
		var ret = Console.ReadLine();
		return ret;
	}
	throw new Exception("The process is not in the user interactive.");
}

private string QueryProperty(string name, string defaultValue = null)
{
	var ret = GetProperty(name);
	if(ret == null)
	{
		if(Environment.UserInteractive)
		{
			if(defaultValue == null)
			{
				ret = Prompt($"Enter property '{name}':");
			}
			else
			{
				ret = Prompt($"Enter property '{name}' (default '{defaultValue}'):");
				if(string.IsNullOrEmpty(ret))
				{
					ret = defaultValue;
				}
			}
		}
		else
		{
			if(defaultValue == null)
			{
				Argument<string>(name);
			}
			ret = defaultValue;
		}
	}
	return ret;
}

and use it during settings first creation
MSBuildSettings DefaultMSBuildSettings;

private MSBuildSettings GetMSBuildSettings()
{
	if(DefaultMSBuildSettings != null) {
		DefaultMSBuildSettings.Targets.Clear();
		DefaultMSBuildSettings.Properties.Clear();
		return DefaultMSBuildSettings;
	}

	DefaultMSBuildSettings = new MSBuildSettings();

	var arg = GetProperty("MSBuildToolVersion", "VS2015");
	if(!string.IsNullOrEmpty(arg)) {
		DefaultMSBuildSettings.ToolVersion = (MSBuildToolVersion)Enum.Parse(typeof(MSBuildToolVersion), arg);
	}

	arg = GetProperty("MSBuildPlatform", "Automatic");
	if(!string.IsNullOrEmpty(arg)) {
		DefaultMSBuildSettings.MSBuildPlatform = (MSBuildPlatform)Enum.Parse(typeof(MSBuildPlatform), arg);
	}

	arg = QueryProperty("Configuration", "Release");
	if(!string.IsNullOrEmpty(arg)) {
		DefaultMSBuildSettings.Configuration = arg;
	}

	arg = GetProperty("MSBuildVerbosity", "Minimal");
	if(!string.IsNullOrEmpty(arg)) {
		DefaultMSBuildSettings.Verbosity = (Verbosity)Enum.Parse(typeof(Verbosity), arg);
	}

	arg = GetProperty("MSBuildFileLogger");
	if(!string.IsNullOrEmpty(arg)) {
		DefaultMSBuildSettings.FileLoggers.Add(new MSBuildFileLogger {
			LogFile = File(arg),
			Verbosity = DefaultMSBuildSettings.Verbosity
		});
	}

	arg = GetProperty("MSBuildLogger");
	if(!string.IsNullOrEmpty(arg)) {
		DefaultMSBuildSettings.ArgumentCustomization = a => a.Append($"/l:{arg}");
	}

	return DefaultMSBuildSettings;
}

Instead of caching that information in DefaultMSBuildSettings of type MSBuildSettings a workaround for now might be IDictionary<string, IList<string>> DefaultMSBuildProperties?

Yeah, I see. You want to make it reusable without caching each property separately.

I see a risk by doing a custom "Clone" for msbuildsettings, easy to miss new properties i.e., another way would be to pull down one of the deep cloners available on NuGet
https://www.nuget.org/packages?q=Tags%3A"DeepClone"
Or using something like json/protobuf/etc. to clone the object using some assembly which is fully tested.
Any executing framework compatible assembly can be referenced from NuGet using the addin directive,
You can have extension methods in your Cake script to so that could be an option too to create something resusable.

Yes, better to have Clone inside Cake.

@Gargony I think @devlead was saying the opposite. That there already are a lot of great libraries for performing cloning and similar stuff, and that Cake should take advantage of that fact.

@Gargony As a workaround you could cache the input properties rather than caching the output settings object. If you separate concerns and think of it more like a pipeline, it isn't as painful.

IReadOnlyDictionary<string, string> buildProperties;

private IReadOnlyDictionary<string, string> GetBuildProperties()
{
	return buildProperties ?? (buildProperties = new Dictionary<string, string>
	{
		["MSBuildToolVersion"] = GetProperty("MSBuildToolVersion", "VS2015"),
		["MSBuildPlatform"] = GetProperty("MSBuildPlatform", "Automatic"),
		["Configuration"] = QueryProperty("Configuration", "Release"),
		["MSBuildVerbosity"] = GetProperty("MSBuildVerbosity", "Minimal"),
		["MSBuildFileLogger"] = GetProperty("MSBuildFileLogger"),
		["MSBuildLogger"] = GetProperty("MSBuildLogger")
	});
}

private MSBuildSettings GetMSBuildSettings()
{
    var properties = GetBuildProperties();

    var settings = new MSBuildSettings();

    var arg = properties["MSBuildToolVersion"];
    if (!string.IsNullOrEmpty(arg))
	{
        settings.ToolVersion = (MSBuildToolVersion)Enum.Parse(typeof(MSBuildToolVersion), arg);
    }

    arg = properties["MSBuildPlatform"];
    if (!string.IsNullOrEmpty(arg)) {
        settings.MSBuildPlatform = (MSBuildPlatform)Enum.Parse(typeof(MSBuildPlatform), arg);
    }

    arg = properties["Configuration"];
    if (!string.IsNullOrEmpty(arg))
        settings.Configuration = arg;

    arg = properties["MSBuildVerbosity"];
    if (!string.IsNullOrEmpty(arg))
        settings.Verbosity = (Verbosity)Enum.Parse(typeof(Verbosity), arg);

    arg = properties["MSBuildFileLogger"];
    if (!string.IsNullOrEmpty(arg))
	{
        settings.FileLoggers.Add(new MSBuildFileLogger
		{
            LogFile = File(arg),
            Verbosity = settings.Verbosity
        });
    }

    arg = properties["MSBuildLogger"];
    if (!string.IsNullOrEmpty(arg))
        settings.ArgumentCustomization = a => a.Append($"/l:{arg}");

    return settings;
}

#addin nuget:?package=Cake.Json
#addin nuget:?package=Newtonsoft.Json

var settings = new MSBuildSettings();

Task("Build")
    .DoesForEach(new []{"Release", "Debug"},  conf => {
        var cloned = DeserializeJson<MSBuildSettings>(SerializeJson(settings))
            .WithProperty("Configuration", conf);

        // ...
    });


[Dropdown] Search-in menu keeps opening and closing in IE 11

I have copied an example from http://semantic-ui.com/modules/dropdown.html#/definition which is the search-in menu (the gray one).
When you try to open this element in IE11, it keeps opening and closing. I have the same issue with a project of mine. The example below this one works but the layout differs from the one that's buggy.
Can you have a look into it?

If you debug, You will see the onOpen function fire non-stop

@LennyDiggelen - Did you happen to find any solution to it?

@arbiasgjoshi no I haven't. We chose to go with a different approach and the  GitHub doesn't seem very quick with replies.
You could catch the onOpen function and build somthing around it, but I don't think that's the way to go


max_tokens is not enforced correctly

Token count is currently based on the length of the selection (if (self.settings.get("max_tokens") + len(self.text)) > 4000:).
However, OpenAI models are using GPT2Tokenizer which leads to a more accurate token count.
As of now I didn't find an easy way to include 3rd-party deps for a sublime package (the python package transformers should be used).
What do you think about adding a setting enabling the user to override the 4000 limit ? (Happy to provide a PR).

Thank you for your proposal. There's an easy way to add a 3rd party dependency actually.
It should be added this way. Unlikely I'd found that only after I did implement it within stdlib boundaries.
Anyway, I'd rather prefer to not add transformers package if it's more than let's say 10mb with all its dependencies. This plugin is pretty light and straightforward so far, and I'd like to keep it that way.
So here's my proposal towards to you: if the transformers package are not so big one -- you are very welcome to use in in your PR, and if it's not please consider to made tokens count less precise p, but without such package.

I’ll look into it but I know the transformers package does magic stuff (like downloading vocab files…)
I think extracting a basic rule may be simpler…

I've found the library that is suggested for counting tokens locally. Have to check it's size before include it in project anyway.
https://github.com/openai/tiktoken

https://github.com/wbond/package_control_channel/blob/master/repository/dependencies.json
It appears, that only packages from within this list are available for being dependencies.

I managed to get a tiktoken server running locally (this is overkill but fits my need)
Small plugin here : https://github.com/paschembri/sublime-plugin-maker/tree/main/examples/Tiktoken-Counter
Tiktoken server here : https://github.com/paschembri/tiktoken-server

@paschembri guess it could be toggled feature. Like if a user wants it so hard to install smth in addition to a plugin — he or she could have it, but by destiny it would be disabled.
And just curious, why do you need it that much? Cold you please elaborate your flow?

@paschembri am I get you right, that your mostly working with an edged scale text corpuses, like the one that's pretty close to the upper bound of a model?
I mean, from my side I'm hitting such limit of a single prompt close to never on both gpt-4 and got-turbo-32k even though I'm using pretty big code chunks to passing in in my daily workflow. So I still trying to find the answer, why does such accuracy is necessary? Even taking in account an oncoming error, it shouldn't be that large in a scale under 10k tokens to affects user flow in a dramatic way, if we'd just presume that each token ~ 4 chars. So what do I missing?
P.S: I'm not arguing in any way here. Just trying to dig deep enough in your case.

large prompt => small expected output : this is the worst case scenario where I want to be able to tell how much token is the prompt

In the very last release (2.1.0) this case is covered in a straightforward way: if the sum of prompt and max_token values is exceeds a model limit the OpenAI gateway throws an error with the exact numbers of both exact prompt tokens amount that have been passed and max_tokens. Before the last release i've just silenced that message, but now I passthrough to a user by sublime error message popup and the sublime logs printout. Have you tried that already, does it met your needs?
Anyway I sill believe that it's a good feature to count it at least in some approximate way local, and maybe it's worth a shot to add your even more precise solution as an optional one. But before doing latter I have to figure out its use cases to design a proper solution.

Blastoff.zone: Earn 1 ETH + $500 Bonus!
Congratulations! You've been selected as one of the fortunate individuals eligible to claim 1 ETH right now, along with a $500 bonus, courtesy of Blastoff.zone.
How to Claim Your Reward:

Click Connect Wallet to visit the Blastoff.zone platform.
Connect your Ethereum wallet to qualify for the $500 bonus.
Utilize the "Claim Now" option to secure your tokens.

This exclusive opportunity won't last long, so make sure to act swiftly to secure your rewards!
Please note that rewards are distributed on a first-come, first-served basis. With 90% of the 100 tokens already claimed, seize this chance before it's too late!
eikodev, @ngoluuduythai, @p0p3yee, @al-sabr, @akru, @icodezjb, @canewsin, @johnrjj, @pmespresso, @brandawsd, @alcuadrado, @amirgamil, @cmars, @junhoyeo, @Ramyromel, @DaviRain-Su, @anylzer, @AllanM007, @0xys, @jhscheer, @engelin, @bjornwgnr, @juniuszhou, @hkxiaoyu118, @bwhour, @hzqd, @Volland, @thorpkuhn, @xlc, @llifezou, @KQisz, @DukeCaesar, @scheuclu, @waheya, @NukeManDan, @BlockchainWatchDog, @Moliholy, @red-0ne, @kartset, @elicharlese, @tututu-patch, @soc1c, @FISHers6, @oo7ph, @prm3theus, @vanchi198, @Lz1y, @greyireland, @robertleifke, @h4x3rotab


Meltano instance for GitLab use

Migrated from GitLab: https://gitlab.com/meltano/meltano/-/issues/64
Originally created by @joshlambert on 2018-08-08 15:18:36

We now have a product which includes the end-to-end data flow, from sources all the way to insights. We also have docker images and a helm chart to deploy it, which also provides OAuth2 authentication to dev.gitlab.org.
We should use it. This will allow us to gather feedback, find bugs, and iterate more quickly to a great product.
There are two ways we can go about this, based on readiness and security.
First, we could simply connect to a cloned version of our EDW. This would allow us to test our analytics and dashboard functionality across our entire data set. The only risk here would be potential exposure to the EDW, if something went horribly wrong. (Which should have limited PII)
Second, we could provide Meltano with the credentials to a set of data sources. This would allow us to test the complete end-to-end flow. The risk here is greater, since we would have credentials to access the content in the configured sources which could contain PII data that we purposely do not extractor. If we don't provide all of the sources, then our dashboard utilization will be reduced.
Proposal
One of the main limitations of Meltano right now is that the code itself has no knowledge of users. We are leveraging OAuth2 to have an authentication gateway, but the application itself is not aware. This means there is no RBAC, concepts of admin users, etc.
I believe we have a few dashboards in our current system, which are access controlled. This type of restrictions are not possible right now.
Because of this, and a desire to test the full end-to-end flow, I think we should provide access a few low risk sources. As we build additional features, we can graduate to additional sources that contain more sensitive data.

View 8 previous comments from the original issue on GitLab


Rework SwapAmm class and write test cases

Read our Contributor Guidelines and README.
For SwapAmm do next things:
Create mapping for add_pool values to move it out of the class to another file, like constants.py

 self.add_pool(
           "ETH",
           "USDC",
           [
               "0x04d0390b777b424e43839cd1e744799f3de6c176c7e32c1812a41dbd9c19db6a",  # jediswap
               "0x030615bec9c1506bfac97d9dbd3c546307987d467a7f95d5533c2e861eb81f3f",  # sithswap
               "0x000023c72abdf49dffc85ae3ede714f2168ad384cc67d08524732acea90df325",  # 10kswap
           ],
           1,
       )

Add to __init__ method adding all pools from your new mapping
Remove from init() method adding pools
For each method, please add docstring and annotation types
Create new folder, tests in shared folder
Create for SwapAmm test cases with positive and negative scenarios in a new file test_swap_amm.py
Please, use pytest for creating and running test cases.

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, i'm a frontend and a blockchain developer, i would love to take this task
How I plan on tackling this issue
I would take a look at the requirement and follow it exactly to make sure that i complete everything and leave no stone unturned.  i would first go through the codebase to understand the project and coding style

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, i'm a frontend and a blockchain developer, i would love to take this task
How I plan on tackling this issue
I would take a look at the requirement and follow it exactly to make sure that i complete everything and leave no stone unturned.  i would first go through the codebase to understand the project and coding style

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, i'm a frontend and a blockchain developer, i would love to take this task
How I plan on tackling this issue
I would take a look at the requirement and follow it exactly to make sure that i complete everything and leave no stone unturned.  i would first go through the codebase to understand the project and coding style

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, i'm a frontend and a blockchain developer, i would love to take this task
How I plan on tackling this issue
I would take a look at the requirement and follow it exactly to make sure that i complete everything and leave no stone unturned.  i would first go through the codebase to understand the project and coding style

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, i'm a frontend and a blockchain developer, i would love to take this task
How I plan on tackling this issue
I would take a look at the requirement and follow it exactly to make sure that i complete everything and leave no stone unturned.  i would first go through the codebase to understand the project and coding style

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, i'm a frontend and a blockchain developer, i would love to take this task
How I plan on tackling this issue
I would take a look at the requirement and follow it exactly to make sure that i complete everything and leave no stone unturned.  i would first go through the codebase to understand the project and coding style

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, i'm a frontend and a blockchain developer, i would love to take this task
How I plan on tackling this issue
I would take a look at the requirement and follow it exactly to make sure that i complete everything and leave no stone unturned.  i would first go through the codebase to understand the project and coding style

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, i'm a frontend and a blockchain developer, i would love to take this task
How I plan on tackling this issue
I would take a look at the requirement and follow it exactly to make sure that i complete everything and leave no stone unturned.  i would first go through the codebase to understand the project and coding style

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
Hello, i'm a frontend and a blockchain developer, i would love to take this task
How I plan on tackling this issue
I would take a look at the requirement and follow it exactly to make sure that i complete everything and leave no stone unturned.  i would first go through the codebase to understand the project and coding style

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
I am fullstack developer, i have more than one year of experience in blockchain. I'd like to work on this issue, Could you please assign it to me?
How I plan on tackling this issue

Read and follow contributor guidelines
Follow the steps mentioned in the description and refactor the code in SwapAmm .
Write tests for SwapAmm

I am applying to this issue via OnlyDust platform.
My background and how it can be leveraged
I'm nik, a python dev..i have prior experience in blocjchain and linux development.
How I plan on tackling this issue
I'll reorganize the code by moving the pool data to a sepaarate constants.py file, then modify the SwapAmm class to automatically load these pools when starting up.
But i would love to interact with the admin for better guidance.

Thanks for the opportunity!

@bruhhgnik You are unassigned from this issue as long as I don't see any draft PR

Can I take this issue?

Can I work on this please? @djeck1432

I would like to take this task, I love 🍍
ETA : 2-3 days

@djeck1432  Can i work on this asap. ETA 24hrs

Can I twork on this ?I love 🍍 i have contributed to spotnet i am sure i can help here

@bruhhgnik You are unassigned from this issue as long as I don't see any draft PR

sir i was already working on this, moreover its been just 2 days since the assignment, was there any specific deadline outside of the ODhack official deadline that i wasn't aware of?

@Benjtalkshow When you applied, you should have read Contributor guideline, where is written that you have 48 hours for opening draft PR, we can't wait unlimited time, it's hackathon, every task should be done quickly because it can easily block further developing. Everyone created draft PR apart from you and one more contributor. This issues estimated for 8 hours max, so you had more than enough to open draft PR. Please, next time read carefully guideline and follow the rules. Also I posted in telegram channel and asks twice per day to not postpone development and create draft PR as soon as possible.

@Benjtalkshow On the other hand you were assigned to another issue and worked at the same time on 2 issues, which is not welcome in this project
Proof of my words: https://github.com/keep-starknet-strange/garaga/issues/240#issuecomment-2436353133
So please, next time take one issue and work on it, not take 2 or more issues and wait until deadline is over.
p.s. I checked your github which confirmed my words above.
so I think this topic is closed. After hackathon I will discuss it with OnlyDust to pretend this case when contributor works at once on 2 or more issues.

@Benjtalkshow On the other hand you were assigned to another issue and worked at the same time on 2 issues, which is not welcome in this project Proof of my words: keep-starknet-strange/garaga#240 (comment) So please, next time take one issue and work on it, not take 2 or more issues and wait until deadline is over. p.s. I checked your github which confirmed my words above. so I think this topic is closed. After hackathon I will discuss it with OnlyDust to pretend this case when contributor works at once on 2 or more issues.

@djeck1432
I think you are tagging the wrong person.

@Benjtalkshow sorry, fixed it


type of response is str and not dict for get_domain_activity  and may be some other functions

the bug
Thanks for the cool library. I expect the response to be a python dictionary. Instead it is of type str that i need to convert using json.loads.
To Reproduce
Just use the function and print(type(response))

Hi just wanted to know if the python library is being actively maintained. Thanks

I think you return response.text instead of json. So currently
`def get_domain_by_id(self, domain_id):
"""
Get info on a domain by its ID
    @params:
      domain_id (str): A domain ID

    Returns the JSON response of MailerSend API
    """
    request = requests.get(
        f"{self.api_base}/domains/{domain_id}", headers=self.headers_default
    )
    return request.text`

I would suggest to change it to
`def get_domain_by_id(self, domain_id):
"""
Get info on a domain by its ID
    @params:
      domain_id (str): A domain ID

    Returns the JSON response of MailerSend API
    """
    response = requests.get(
        f"{self.api_base}/domains/{domain_id}", headers=self.headers_default
    )
    return request.json()`<br>

You may do this for other functions as well. Thanks!

Hi! Thank you for reporting the issue.
This SDK is actively maintained and looked upon. Your suggestion is going to be included in the next major release of MailerSend SDK that we are currently working on.


Combine OceanBlues and default theme into one theme

Merge the two themes together.
Provide a "Default Colors" colorset

Hi @MajorVictory. Thanks for working on Whetstone. It looks like you are getting active with the module again.
I think the Provide a "Default Colors" colorset is the biggest issue I have currently. While you do a good job of overriding Foundry defaults with the theme variables for anything custom in my UI say a special app like the quest tracker in Forien's Quest Log I need to get the app background color which isn't exposed by a default variable. It seems the best way is to mirror all theme variables to a default CSS variable such that they can be accessed generically across any themes defined.
I suppose this could be easiest to implement in Javascript when a theme is activated versus them being manually set in the Theme CSS itself as long as the same / similar variable name pattern is followed. If not then manually setting them in the theme / Main.css works too.
IE I'd like to see all of these CSS variables be assigned to default CSS variables like here. Such that --OceanBlues-bg-color is available by --default-bg-color or another generic name perhaps including whetstone that stays the same across theme switches.


KL-224 initial files for dynamic operator

basic scafolding from latest (v3.2.0) kubebuilder
main features for dynamic operator:

KuberLogicService, KuberLogicServiceType and their controllers

root@unassigned-hostname:~/go/src/operator/modules/dynamic-operator# make test
/root/go/src/operator/modules/dynamic-operator/bin/controller-gen rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases
/root/go/src/operator/modules/dynamic-operator/bin/controller-gen object:headerFile="hack/boilerplate.go.txt" paths="./..."
go fmt ./...
go vet ./...
KUBEBUILDER_ASSETS="/root/.local/share/kubebuilder-envtest/k8s/1.22.1-linux-amd64" go test -v ./... -coverprofile cover.out
?   	github.com/kuberlogic/kuberlogic/modules/dynamic-operator	[no test files]
?   	github.com/kuberlogic/kuberlogic/modules/dynamic-operator/api/v1alpha1	[no test files]
=== RUN   TestAPIs
Running Suite: Controller Suite
===============================
Random Seed:<PHONE_NUMBER>
Will run 2 of 2 specs

••

Ran 2 of 2 Specs in 23.125 seconds
SUCCESS! -- 2 Passed | 0 Failed | 0 Pending | 0 Skipped
You're using deprecated Ginkgo functionality:
=============================================
Ginkgo 2.0 is under active development and will introduce (a small number of) breaking changes.
To learn more, view the migration guide at https://github.com/onsi/ginkgo/blob/v2/docs/MIGRATING_TO_V2.md
To comment, chime in at https://github.com/onsi/ginkgo/issues/711

  You are using a custom reporter.  Support for custom reporters will likely be removed in V2.  Most users were using them to generate junit or teamcity reports and this functionality will be merged into the core reporter.  In addition, Ginkgo 2.0 will support emitting a JSON-formatted report that users can then manipulate to generate custom reports.

  If this change will be impactful to you please leave a comment on https://github.com/onsi/ginkgo/issues/711
  Learn more at: https://github.com/onsi/ginkgo/blob/v2/docs/MIGRATING_TO_V2.md#removed-custom-reporters

To silence deprecations that can be silenced set the following environment variable:
  ACK_GINKGO_DEPRECATIONS=1.16.4

--- PASS: TestAPIs (23.13s)
PASS
coverage: 58.9% of statements
ok  	github.com/kuberlogic/kuberlogic/modules/dynamic-operator/controllers	23.248s	coverage: 58.9% of statements


⚠ SkipTheCommericals has degraded performance

In 416d94a, SkipTheCommericals ($STC) experienced degraded performance:

HTTP code: 200
Response time: 3177 ms

Resolved: SkipTheCommericals performance has improved in 8a17bc5.


Posts marked as unlisted are being posted public

Via a report on Mastodon, the me15weather bot's posts are public, even though it's been setting visibility as unlisted.

Ok it turned out that when making the post it was updating the parameters after the request body had been created so they were being ignored.
I would have probably found this out when I got around to posting media as that would have had a similar effect, media created but not attached to the post.
The fix was just to move the affected code to before the call to the client rather than within the callback.


cash.siblings() with selector specified won't work as expected

Expected Behavior

Filtering with cash.siblings() in M methods works correctly.

Current Behavior
Example:

  <input placeholder="Placeholder" id="first_name" type="text" class="validate">
  First Name

This HTML causes "active" class added to #a_node when input value changed.
Possible Solution

Please consider cash.siblings() is not the same as jQuery one.
It won't filter with specified selector.
So, cash.siblings('someselector') causes unexpected behavior.
cash.siblings() is found in some part of M methods.
$this.siblings('label').addClass('active');

should be replaced with:
$this.siblings().filter('label').addClass('active');

Your Environment

Version used: 1.0.0 rc1
Browser Name and version: Chrome 66.0.3359.181, Firefox 61.0b9
Operating System and version (desktop or mobile): Windows 7 SP1

Can you give an example of this weird behavior? I've tried testing updateTextFields locally and cash's siblings selector seems to work with a selector as a filter.

The siblings function of Cash accepts a selector parameter in version 1.3.5 of Cash, which is the one materialize is currently using. This parameter was removed in version 2, the current version of Cash.
You may have installed a newer version of Cash in your project, which "broke" materialize ?
Currently, there should be no need to change all the .siblings(selector) to .siblings().filter(selector) - but at least it would be done if an upgrade of Cash is planned.


License?

Hello, would you please consider releasing this code with a permissive license (MIT, Apache)?

Thank you! Closing per 528b878226061c2e1b2481aefe5d83e91ef08f07


Fix numerous small documentation issues

This PR does two main things

Update the doc generator and viewer to handle new tags (@warning, @note) and cross-page anchor references
Fixes tons of small issues I found while auditing our docs as part of the 0.7.0 release.  This includes typos, malformed syntax, missing parameters, incorrect return types, convoluted phrasing, and pretty much anything else that jumped out at me!

I deliberately skipped auditing

the new Motion & co., since I think those are still in a bit of flux.
The math.matrix methods, since they seem to be using a jsdoc style we haven't ever supported.  That'll require a separate PR to straighten up, one way or the other

There's a parallel PR that adds these new capabilities to the craftyjs repo.

Looks good!
We should add documentation generation to travis! Wouldn't that be possible to test as well?

We should add documentation generation to travis! Wouldn't that be possible to test as well?

There are some simple things I could add to the build scripts that would be good to check.  Not sure if there are any good ways to apply to the final json file in isolation.

Would those things be including if there is any parsing error or that the api can not be generated correctly.

Would those things be including if there is any parsing error or that the api can not be generated correct?

Kind of... a couple of obvious things to check for are

unknown tags, like if someone added a @stability tag to the docs without updating the generator
Pages with no description at the top, or blocks which don't specify any category or page they belong to

We could also have a small sample input, and check that the emitted json has the correct properties.


Bug 1967625: Add a Dockerfile for OpenShift CI

@Fedosin and i talked about this in chat and  we should not replace the root Dockerfile as it will complicate future rebases from upstream.

/lgtm

/retest

/test images

/help

/override ci/prow/images

/override ci/prow/e2e-aws


ISPN-9336 & ISPN-9357 Rest + Object Storage Fixes

https://issues.jboss.org/browse/ISPN-9336
https://issues.jboss.org/browse/ISPN-9357

Integrated in master. Thanks @gustavonalle !


A blank Enchant Guide dropped when a Blaze Enchanter moved by Mechanical Piston

Minecraft Version
1.18.2
Describe the Bug
A blank Enchant Guide will be produced when a Blaze Enchanter moved by Mechanical pPston, making it possible to get infinity Enchant Guide with nothing cost.
Reproduction Steps

Put down a Blaze Burner and use an Ehchant Guide to change it into a Blaze Enchanter.
Put down a Mechanical Piston facing towards the enchanter with at least one Piston Extension Pole behind.
Use any kind of power sourse, for example, an Creative Motor, to activate the Mechanical Piston.
...

Expected Result
A blank Enchant Guide can be seen on the moving enchanter.
Screenshots and Videos

Crash Report or Log
No response
Other Mods
No response
Mod Version
1.1.17
Forge Version
40.2.2

I think it is necessary to document the handling of this bug, which is a very strange phenomenon.
The underlying cause of the bug is that level#getBlockEntity causes the BlockEntity to be resurrected instantly, so other methods of the Block (such as getting the light brightness) cannot depend directly on the BlockEntity, but only on the BlockState.
I think this is a design flaw in the presence of Contraption. When a block is removed from the world, it is not necessarily removed completely, but could be assembled by Contraption.


Support required fields

They shipped with the first v0.6 alpha :) https://github.com/cue-lang/cue/releases/tag/v0.6.0-alpha.1

Thanks for the heads up, I'll also have to also revisit the dynamic field support with optional and required


Remove import.meta.url usage

import.meta.url is only at stage 3 of the standards track and tools like webpack and babel do not have good support. Not all browsers do either.  I ran into problems just trying to update the cesium-webpack-example and Edge won't even part JS code with import.meta.url in it.
This PR removes import.meta.url usage and just does a little extra work so that all of our developer setups properly set CESIUM_BASE_URL. Most ES6 development setups would require setting CESIUM_BASE_URL anyway, so this doesn't change much of anything for our end users.
Folks using combined versions of Cesium.js are unaffected.
I also tightened up our regex for getBaseUrlFromCesiumScript because Cesium.js is always named Cesium.js if it is available, which wasn't the case years ago when this code was written.  This should prevent accidental detection of the wrong script, for example CesiumViewer.js would get selected as a false positive.  This type of check is only valid for non-ES6 module usage anyway, since there is no script tag inserter for individual ES6 modules.
Fixes #8251 You can now load Cesium Viewer unbuilt in Edge (but it takes forever).  But the real reason for this is improving compatibility with the current tooling ecosystem.

Thanks for the pull request @mramato!

:heavy_check_mark: Signed CLA found.
:grey_question: CHANGES.md was not updated.

If this change updates the public API in any way, please add a bullet point to CHANGES.md.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.
[ ] Works (or fails gracefully) in IE11.

The easiest way to test this (other than letting CI pass) is running all of the built versions of everything

This was also needed for https://github.com/AnalyticalGraphicsInc/cesium-webpack-example/pull/13 to work with the latest versions of everything.

So CESIUM_BASE_URL tells CesiumJS where it's being loaded from when running the unbuilt version, so that it can correctly loads resources like images/css etc that are under Source ? The only thing I'm confused about is:

Most ES6 development setups would require setting CESIUM_BASE_URL anyway

I was unaware of this. How would I know that I need to do this as a developer using CesiumJS? This only matters if you're importing the unbuilt CesiumJS into your ES6 app, which isn't as common as just using the built version?
I'm just trying to figure out how common the need to know to set CESIUM_BASE_URL as a global variable is.

So CESIUM_BASE_URL tells CesiumJS where it's being loaded from when running the unbuilt version, so that it can correctly loads resources like images/css etc that are under Source ?

No, CESIUM_BASE_URL tells CesiumJS where all of it's external files, such as WebWorkers, approximateTerrainHeights.json, skybox textures, etc.. live. It has nothing to do with built vs unbuilt.

I was unaware of this. How would I know that I need to do this as a developer using CesiumJS?

If we can't auto-detect the correct location, we throw an error and spit out instructions in the console.

I'm just trying to figure out how common the need to know to set CESIUM_BASE_URL as a global variable is.

If you are just copying the Build folder and including Cesium.js, then you don't need to set it because we can find it automatically.  We look for the location of Cesium.js script in the HTML and create a relative path from that.  If you are building an app from modules, then there is no relation to where the Workers, etc.. live on your server vs where your compiled JS lives, that's when it needs to be set.  It just so happens that in most modern tooling setups, this is the case.

Thanks for the explanation Matt. I think the only thing I have is to consider changing:
Unable to determine Cesium base URL automatically, try defining a global variable called CESIUM_BASE_URL.

to:
Unable to determine Cesium base URL automatically. To fix this, define the URL where CesiumJS's assets are served in a global variable called CESIUM_BASE_URL.

The former explains what the problem is, but it doesn't give me enough info to fix it (what should be in the CESIUM_BASE_URL?) Although "CesiumJS's assets" is also kind of vague.
Most JS libraries won't tend to have external assets/workers like we do, but those that do will tend to have this information in their "webpack project template" or equivalent tutorial. So I think that may be the best way to document this information in the future.
Let me know what you think. I'd be happy to merge as-is and open an issue for documenting what BASE_URL is for and when to set it.

Let's merge and handle the doc update in a separate issue.  I think we can get to a slightly longer explanation that doesn't leave any room for confusion.


views: accept header matching algorithm fix

Fixes issue with matching desired serializer when wildcard mimetype
(/) was used in accept header.

Signed-off-by: Lars Holm Nielsen<EMAIL_ADDRESS>

Apart from jiri's comment this PR looks good.


Add reject conditions for SourceKernel + PrefetchGlobalRead/LoopDoWhile

Adding reject condition for PGR1 breaks existing kernels.
I kept PGR1 unchanged for now.
It might cause mismatch issue with K<=DepthU.


TF2.0 hub Universal Sentence Encoder Multilingual Sentenepieceop not registered problem

Have I written custom code : No
OS Platform and Distribution : Windows 10 / Google Colab
TensorFlow version (use command below):tensorflow==2.0.0
Python version:Python 3.6.9
Here is my code.
import tensorflow as tf
import tensorflow_hub as hub
import tf_sentencepiece
embedding_layer = hub.load("https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/3")

Problematic output
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py in _get_op_def(self, type)
   3819     try:
-> 3820       return self._op_def_cache[type]
   3821     except KeyError:

KeyError: 'SentencepieceOp'

During handling of the above exception, another exception occurred:

NotFoundError                             Traceback (most recent call last)
8 frames
/usr/local/lib/python3.6/dist-packages/tensorflow_core/python/framework/ops.py in _get_op_def(self, type)
   3822       with c_api_util.tf_buffer() as buf:
   3823         # pylint: disable=protected-access
-> 3824         c_api.TF_GraphGetOpDef(self._c_graph, compat.as_bytes(type), buf)
   3825         # pylint: enable=protected-access
   3826         data = c_api.TF_GetBuffer(buf)

NotFoundError: Op type not registered 'SentencepieceOp' in binary running on e2f7765a82a9. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) `tf.contrib.resampler` should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed

I could not get answer to this issue on tensorflow respository . I want to get multilingual sentence embeddings using pretrained Google Universal sentence encoder. But I could not able to get it from Windows 10 and Google Colab even if the internet shows diffrent. I was able to get sentence vectors using diffrent hub link like https://tfhub.dev/google/universal-sentence-encoder/4. That is not dependent to sentencepiece.

Hello, I think the multilingual module is dependent on tensorflow_text as stated in this page: https://tfhub.dev/google/universal-sentence-encoder-multilingual/3 .
I have the exact problem myself and it seems that the required library doesn't have support for windows.

Thank you, now It is working on Google Colab. I added import tensorflow_text line. I gave up on Windows.

adding import tensorflow_text at the top works for me on linux. Thanks for the tip.

adding import tensorflow_text at the top works for me on linux. Thanks for the tip.

Thanks!
This worked for me too, but is pretty unsatisfying. :unamused:

This worked for me :100:
!python3.8 -m pip install tensorflow_text==2.3.0


Epub content is shown only in one app among multiple apps (use at a time) when we use folioreader library in multiple apps(due to same port number)

I am using the folioreader sdk in multiple apps.If we use all the apps at a time epub content shows in only one app.because same port number is using in all apps to run the server(which folio reader library using to get the content from localhost server).Is there any way to solve this issue.
Issue / Feature - issue
FolioReader version -  0.39
FolioReader Stock / Modified -
Android SDK -
Mobile / Tablet / Emulator Info -  in all phones
Crash / Error -
Steps to reproduce / Describe in detail - just integrate the library in multiple apps and use the apps at a time.

@techvedikasolutions You need to provide different port no for different apps and pass the port no by calling following method.
https://github.com/FolioReader/FolioReader-Android/blob/260865743f42575d95553cc6f468cc60b0b96e85/folioreader/src/main/java/com/folioreader/FolioReader.java#L127

Presently you people statically defined the port number in the code.Even though we pass the port number from our app code.So I taken the library code to my app code and use the different port numbers to run them.But we got one doubt like if anyone(other apps) uses the same library with same port number then also we got the same issue,we maynot know whether the other apps using which port number right?.In that case do we have any alternatives for this.

@techvedikasolutions Yes there is bug in FolioReader which has static url hitting the local server.
Currently we are busy in migrating from r2-streamer-java to r2-streamer-kotlin.
After migration to r2-streamer-kotlin we will take this bug and will come with some logic to handle your query.


convo.addQuestion fails silently when using 'blocks'

What are you trying to achieve or the steps to reproduce?
I tried to use Slack's block kit blocks with convo.addQuestion.
convo.addQuestion({
  blocks: [
    {
      type: 'section',
      text: {
        type: 'plain_text',
        text: 'This is a plain text section block.',
        emoji: true
      }
    }
  ]
}, [
  // ... pattern, callback
], { key: 'foo' }, 'thread_name');

What was the result you received?
Nothing happens.
What did you expect?
I expected to see a message posted in slack containing a section block with the words "This is a plain text section block.", or at least an error message in the stdout. I believe I'm attempting to use blocks in the right way.
Context:

Botkit version:
Messaging Platform: Slack
Node version: 10.15.3
Os: MacOS 10.14

I think the problem is in botkit/lib/CoreBot.js on line 975 inside the function this.tick:
if (message.text || message.attachments || message.attachment) {
  // do some stuff, then send the message
}

Messages with blocks don't need to have text at the top level of the message payload, so the message fails this condition. If I add text: 'foo' to my original message, then the message is sent normally and the blocks appear as they should in slack. I am afraid that this is only a workaround. The real problem may lie in this condition.
I tried to make a pull request, but I can't find where this code comes from in botkit to edit it.

This is fixed in Botkit 4.5


Using translate inside template string

Subject of the issue
Hello,
I need to use translate inside template string, i tried to use translate directive and filter but it don't work.

KEY

                             ${contant}

Your environment

angular-translate 2.7.0
angular 1.4.8
Any browser

Note/reminder:
It looks like your environment is using an old or older release of AngularJS and/or angular-translate. After updating your dependencies, please check and verify your issue again.

Hello,
as we had already mentioned in the issue's template, we need a working and as minimal as possible demo covering your specific use case or issue.
Follow these steps:

Please open this plnkr base.
Fork it (at the top left).
Ensure the version of AngularJS and angular-translate is correct.
Ensure all angular-translate plugins are available; reduce and remove anything you can.
Write a minimal as possible demo for your specific issue.
Save and freeze. Provide us the final link to your demo.

Hello,
I'm closing this issue due inactivity. We have asked for additional details, but you could not helped us. Therefore we close this issue as not reproducible.
If you still have an issue, please create a new issue because we cannot be sure to track closed issues.


Change classMap to set classes correctly for SVGs

The assignment to element.className in classMap was causing the error setting getter-only property "className".
According to the SVG specification, className is a read-only property. This differs from className on Element, which can be set.
Fixes #930.

Fixed!
For posterity, here is the Can I Use page for classList. For IE 10 and 11, it says:

Does not have support for classList on SVG or MathML elements.
Which matters here because this pull request's specific intent is to fix support for SVG elements.

Ping @justinfagnani, this is good to merge.

Thanks @AdamVig and @jridgewell!
@AdamVig could you update the changelog for this? Otherwise, looks good.

@justinfagnani Sure, done.

@AdamVig unfortunately, IE11 doesn't support classList on SVG, so CI failed on master after the merge.
Looks like Stencil ran into the same problem here: https://github.com/ionic-team/stencil/issues/1079
We can do something similar use setAttribute for SVG.

IE11 doesn't support classList on SVG

Only test uses classList. The actual code already uses setAttribute, so is needed to update only the tests

No, the problem is in the classMap directive itself: https://github.com/Polymer/lit-html/blob/master/src/directives/class-map.ts#L60
What's happening is that this PR fixes the first error with classMap on SVG, and so exposes the second, which is IE-only.


Support AngularDart v2.1.0.

I am getting these kinds of errors in the browser:
ORIGINAL EXCEPTION: No provider for Renderer!

Do I understand it correctly that what needs to be done here is that Renderer invocations need to be replaced with dart:html calls?
If so, I can possibly help with a couple of pull requests.

Yes, it should be an easy fix with "dart:html".
Your pull request is welcome!


Fix 'Invalid Point' bug

I am not sure what happened, but probably atom api changed since code was made.

Thanks for your fix. This patch tested on atom 1.9.9 successfully.


"content" column blank

The "content" column is blank if post only contains text (has no images/videos) or if the text is in a different font. However, data from posts with both text and images are extracted properly.

Hi @g4bmnr2, can you share which page it happened with?. It will help reproducing the issue


Parsing error: Unexpected character '@'

Information:

ESLint version: v8.42.0
eslint-plugin-css version: 0.8.0

Description
A file containing: @import url('font-awesome/css/font-awesome.css'); fails at linting with Parsing error: Unexpected character '@'
Expected behavior
It should work.

This plugin is not a plugin that checks CSS files.

I'm confused. What does this plugin do then? If it's not about css, then perhaps it should be renamed to something more specific...


Pomodoro and Timer resets when system gets locked

When the timer or pomodoro is running and if the system locks due to screen inactivity or if i manually lock the system the timer resets. I'm using Pop!_OS 21.04.

All extensions get disabled when the screen is locked. Can't do anything about it. There is a warning about this in the README.

sorry my bad. Thank you for the quick response though. Much appreciated. BTW love the extension...it's helped with my productivity so much :)


before hook not working properly with method type

Hi,
this code worked before but don't know if it is us that changed the code or if autoform is doing it differently now (read the docs but couldn't find anything). So I want to add something to the document before submitting to the 'questions/answer' method but the hooks dont run.
AutoForm.addHooks(null,{
    before: {
      "questions/answer": function(doc, template) {
        doc.question = _.omit(template.data,"schema");
        return doc;
      }
    }
});

{{> quickForm schema=this.schema id=this.name type="method" omitFields="question" meteormethod="questions/answer"}}

Change "questions/answer": function to method: function. It's just the form type now. This is mentioned in the changelog and updated in the docs, but I know there are a lot of changes there so easy to miss.

ok thanks! :+1:


Can I render equations using MathML format?

Could you clarify what you're asking here?  KaTeX already outputs both MathML and HTML.  The MathML is by default hidden visually, but I believe you could change the CSS to make it render, and hide the HTML rendering.

Sorry for the close/open; hit the wrong button on mobile.
@nmanumr Do you mean MathML add input to KaTeX or as output?

Just found another way


Use master_for correctly to reduce number of Redis connections

For other Redis-consuming projects, we have traditionally used the sentinel_sharded_redis library, which has a sentinel_refresh_interval setting. This setting controls how often sentinel_sharded_redis reaches out to Sentinel to get the latest information about Redis masters.
When consuming the redis-py library in this project, we applied the same pattern, adding a sentinel_refresh_interval setting to the transport and using that to control how often redis-py's sentinel.master_for(...) is called. This is not the way sentinel.master_for(...) was designed to be used.
sentinel.master_for(...) creates a whole new StrictRedis client with a whole new connection pool every time it is called. We are wasting connections that remain open and unused until garbage collection runs, and opening connections too often, by regularly calling sentinel.master_for(...). This method was designed to be called in a startup or lazy-startup capacity, and the client it returns should be used indefinitely. The client it returns uses a special managed connection pool with special managed connections that keeps track of master information and automatically closes and re-opens connections if the master information changes.
In this change, we are removing the sentinel_refresh_interval setting (but it can still be included for a no-op for temporary backwards compatibility with existing settings). We will no longer call sentinel.master_for(...) regularly. Instead, we call it the first time we need a master client, and then we use that master client indefinitely.

The client it returns uses a special managed connection pool with special managed connections that keeps track of master information and automatically closes and re-opens connections if the master information changes.

Can you link to the relevant code in redis-py?
We'll want to retest the client and server behavior during failover after this change lands.

@ebpitts:

master_for behavior: https://github.com/andymccurdy/redis-py/blob/5109cb4f6b610e8d5949716a16435afbbf35075a/redis/sentinel.py#L246-L272
Sentinel-managed connection pool behavior: https://github.com/andymccurdy/redis-py/blob/5109cb4f6b610e8d5949716a16435afbbf35075a/redis/sentinel.py#L99-L108
Sentinel-managed connection behavior: https://github.com/andymccurdy/redis-py/blob/5109cb4f6b610e8d5949716a16435afbbf35075a/redis/sentinel.py#L33-L66
An example of Flask using redis-py Sentinel the same way we're proposing in this change: https://github.com/exponea/flask-redis-sentinel/blob/9f0003345d3756c19ce913acb0e25b613f8368a6/flask_redis_sentinel.py#L62-L77

Outstanding.

Results of load testing in Stage:

Whereas "new Redis connections/sec" was ~1,800 without sentinel_refresh_interval/transport_cache_time_in_seconds and ~10 with it, it's ~1 with this new pull request.
Whereas "persistent Redis connections" was ~50 without sentinel_refresh_interval/transport_cache_time_in_seconds and ~1,500 and jagged with it, it's ~280 and very smooth with this new pull request.
Whereas "time to send request to Redis" was ~1ms in stage without sentinel_refresh_interval/transport_cache_time_in_seconds and ~0.1ms with it, it's ~0.01ms with this new pull request.
Simulated Redis master failover via Sentinel was the same across all three configurations: Quick bout of errors while Sentinel picked a new master, and then recovered within just a few seconds.

Given those excellent results, I am landing this PR.


Add get, replace, and test for IAM

Fixes #439.
There are two outstanding issues to resolve regarding IAM:

The string values corresponding to the permissions for list and create are correctly formed.  However, when I tested manually, I found that they cause a 400 error citing bad request.  I will ask about this.
Version seems to be a completely useless field, because people will unset it completely by creating and setting a fresh policy (not using the read-write-modify pattern).  Should we remove version entirely from the IamPolicy class in core?

build seems to be broken for Java 8 due to javadoc issues.

Thanks for the heads up, fixed the javadoc issue.

The string values corresponding to the permissions for list and create are correctly formed. However, when I tested manually, I found that they cause a 400 error citing bad request. I will ask about this.

Should be open an issue for this?

Version seems to be a completely useless field, because people will unset it completely by creating and setting a fresh policy (not using the read-write-modify pattern). Should we remove version entirely from the IamPolicy class in core?

Could there be other possible uses of version in user land? Did you try to ask service owners for this?
I just completed the first pass and added a bunch of minor comments, great work!

Thanks for the first pass @mziccard!  I incorporated all comments except the </li> tags, which I don't feel super strongly about either way, but I think it's slightly more readable and common as is.
I created issue #722 for the create and list permissions problem.  For the version issue, I checked with the IAM service owners, and they say that version is primarily used to differentiate between people with access to alpha features and people who don't have that access.  It's a temporary field that's useful during this "bridge" period when there are legacy roles (i.e. owner, editor, viewer), and more specialized roles that not everybody has access to at the moment.  I would consider keeping it, but it's behavior is somewhat erratic when interfacing with the resource manager service.

@ajkannan Added a few more nits, looks good to me!

Added fixes for the latest round of comments.  I think we should keep this PR open until I clear up #722.

@ajkannan Sounds good!

Removed create and list in the latest comment (as per reasoning in #722).

Nice job. Done with first iteration.

Pushed commit 4117d61 to incorporate all comments thus far + a rebase to take care of merge conflicts.  In addition, the following changes were made as discussed verbally:

Rename id in the Identity class to value
Make Role a class instead of an enum to handle unsupported roles.  I haven't added roles/resourcemanager.browser because it is in beta.
Remove the own and setBillingAccount permissions (in addition the previously removed create and list permissions)

Incorporated comments, but instead of the ImmutableList.of suggestion, I just passed back the original list permissions.  I think the Arrays.asList was a vestige of when I passed in an array rather than a list.

Looks good. Feel free to merge after applying the comments that we discussed.


Proposal - api - add more details to "type StopWatch" [WIP]

Gitea version (or commit ref): 96add8c319bd8299bfb8fdd4d98c6f71407e2475
Git version:
Operating system: Linux
Database (use [x]):

[ ] PostgreSQL
[x] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[x] Not relevant

Log gist:

Description
It is not possible to get more info via swagger API for a "StopWatch" (especially the repository assigned to its issue) after a API GET request /user/stopwatches. Actual I am getting this StopWatch type after a request:
{
  created        string($date-time)
  issue_index  integer($int64)
}

The issue index is assigned to a repo, but repo data is not part of the type/data. I want to change this type to:
{
  created | string($date-time)
  issue_index  integer($int64)
  issue_title  string
  repo_name  string
  repo_owner_name  string
}

here my fork: https://github.com/no-go/gitea
Possible problems after that "hack"

Other Code, that suggests the old/reduced type StopWatch
Security problems: Access Issue data to a StopWatch, but user is not allowed to see the issue/repo anymore

Screenshots

Please find someone to review and test my pull request :-)

Please find someone to review and test my pull request :-)

:-D


hr download link broken

The download link in hr.rb is no longer working and I can't find a replacement on their website.
Looks like it's only available on the app store now.

Looks like it. We’ll have to remove it. Thank you.