Feature/context

Add context and various logging improvements

Codecov Report
Attention: Patch coverage is 35.50296% with 109 lines in your changes missing coverage. Please review.

Project coverage is 56.94%. Comparing base (e2dd4a8) to head (1407e45).

Files with missing lines
Patch %
Lines

src/gribjump/gribjump_c.cc
0.00%
37 Missing :warning:

src/gribjump/Metrics.h
11.11%
24 Missing :warning:

src/gribjump/remote/Request.cc
0.00%
14 Missing :warning:

src/gribjump/remote/RemoteGribJump.cc
0.00%
11 Missing :warning:

src/gribjump/Task.h
0.00%
6 Missing :warning:

src/gribjump/Engine.cc
81.81%
4 Missing :warning:

src/gribjump/LocalGribJump.cc
55.55%
4 Missing :warning:

src/gribjump/Task.cc
72.72%
3 Missing :warning:

src/gribjump/remote/GribJumpUser.cc
0.00%
3 Missing :warning:

src/gribjump/ExtractionData.cc
60.00%
2 Missing :warning:

... and 1 more

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #15      +/-   ##
===========================================
- Coverage    57.47%   56.94%   -0.54%
===========================================
  Files           77       79       +2
  Lines         3887     4004     +117
  Branches       442      448       +6
===========================================
+ Hits          2234     2280      +46
- Misses        1653     1724      +71

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


Deque: A double ended queue

Is your feature request related to a problem? Please describe.
As far as I've seen this library "lacks" a cache-friendly queue implementation. Coming from a C++ background, having std::deque has proven to be quite useful numerous times.
Describe the solution you'd like
An implementation of a deque.
Describe alternatives you've considered
I've previously authored an alternative data structure that functions very well as a deque, known as devector, where you can find here. It's a more customizable version of boost's devector.
Additional context
devector is basically a vector that hasn't anchored its list's first element to the start of the underlying buffer, leaving free slots on both the beginning and end of the buffer.
A simple visualization which you can find on my repository:

Conclusion
I've time to spare and I'd be willing to re-implement a devector in C or even try something new and implement a deque the way C++ does.  Would any of the two be desirable?

you can try tb_circle_queue
https://github.com/tboox/tbox/blob/master/src/tbox/container/circle_queue.h

@waruqi  I didn't notice that one, should be more careful next time. Thanks for your time!


mysql dialect URL returns without scheme

Description
mysql.URL() returns the url without the scheme mysql:// while postgres and cockroach dialects add that scheme. Is there any reason for doing that or should I fix it?
Steps to Reproduce the Problem
c, err := pop.NewConnection&pop.ConnectionDetails{
    URL: "mysql://url",
})
require.NoError(t, err)

Expected Behavior
strings.HasPrefix(c.URL(), "mysql://") == true

Actual Behavior
strings.HasPrefix(c.URL(), "mysql://") == false

I don't think there's a reason for that, you can fix it. :)

Closing, see https://github.com/gobuffalo/pop/pull/544#issuecomment-754475577

Closing, see https://github.com/gobuffalo/pop/pull/544#issuecomment-754475577


Unable to verify contracts with any suppressed solidity compiler errors  (eg. --suppress-errors sendtransfer)

🐛 Bug Report
Unable to verify contracts that were compiled with supressed errors
📝 Description
I have a successfully deployed contract that was compiled using hardhat zksolc configuration that looks like as follows
  zksolc: {
    version: "1.5.6",
    compilerSource: "binary",
    settings: {
      suppressedErrors: ['txorigin', 'sendtransfer'],
    },
  },

🔄 Reproduction Steps
Deploy a contract with this vulnerability present but supressed https://docs.soliditylang.org/en/latest/security-considerations.html#reentrancy
Attempt to verify the contract against https://explorer.sepolia.era.zksync.dev/contract_verification using hardhat verify
Receive the following error
Backend verification error: Compilation errorError: You are using '<address Y>.send/transfer(<X>)' without providing the gas amount.
Such calls will fail depending on the pubdata costs.

Please use 'Y(<address>).call{value: <X>}("")' instead, but be careful with the
reentrancy attack. `send` and `transfer` send limited amount of gas that prevents reentrancy,
whereas `<address>.call{value: <X>}` sends all gas to the callee.

In Solidity v0.4, where there is no `payable` type, this may be a false positive
if `using X for address` is used with `X` implementing its own `send` or `transfer` functions.

Learn more about reentrancy at https://docs.soliditylang.org/en/latest/security-considerations.html#reentrancy

You may disable this error with:
    1. `suppressedErrors = ["sendtransfer"]` in standard JSON.
    2. `--suppress-errors sendtransfer` in the CLI.
     |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

🤔 Expected Behavior
Since the warning is something that can be suppressed via the solidity compiler it should be able to pass verification here.
😯 Current Behavior
Unable to verify the contract despite being able to build it locally.
🖥 Environment
    "@matterlabs/hardhat-zksync-verify": "^1.6.0",
     "@matterlabs/hardhat-zksync-deploy": "^1.6.0",
    "@matterlabs/hardhat-zksync-solc": "^1.2.5",
    "@nomicfoundation/hardhat-chai-matchers": "^1.0.6",
    "@nomicfoundation/hardhat-ethers": "^3.0.8",
    "@nomicfoundation/hardhat-network-helpers": "^1.0.12",
    "@nomicfoundation/hardhat-verify": "^2.0.11",
    ...
    "ethers": "~6.13.4",

📋 Additional Context
This was added in hardhat zksync
https://github.com/matter-labs/hardhat-zksync/pull/1375
📎 Log Output
Paste any relevant log output here.

Closing and opening at https://github.com/matter-labs/block-explorer

Actually - reopening as this does seem to be the right place to open this issue


Fix version bower dependencies

Description
fix version for all dependencies in bower javascript
Additional Context
Add any other context or screenshots about the feature request here. Or any other alternative you have considered to addressed this new feature.

Progress Status

[ ] Branch created
[ ] Code committed to development branch
[ ] Testing - QA
[ ] Documentation
[ ] Release notes - resolved issues, compatibility, known issues
[ ] Code committed to upstream release/hotfix branches
[ ] Documentation committed to upstream release/hotfix branches

closed as ruby sunstone will be deprecated by #5422


cmd/compile: internal compiler error - 'can't find empty register' on ppc64le builders

The linux-ppc64le builders are currently broken with a internal compiler error: 'checkIfRange' crash:
##### Testing race detector
# net/http
m:0 unique:58 final:0 rematerializable:0
v2: v2 SP
v414: v414 R3
v205: v205 R4
v459: v348 R5
v458: v458 modtime+8[int64]
v457: v457 modtime+16[*time.Location]
net/http/fs.go:448:14: internal compiler error: 'checkIfRange': can't find empty register on edge b61->b65

goroutine 1 [running]:
runtime/debug.Stack(0xadf820, 0xc000086008, 0x0)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/runtime/debug/stack.go:24 +0x8c
cmd/compile/internal/gc.Fatalf(0xc002c89170, 0x2e, 0xc002d93b00, 0x3, 0x3)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/gc/subr.go:188 +0x294
cmd/compile/internal/gc.(*ssafn).Fatalf(0xc002f254d0, 0x1c00e000000007, 0x93d17d, 0x28, 0xc002d8d9e0, 0x2, 0x2)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/gc/ssa.go:6177 +0x160
cmd/compile/internal/ssa.(*Func).Fatalf(...)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/ssa/func.go:617
cmd/compile/internal/ssa.(*edgeState).findRegFor(0xc002da4a90, 0xc0000883c0, 0xc002da4908, 0xc002ebdca8)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/ssa/regalloc.go:2287 +0x3dc
cmd/compile/internal/ssa.(*edgeState).process(0xc002da4a90)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/ssa/regalloc.go:2010 +0x308
cmd/compile/internal/ssa.(*regAllocState).shuffle(0xc002f2b200, 0xc002f03800, 0x49, 0x49)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/ssa/regalloc.go:1848 +0x204
cmd/compile/internal/ssa.(*regAllocState).regalloc(0xc002f2b200, 0xc002eaac60)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/ssa/regalloc.go:1659 +0x18d0
cmd/compile/internal/ssa.regalloc(0xc002eaac60)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/ssa/regalloc.go:146 +0x5c
cmd/compile/internal/ssa.Compile(0xc002eaac60)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/ssa/compile.go:92 +0x8a4
cmd/compile/internal/gc.buildssa(0xc0008dc160, 0x0, 0x0)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/gc/ssa.go:289 +0x778
cmd/compile/internal/gc.compileSSA(0xc0008dc160, 0x0)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/gc/pgen.go:298 +0x38
cmd/compile/internal/gc.compile(0xc0008dc160)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/gc/pgen.go:277 +0x26c
cmd/compile/internal/gc.funccompile(0xc0008dc160)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/gc/pgen.go:222 +0xe8
cmd/compile/internal/gc.Main(0x949c48)
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/internal/gc/main.go:682 +0x3184
main.main()
	/tmp/workdir-host-linux-ppc64le-osu/go/src/cmd/compile/main.go:51 +0xb8

2019/09/23 06:03:30 Failed: exit status 2
2019/09/23 06:03:50 FAILED

Full log: https://build.golang.org/log/b288cd59a7c053c8cf0136972f9c37c42bc678c6
The breakage started after CL 194297 (compile: prefer an AND instead of SHR+SHL instructions).
cc @martisch

@laboger. I do not currently have a ppc64le machine setup to test or debug this. Could you please have a look if there is an easy fix forward?
As this only happens in race and on ppc64le (not ppc64) it seems a special/local problem. Maybe since cl/194297 can use introduce the use of an extra register to load a large constant where it previously did not this increased the register pressure above a threshold when compiling the checkIfRange in race mode. If that is the case could registers be spilled to resolve the problem?
Seems other changes could run into this problem too if not resolved generally.
https://github.com/golang/go/blob/7ed973b4d9dab38347f34e87febf3c8659160ce6/src/net/http/fs.go#L447

This is strange. The register allocator is reporting m==0 in (*edgeState).findRegFor.
That's shouldn't happen. m is initialized (and then never modified) to
	var m regMask
	if typ.IsFloat() {
		m = e.s.compatRegs(types.Float64)
	} else {
		m = e.s.compatRegs(types.Int64)
	}

Both those calls should return nonzero.

CL 195117 changes it to call compatRegs with typ, and let compatRegs to find the one for the given type. If is float or int, it should be fine. But if typ is flags, the behavior changes: it used to return integer register's mask, now it returns 0. In this particular case, typ is in fact flags. I thought we shouldn't have flags type here?
The interesting value here is v205, which is of type flags but got register R4. This seems bad.
  b61: <- b59
    v352 = MOVDaddr <*int64> {time.t} [8] v2 : R3
    v412 = MOVDstore <mem> [32] v2 v352 v387
    v413 = CALLstatic <mem> {runtime.raceread} [40] v412
    v414 = MOVDload <int64> {time.t} [8] v2 v413 : R3 (~R0[int64])
    v348 = LoadReg <uint64> v459 : R5
    v62 = MOVDconst <uint64> [-9223372036854775808] : R4
    v205 = ANDCC <flags> v348 v62 : R4
    Plain -> b65

PPC64Ops.go has:
		{name: "ANDCC", argLength: 2, reg: gp21, asm: "ANDCC", commutative: true, typ: "Flags"}, // arg0&arg1 sets CC

I think this is not right. It should have a tuple type like (Int64, Flags) instead of flags type.

I think ANDCC doesn't generate the result of the AND, just the flags. So the fix might be as simple as replacing gp21 with gp2flags.


Fork Project

Fork project
Forks a project into the user namespace of the authenticated user.
POST /projects/fork/:id

Parameters:

id (required) - The ID of the project to be forked

Fixed by #44


Make files a positional argument

Title says it all, this removed the need for the annoying -f flag, that was mostly unergonomic and useless.
@f18m I'd appreciate your thoughts on this!

Hi,
I think the change is fine even if I dont see anything wrong with current -f flag honestly. Anyway for people like me that have integrated beautysh into a large project where lots of people work on (everybody having beautysh installed),It would be important to have at least the minor version incremented for such a backward-incompatible change... In such way I can write in the build system a rule forcing people to use only the newer version... I guess for people integrating beautysh in other ways (eg sublimetext) It Will be the same ;)

@f18m Yeah, I'm going to bump the major version when this gets released :)
Thanks for the feedback!


Auto generated model.

This PR adds a script which creates an automatically generated model and some tests. The script parses the XML and calculates the appropriate center of mass and buoyancy volumes based on the constraints given.
How the script works
The script reads an SDF-like file with the poses of individual links and computes their moments. It then calculates the correct position of the center of mass of the vehicle and applies this to the link whose inertial pose is marked with @calculated along with the appropriate mass.
Finally for any link whose collision volume that has been marked as @neutral_buoyancy the system will write the link to have neutral buoyancy.
Requires upstream: https://github.com/ignitionrobotics/ign-gazebo/pull/1211
Things to look out for in this PR.
Without #96 I expect most of the tests to fail except for the newly added tests which test the hydro-static stability of the vehicle. The newly FlatWorld tests assert that the vehicle is neutrally buoyant so it doesn't move any where to start of. There are no inherent oscillations. The TiltedWorld test asserts that the vehicle when placed in a certain pitch will oscillate without hydrodynamics to damp it. The maximum of this oscillation should be its starting pitch. Both these tests only check the buoyancy of the vehicle and no hydrodynamics.

Even after the Hydrostatics is fixed the pitchmass mission continues to oscillate. This suggests we need more damping we will probably have to tune Mqq parameter.

The battery visual is in the wrong place. I guess we can move it?
On Wed, Dec 22, 2021, 12:12 PM Louise Poubel @.***>
wrote:

@.**** requested changes on this pull request.
The smaller collisions look really strange
[image: PR89_coll]
https://user-images.githubusercontent.com/5751272/147033962-fea95e09-e3f9-449f-bce4-96b2b391fb86.png
I know they're calculated in a way to achieve stability, but shouldn't
they at least be reasonably placed and scaled? If we're going with whatever
brings stability, I'd recommend we just get rid of these small collisions
and rely on just one or two large collisions for buoyancy.
I also noticed that the battery's CoM seems to be way forward now, outside
the battery itself:
[image: PR89_com]
https://user-images.githubusercontent.com/5751272/147034184-9a7ccedc-19b0-41e2-b629-3c5bb21c6dd8.png
In lrauv_description/CMakeLists.txt
https://github.com/osrf/lrauv/pull/89#discussion_r773579331:

configure_file(

"hooks/hook.dsv.in"
"${CMAKE_CURRENT_BINARY_DIR}/hooks/hook.dsv" @ONLY
)
+#============================================================================
+# Model Generation
+add_custom_command(

OUTPUT modelsdf

COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/scripts/description_generator.py ${CMAKE_CURRENT_SOURCE_DIR}/models/tethys/model.sdf.in ${CMAKE_CURRENT_BINARY_DIR}/models/tethys/model.sdf

Can we break this line so it's not necessary to scroll horizontally?
In lrauv_description/test/test_hydrostatic_stability.cc
https://github.com/osrf/lrauv/pull/89#discussion_r773581904:

}

);

fixture->Finalize();

fixture->Server()->Run(true, 10000, false);

EXPECT_EQ(10000, tethysPoses.size());

bool first = true;

ignition::math::Pose3d prev_pose;

for (const auto &pose: tethysPoses)

{

if (first)

{

 prev_pose = pose;

 first = true;

Oops
⬇ Suggested change

 first = true;

 first = false;

In lrauv_description/test/worlds/flat_world.sdf
https://github.com/osrf/lrauv/pull/89#discussion_r773582446:

 <uri>tethys</uri>

 <plugin

   filename="ignition-gazebo-detachable-joint-system"

   name="ignition::gazebo::systems::DetachableJoint">

   <parent_link>base_link</parent_link>

   <child_model>__model__</child_model>

   <child_link>drop_weight</child_link>

   <topic>/model/tethys/drop_weight</topic>

 </plugin>

 <plugin

   filename="ignition-gazebo-joint-position-controller-system"

   name="ignition::gazebo::systems::JointPositionController">

   <joint_name>battery_joint</joint_name>

   <use_velocity_commands>true</use_velocity_commands>

   <cmd_max>0.0007</cmd_max>

 </plugin>

Could you add a comment explaining why we're loading only these plugins
instead of loading tethys_equipped?
We should also consider putting these into a new model. Right now the
plugins are duplicated on the 2 world files and on tethys_equipped - it
will be hard to keep them all in sync.
In lrauv_ignition_plugins/worlds/buoyant_tethys.sdf
https://github.com/osrf/lrauv/pull/89#discussion_r773583650:

@@ -5,6 +5,7 @@

-->

0 0 -9.8

If this is needed, it would be good to add a comment, otherwise I can see
us removing it by mistake. Is it a matter of the precision matching other
calculations?
In lrauv_description/test/test_hydrostatic_stability.cc
https://github.com/osrf/lrauv/pull/89#discussion_r773583704:

fixture->Finalize();

fixture->Server()->Run(true, 100000, false);

EXPECT_EQ(100000, tethysPoses.size());

bool first = true;

double maxPitch {std::numeric_limits::min()},

minPitch{std::numeric_limits::max()};

ignition::math::Pose3d prev_pose;

for (const auto &pose: tethysPoses)

{

if (first)

{

 prev_pose = pose;

 first = true;

⬇ Suggested change

 first = true;

 first = false;

In lrauv_description/test/test_hydrostatic_stability.cc
https://github.com/osrf/lrauv/pull/89#discussion_r773583788:

{

 auto worldEntity = ignition::gazebo::worldEntity(_ecm);

 ignition::gazebo::World world(worldEntity);

 auto modelEntity = world.ModelByName(_ecm, "tethys");

 EXPECT_NE(ignition::gazebo::kNullEntity, modelEntity);

 tethysPoses.push_back(

     ignition::gazebo::worldPose(modelEntity, _ecm));

}

);

fixture->Finalize();

fixture->Server()->Run(true, 10000, false);

EXPECT_EQ(10000, tethysPoses.size());

Does this one have one less zero than the tilted test on purpose?
In lrauv_description/test/test_hydrostatic_stability.cc
https://github.com/osrf/lrauv/pull/89#discussion_r773583989:

EXPECT_NEAR(prev_pose.Pos().Z(), pose.Pos().Z(), 1e-2);

auto pitch = pose.Rot().Euler().Y();

if (pitch > maxPitch)

{

 maxPitch = pitch;

}

if (pitch < minPitch)

{

 minPitch = pitch;

}

prev_pose = pose;

}

// Since we start the system at 0.08 pitch, we should not exceed this.

Should we check minPitch too?
It would also be interesting to check that the vehicle is actually
bouncing up and down, because the current test would also pass if the
amplitude is decreasing (which shouldn't happen because we don't have
hydrodynamics loaded), or even if the vehicle were stopped in place. I'm
not sure what the quickest way of testing this would be, maybe checking
that the pitch rate keeps going up and down?
In lrauv_description/test/test_hydrostatic_stability.cc
https://github.com/osrf/lrauv/pull/89#discussion_r773584091:

double maxPitch {std::numeric_limits::min()},

minPitch{std::numeric_limits::max()};

ignition::math::Pose3d prev_pose;

for (const auto &pose: tethysPoses)

{

if (first)

{

 prev_pose = pose;

 first = true;

 continue;

}

EXPECT_NEAR(prev_pose.Pos().X(), pose.Pos().X(), 1e-2);

EXPECT_NEAR(prev_pose.Pos().Y(), pose.Pos().Y(), 1e-2);

EXPECT_NEAR(prev_pose.Pos().Z(), pose.Pos().Z(), 1e-2);

auto pitch = pose.Rot().Euler().Y();

Can we also add expectations for roll and yaw?
In lrauv_description/test/test_hydrostatic_stability.cc
https://github.com/osrf/lrauv/pull/89#discussion_r773584345:

for (const auto &pose: tethysPoses)

{

if (first)

{

 prev_pose = pose;

 first = true;

 continue;

}

EXPECT_EQ(prev_pose, pose);

prev_pose = pose;

}

EXPECT_EQ(prev_pose.Pos(), ignition::math::Vector3d(0,0,0));

EXPECT_EQ(prev_pose.Rot(), ignition::math::Quaterniond(1,0,0,0));

+}

+TEST(Stability, TiltedWorld)
It would be good to explain here what we're trying to test.
—
Reply to this email directly, view it on GitHub
https://github.com/osrf/lrauv/pull/89#pullrequestreview-838043687, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEEMQBND7MEOT7HGLMV3QTUSFFZHANCNFSM5IQAJQ2Q
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were assigned.Message ID:
@.***>

I'm close to approving this. Just checking if you missed these 2 comments, @arjo129:

https://github.com/osrf/lrauv/pull/89#discussion_r771218259
https://github.com/osrf/lrauv/pull/89#discussion_r773583989

Thanks a lot I've addressed the feedback from those two.


Updated ServiceFabric spec with examples

Added application type name, application type version, application, and service examples
Updated cluster examples to match current API
Fixed service resource properties model

This is a preview version, so changes to the model are expected.

Makes sense. Ignoring breaking changes.  Can you look at the linter and model errors and resolve?

Linter is returning false positives based on the RP API documentation. We are explicitly using 202 status code for asynchronous operations. The new resource types are proxy-only, but are being incorrectly flagged as tracked resources. We are not able to change the camelCase style of some of the properties because they are shared with our non-ARM REST API model.

Ignoring breaking changes since this is a preview version.  Will merge with linter and model issues based on @juhacket comments.

 https://github.com/Azure/azure-sdk-for-ruby/pull/1149

No modification for AutorestCI/azure-sdk-for-node


Azure Devops Release Pipeline - Azure App Service files not updated

I left this issue in stackoverflow also. I setup everything, and followed the existing solutions in different threads, but the (successul) release pipeline doesn't update the files in the Azure service.
I'm using the pipeline step version 4.*
The WebApp.zip is retreived successfully from the build and it contains the files, but in a strange subfolder structure: Content\d_C\a\1\s\Platform\Backend\Backend.WebApp (my path starts at 'Platform')
Here I also left the log output of the step:
https://stackoverflow.com/questions/56239438/azure-devops-release-pipeline-azure-app-service-files-not-updated

hello, anyone? I keep investing time into this pipeline, but it seems unsolvable. Somehow the deployment task doesn't recognize the content of the WebApp.zip, although it has all the dll's and so on...

Solved it...
https://developercommunity.visualstudio.com/content/problem/587989/azure-devops-release-pipeline-azure-app-service-fi.html


Create frontend for viewing paybuttons.

Description:
Creates a simple http://localhost:3000/paybuttons page to view paybuttons.

There is no front end to create paybuttons for now, they will be created in a separate PR.
Test Plan:
Creates some paybuttons with, e.g:
curl -X POST localhost:3000/api/paybutton -H "Content-Type: application/json"  -d '{"userId": "u-id", "name":"pb-example-name2", "buttonData": "{\"foz\": \"baz\"}", "addresses":"ecash:qpz274aaj98xxnnkus8hzv367za28j900c7tv5v8pc\nbitcoincash:qpz274aaj98xxnnkus8hzv367za28j900c7tv5v8lc"}' | jq

Then check if/how they appear in the page.

[x] Depends on #116

can you pull master into this?

I need some better instructions on how to add a paybutton for a user as right now I can't seem to do it manually in the db.

If you can't run the curl command because you're running Windows, you can enter the alpine docker container as root with yarn docker nrs, add the curl and jq utilities with apk add curl jq and run the curl command in the description from there.

There's 1 paybutton entry in the db for me but none show up.

Probably is this entry has a providerUserId different from the logged in user you're using in the front-end.

Is the in-UI button/address creator form coming back soon? I just noticed it's missing now.

Yes, it's basically ready, I just didn't create the PR yet because I wanted to put up a PR making it so that when creating the dev environment we also create a entry in the supertokens database for a standard 'dev' user, thus making it easier to test/ work with the front-end in the future.

I need some better instructions on how to add a paybutton for a user as right now I can't seem to do it manually in the db.

If you can't run the curl command because you're running Windows, you can enter the alpine docker container as root with yarn docker nrs, add the curl and jq utilities with apk add curl jq and run the curl command in the description from there.

There's 1 paybutton entry in the db for me but none show up.

Probably this entry has a providerUserId different from the userId of the logged in user you're using in the front-end.

Is the in-UI button/address creator form coming back soon? I just noticed it's missing now.

Yes, it's basically ready, I just didn't create the PR yet because I wanted to put up a PR making it so that when creating the dev environment we also create a entry in the supertokens database for a standard 'dev' user, thus making it easier to test/ work with the front-end in the future.

apk isn't a valid commant in Windows.

apk isn't a valid commant in Windows.

You should run inside the docker node container, which is running Alpine Linux.

The test plan provides a way to create buttons via curl, but skips over how to actually log in and view those buttons. what username/password?

The test plan provides a way to create buttons via curl, but skips over how to actually log in and view those buttons. what username/password?

Indeed, you can run yarn docker dbu to enter the user database and then run the following query there to create user<EMAIL_ADDRESS>with password  u and id u-id:
INSERT INTO emailpassword_users VALUES ('u-id'<EMAIL_ADDRESS>'$2a$11$QOyNFFmciE6Hda1avqxxa.qLMYIJSBWn7eV8i6Ude73qu5l2/wA5e',<PHONE_NUMBER>244);
INSERT INTO emailverification_verified_emails VALUES ('u-id', 'u@u.com');
INSERT INTO all_auth_recipe_users VALUES ('u-id', 'emailpassword',<PHONE_NUMBER>244);

I am creating a PR that will seed this DB with a default dev user, so in the future this is easier.

I know this is slightly out of scope for this task but figured we should address it. Can we switch to storing the address prefixes in the db? It's more useful to just have it in there than having to append it every time we need to work with the address.

I don't understand, how would you like it to be stored? Right now we are storing it in the DB by pointing each PaybuttonAddress to a chain that has the prefix for which that address refers to.
If you mean that we should save the string, for example, ecash:qp...3f2 instead of qp...3f2 in the field address, it's something we can do for sure, but it is indeed out of the scope of this PR; I could  open another PR addressing it.


 We don't need a pointer alignment.
 They are not pointer sized.
R2R helpers don't have addresses that are visible from managed code. We don't need to align them at 4 byte boundaries.

Saves around 10 kB on the size of a Hello world. Won't make a huge difference, but this was an easy thing.

@fadimounir Could you have a look?

LGTM


Added librealsense wrapper.

Changes proposed in this pull request:

Add a ros friendly wrapper for librealsense.

There is a lot of ros boilerplate in there, I can clean it up more if you like. Feel free to take over maintainer.

Moved this work to kinetic-devel branch, we can always pull changes back into indigo if you want.


Problem with schema created from List-Inheritance

Hello, I am about to generate valid schemas from the models in our project for data validation. I stumbled upon a problem where we have an object defined which is actually inheriting from List which is not resembled by an array in the schema but by an object. Therefor the validation goes wrong. Since I am new to NJsonSchema there might be a solution to this I do not know yet. I already use FlattenInheritanceHierarchy.
Our object; we had to define it like this so that the tags in the xml output are named  "legendid" works:
namespace x
{
  /// <inheritdoc />
  /// <summary>
  /// model that defines a list of legend ids
  /// </summary>
  [CollectionDataContract(ItemName = "legendid", Namespace = ""), IgnoreMapping]
  public class LegendIdListModel : List<int>
  {
    /// <inheritdoc />
    /// <summary>
    /// constructor
    /// </summary>
    /// <param name="collection"></param>
    public LegendIdListModel(IEnumerable<int> collection) : base(collection) { }

    /// <inheritdoc />
    /// <summary>
    /// constructor (necessary for serialization)
    /// </summary>
    // ReSharper disable once UnusedMember.Global
    public LegendIdListModel() { }
  }
}

Usage:
    /// list of article legends
    /// </summary>
    [DataMember(Name = "articlelegendids", Order = 4, EmitDefaultValue = false)]
    public LegendIdListModel ArticleLegendIds { get; set; }

The schema generated using FlattenInheritanceHierarchy. (If I change the type to array here validation works)
"LegendIdListModel": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "Capacity": {
          "type": "integer",
          "format": "int32"
        },
        "Count": {
          "type": "integer",
          "format": "int32"
        },
        "Item": {
          "type": "integer",
          "format": "int32"
        }
      }
    }

Usage:
      "description": "list of article legend ids (article and cross selling teaser legends)",
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/definitions/LegendIdListModel"
        }
      ]
    },

JSON Data which is generated and is invalid against this scheme:
 "articlelegendids": [
    3
  ],

Any proposal on how to make this work? Or is it an issue in the generator? Thanks in advance.
Sidenote: List of generator settings in wiki seems to be down, I get a ssl handshake error on the following link:
https://apiverse.io/organizations/nuget-org/nuget-feeds/public/packages/NJsonSchema/versions/latest?type=NJsonSchema.Generation.JsonSchemaGeneratorSettings&namespace=NJsonSchema.Generation&assembly=netstandard-2.0

I have the same issue. Did you find a solution?

Same here.

I was able to workaround it by using a custom generator


Changed fileDescriptor Type to support win_64

Changed Type from qint32 to qintptr, which according to QT "Typedef for
either qint32 or qint64. This type is guaranteed to be the same size as
a pointer on all platforms supported by Qt. On a system with 32-bit
pointers, qintptr is a typedef for qint32; on a system with 64-bit
pointers, qintptr is a typedef for qint64." Solution Taken from
http://stackoverflow.com/questions/18607915/zmq-getsockopt-returns-einval-on-windows-x64-when-local-address-of-zmq-fd-option

Thank you very much :-)

No Thank you...great project.


can detect more than seven numbers?

i'm very appreciate to know the project? I just want to use to detect some numbers and chracters? can it detect more than seven numbers?  Thanks

I am not sure about the performance. As a glance, that is possible.
By adding more digits (common.py), the artificially made training images would have more digits.
The network used in here should be extended to accept more digits.
The easiest way is to increase the dimension of last FC output.

Yes ofcourse it can, but the code modification doesn't involve changing common.py , but you have to change gen.py , the generate code function

@sourabh2k15 I've tried that, and I don't believe it works. I think you do have to modify code elsewhere other than gen.py because I believe especially the output of the fully connected layer thinks there are only 7 classes. It would be great if anyone figures an easy way to change the number of characters the nn expects.

I had done it successfully, Indian license plates have 10 length. so i
changed in gen.py the pattern , got test data , then changed model.py to
change 7 to 10 everywhere, you also need to change it in train.py . Also
finally when you get training weights you will want to run it on new images
using detect.py, there also change 7s to 10s . Hope that helps.
Thanks.
On Wed, May 31, 2017 at 4:53 AM, Josh Arnold<EMAIL_ADDRESS>wrote:

@sourabh2k15 https://github.com/sourabh2k15 I've tried that, and I
don't believe it works. I think you do have to modify code elsewhere other
than gen.py because I believe especially the output of the fully connected
layer thinks there are only 7 classes. It would be great if anyone figures
an easy way to change the number of characters the nn expects.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/matthewearl/deep-anpr/issues/16#issuecomment-305036956,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH09QlAR8A-VrizIID-UT-gGwQG8irFgks5r_KUEgaJpZM4LBCb0
.

I had done it successfully, Indian license plates have 10 length. so i changed in gen.py the pattern , got test data , then changed model.py to change 7 to 10 everywhere, you also need to change it in train.py . Also finally when you get training weights you will want to run it on new images using detect.py, there also change 7s to 10s . Hope that helps.
Thanks.


Added the countries_trivia script

Pull Request Template
What have you Changed - I have added the countries_trivia script and included README.md, and the african_countries.csv file for loading questions and answers.
Issue no.(must) - #10
Self Check(Tick After Making pull Request)

[] One Change in one Pull Request
[X] This issue was assigned to me
[X] My file is in proper folder
[X] I am following clean code and Documentation.
[X] I have added README.md with my script

@codePerfectPlus could you assign this to Arnab Sen? (I'm not sure of his Github username though) He said he'd like to do the task.

You already made a pull request for the same. I will assign him on a new issue.
I will create some new issues in the evening.

Alright Boss.
Thanks.
On Sep 28, 2020 1:06 PM, "Deepak Raj"<EMAIL_ADDRESS>wrote:

You already made a pull request for the same. I will assign him on a new
issue.
I will create some new issues in the evening.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Py-Contributors/awesomeScripts/pull/11#issuecomment-699965267,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AMHEIXRQY3QZSMJ7GXMCRO3SIB33NANCNFSM4R4LB37Q
.


Library section not deleting entries

Bug
Some videos just don't disappear from library section.
To Reproduce
Steps to reproduce the behavior:

Go to 'Hamburger' menu
Click on 'Library'
Click a video play it normally.
Click in delete button (Remove from your library) . Mark 'remove from my computer'
The video still there in you library.

Expected behavior
The entry in your library should disappear.
Screenshots
If applicable, add screenshots to help explain your problem.
System Configuration

LBRY Daemon version:
LBRY App version:
LBRY Installation ID:
Operating system:

Additional context
Add any other context about the problem here.

Sorry to hear about the trouble. Pretty sure this is the same bug as https://github.com/lbryio/lbry-desktop/issues/4420 but if you give us some examples of what files can't be deleted and your log file from the help page to<EMAIL_ADDRESS>we'll take a closer look. Please reference this issue also.


Several public IP with load balancer rules overwrite each other

ISSUE TYPE

Bug Report

COMPONENT NAME
VR: LOAD BALANCER RULE
CLOUDSTACK VERSION
<IP_ADDRESS>
CONFIGURATION

SUMMARY
When having at least 2 public IPs configured with load balancer rules, the configuration overwrite each other and
only one set of rules on 1 public IP are usable.
STEPS TO REPRODUCE

Assign 2 public IPs
Create 3 rules on IP one
Create 1 rule on IP two

Then the rules on step 2 disappear, I could test it entering to the haproxy.cfg file and realized they're gone
EXPECTED RESULTS
Having multiple IP each with multiple load balancer rules

Hi @weizhouapache,
Thanks for your prompt reply, here are some details

Hyp: KVM
Cloudstack Version and VR: <IP_ADDRESS>
VPC: Redundant VPC offering
Network: DefaultIsolatedNetworkOfferingForVpcNetworks
state of vm, network or vpc: enabled

These is my current haproxy.conf with 1 IP and 3 listen options (rules)
listen 172_x_x_x-xxxx
bind 172.x.x.x:xxx
balance roundrobin
server 172_x_x_x-xxx_0 172.x.x.x:xxxx check
listen 172_x_x_x-xxx
bind 172.x.x.x:xxx
balance roundrobin
server 172_x_x_x-xxx_0 172.x.x.x:xxx check
server 172_x_x_x-xxx_1 172.x.x.x:xxx check
server 172_x_x_x-xxx_2 172.x.x.x:xxx check
listen 172_x_x_x-xxx
bind 172.x.x.x:xxx
balance roundrobin
server 172_x_x_x-xxx_0 172.x.x.x:xxx check
server 172_x_x_x-xxx_1 172.x.x.x:xxx check
server 172_x_x_x-xxx_2 172.x.x.x:xxx check
mode http
option httpclose
But in the UI I have two defined different IP with lb rules each, the first one with the ones as defined above and the second is not in the config but when I update (add/remove member) on my second ip, the above config disappear and got replaced with the second ip lb rules.

@weizhouapache: find the info requested
The previous configuration was overwritten

/var/log/cloudstack/agent/agent.log

2021-10-08 09:44:07,124 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-1:null) (logid:139f6f30) Expected 6 answers while executing IpAssocVpcCommand but received 2
2021-10-08 09:44:08,121 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-3:null) (logid:139f6f30) Expected 6 answers while executing IpAssocVpcCommand but received 2
2021-10-08 09:44:08,199 INFO  [cloud.network.HAProxyConfigurator] (agentRequest-Handler-5:null) (logid:139f6f30) Haproxy mode http enabled
2021-10-08 09:44:10,300 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-5:null) (logid:139f6f30) Expected 1 answers while executing LoadBalancerConfigCommand but received 2
2021-10-08 09:44:10,352 INFO  [cloud.network.HAProxyConfigurator] (agentRequest-Handler-2:null) (logid:139f6f30) Haproxy mode http enabled
2021-10-08 09:44:12,798 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-2:null) (logid:139f6f30) Expected 1 answers while executing LoadBalancerConfigCommand but received 2
2021-10-08 09:44:13,708 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-4:null) (logid:139f6f30) Expected 6 answers while executing IpAssocVpcCommand but received 2
2021-10-08 09:44:14,769 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-1:null) (logid:139f6f30) Expected 6 answers while executing IpAssocVpcCommand but received 2
2021-10-08 09:44:26,003 INFO  [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-4:null) (logid:49a7954c) Trying to fetch storage pool 3f7ecd1c-466e-3741-b176-0d3e29a2dfdc from libvirt
2021-10-08 09:44:26,007 INFO  [kvm.storage.LibvirtStorageAdaptor] (agentRequest-Handler-4:null) (logid:49a7954c) Asking libvirt to refresh storage pool 3f7ecd1c-466e-3741-b176-0d3e29a2dfdc
2021-10-08 09:44:31,254 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-1:null) (logid:1f2a0b5a) Expected 6 answers while executing IpAssocVpcCommand but received 2
2021-10-08 09:44:32,171 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-3:null) (logid:1f2a0b5a) Expected 6 answers while executing IpAssocVpcCommand but received 2
2021-10-08 09:44:32,222 INFO  [cloud.network.HAProxyConfigurator] (agentRequest-Handler-5:null) (logid:1f2a0b5a) Haproxy mode http enabled
2021-10-08 09:44:33,900 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-5:null) (logid:1f2a0b5a) Expected 1 answers while executing LoadBalancerConfigCommand but received 2
2021-10-08 09:44:33,940 INFO  [cloud.network.HAProxyConfigurator] (agentRequest-Handler-4:null) (logid:1f2a0b5a) Haproxy mode http enabled
2021-10-08 09:44:35,590 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-4:null) (logid:1f2a0b5a) Expected 1 answers while executing LoadBalancerConfigCommand but received 2
2021-10-08 09:44:36,535 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-2:null) (logid:1f2a0b5a) Expected 6 answers while executing IpAssocVpcCommand but received 2
2021-10-08 09:44:37,509 WARN  [resource.virtualnetwork.VirtualRoutingResource] (agentRequest-Handler-1:null) (logid:1f2a0b5a) Expected 6 answers while executing IpAssocVpcCommand but received 2

ls -rt /var/cache/cloud/processed/load_balancer.json.*.gz |tail -n1 |xargs zcat

{
"rules":[
{
"configuration":[
"global",
"\tlog <IP_ADDRESS>:3914   local0 warning",
"\tmaxconn 4096",
"\tmaxpipes 1024",
"\tchroot /var/lib/haproxy",
"\tuser haproxy",
"\tgroup haproxy",
"\tdaemon",
"\t ",
"defaults",
"\tlog     global",
"\tmode    tcp",
"\toption  dontlognull",
"\tretries 3",
"\toption redispatch",
"\toption forwardfor",
"\toption forceclose",
"\ttimeout connect    5000",
"\ttimeout client     50000",
"\ttimeout server     50000",
"\nlisten stats_on_private\n\tbind <IP_ADDRESS>:8081\n\tmode http\n\toption httpclose\n\tstats enable\n\tstats uri     /admin?stats\n\tstats realm   Haproxy\ Statistics\n\tstats auth    admin1:AdMiN123\n",
"\t ",
"listen 172_18_0_28-8080",
"\tbind <IP_ADDRESS>:8080",
"\tbalance roundrobin",
"\tserver 172_18_0_28-8080_0 <IP_ADDRESS>:8080 check cookie 172_20_50_10-8080",
"\tserver 172_18_0_28-8080_1 <IP_ADDRESS>:8080 check cookie 172_20_50_11-8080",
"\tcookie cs insert  ",
"\tmode http",
"\toption httpclose",
"\t ",
"\t "
],
"tmp_cfg_file_path":"/etc/haproxy/",
"tmp_cfg_file_name":"haproxy.cfg.new.1633704272222",
"add_rules":[
"<IP_ADDRESS>:8080:"
],
"remove_rules":[
     ],
     "stat_rules":[
        "<IP_ADDRESS>:8081:0/0:,"
     ],
     "router_ip":"<IP_ADDRESS>"
  }

],
"type":"loadbalancer",
"delete_from_processed_cache":false
}

are you able to reproduce the issue by the steps in description every time ? Yes I do, please check the diagnostic from the virtual router.
haproxy_check.py | advanced | False | 2021-10-09T19:10:18-0500 | Missing section for load balancing listen 172_x_x_x-xxx

@KuasarCloud
I think you are facing a corner case, please upload your logs for investigation.

Can I send them to an email or something? I don't want my internal config on public access.

Can I send them to an email or something? I don't want my internal config on public access.

@KuasarCloud my email is weizhouapache.org

Please, check your spam, I think I sent it ok. thanks

@KuasarCloud could you please send again to weizhouapache AT gmail.com ?

@weizhouapache are you working on a fix, or should we document that LB is limited/supported for only 1 tier. cc @nvazquez @sureshanaparti

We may need to explore why the restriction was added in UI - perhaps this limitation is known? (also if none of the older ACS versions supported this case - likely this is not a regresssion/bug but limitation)

@rhtyd
it might be a limitation on netscaler.
if LB provider is VpcVirtualRouter,  I think we can support it on UI (it is already supported by api or cloudmonkey), I do not see any reason it is not supported.
if LB provider is netscaler, it will be same as before (multiple vpc tiers with LB is not supported). we do not change it
make sense ?

@weizhouapache that's not what I meant - if anyone can determine that this worked in an older version of ACS but doesn't work for 4.15/4.16/main - then it's a regression or bug; otherwise, it isn't a regression or a bug but a limitation which may be addressed in a future version of ACS.

@weizhouapache have you tested it with Netcaler ?

@weizhouapache have you tested it with Netscaler ?

@kurushi9000 no


Stop initializing variables in reconcile loop

We have a large number of variables unnecessarily initialized in the Reconcile loop. We should move these initializations out.

PR #89


istioctl profile diff: using profile names

To fix https://github.com/istio/istio/issues/19044
The feature to use profile names for diff is implemented previously. This PR just add examples on how to use diff using profile names.
$ istioctl profile diff -h
The diff subcommand displays the differences between two Istio configuration profiles.

Usage:
  istioctl profile diff <file1.yaml> <file2.yaml> [flags]

Examples:
  # Profile diff by providing yaml files
  istioctl profile diff manifests/profiles/default.yaml manifests/profiles/demo.yaml

  # Profile diff by providing a profile name
  istioctl profile diff default demo

Diff using profile names:
$ ./out/linux_amd64/istioctl profile diff minimal preview -d manifests/
The difference between profiles:
 apiVersion: install.istio.io/v1alpha1
 kind: IstioOperator
 spec:
-  components:
-    ingressGateways:
-    - enabled: false
-      name: istio-ingressgateway
+  meshConfig:
+    defaultConfig:
+      proxyMetadata:
+        ISTIO_META_DNS_CAPTURE: "true"
+  values:
+    telemetry:
+      v2:
+        metadataExchange:
+          wasmEnabled: true
+        prometheus:
+          wasmEnabled: true

@shamsher31: The following test failed, say /retest to rerun all failed tests:

Test name
Commit
Details
Rerun command

integ-multicluster-k8s-tests_istio
08e67d9dd20c3c356f9a3e3a7fa9fe2737c7d86d
link
/test integ-multicluster-k8s-tests_istio

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

/test integ-multicluster-k8s-tests_istio


⚠ Spryr has degraded performance

In 36311fe, Spryr (https://spryr.com) experienced degraded performance:

HTTP code: 200
Response time: 5606 ms

Resolved: Spryr performance has improved in 347959f after 11 minutes.


Error to get access token

GigachatClient try to get access token with Credentials.basic (Authorization: Basic ...), but it does not work with error:
{"code":4,"message":"Can't decode 'Authorization' header"}
If change Authorization to Bearer + clientSecret, than ngw.devices.sberbank.ru return access_token

Sorry, it's work: you need insted 'Authorization key' use client secret, but in personal account you can get only 'Authorization key'


Made AQI Calculator responsive

Fixes Issue🛠

Closes #1126
Description👨💻

Made contents fit into the container box.
Removed the extra white space from the bottom of the page.

Type of change📄

[x] Bug fix (non-breaking change which fixes an issue)

How this has been tested✅
Tested using inspect element.

Checklist✅

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have added demonstration in the form of GIF/video file
[x] I am an Open Source Contributor

Screenshots/GIF📷
Mobile view:

Could you also assign me my previous issues that you labelled as standby #1130 #1131 #1136 ?


Segmentation fault on demo exit when running in non-main thread

Make sure you have read the documentation and have put reasonable effort to find an already-existing answer.
Expected behaviour
Exit cleanly on Ctrl-C
Actual behaviour
^C*** KeyboardInterrupt ***
**** exiting run() ****
Segmentation fault

Steps to reproduce the behaviour
porcupine_demo_mic.py runs correctly. However, in porcupine_demo_mic.py, even though class PorcupineDemo(Thread) sub-classes thread, it does not create a thread, but runs in main thread. Specifically, see line 203, where PorcupineDemo(...).run() instantiates PorcupineDemo and calls its run() method immediately (from main thread).
I'd like to run PorcupineDemo instance in a non-main thread. To do that PorcupineDemo(...).run() should change to PorcupineDemo(...).start() or something to that effect.
With PorcupineDemo(...).start() the demo still runs (see hacky code enclosed below), but terminating the demo (e.g. using Ctrl-C) causes segmentation fault.

#
# You may not use this file except in compliance with the license. A copy of the license is located in the "LICENSE"
# file accompanying this source.
#
# Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
# an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
# specific language governing permissions and limitations under the License.
#

import argparse
import os
import struct
import sys
from datetime import datetime
from threading import Thread
from ctypes import *

import numpy as np
import pyaudio
import soundfile

sys.path.append(os.path.join(os.path.dirname(__file__), '../../binding/python'))
sys.path.append(os.path.join(os.path.dirname(__file__), '../../resources/util/python'))

from pvporcupine import Porcupine
from pvporcupine.resources.util.python.util import *

import time

stop = False

class PorcupineDemo(Thread):
    """
    Demo class for wake word detection (aka Porcupine) library. It creates an input audio stream from a microphone,
    monitors it, and upon detecting the specified wake word(s) prints the detection time and index of wake word on
    console. It optionally saves the recorded audio into a file for further review.
    """

    def __init__(
            self,
            library_path,
            model_file_path,
            keyword_file_paths,
            sensitivities,
            input_device_index=None,
            output_path=None):

        """
        Constructor.

        :param library_path: Absolute path to Porcupine's dynamic library.
        :param model_file_path: Absolute path to the model parameter file.
        :param keyword_file_paths: List of absolute paths to keyword files.
        :param sensitivities: Sensitivity parameter for each wake word. For more information refer to
        'include/pv_porcupine.h'. It uses the
        same sensitivity value for all keywords.
        :param input_device_index: Optional argument. If provided, audio is recorded from this input device. Otherwise,
        the default audio input device is used.
        :param output_path: If provided recorded audio will be stored in this location at the end of the run.
        """

        super(PorcupineDemo, self).__init__()

        self._library_path = library_path
        self._model_file_path = model_file_path
        self._keyword_file_paths = keyword_file_paths
        self._sensitivities = sensitivities
        self._input_device_index = input_device_index

        self._output_path = output_path
        if self._output_path is not None:
            self._recorded_frames = []

        self.stop = False

    def run(self):
        """
         Creates an input audio stream, initializes wake word detection (Porcupine) object, and monitors the audio
         stream for occurrences of the wake word(s). It prints the time of detection for each occurrence and index of
         wake word.
         """

        num_keywords = len(self._keyword_file_paths)

        keyword_names = list()
        for x in self._keyword_file_paths:
            keyword_names.append(os.path.basename(x).replace('.ppn', '').replace('_compressed', '').split('_')[0])

        print('listening for:')
        for keyword_name, sensitivity in zip(keyword_names, self._sensitivities):
            print('- %s (sensitivity: %.2f)' % (keyword_name, sensitivity))

        porcupine = None
        pa = None
        audio_stream = None
        try:
            porcupine = Porcupine(
                library_path=self._library_path,
                model_file_path=self._model_file_path,
                keyword_file_paths=self._keyword_file_paths,
                sensitivities=self._sensitivities)

            # print('frames_per_buffer={}'.format(porcupine.frame_length))
            # https://stackoverflow.com/questions/7088672/pyaudio-working-but-spits-out-error-messages-each-time
            if False:
                ERROR_HANDLER_FUNC = CFUNCTYPE(None, c_char_p, c_int, c_char_p, c_int, c_char_p)
                def py_error_handler(filename, line, function, err, fmt):
                    pass
                c_error_handler = ERROR_HANDLER_FUNC(py_error_handler)
                asound = cdll.LoadLibrary('libasound.so')
                asound.snd_lib_error_set_handler(c_error_handler)

            pa = pyaudio.PyAudio()
            audio_stream = pa.open(
                rate=porcupine.sample_rate,
                channels=1,
                format=pyaudio.paInt16,
                input=True,
                frames_per_buffer=4096,  # porcupine.frame_length,
                input_device_index=self._input_device_index)

            global stop
            while not stop:
                pcm = audio_stream.read(porcupine.frame_length)
                pcm = struct.unpack_from("h" * porcupine.frame_length, pcm)

                if self._output_path is not None:
                    self._recorded_frames.append(pcm)

                result = porcupine.process(pcm)
                if num_keywords == 1 and result:
                    print('[%s] detected keyword' % str(datetime.now()))
                elif num_keywords > 1 and result >= 0:
                    print('[%s] detected %s' % (str(datetime.now()), keyword_names[result]))

        # except KeyboardInterrupt:
        #     has no effect when running in non-main thread
        #     print('stopping ...')
        finally:
            if porcupine is not None:
                porcupine.delete()

            if audio_stream is not None:
                audio_stream.close()

            if pa is not None:
                pa.terminate()

            if self._output_path is not None and len(self._recorded_frames) > 0:
                recorded_audio = np.concatenate(self._recorded_frames, axis=0).astype(np.int16)
                soundfile.write(self._output_path, recorded_audio, samplerate=porcupine.sample_rate, subtype='PCM_16')

        print('**** exiting run() ****')

    _AUDIO_DEVICE_INFO_KEYS = ['index', 'name', 'defaultSampleRate', 'maxInputChannels']

    @classmethod
    def show_audio_devices_info(cls):
        """ Provides information regarding different audio devices available. """

        pa = pyaudio.PyAudio()

        for i in range(pa.get_device_count()):
            info = pa.get_device_info_by_index(i)
            print(', '.join("'%s': '%s'" % (k, str(info[k])) for k in cls._AUDIO_DEVICE_INFO_KEYS))

        pa.terminate()

keyword_file_paths=['/home/pi/.local/lib/python3.7/site-packages/pvporcupine/demo/python/../../resources/util/python/../../../resources/keyword_files/raspberry-pi/picovoice_raspberry-pi.ppn']
library_path='/home/pi/.local/lib/python3.7/site-packages/pvporcupine/demo/python/../../resources/util/python/../../../lib/raspberry-pi/cortex-a72/libpv_porcupine.so'
model_file_path='/home/pi/.local/lib/python3.7/site-packages/pvporcupine/demo/python/../../resources/util/python/../../../lib/common/porcupine_params.pv'

demo =PorcupineDemo(
        library_path=library_path,  # args.library_path,
        model_file_path=model_file_path, # args.model_file_path,
        keyword_file_paths=keyword_file_paths, # keyword_file_paths,
        sensitivities=[0.5],  # sensitivities,
        output_path=None, # args.output_path,
        input_device_index=None) # args.input_audio_device_index).run()
demo.start()

print('thread started')
try:
   while not stop:
       time.sleep(0.2)
except KeyboardInterrupt:
   print('*** KeyboardInterrupt ***')
   stop = True
   demo.join()

whats throws the segfault? I can't help unless you can provide sufficient information especially that this is not the demo as provided in the repo.

How do I find out what exactly throws segfault?
On Mon, Jun 15, 2020, 9:01 AM Alireza Kenarsari<EMAIL_ADDRESS>wrote:

whats throws the segfault? I can't help unless you can provide sufficient
information especially that this is not the demo as provided in the repo.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Picovoice/porcupine/issues/281#issuecomment-644223243,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACIUSZCJN4IH4V65MI6BSFDRWZAUJANCNFSM4N5XB5SA
.

you need to figure out if portaudio is causing the segfault or the engine. there are ways for debugging this and a quick google search will prob show you the way. I'm closing for now cause this is not a demo we provided on the repo. if you find enough information re-open.


updated et_def to avoid overflow. update et_feeder to speedup resolve

bug fix patch:

updated et_def.proto comm_size from uint32_t to uint64_t to avoid overflow
changed et_feeder.cpp: when readWindow, resolve dependency after reading whole window instead of reading each node.

Verified and should not introduce new bugs.
Merged for current astrasim-2.0 usage (as it not transferred to new schema yet).


How to install and run marzipano locally on my computer?

I've read the documentation but I still don't really know what to do. I'm sure many marzipano users want the same thing, I've asked this question on the google discussions board, but there are no replies there so I'm asking it here on github.
The question is simple: how do I make a working marzipano tool from the source code myself and have it run locally offline on my computer? It should be the same marzipano tool on the website, but run locally on my computer, has anyone done this before and can give me guidance?
I really appreciate any help, and thank you developers for making such an amazing tool (it's probably the best out there)
EDIT: I downloaded a zip of the source, but when I open the folder, I expected to find a .html file that will open with a working marzipano tool, but I was wrong, there's no such thing

The Marzipano Tool isn't part of the open source project (and we don't have plans to release it). So the answer is that you cannot. Sorry.

Ok, so the tool itself is closed source. So what is the documentation for? If I do all the instructions there correctly, what do I get? Do I get a marzipano tool or? Sorry if I don't understand, mind explaining a little?

The thing we call Marzipano is a Javascript library for displaying 360 panoramas in the browser. The library is fully open source and you can find it, along with some demos, in this GitHub repository.
The page at http://www.marzipano.net/docs.html is documentation for the library. It is written for programmers who want to use it in their projects. You would follow them to code a virtual tour from scratch, rather than using the Marzipano Tool.
The Marzipano Tool is a web application, available at http://www.marzipano.net/tool, written around the Marzipano library. It allows someone without programming knowledge to assemble a virtual tour from a set of 360 panoramas. But the tool itself is not open source.
When you export a tour from the tool, you get a zip archive with some HTML, CSS and Javascript files. One of those files is the Marzipano library, and the others implement the functionality and visual look of the tour.
You can upload the files into a web hosting service to make the tour available for other people to see. You can also make changes to the files to further customize the tour, but that requires some knowledge of Javascript and/or CSS.

Well, thank you for the nice explanation, but problem is, the documentation looks kinda complicated, is there an active forum where I can get step-by-step instructions to set everything up? It's difficult, but I'm willing to try, where do I get help from people?

Can you first explain what you're trying to do?

Documentation is lacking steps in my opinion, or maybe I'm just too noob. What i'm looking for is step-by-step instructions to end up with a working virtual tour.

Why is the Marzipano Tool not enough for your purposes? Even if you want to customize the look of the tour, taking a generated tour as the starting point will be a lot less work (you might be able to make your changes on the CSS and not have to modify the Javascript at all, for example).
If your objective is to fully understand how everything fits together, I would encourage you to begin by studying the source code for one of the simpler demos - this one, for example. It's not a full tour, but the code is simple enough that you can follow along by referring to the documentation. The documentation does expect you to have some prior knowledge about web development.
Our discussion forum is the right place to ask questions about the library. Please feel free to post there, but note that we can only help with Marzipano-specific issues, not general web development questions (there are better forums/tutorials for that elsewhere on the Internet).

Thank you for help sir, I'll study and hope to understand it. Meanwhile, I could only hope the website stays alive for as long as possible :)

Hi, i like to stop here and ask for something similar. I guess he wish to provide an own service in the net to have more vistors to his webpage.
I like to speak open. Did fork marzipano for a maybe later use. My problem is i search a fast working solution for my river boat tour through europe for carthography. I plan to do each 50 m to make a photo from the river with gps tags and like to put the results to openstreetmap.
Means 3000 km and often no internet on the river. So each photo is gps tagged for position. and very often background text information and notices. Each day will be arround 20-80 km and to work out in night with posting to online tool will not be the best solution.
Any idea? All photos and the tour should be cc-by-sa compatible. If marcipano is not the best tool for this maybe you can point me to another solution. Because of 12 volts electricity most should be possible with a tablet. Board pc is in general raspberry pi.

@tocan I can help you with your project.  Please contact me at<EMAIL_ADDRESS>

Friend Please help me, I can't run marzipano locally on my computer too.
Can you send me the complete demo about "Video",URL:"http://www.marzipano.net/demos/video-multi-res",thanks

my email<EMAIL_ADDRESS>

Hey there...
So I've been looking around for Open Source 360 Virtual Tour Software Solutions which are easy to deploy and to handle by non used users. So this is when I landed on your Marzipano Tool which honestly is one of the best an simplest tools I stumbled on! Thanks for that!
My major problem is that I need an offline solution like that! I need solutions which are working under circumstances where connectivity is an issue (example: disaster & emergency situations) and where we are not being able to have a permanent internet connection or that the speed is that low that you can not waste it for "unimportant" data like that... Has anybody an idea or an alternative? Because the server solution is an ideal approach! You don't have to install the software on all computers because often these devices change but still are able to keep it updated and available in the small internal net.
Or does anybody know if the statement of non disclosing the code does still apply? Or has anybody programmed a similar tool? Because that's my problem. The server itself is good but only half of the solution...
Thanks in advance for any help!

The Marzipano Tool is a web application, available at http://www.marzipano.net/tool, written around the Marzipano library. It allows someone without programming knowledge to assemble a virtual tour from a set of 360 panoramas. But the tool itself is not open source.

I understand that the Marzipano Tool  is not opensource, but do you have a paid version somewhere?


Add args to functions

ARGS WORKgit add .! - strings not implemented yet. only booleans and numbers.


Add OpenBLAS 0.3.0

I've tested this package remotely and have excluded all broken builds.
Here is the links to the Travis/AppVeyor with status "All passed":

https://ci.appveyor.com/project/xsacha/hunter-h4uji/build/1.0.13
https://travis-ci.org/xsacha/hunter/builds/390176136

Update: Merged commits in to one

Testing:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.4082
https://travis-ci.org/ingenue/hunter/builds/390197020?utm_source=github_status&utm_medium=notification

Uploading:

https://ci.appveyor.com/project/ingenue/hunter/build/1.0.4083
https://travis-ci.org/ingenue/hunter/builds/390200120?utm_source=github_status&utm_medium=notification

Released: https://github.com/ruslo/hunter/releases/tag/v0.22.9


Add optional image diff view component (like github)

Add fade and swipe modes in addition to the existing 3-side gemini difference mode.
Also, github have slightly different difference mode, which implemented in the package too, and this mode perhaps can be ported in gemini-gui too (not for replace existing but in addition).
Demo: http://mxtnr.ru/image-diff-view/
Repo: https://github.com/a-x-/image-diff-view
Npm: https://www.npmjs.com/package/image-diff-view
Github image diff view modes: https://github.com/blog/817-behold-image-view-modes

i can port it if you want it as i want.
p.s. stars are welcome

integration variant:

@a-x- tnx for the proposal. We'll discuss it

@a-x- so your idea is useful. Can you send PR? We can discuss visual part in the private chat

ok, I can do it at the coming weekend


Small correction on method name for WaterfallStepContext method

Re: "Additionally, the next method continues to the next step of the waterfall dialog within the same turn, enabling your bot to skip a certain step if needed."
The method name is NextAsync:
https://docs.microsoft.com/en-us/dotnet/api/microsoft.bot.builder.dialogs.waterfallstepcontext.nextasync?view=botbuilder-dotnet-stable
So, should be:
"Additionally, the NextAsync method continues to the next step of the waterfall dialog within the same turn, enabling your bot to skip a certain step if needed."

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

ID: 6d405d76-b17a-dbe9-c2f2-734fa34b0e8b
Version Independent ID: 3acc3fa8-b98d-a5f1-8bea-e823c3efec14
Content: Dialogs within the Bot Framework SDK - Bot Service
Content Source: articles/v4sdk/bot-builder-concept-dialog.md
Service: bot-service
GitHub Login: @johnataylor
Microsoft Alias: johtaylo

Thanks for catching this @dmvtech, I've opened a PR and the changes should be changed merged later today.

Closing this now that the changes have been merged.


Create New and Refactor Old UI classes

Create new UI classes and refactor old classes to work with new Model

Done by Felicia on 13/3/20 PR#49


Updates for PureScript 0.11

I've been working on updating some packages for PureScript 0.11. I've bumped the dependency versions, updated the syntax, and dealt with API changes in the dependencies. (Control.Monad.Aff.delay instead of later', removal of parseJSON from Data.Foreign, etc.) The only public-facing API change is changing Int to Milliseconds in RetryPolicy.
The syntax in the test has also been updated, but I was not able to successfully execute the test and I am not sure whether that is a local problem or something that needs to be fixed ...
Let me know if it looks good!

Thanks!

Cool, thank you!


Update Composer dependencies (2022-02-12-00-04)

Visual regression test passed!
View the visual regression test report


The previous values of Data Sources Configuration get erased if we add an empty Data Source Configuration

Steps to reproduce:

Create a DA (DUS) with Data Source configuration ( add two or more)
Edit the DA to add an empty Data Source configuration
Publish or SAVE the DA
Again try to edit the DA, and if we view the configuration we can see that all the previous values are erased.
Note: This scenario also happens when we try to create DA with one Data source configuration filled and other as empty

Fixed: https://github.com/decentralised-dataexchange/bb-consent-admin-dashboard/pull/321


Convert Output.dict to ascii textfile

Is it possible to convert Output.dict to ascii textfile

I have the same question, please help


Telegram channel limit. Multichannels?

Telegram has a limit, it's not possible to read more than 1000000 messages per channel, and Teldrive can't access to older files than 1000000. Is it possible to use more than one channel to the same Teldrive? How to do this if possible?

were you able to reach 1mln messages in a single channel?
i knew this issue existed years ago, but i thought it was solved already.

Yes, uploading 1M files is possible... And the issue is not solved unfortunately. So, is there any way to use more than 1 channel to upload files with Teldrive?

just create another channel and select it from the gui.
btw what i was asking is if you reached 1mln on teldrive, tried to request the first files you uploaded and it gave you some kind of error.
if you did, could you share your log?

this is the error when run teldrive comand:
ERROR   Ignored key without a value.    {"ignored": null}
10/06/2024 12:24 PM     ERROR   failed to delete messages
And this is the error when try to play/download any video or archive:
2024/06/10 12:36:47 [Recovery] 2024/06/10 - 12:36:47 panic recovered:
interface conversion: tg.MessageClass is *tg.MessageEmpty, not *tg.Message
runtime/iface.go:262 (0x40ecb0)
runtime/iface.go:272 (0x40ec69)
github.com/divyam234/teldrive/pkg/services/common.go:229 (0x15821dd)
github.com/divyam234/teldrive/pkg/services/file.go:643 (0x1589cb5)
github.com/divyam234/teldrive/pkg/controller/file.go:196 (0x1596248)
github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x1631c82)
github.com/divyam234/teldrive/cmd/run.go:233 (0x1631c70)
github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x9890aa)
github.com/gin-contrib/zap@v1.1.3/zap.go:68 (0x1630e30)
github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x996539)
github.com/gin-gonic/gin@v1.10.0/recovery.go:102 (0x996527)
github.com/gin-gonic/gin@v1.10.0/context.go:185 (0x9952d1)
github.com/gin-gonic/gin@v1.10.0/gin.go:633 (0x994d40)
github.com/gin-gonic/gin@v1.10.0/gin.go:589 (0x994871)
net/http/server.go:3137 (0x77a22d)
net/http/server.go:2039 (0x7755e7)
runtime/asm_amd64.s:1695 (0x471920)

did you manually check if the file is really on telegram or it's just a ghost entry?
some months ago it used to happen from time to time that a file part would be deleted from chat during up, but the entry would still be added to the database.

I've checked that all the files before a date have disappeared because the channel have more than 1M files.
@NiTr0gLiTcH When you say I can select another different channel from the gui, then the new files added from this moment will be uploaded to this new channel and Teldrive will know what channel is used to every file. Is this correct? Then I can use multiple channels... Is it ok?

For reference, I hit the same 1000000 file limit in https://github.com/divyam234/teldrive/issues/242. https://github.com/divyam234/teldrive/issues/254 could be releated also.

@NiTr0gLiTcH When you say I can select another different channel from the gui, then the new files added from this moment will be uploaded to this new channel and Teldrive will know what channel is used to every file. Is this correct? Then I can use multiple channels... Is it ok?

Yes, you are right, every entry in the files table in the database is marked up with the id of the telegram channel it belongs to.
If you upload through the gui, all files will go to the new default channel instantly.
If you upload through rclone, make sure that the config file does not have an explicit "channel_id" configuration setting, or else files will still go to this configured channel. You can just delete the setting from the rclone.conf file if you want to go with the default channel for rclone uploads also.

Do you realize how much you have abused the service by saving close to half a petabyte of data just for movies and TV shows? Instead of using something like Stremio with debrid , everyone seems to want to create their own Netflix without understanding the negative impact it causes. Many people use this service fairly, but a few individuals are ruining the entire experience for everyone. These are often the same people who ask for feature requests without ever donating to the project, always looking for a free lunch.

Do you realize how much you have abused the service by saving close to half a petabyte of data just for movies and TV shows? Instead of using something like Stremio with debrid , everyone seems to want to create their own Netflix without understanding the negative impact it causes. Many people use this service fairly, but a few individuals are ruining the entire experience for everyone. These are often the same people who ask for feature requests without ever donating to the project, always looking for a free lunch.

@divyam234  First of all thanks for the great work.  I don't collect movies to have my Netflix, I have thousands of files from my work and my hobby in musical shows, theater and television, photos, videos (I work in video editing), musical scores, index cards... most of them don't take up much space but it is a very large number of files.  In addition to some old movies and series and special collector's editions that are difficult to find online.  By my mistake I have uploaded a large part of this duplicate content on the same channel and it has caused my database and my Telegram channel to fill up, I am trying to clean it, but if I don't succeed I will have to directly delete the entire channel and go back to start from the beginning, even if it takes me months.  Sorry for the misunderstanding and thanks again for the work.  By the way, I did make a modest donation to the project.

@Xabiman I am  pointing to you specifically  I am just pointing out to people who uses  plex, emby etc to save content in 4k HDR mainly  even if there are better alternatives avaliable like  x265  encodes or streamio  because of these people only  storage providers are revising their plans and they are now abusing telegram servers but will eventually affect teldrive.

Yes, that appears to be the way of it so far, this rclone thread as a worthy journal. Any free or just cheap-enough service is bound to be abused. Seeing how for instance the DropBox Business Advanced offer was only able to sustain itself for a couple of weeks before it had been abused to death was an interesting watch.
The Telegram case is special because it is so extremely slow and unpredictable compared to other storage offerings we have seen. For instance, streaming 4K HDR content or just 1080p h264 content is simply impossible, because the bandwidth and stability is not there to support it.
As the Telegram backend cannot support Plex/Emby-as-Netflix installations, this means that the type of storage abuse is somewhat different and a lot less for this backend. Also, everybody knows that with Telegram your data could be gone in an instant, without any explanation. Meaning, your efforts could be down the drain at any given moment.
Anyway, Telegram is still just beginning its monetization journey. And Pavel Durov is still a lot more interested in user count, apps, coins, ai and freedom philosophy than he is in earning money. But once he gets ready for an IPO, I expect things to start changing fast.
So yes, of course the Telegram service and teldrive will eventually be affected. Probably the first sign will be that we will see the backend gradually reduced in speed until at last it is completely unusable. But I personally don't expect anything to change the next few years. Telegram has 2.5 million new users signing up every day, and they want to keep themselves as attractive as possible for a while still.

... and they are now abusing telegram servers but will eventually affect teldrive.

When you say eventually, what timeframe are you imagining? Just curious :-)


Consider support for newer rullup versions

emitChunk is marked as deprecated. When using your plugin with the latest rollup version (2.61.1), a deprecation warning pops up, which states that emitFile should be used instead of emitChunk which is marked as deprecated.

I've updated the code to use the new methods. Could you try out the changes from the repo before I publish to npm, to verify that everything works?

It seems now to be working fine, thanks!

Published as 2.1.0


Paper: Add input/output types for parametric programs

Need to add input/output types for OpenQASM programs into the spec. See pp. 22, 23, 24 of https://arxiv.org/pdf/2104.14722.pdf. VQE example should be updated (or a new one added to compare).

@karalekas volunteered to write this into the spec.
There's also an issue to resolve in the examples which sometimes use 'input' and 'output' as variable names.

Closing via #225.


[Indigo] [Launchpad] Integrate all API requests with Launchpad.

Description
First, get familiar with Launchpad. Then, ask back-end team for the list of all business-process-related APIs and their documentations.
Filter Integration Checklist

[ ] Business Domain filtering behavior.
[ ] Severity filtering behavior.

Launchpad Session Checklist

[ ] TreeView - getMap
[ ] TreeFilter - getEAIDomainList
[ ] TreeFilter - getPublishingBusinessDomainList
[ ] ActivityTable - getGrid
[ ] ActivityFilter - getBusinessDomainList

We are moving this to sprint 6 and directly integrate with APIs once they are ready.

We are moving this to sprint 7 to finalize the integration. Everything related to this issue should go into branch indigo-106-integration.