Polling application backend spec

Abstract
This spec outlines a polling application backend that uses a contract for non-binding voting in on-chain polls and a subgraph for off-chain vote tallying.
Motivation
This design seeks to fulfill the following criteria:

Simplicity. In this MVP, the priority is making the process of participating easy to understand and accessible so more complex mechanics such as as more sophisticated vote weighting rules are left for a future iteration.
Auditable. A third party should be able to audit the results of a poll to establish confidence that the votes were tallied correctly.
Censorship resistant. A centralized party cannot censor votes. We assume that miners are not censoring transactions for the duration of a poll.
Open poll creation.  Anyone should be able to create a poll. Any requirements for creating a poll should apply to all parties.

This design does NOT seek to fulfill the following criteria:

Secrecy. Votes will be public as soon as they are submitted on-chain. We leave vote secrecy as a problem to be solved in a future iteration.
Coercion resistant. Since votes will be public, voters can also be coerced (i.e. via a smart contract bribe) into voting a certain way. We leave coercion resistance as a problem to be solved in a future iteration.

Proposed Solution
The polling application backend will consist of two components

A PollCreator contract that manages the creation of Poll contracts.
A Poll contract that manages voting operations.
A poll subgraph that indexes events emitted by the PollCreator contract to keep track of created polls and events emitted by Poll contracts to tally votes.

PollCreator Contract
    contract PollCreator {
    	// The amount of LPT that needs to be burned when creating a poll.
    	uint256 public pollCreationCost;
    	// The address of the RoundsManager.
    	// This value will be used for all polls created.
    	address public roundsManagerAddr;

    	// Emitted when a poll is created
    	// This event can be indexed to construct a list of all polls.
    	event PollCreated(
    	    address poll,
    	    bytes memory proposal,
    	    uint256 endRound,
    	    uint256 quorum,
    	    uint256 threshold
    	);

    	constructor(uint256 _pollCreationCost, address _roundsManagerAddr) public;

    	/**
    	 * @dev Create a poll by burning POLL_CREATION_COST LPT.
         *            Reverts if this contract's LPT allowance for the sender < POLL_CREATION_COST.
         * @param _proposal The IPFS multihash for the proposal.
         * @param _pollPeriod The number of rounds that a poll will be open for.
         * @param _quorum The % (represented as a fixed point number) of active stake that needs to vote for the poll result to be considered valid.
    	 * @param _threshold The % (represented as a fixed point number) of active stake that needs to vote yes for the poll result to be considred an approval signal.
         */
    	function createPoll(
    	    bytes memory _proposal,
    	    uint256 _pollPeriod,
    	    uint256 _quorum,
    	    uint256 _threshold
    	) external;
    }

Creating a poll

Anyone call call createPoll().
The sender must have already set the LPT allowance for PollCreator to at least POLL_CREATION_COST by calling the LPT approve() function.
createPoll() will call the LPT transferFrom() function to move POLL_CREATION_COST LPT from the sender to the contract. This LPT will then immediately be burned using the LPT burn() function.
After the POLL_CREATION_COST LPT is burned, a new Poll will be deployed by this contract and a PollCreated event will be emitted containing the address of he new Poll.

N.B. While the contract does not support crowdfunding the poll creation cost, anyone can write a crowdfunding contract that submits the createPoll() transaction when the contract has accumulated sufficient LPT to pay for the poll creation cost.
Poll Contract
    contract Poll {
        // The IPFS multihash that can be used to fetch the proposal text off-chain.
        bytes public proposal;
    	// The round at which the poll ends and votes can no longer be submitted.
    	uint256 public endRound;
    	// The % (represented as a fixed point number) of active stake that needs to vote for the poll result to be considered valid.
    	uint256 public quorum;
    	// The % (represented as a fixed point number) of active stake that needs to vote yes for the poll result to be considred an approval signal.
    	uint256 public threshold;

    	// The RoundsManager interface used to check the current round.
    	IRoundsManager private roundsManager;

    	// Emitted when an account submits a yes vote
    	// This event can be indexed to tally all yes votes
    	event Yes(address indexed voter);
    	// Emitted when an account submits a no vote
    	// This event can be indexed to tally all no votes
    	event No(address indexed voter);

    	constructor(
    	    bytes memory _proposal,
    	    uint256 _endBlock,
    	    uint256 _quorum,
    	    uint256 _threshold,
    	    address _roundsManager,
    	) public;

    	/**
    	 * @dev Vote yes for the poll's proposal.
    	 *            Reverts if the poll period is over.
         */
    	function yes() external;

    	/**
    	 * @dev Vote no for the poll's proposal.
    	 *            Reverts if the poll period is over.
         */
    	function no() external;
    }

Voting in a poll

Both yes() and no() will revert if roundsManager.currentRound() <= endRound
yes() will emit a Yes event containing the sender's address
no() will emit a No event containing the sender's address
There are no restrictions on the number of times that a sender can call yes() or no()
There are no restrictions preventing a sender from calling both yes() or no()
The interpretation of the Yes and No events emitted by this contract is left for the subgraph.

Subgraph
The following entities will be added to the subgraph:
    enum PollChoice @entity {
    	No
    	Yes
    }

    type Poll @entity {
    	id: ID!
    	proposal Bytes!
    	endRound BigInt!
    	// This is a fixed point number that will need to be converted into a %
    	// prior to displaying to a user
    	quorum BigInt!
    	// This is a fixed point number that will need to be converted into a %
    	// prior to displaying to a user
    	threshold BigInt!
    	// This will be updated at the beginning of each round
    	tally PollTally
    	voters: [Voter!] @derivedFrom(field: poll)
    }

    type PollTally @entity {
    	id: ID!
    	// Active stake that voted yes
    	yes: BigInt!
    	// Active stake that voted no
    	no: BigInt!
    }

    type Voter @entity {
    	id: ID!
    	stake: BigInt!
    	// The stake that does not back a vote
    	// This can be subtracted from stake to compute the voter's voting stake
    	// If the voter is a delegator, this will be null
    	// If the voter is an active orchestrator, this will be non-zero if any
    	// of the its delegators voted on their own
    	nonVoteStake: BigInt
    	choice PollChoice!
    	poll: Poll!
    }

The following new event handlers will be added to the subgraph:
PollCreated(address poll, bytes proposal, uint256 endRound, uint256 quorum, uint256 threshold)

Store a poll entity

poll.id = poll
poll.proposal = proposal
poll.endRound = endRound
poll.quorum = quorum
poll.threshold = threshold

When a new poll entity is created, the subgraph should start indexing the new Poll contract

TheGraph supports data source template definitions that should help with this
The subgraph should start indexing the new Poll contract from the block in which it is deployed and it should stop indexing once the poll's end round is initialized

Yes(address voter)

If a voter entity does not exist, create one

voter.id = voter
voter.poll = Poll(<POLL_CONTRACT_ADDRESS>)

Update the voter entity

voter.choice = PollChoice.Yes

No(address voter)

If a voter entity does not exist, create one

voter.id = voter
voter.poll = Poll(<POLL_CONTRACT_ADDRESS)

Update the voter entity

voter.choice = PollChoice.No

The following existing event handlers will be updated in the subgraph:
Round(uint256 newRound)

Fetch all polls
For each poll where poll.endRound > newRound

Update the vote stake for each voter

For each voter in the poll

If voter.id is an active orchestrator

voter.voteStake = Transcoder(voter.id).totalStake

If voter.id is not an active orchestrator

voter.voteStake = pendingStake(voter.id, currentRound)

delegate = Delegator(voter.id).delegate
If delegate is an active orchestrator

Voter(delegate).nonVoteStake += voter.voteStake

Update the poll tally

Reset the poll tally

poll.tally.yes = 0
poll.tally.no = 0

For each voter in the poll:

If voter.choice == PollChoice.Yes

poll.tally.yes += (voter.voteStake - voter.nonVoteStake)

If voter.choice == PollChoice.No

poll.tally.no += (voter.voteStake - voter.nonVoteStake)

Design Rationale

The design described only updates the poll tally and the voting stake of voters at the beginning of each round

This means that the frontend will only refresh the poll tally and the voter's voting stake after the initialization of a round

The design describes will not update the poll tally and the voting stake of voters until the first round is initialized after a poll is created

This means that the frontend will not be able to show a poll tally and the voter's voting stake until the first round is initialized after a poll is created

It is worth mentioning that the current definition of active stake is:

Stake delegated to an orchestrator in the active set in the current round
The above value is "locked in" for the duration of the round
Only active stake is eligible for rewards in the round
Any rewards earned during the round are added to one's active stake for the next round

So, refreshing the poll tally and the voting stake of voters at the beginning of each round actually aligns with the current definition of active stake.
That being said, I can see why refreshing the poll tally and the voting stake of voters only once per round might not be ideal from a UI/UX POV. Open to suggestions and happy to discuss alternatives.
Implementation Tasks and Considerations

Write the PollCreator and Poll contracts
Update the subgraph

Testing Tasks and Considerations

Unit tests for the contracts
We could test the subgraph indexing logic by creating sample polls on a development chain (i.e. Ganache)

The poll tally should be correct after completing at the beginning of each round
The end poll tally should not change after the end round of a poll
The voting stake of each voter should be correct at the beginning of each round

Alternatives

We could try to modify the subgraph indexing logic to allow a refresh of the poll tally and the voter's voting stake after any update that affects either the poll tally or a voter's voting stake. This will be more complicated, but might be possible - I aired on the side of simplicity for this initial design

Looks great. Couple thoughts...

Why use approve/transferFrom instead of having the value of the contract creation function be equal to the poll creation cost?

Should the endRound be included in the poll, rather than the poll ending at the initializiation of the endRound?

Another alternative is to just periodically update stake for the poll tallys at an interval that is more frequent than once/round, but not at every update. The frontend could just showcase the "last update date", whether this is 1x/hour or 1x/15 mins, etc.

@param _proposal The IPFS multihash for the proposal.

Any thoughts around the proposal form inputs and storage? A simple title, description, and link that we store as JSON in ipfs?

Any thoughts around the proposal form inputs and storage format? A simple title, description, and link that we store as JSON in ipfs?

Yes that's how I'd do it.
I would want to add one thing. The process of uploading to IPFS then submitting the IPFS Multihash on-chain is not an atomic process. But there's ways to tackle this.

Run our own gateway and unpin the uploaded document if the transaction fails
Compute the IPFS multihash before upload (--only-hash option in the CLI when using ipfs add, but there should be an API method or option for it too), we can do this because we know the pre-image. Then submit the transaction first and upload the document after the transaction has been submitted. If uploading fails we can retry at very little cost (bandwith only).

We might also want to run our own IPFS gateway for this (necessary for option 1 regardless I think).

I'm not sure if quorum and treshold should be values decided by the user ?
This allows the opening of proposals with a very low quorum and treshold required. The poll would signal approvement of the proposal but the signal would not be representative.

I'm not sure if quorum and treshold should be values decided by the
user ?

I think the idea here is that the contracts are a self-deployable,
re-usable mechanism for any type of poll that someone wanted to run. But
that the "social contract" or convention of the process that the community
adheres to for its governance instill conventions around what constitutes a
valid poll that the community would adhere to.
On Fri, Mar 13, 2020 at 12:43 PM Nico Vergauwen<EMAIL_ADDRESS>wrote:

I'm not sure if quorum and treshold should be values decided by the
user ?
This allows the opening of proposals with a very low quorum and treshold
required. The poll would signal approvement of the proposal but the signal
would not be representative.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/livepeer/livepeerjs/issues/593#issuecomment-598883927,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAACRFKF5QOEYD6RH7JTKEDRHKEGBANCNFSM4LGCMGCQ
.

User as in poll creator.
If the validity of a poll is decided by a social contract/construct then we don't need a quorum and treshold defined in the proposal. We can just let people vote and the front end can display what the eventual voter turnout is in terms of token weight, then the social contract determines if it is valid based upon data. Not a pre-defined quorum and treshold by the poll creator.
The alternative (and a system that is more extensible to binding votes changing contract params) is to define quorum and treshold parameters upon Factory genesis, these parameters can then be altered by governance itself but the initial params are decided by Livepeer Inc.

Thanks for all the feedback!

Why use approve/transferFrom instead of having the value of the contract creation function be equal to the poll creation cost?

@dob
The approach of sending value with the createPoll() only works if the poll creation cost is denominated in ETH. If the poll creation cost is denominated in LPT, then createPoll() needs to call transferFrom() so that the LPT can be transferred to the contract and burned in a single atomic transaction.
I think the poll creation cost should be denominated in LPT because a poll is an ask for the time/attention of LPT holders. There will be some more friction in acquiring non-staked LPT for poll creation, but I don't see that as a bad thing given that creating a poll places a time/attention cost on all LPT holders.

Should the endRound be included in the poll, rather than the poll ending at the initializiation of the endRound?

@dob
I lean towards defining the end of the poll at the start of the endRound because this is consistent with how the end of time periods is handled in other protocol contracts:

An unbonding lock can be withdrawn starting at its withdrawRound instead of after its withdrawRound
A PM ticket expires on-chain starting at creationRound + ticketValidityPeriod instead of starting at creationRound + ticketValidityPeriod + 1

This question made me realize a flaw in using round numbers to determine the end of a poll: if a poll is started immediately upon creation then it might not be active for the full poll period because it is started in the middle of a round. So, a poll that is supposed to last 10 rounds may only last 9.2 rounds. This issue can be resolved by one of the following solutions:

Start the poll at the beginning of the next round after the round in which it is created. So, if a poll is created in round N, it starts in round N + 1.
Allow a poll creator to specify the start round for a poll. This is an extension of solution 1. If the poll is created in round N, the poll creator could specify any start round in the future (including N + 1).
Use block numbers to determine the end of a poll. If the poll period is supposed to be M rounds, the corresponding # of blocks in M rounds can be set as the value.

I lean towards solution 3 because the poll can be started immediately upon creation. This also simplifies the contracts even more because they do not need to be internally aware of rounds and any other contracts besides the LivepeerToken contract.

I'm not sure if quorum and treshold should be values decided by the user ?

@kyriediculous
I'm actually thinking of defining the quorum and threshold as constants in PollCreator and including them in the PollCreated() event without keeping those values in contract storage. As long as the quorum and threshold are included in the PollCreated() event, the subgraph can store those values off-chain. Anyone can deploy a new PollCreator contract with different values for the quorum and threshold (the PollCreator contract would be immutable after deployment), but a primary PollCreator contract (along with the quorum and threshold values defined) can be identified as the one the majority of the community chooses to use.

When the Poll contract is instantiated with the deposit, the deposit can be converted into LPT using Uniswap from the contract directly.

@kyriediculous
This could be a nice way to make it easier to acquire the LPT needed for poll creation, but in the interest of modularity, I think the swap functionality should be in a separate contract that interacts with the PollCreator. Then, a user could send ETH into the swap contract that will atomically swap the ETH for the required LPT and then call createPoll() on the PollCreator().
A challenge with implementing a contract that atomically swaps ETH for LPT is that the amount of ETH required to swap for the LPT required for the poll creation cost will be variable. One might be able to address this by estimating the required ETH X, asking the user for X + some % to ensure that sufficient ETH will be sent to cover the required LPT, swap for the required LPT and refund any extra ETH back to the sender.
An alternative is to define the poll creation cost as "$X of LPT" and allow the user to send a stablecoin (i.e. Dai) which is swapped for an equivalent amount of LPT which is burned. The ETH gas cost could be abstracted away via meta-transactions.
I'm interested in the described alternative, but given the additional complexity of the swap + meta-transactions in order to reduce the # of tokens the user needs to be aware of to 1, I'm currently inclined to start with the simple LPT burn model as the MVP and different ways to handle the cost could be introduced in follow on iterations.

Closing this because this is now implemented and this spec is also captured by LIP-16.


publish test status document

Hi @JamesWTruher, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!

It looks like you're a Microsoft contributor (Jim Truher). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

Duplicate PR - closing.


Tallyfy Connector V2

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] The PR has modified HISTORY.rst describing any customer-facing, functional changes. Note that this does not include changes only to help content. (see Modifying change log).

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: adheegm sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


[TEST][Do not review] Test vendored calcite update

PR for testing https://github.com/apache/beam/pull/16473

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Run SQL PostCommit

(RAT PreCommit failing because LICENSEs in artifacts, which makes sense)


chore(doc): Add missing ca_certificate_identifier label in rds_instance_info metric in README description

This label has been introduced in https://github.com/qonto/prometheus-rds-exporter/pull/38 , but README.md has not been updated with this new label

#sre


[DNM] Debug update deps issue

/hold
Debugging the current update-deps.sh issues

/reopen

reopen


Error detected while processing function nerdtree#ui_glue#invokeKeyMap

Getting error on opening project with nerdtree
Error detected while processing function 225..205..211:
line    2:
E605: Exception not caught: NERDTree.TreeNotOpen
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..73..72..<SNR>40_activateFileNode..101..118..168..169:
line    8:
E171: Missing :endif
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..73..72..<SNR>40_activateFileNode..101..118..168:
line    4:
E171: Missing :endif
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..73..72:
line    3:
E171: Missing :endif
Error detected while processing function nerdtree#ui_glue#invokeKeyMap..73:
line   18:
E171: Missing :endif
Press ENTER or type command to continue

Ubuntu 15.04,
vim 7.4+
.virmrc

On Ubuntu 14.04 everything worked well. Thanks.

I've did git hard reset to revion
commit 1cbd52aa77541682658f4c8a6d217c77a78c3879
Merge: cd5f168 f6cad7e
Author: Martin Grenfell<EMAIL_ADDRESS>Date:   Fri May 1 14:13:13 2015 +0100

    Merge pull request #434 from handcraftedbits/master

    Use different arrow characters for compatibility.

now it works well, wait for fix :smile:

wait for fix too!

Hey guys, this should be fixed now. Let me know if there any more problems :)

ty, fixed!

I got the same errors on MAC


[Draft] Add json_dump

Hello.
I am new for rust python.
I have added json_dump method. But it works only for StringIO.
Could you give me some advice? (Other IO,, what else)

Hi @zsaladin , thank you for your contribution!
Some tips:

Please add a test snippet in tests/snippets/json_snippet.py which demonstrates the behavior. For example by using io.StringIO and json.dump.
Consider adding the load function as well.

@windelbouwman  This function take StringIO but doesn't take BytesIO. Any idea how to support it?

@youknowone StringIO is basically a file opened in text mode. If you have a BytesIO file, you have a file opened in binary mode, so you would need to encode the text first as bytes, and then write it to file. Should the json.dump take a file opened in binary mode?

json.load and json.loads need to support bytes-like objects.
https://docs.python.org/3/library/json.html#json.load
According to cpython implementation, implementationn json_loadsfor bytes-like object should be preceded. Does this need to be done in this PR?

@zsaladin what do you mean by "bytes-like object should be preceded"?

Oh I mean json_loads for bytes-like object(bytes, bytearray) should be implemented first. I will make new PR for it.


Transferring .Hx stages to Lua?

Describe your problem here.
Im transferring my 7.x stages to 6.3, but how do I transfer the stage’s .hx code?
Are you modding a build from source or with Lua?
Lua
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
No response

0.6.3 is not supported anymore so do it at your own risk and knowledge


Empty Model has one joint

I would like to ask why there is a joint in the empty model ?
--> import pinocchio as pin
--> a = pin.Model()
--> a.joints
<pinocchio.pinocchio_pywrap.StdVec_JointModelVector object at 0x7fd854a506a0>
--> list(a.joints)
[
    JointModelRX
  index:<PHONE_NUMBER>3709551615
  index q: -1
  index v: -1
  nq: 1
  nv: 1
]

If we need an universal joint, does the size of fext need to be equal to the number of real joints + 1 as that seems unnecessary to me ?

This joint is related to the universe. It has no meaning by the way. It is just the result of having it by default set to JointModelRX, as it is the default variant.
Fext should be of size model.njoints.


Upgrades: disk space check does not handle error and name is confusing

The inspector check that verifies disk space is ignoring an error. Also, the check's name is confusing.

Closed via #317


Move RocketWatch to Spacedock

This will leave CKAN pointing to a cached version from Kerbalstuff as the latest release. I've left a message for the mod author asking for a preference.

I have had feedback from the mod author that 1.1.1 and 1.2 are identical. We should be fine to merge this, and I'll keep a weather eye out to see that the mod author bumps the version number sufficiently for the next release.

Rather than crossing our fingers that the next release has a version number that doesn't conflict, we can add an epoch to 1) force the download from the more stable/longterm spacedock rather than the backup and 2) ensure that if the next iteration of the mod has the 1.2 version number that our users have an upgrade path.

We could, but I've discussed it with the author, and they have said they will bump the version number sufficiently.


division by zero when calculating lcm

BigInt::zero().lcm(&BigInt::zero()) panics instead of returning the expected result of 0.

Ah, yes we should fix that, akin to https://github.com/rust-num/num-integer/pull/18/commits/48caf28f0c3b72eb84c2afb5176327289e7ff216


Fix psl-make-dafsa to work with python3

String encoding is quite different in python3 and I had to use bytes objects instead.
"make check" will now pass with both python2 and python3, otherwise I have not made much testing.

Coverage remained the same at 91.532% when pulling 3f276c7d1e1c1a4d394567ac79d011f28f45d65a on liljenzin:python3-fixup into 1b36fb00123020a0ecc9d440c88e875c37c834af on rockdaboot:master.

Wow ! @darnir said it's a nontrivial change... I didn't expect that vast. I'll do all kind of testings tomorrow. Thanks again, Olle !

Many thanks, passes all tests. python2 (2.7.12) python3 (3.5.2) create exactly the same binaries here.


How i can hide last tabbar item

I want show tabbar on another view and no tabar item selected.<PHONE_NUMBER>0 Thank for @ober01 .

You could only hide tabbar https://is.gd/g1k8PQ


vesktop: identical background-primary and text-secondary results in invisible text in new Discord "activity" feature

Because the values of --background-primary and --text-secondary are both var(--base00), this new UI element which uses secondary on top of primary makes the text invisible.

Feel free to submit a PR. With #249 pending, chose something that looks reasonable.
For reference, here are the related declarations:

https://github.com/danth/stylix/blob/6bbae4f85b891df2e6e48b649919420434088507/modules/vesktop/template.mustache#L34
https://github.com/danth/stylix/blob/6bbae4f85b891df2e6e48b649919420434088507/modules/vesktop/template.mustache#L44

Is it possible to set a different color just for this element?


Add the TERASOLUNA logo

Add the TERASOLUNA logo to the following HTMLs.

[ ] index.html
[ ] index_en.html

The following is additional support.
Add the TERASOLUNA logo to the HTML below.

[ ]  guideline/index.html


Timeout when the reader cannot consume messages anymore

Due to several reports in #180, I need to introduce an external context with timeout to prevent reader.consume from hanging.

Hello. First, thanks for your extension! Currently this is the only one to work with kafka in k6 script! Do you plan to work on this bug soon? This is very annoying in my project when some kafka messages are not received randomly, the test hangs until k6 reaches the end of the test duration time. I'm not really skilled with writting extensions for kafka yet (only wrote an extension to do some custom crypto operations and keep keys) so definitely I have no idea about adding a timeout in the context to make it work.

Hello @mostafa , do you have any update on this?


[Typo/Bug] typo in text definition for 'anterior horn motor neuron'

CL term
CL:2000048 'anterior horn motor neuron'
Description of typo, bug or error
Typo in text defintion:
"An lower motor neuron whose soma is located in one of the ventral horns of the spinal cord and innervates skeletal muscles of the trunk or head."
Change "An" to "A".
Side note and likely for a separate ticket: @shawntanzk, this text definition does not seem correct. This seems to leave out innervation of skeletal muscles in limbs and unsure what "head" muscles are innervated by this cell type. Appreciate your expertise on this.

Given that this isn't a huge deal, I'd like to leave this ticket for new incoming curators - I see you have tagged good first task too :)

Fixed it in #1812 (for some odd reason, this ticket seems duplicated or something and @bvarner-ebi & @aleixpuigb spotted that it was still opened after I fixed it). If all good, please do close it :)

There isn't a PR linked and merged to this issue to close it. But it's weird how they're duplicated.

Closing this issue in favour of https://github.com/obophenotype/cell-ontology/issues/1765

Fixed it in #1812 (for some odd reason, this ticket seems duplicated or something and @bvarner-ebi & @aleixpuigb spotted that it was still opened after I fixed it). If all good, please do close it :)

This ticket (#1764) was opened as a "good first task" to fix the typo in the definition. In response to:

"Side note and likely for a separate ticket: ...",

@shawntanzk made that separate ticket (#1765). When @shawntanzk fixed #1765, the typo in this ticket was also fixed.


Warning when adding keys that are already registered

Subject of the issue
As a developer I'd like to know if I have duplicate keys in my translation files.
Steps to reproduce
https://plnkr.co/edit/OagTzPaRwIbBQDavcGYP?p=preview
Expected behaviour
I would like to see a warning being logged if my second call to $translateProvider.translations() contains keys already registered.
Actual behaviour
There is no warning, and the last call to $translateProvider.translations() overwrites the previous ones.

Something like this added to pascalprecht.translate.$translateProvider#translations should work:
     for (var key in translationTable) {         if ($translationTable[langKey][key]) {           console.warn('pascalprecht.translate.$translateProvider: Duplicate translation key \'' + key + '\' [' + langKey + ']');         }       }

Maybe I am missing something.. but a map does not contain duplicate entries by specification. Or in other words: Any duplicate entry will be sorted out by the parser engine (i.e. Browser).

Yes, of course but if I have multiple translation files and accidentally overwrite a value already registered I've like to know about it.

Fair point.


Tabs border does not respond to window size change

For example:

hm, the bug seems to be present only when i added this css rule:
.a-tabs-wrapper {
    justify-content: center;
}


Add swipe/slide/zoom functionality

From "paxperscientiam": On the UX side of things, the ability to slide over to the next image via trackpad or mobile screen, would be great. To this end, I think we want a sliding motion to be equivalent to pressing left/right buttons, correct?"
Correct :-)

@rejas Just for the record, there is no interest in adding dependencies, correct?

No, only if it was very very small. For exmaple issue #47 would be really easy to fix if I would use hammer.js but then the size of the library doubles....

@rejas just to update, mobile finger sliding works just fine. It's only trackpad that does not.

Trackpads? Well, for those that want to add support for that, they could use their own library for detecting that an call a function for next / prev on our library. what do you think?

@rejas just to update, mobile finger sliding works just fine. It's only trackpad that does not.

For me zooming doesn't work on Pixel XL with Android 9 and Chrome 86.0.4240.198
Do you have to configure it the right way to work? Or did you mean sliding next/prev and not zooming?

Swipe is currently working as intended, if there is anything wrong with zoom, please open a new issue with a clear description of why the current state is lacking.


Bluetooth: controller: Consideration for SDU interval in fragmentation

Included consideration for the packet sequence number and time stamps together with the SDU interval in matching the event for fragmentation of SDUs to unframed PDUs.

Included aunit test to cover change.

@cvinayak please review

@niag-Oticon Please rebase

@niag-Oticon please rebase

Requesting change until investigation of why there is loss of audio sync

@cvinayak Thanks for the approval, but I believe that this change request is still blocking.

Requesting change until investigation of why there is loss of audio sync

@cvinayak Thanks for the approval, but I believe that this change request is still blocking.

@kruithofa please review and approve.


Fixing digest for credential package

Changing digets value name in credential-package so build tooling can properly substitute
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/lgtm


[RFE] Add support for yum repos

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

When adding a folder structure to hauler, everything get's flattened. If you ran createrepo with the intent of creating a valid yum repository, the repodata folder won't be present. Would it be possible to allow the concept of folders to exist to preserve the ability to haul and serve yum repos?
Describe alternatives you've considered

Additional context

Is there a reason to not use https://linux.die.net/man/1/reposync for this? It's already well supported for this exact scenario.


Make runners configurable from the command-line using hydra

https://github.com/agencyenterprise/neural-data-simulator/issues/44
Introduction
This PR adds command-line configuration to the run_*.py scripts. For example you can now change the logger level with:
streamer log_level=DEBUG.
Changes

Switch from pydantic-yaml library to hydra. hydra both reads in YAML config files and parses any values from the command-line interface

The config files (mostly) did not need to change for this update.

Replaces deprecated YamlStrEnum by str, Enum mix-inheritance

This hydra/PyDantic integration is based on this blog post: https://suneeta-mall.github.io/2022/03/15/hydra-pydantic-config-management-for-training-application.html#can-pydantic-bridge-the-gaps-in-hydra
Behavior

run_closed_loop works the same:

The run_*.py scripts can now be configured on the command-line, e.g. streamer log_level=DEBUG streamer.stream_indefinitely=false
run_*.py --help shows the default config, e.g.:

run_streamer is powered by Hydra.

== Configuration groups ==
Compose your configuration from those groups (group=option)

== Config ==
Override anything in the config (foo.bar=value)

version: 1.0.0
log_level: INFO
streamer:
  lsl_chunk_frequency: 100
  input_type: npz
  stream_indefinitely: true
  blackrock:
    input:
      file: sample_data/blackrock-file.ns6
    output:
      lsl:
        channel_format: int16
        instrument:
          manufacturer: Blackrock Neurotech
          model: Playback
          id: 1
  npz:
    input:
      file: sample_data/session_4_behavior_standardized.npz
      timestamps_array_name: timestamps_train
      data_array_name: vel_train
    output:
      sampling_rate: 50
      n_channels: 2
      lsl:
        channel_format: float32
        stream_name: NDS-Behavior
        stream_type: Behavior
        source_id: SimulatedBehavior
        instrument:
          manufacturer: Blackrock Neurotech
          model: Simulated
          id: 0

The scripts do also generate an outputs folder, which is mostly unused right now.

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

Files
Coverage Δ

src/neural_data_simulator/settings.py
94.51% <100.00%> (+0.20%)
:arrow_up:

src/neural_data_simulator/scripts/run_encoder.py
83.47% <75.00%> (-2.89%)
:arrow_down:

...ural_data_simulator/scripts/run_ephys_generator.py
84.15% <75.00%> (-2.94%)
:arrow_down:

... and 2 files with indirect coverage changes
:loudspeaker: Thoughts on this report? Let us know!.

@NewtonSander have you seen this error before? https://github.com/agencyenterprise/neural-data-simulator/actions/runs/6583346051/job/17886339278?pr=49
On (test) windows-latest:
Run poetry install --no-interaction --no-root

Command ['D:\\a\\neural-data-simulator\\neural-data-simulator\\.venv\\Scripts\\python.exe', '-I', '-W', 'ignore', '-'] errored with the following return code 103

Error output:
No Python at '"C:\hostedtoolcache\windows\Python\3.[11](https://github.com/agencyenterprise/neural-data-simulator/actions/runs/6583346051/job/17886339278?pr=49#step:8:12).5\x64\python.exe'

My PR doesn't touch any actions, so I'm a little confused where this is coming from, unless windows-latest was updated and it broke our tests somehow?

@NewtonSander have you seen this error before? https://github.com/agencyenterprise/neural-data-simulator/actions/runs/6583346051/job/17886339278?pr=49
On (test) windows-latest:
Run poetry install --no-interaction --no-root

Command ['D:\\a\\neural-data-simulator\\neural-data-simulator\\.venv\\Scripts\\python.exe', '-I', '-W', 'ignore', '-'] errored with the following return code 103

Error output:
No Python at '"C:\hostedtoolcache\windows\Python\3.[11](https://github.com/agencyenterprise/neural-data-simulator/actions/runs/6583346051/job/17886339278?pr=49#step:8:12).5\x64\python.exe'

My PR doesn't touch any actions, so I'm a little confused where this is coming from, unless windows-latest was updated and it broke our tests somehow?

@charlesincharge I wasn't aware of this error, I re-triggered a successful job on main and it also failed.
I've tried to fix the bug in a fork of main and didn't manage to find the root cause, so the workaround was to disable the cache for Windows:
https://github.com/agencyenterprise/neural-data-simulator/pull/53

Thanks for helping me workaround that test error Newton!

@charlesincharge it seems like I can't run decoder --help if the config files do not exist in the default location:
decoder --help
Traceback (most recent call last):
  File "/Users/nsander/workspace/neural-data-simulator/src/decoder/run_decoder.py", line 110, in run
    run_with_config()
  File "/Users/nsander/.pyenv/versions/3.11.6/lib/python3.11/site-packages/hydra/main.py", line 94, in decorated_main
    _run_hydra(
  File "/Users/nsander/.pyenv/versions/3.11.6/lib/python3.11/site-packages/hydra/_internal/utils.py", line 363, in _run_hydra
    hydra.app_help(config_name=config_name, args_parser=args_parser, args=args)
  File "/Users/nsander/.pyenv/versions/3.11.6/lib/python3.11/site-packages/hydra/_internal/hydra.py", line 356, in app_help
    cfg = self.compose_config(
          ^^^^^^^^^^^^^^^^^^^^
  File "/Users/nsander/.pyenv/versions/3.11.6/lib/python3.11/site-packages/hydra/_internal/hydra.py", line 594, in compose_config
    cfg = self.config_loader.load_configuration(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nsander/.pyenv/versions/3.11.6/lib/python3.11/site-packages/hydra/_internal/config_loader_impl.py", line 142, in load_configuration
    return self._load_configuration_impl(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/nsander/.pyenv/versions/3.11.6/lib/python3.11/site-packages/hydra/_internal/config_loader_impl.py", line 243, in _load_configuration_impl
    self.ensure_main_config_source_available()
  File "/Users/nsander/.pyenv/versions/3.11.6/lib/python3.11/site-packages/hydra/_internal/config_loader_impl.py", line 129, in ensure_main_config_source_available
    self._missing_config_error(
  File "/Users/nsander/.pyenv/versions/3.11.6/lib/python3.11/site-packages/hydra/_internal/config_loader_impl.py", line 102, in _missing_config_error
    raise MissingConfigException(
hydra.errors.MissingConfigException: Primary config directory not found.
Check that the config directory '/Users/nsander/.nds' exists and readable

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/nsander/.pyenv/versions/3.11.6/bin/decoder", line 6, in <module>
    sys.exit(run())
             ^^^^^
  File "/Users/nsander/workspace/neural-data-simulator/src/decoder/run_decoder.py", line 112, in run
    raise FileNotFoundError(
FileNotFoundError: Run 'nds_post_install_config' to copy the default settings files

after I execute nds_post_install_config I get the yaml config and at the end this message:
Powered by Hydra (https://hydra.cc)
Use --hydra-help to view Hydra specific help

so i have to execute --hydra-help to get the help docs for --config-path and --config-name, but it's mixed with all the other options provided by hydra:
decoder --hydra-help
Hydra (1.3.2)
See https://hydra.cc for more info.

== Flags ==
--help,-h : Application's help
--hydra-help : Hydra's help
--version : Show Hydra's version and exit
--cfg,-c : Show config instead of running [job|hydra|all]
--resolve : Used in conjunction with --cfg, resolve config interpolations before printing.
--package,-p : Config package to show
--run,-r : Run a job
--multirun,-m : Run multiple jobs with the configured launcher and sweeper
--shell-completion,-sc : Install or Uninstall shell completion:
    Bash - Install:
    eval "$(decoder -sc install=bash)"
    Bash - Uninstall:
    eval "$(decoder -sc uninstall=bash)"

    Fish - Install:
    decoder -sc install=fish | source
    Fish - Uninstall:
    decoder -sc uninstall=fish | source

    Zsh - Install:
    Zsh is compatible with the Bash shell completion, see the [documentation](https://hydra.cc/docs/1.2/tutorials/basic/running_your_app/tab_completion#zsh-instructions) for details.
    eval "$(decoder -sc install=bash)"
    Zsh - Uninstall:
    eval "$(decoder -sc uninstall=bash)"

--config-path,-cp : Overrides the config_path specified in hydra.main().
                    The config_path is absolute or relative to the Python file declaring @hydra.main()
--config-name,-cn : Overrides the config_name specified in hydra.main()
--config-dir,-cd : Adds an additional config dir to the config search path
--experimental-rerun : Rerun a job from a previous config pickle
--info,-i : Print Hydra information [all|config|defaults|defaults-tree|plugins|searchpath]
Overrides : Any key=value arguments to override config values (use dots for.nested=overrides)

== Configuration groups ==
Compose your configuration from those groups (For example, append hydra/job_logging=disabled to command line)

hydra: config
hydra/env: default
hydra/help: default
hydra/hydra_help: default
hydra/hydra_logging: colorlog, default, disabled, hydra_debug, none
hydra/job_logging: colorlog, default, disabled, none, stdout
hydra/launcher: basic
hydra/output: default
hydra/sweeper: basic

Use '--cfg hydra' to Show the Hydra config

After some discussion with Newton and trying to brainstorm workarounds, I have decided that hydra is probably over-featured and a bit too opinionated for our use-case. For example, hydra is not designed for the situation where the default config file doesn't exist (as it does when the user hasn't run nds_post_install_config)
We do want hydra's specific YAML/command-line-merging logic though, and this is implemented by OmegaConf.
I'll change this PR to use https://omegaconf.readthedocs.io/en/2.3_branch/usage.html#from-command-line-arguments

@NewtonSander thanks for the feedback here. I made some substantial changes, so I moved it to a different branch and opened a separate PR: https://github.com/agencyenterprise/neural-data-simulator/pull/57
I will close this PR.


Redhat quay operator 3.3.0 fails to install due to bad csv

Attempting to install the redhat quay operator 3.3.0 fails on OCP 4.3 due to an invalid csv. Reviewing the failed install plan shows the following error:
  status:
    catalogSources:
    - redhat-operators
    conditions:
    - lastTransitionTime: 2020-06-04T20:02:09Z
      lastUpdateTime: 2020-06-04T20:02:09Z
      message: 'error creating csv red-hat-quay.v3.3.0: ClusterServiceVersion.operators.coreos.com
        "red-hat-quay.v3.3.0" is invalid: spec.customresourcedefinitions.owned.displayName:
        Required value'
      reason: InstallComponentFailed
      status: "False"
      type: Installed
    phase: Failed

Attaching the entire install plan log.

installplan.log

I am also facing same issue, pls advice how to proceed further on it

@bfabec @abd2312 Can you still see this issue with the latest version (v3.6.2) ?

Closing this issue due to inactivity. Please reopen if necessary.


locales -> added Hungarian and fixed some typos

Fixes:
Distance: based on the snippet distance: n => (n < 1000) ? Math.round(n) + locale.distance[0] : Math.round(n/1000) + locale.distance[1], distance[0] should be 'meter', locale.distance[1] should be 'kilometer' (or the equivalent). It was swapped the other way in some cases
Temperatur(e): The e was missing in some cases

thanks

Awesome - thanks!


Istio prometheus is missing "kubernetes_node" label

I started to notice that community Grafana dashboards for node exporter will not work with istio prometheus as prometheus config is missing following source_label in kubernetes-service-endpoints job
- jobe_name: kubernetes-service-endpoints
.........
  - source_labels: [__meta_kubernetes_pod_node_name]
    separator: ;
    regex: (.*)
    target_label: kubernetes_node
    replacement: $1
    action: replace

This source_labels: [__meta_kubernetes_pod_node_name] will add additional label (kubernetes_node) which is used in many dashboards to build graphs
Also there is no prometheus job which is monitoring for prometheus itself (inside metrics)
- job_name: prometheus
  honor_timestamps: true
  scrape_interval: 1m
  scrape_timeout: 10s
  metrics_path: /metrics
  scheme: http
  static_configs:
  - targets:
    - localhost:9090)

Going forward it will be nice to see that prom helm config is merged with istio so it will provide same metrics and istio metrics on top of it.
How to reproduce
Install kube-state-metrics, node-exporter, prometheus-server with helm
kubectl  create ns prometheus
helm upgrade --install prometheus -n prometheus stable/prometheus --set alertmanager.enabled=false --set pushgateway.enabled=false

Install istio (istio-1.6.5)
istioctl manifest apply --set profile=default

proxy to prometheus port which installed with helm
kubectl port-forward  --address <IP_ADDRESS> -n prometheus  service/prometheus-server 2000:80

open url
http://<IP_ADDRESS>:2000/graph?g0.range_input=1h&g0.expr=avg%20by%20(kubernetes_node%20)%20(rate(node_cpu_seconds_total%5B2m%5D))&g0.tab=0

Now proxy port for istio prometheus
kubectl port-forward  --address <IP_ADDRESS> -n istio-system  service/prometheus 2000:9090

open same url
http://<IP_ADDRESS>:2000/graph?g0.range_input=1h&g0.expr=avg%20by%20(kubernetes_node%20)%20(rate(node_cpu_seconds_total%5B2m%5D))&g0.tab=0

When you access url for first prometheus you will see all nodes and metrics associated with it
with istio prometheus you will see only one metric as kubernetes_node label dose not exist
Please update prometheus config.

We will not be adding configurability or supporting installation of Prometheus any longer - see https://istio.io/latest/blog/2020/addon-rework/ for details. Note we will still integrate with Prometheus but won't manage installation. Thanks!

@howardjohn  thank for clarifying that istio will not support addons installation moving forward
However it's not clear what path is taking prometheus. Is prometheus used by istiod/envoy to make features like circuit braking, fault injection available ?
Can I disable Istio prometheus, enable Prometheus Merge setting (--set meshConfig.enablePrometheusMerge=true --set values.prometheus.enabled=false) and install prometheus with helm?
Will this impact istio control plane features ?

Istio does not depend on Prometheus at all, it is purely additional for monitoring


Update I18nRoutingServiceProviderTest.php

@thegeekrv What's this?

I don't know, I did a huge mess... :/


Training without prompting

I have dataset where one image have three masks which corresponds to three different classes but there are several masks without any class(masks with completely zero) and during the prompts generation process I am getting errors related to "ZeroDivisionError: integer division or modulo by zero" since there masks are completely zero , so is it possible to train without any prompts in these situation?

During training, at least one mask corresponds to each image, and there is no problem with training in this scenario. It is recommended that you remove masks that only contain background and process the dataset in the format of data_demo.

During training, at least one mask corresponds to each image, and there is no problem with training in this scenario. It is recommended that you remove masks that only contain background and process the dataset in the format of data_demo.

I am able to train now after removing the masks with only background. Additionally  I have questions related to multiple masks, during training I set number of masks to 3 and during testing I get only one mask. Is it possible to get three masks for each image during testing?

@ariharasudhanm Hi,brother,have you solved the problem that segment more than two classes in one image?recently i meet the same problem and i dont konw how to fix it...could you tell me how you fix it later?

Here in the testing phase, you get one mask per prompt. So basically if you want to segment 2 classes in the same image then you need at least 2 prompts. For more than one mask per one image during the testing phase, I would recommend another paper called [SAM-Med] (https://github.com/hitachinsk/SAMed) where you get more than one mask per image during the testing phase.

@ariharasudhanm thanks very much, let me see see


how to use vulkan android?

i have revised my local code as this commit f58b3a8
but when i build using the command ./build.sh -vcp android debug, it failed, as below,

so whether vulkan backend is accomplished?

I just committed a small fix to our CMake files that was creating issues when building Vulkan for Android and some versions of CMake. What version of Filament are you using? The August 2019 commit you're pointing to is quite old at this point and I would recommend you try with the latest master. Vulkan should work, it definitely compiles.

I just did 2 clean builds of Vulkan for Android, in debug and release, and they both succeeded.

i am using the filament 1.5.0

Doesn't the FILAMENT_SUPPORTS_VULKAN need to be turned on?
And does i still use the command ./build.sh -vcp android debug?

It's turned on by passing -v to build.sh. But our Vulkan back end isn't complete yet. It builds on master.

ok, and thank you for your persistently reply.


Fix Dutch typo

I saw my surname in the faked data, but it is misspelled. The misspelled version doesn't exist in The Netherlands.

All clear, thanks for the reply :)

@ppelgrims I think this change is valid. It will only break tests in very rare cases (not all cases based on Dutch names). So I'm going to merge it. Thanks!

Yeah, I'm not sure how strict this is to be enforced. Anyway, nice work @gizburdt !


Added challenge 11, fizzbuzz is not printed

@raddhakrishnan - the print statement (on line 22) should just be fizzbuzz. Your image tells me absolutely nothing. Can you please annotate it clearly. Look at images in either challenge_12 or challenge_09.


[Question] Which patch implement the feature in the below screenshot?

This feature seems like a tabbed windows manager. It's great for coding and compiling.

Check the recent closed issue!

I gave up, it’s full of invalid parameters error. Thanks for your reply.

For people who have errors: X_Error BadMatch Invalid parameters, you can try to replace the tab win create parameters to:
m->tabwin = XCreateWindow(dpy, root, m->wx, m->ty, m->ww, th, 0, depth,
					        InputOutput, visual,
						CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa);

For people who have errors: X_Error BadMatch Invalid parameters, you can try to replace the tab win create parameters to:
m->tabwin = XCreateWindow(dpy, root, m->wx, m->ty, m->ww, th, 0, depth,
			  InputOutput, visual,
			  CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa);

Exactly, this error is came from alpha patch. You must create tab window like the status bar. For more detail please checkout https://dwm.suckless.org/patches/alpha/dwm-alpha-20201019-61bb8b2.diff and search the keyword XCreateWindow at function updatebars(void).

For people who have errors: X_Error BadMatch Invalid parameters, you can try to replace the tab win create parameters to:
m->tabwin = XCreateWindow(dpy, root, m->wx, m->ty, m->ww, th, 0, depth,
			  InputOutput, visual,
			  CWOverrideRedirect|CWBackPixel|CWBorderPixel|CWColormap|CWEventMask, &wa);

Exactly, this error is coming from the alpha patch.  For more detail please check out https://dwm.suckless.org/patches/alpha/dwm-alpha-20201019-61bb8b2.diff and search the keyword XCreateWindow at function updatebars(void).

yeah chadwm doesnt have the alpha patch so I didnt had those issues

Tab patch file link: https://github.com/siduck76/chadwm/issues/17#issuecomment-896920317


Defaulting to ./sami.cfg.php if not passed a config

Simple edit for defaulting to using the config file in the cwd if not given one.

There were no such thing as default config before, right? Maybe call it sami_config.php.dst instead.

Ahhh, you're right, I'm not sure where I got the name from. I might have copied it from some blog/guide/forum, I don't remember now. It's a personal preference (maybe others too?) to being able to leave it off and have a default be used. Like Vagrantfile, gulpfile.js, phpunit.xml, etc....

Following the phpunit model: default to sami_config.php if it exists, otherwise default to sami_config.php.dist

Closing as the repo is not maintained anymore.


Allow URLs to not be split

While #384 is marked as resolved, that issue explicitly mentioned not splitting URLs as a motivation for the request and that use case is still not satisfied.
In this example, even with a break_words(false) specified into the Options, the URL is still split across lines. If printed to a terminal, the newline character interrupts any system URL recognition and makes it impossible to shift-click to open the link.
    assert_eq!(
        textwrap::fill(
            "http://example.com/long/url/that/should/not/be/split",
            textwrap::Options::new(40).break_words(false)
        ),
        "http://example.com/long/url/that/should/not/be/split"
    );

This test fails with this output:
assertion `left == right` failed
  left: "http://example.com/long/url/that/should/\nnot/be/split"
 right: "http://example.com/long/url/that/should/not/be/split"

I would like a way to force textwrap to not insert the newline character in a URL even if it would wrap to the next line. In addition, if the URL could fit fully on the next line, it should not be split up:
    assert_eq!(
        textwrap::fill(
            "I wonder what's for dinner http://example.com/long/url/that/should/not/be/split",
            textwrap::Options::new(60).initial_indent("").break_words(false)
        ),
        "I wonder what's for dinner\nhttp://example.com/long/url/that/should/not/be/split"
    );

assertion `left == right` failed
  left: "I wonder what's for dinner http://example.com/long/url/that/\nshould/not/be/split"
 right: "I wonder what's for dinner\nhttp://example.com/long/url/that/should/not/be/split"

It's not clear if this is because / is interpreted as a character that is allowed to be split.
The NoHyphenation WordSplitter option doesn't change anything:
    assert_eq!(
        textwrap::fill(
            "I wonder what's for dinner http://example.com/long/url/that/should/not/be/split",
            textwrap::Options::new(60)
                .initial_indent("")
                .word_splitter(textwrap::WordSplitter::NoHyphenation)
                .break_words(false)
        ),
        "I wonder what's for dinner\nhttp://example.com/long/url/that/should/not/be/split"
    );

assertion `left == right` failed
  left: "I wonder what's for dinner http://example.com/long/url/that/\nshould/not/be/split"
 right: "I wonder what's for dinner\nhttp://example.com/long/url/that/should/not/be/split"

I tried a couple of tricks with WordSplitter and WordSeparator but so far to no avail.

Hi @c3potheds! Thanks for writing, I very much agree with you that this is confusing and could be made better...
In short, the option you're looking for is WordSeparator::AsciiSpace. See this playground:
    assert_eq!(
        textwrap::fill(
            "I wonder what's for dinner http://example.com/long/url/that/should/not/be/split",
            textwrap::Options::new(60)
                .break_words(false)
                .word_separator(textwrap::WordSeparator::AsciiSpace)
        ),
        "I wonder what's for dinner\nhttp://example.com/long/url/that/should/not/be/split"
    );

The problem is that the default UnicodeBreakProperties variant is too smart in this case: it sees / as a valid place to break a line. This is great when dealing with text like "你好" or "😂😍", but in this case it's not useful.
A first step to improve this could be to update the documentation to call this out. A second step could perhaps be to detect suppress this break point with a new option — I'm not 100% sure what to do here.


Channel monitoring

Previously we've had to manually check each post in the commissions channel to see if users are following the 'once per 7 days' rule.
To automate this I've added a 'monitoring' service which checks all messages sent in a channel and removes them if it's been less than the specified time interval. The channel, interval and bypass roles can all be configured through a new 'monitoring' category.
Users get warned by Izzy if they post too early:

Closes #529
Also added the witty category to .config

There's a second test failure because one of the "Did you mean..." tests uses "100" and that hit your new default value.


Simple Blinds don‘t react fully

Hey! :-)
I have bought blinds (controllable by tuya) and would like to control them in HomeKit.
Now, I have the following issue. Only one action is possible. I can only open the blinds in HomeKit. Closing is not possible. The blinds don’t react when I want to close.
Does anyone know how I can solve this problem?☺🙈
Would be really, really cool if someone can help me :)

Does no one have an idea?:(

Now, I have converted my problem. With this instruction (https://github.com/AMoo-Miki/homebridge-tuya-lan/issues/89), the log-file tells me that the curtain is moving (opening, closing and stopping; Hence: there is no "Blinds saw change to undefined" anymore). But in reality, it don't move. Before I have made this change, one move (closing OR opening) was possible. After this change, there is NO movement anymore. I think my problem is pretty similar to https://github.com/AMoo-Miki/homebridge-tuya-lan/issues/161
Can anyone help us? :/

Same issue, it’s perfectly configure but curtain switch does not work

Hello, I'm using 1.5.0-rc.12 with this configuration and everything is working on my side :

  {
        "platform": "TuyaLan",
        "devices": [
            {
                "name": "Roller shutter",
                "type": "SimpleBlinds",
                "manufacturer": "",
                "model": "",
                "id": "<device-id>",
                "key": "<device-key>",
                "timeToOpen": 17,
                "timeToTighten": 4,
                "flipState": false,
                "cmdOpen": "on",
                "cmdClose": "off",
                "cmdStop": "stop",
                "sendEmptyUpdate": true
            }
        ]
    }

If your device is successfully detected in homebridge, it should work.

Hi all, I bought a Tuya curtain from Taobao and configure it type as "SimpleBlinds". It can recognize as a Curtain in Apple Home apps. however, i cannot control it both open or close through Home apps. any suggestion to make it function ?
this is my configuration
{
"name": "主人房窗簾",
"type": "SimpleBlinds",
"manufacturer": "Tuya",
"model": "Tuya",
"id": "855210025002915b8487",
"key": "xxxxxxxxxxxxxxx",
"ip": "<IP_ADDRESS>",
"timeToOpen": 22,
"timeToTighten": 0,
"flipState": true


Can I train on one long audio file (10 mins+)?

I was wondering if it is possible to just train on one long wav file of 10 mins+ and split it into 3 files with 60%, 20%, and 20% for train, validation, and test set like the paper mentions. Does that work right away or will I have to split the long audio file into separate audio files of single sentences like the VCTK dataset?

Hi,
It works well as long as the audio file contains a single speaker's speech. In addition, I used random frame sampling (you can see the code of the dataset class), which samples frames about 1 second. But I think it is better to increase the batch size for optimization.
Further, I think the data is too small to train from scratch and to get high performance. Probably better to adopt fine-tuning with a lower learning rate.
Thanks

Hello,
I tried fine-tuning with a 9:32 clip of Trump (from here https://www.youtube.com/watch?v=6a1Mdq8-_wo), but I am getting bad results. I split the audio into 6:40 training and 2:52 validation.
Here are the steps I took for preprocessing:

I edited the ExtractMelstats() function by just removing the loop and working on one wav_name instead.
I edited ProcessingTrainData() to set the speaker variable to be the same as wav_name.

With those edits, I ran my own preprocess_custom.py code as shown below. I didn't call GetSpeakerInfo() or SplitDataset() since I just had two files and hard-coded the relevant details. I also did not call the GetMetaResults() function because it deals with text and it didn't look like the training code used it.
Overall, I think the code works as expected with the two wav files for training purposes.
def main(cfg):
    seed_init()
    MakeDir(cfg.output_path)

    trump_train_wav = './base_data/trump/wav/trump_train.wav'
    trump_valid_wav = './base_data/trump/wav/trump_valid.wav'

    wn2info = {}

    print('---Feature extraction---')
    train_result = ProcessingTrainData(trump_train_wav, cfg)
    valid_result = ProcessingTrainData(trump_valid_wav, cfg)

    wav_name, mel, lf0, mel_len = train_result
    wn2info[wav_name] = [mel, lf0, mel_len, "trump_train"]

    mean, std = ExtractMelstats(wn2info, wav_name, cfg) # only use train wav for normalizing stats

    print('---Write Train Features---')
    train_results = SaveFeatures(wav_name, wn2info[wav_name], 'train', cfg)

    wav_name, mel, lf0, mel_len = valid_result
    wn2info[wav_name] = [mel, lf0, mel_len, "trump_valid"]

    print('---Write Valid Features---')
    valid_results = SaveFeatures(wav_name, wn2info[wav_name], 'valid', cfg)

    print('---Write Infos---')
    Write_json([train_results], f'{cfg.output_path}/train.json')
    Write_json([valid_results], f'{cfg.output_path}/valid.json')

    print('---Done---')`

With the preprocessing done, I then started the training and commented out the Tester() part which uses eval data. From what I understand, that has no effect on the training, so commenting out shouldn't impact the performance.
I fine-tuned the model with learning rate of 1e-6 and 1000 epochs with the --resume=True option starting from the model-mel-split.pth provided. The lowest valid loss was at epoch 1 and did not improve after. When I also do the voice conversion with convert.py using the the latest fine-tuned model, the audio is very bad and has a lot of 'static' noise. In fact, the more I increase the epochs the less intelligible it becomes.
I am not sure if I am doing something wrong in the code or perhaps my preprocessing script is missing something. Have you tried fine-tuning the model with another voice (like any public figure with online videos for testing purposes)?
Thanks, and any help would be appreciated!

Hi,
I have not tried fine-tuning for the specific person. But, I think there are some things to try.
You can check the vocoder performance whether the speech can be reconstructed well (without forwarding VC model).
And I checked the video, and I think it's better to split the whole video into several segments (e.g, 10 seconds).
It increases batch size and can be helpful for optimization. And need to adjust lr.
Thanks.

Additionally, it can be the problem of "resume".
What if just load the previous weights and fine-tuning them with a new optimizer?


MSTest Discovery Broken with 1.1.x

Describe the bug
After updating to 1.1.1/1.1.2 from 1.0.3 MSTest discovery is now broken. This is a blocking issue for us.
We couldn't test in our CI before because we were blocked by #2631 as well. I tried in the CI, but it seems there may have been something missed with the fix for #2631 as it's trying to install 1.1.1 still for MSTest, see comment here on that issue.
Locally I see the same behavior still I did with 1.1.1:
========== Starting test discovery ==========
[MSTest][Discovery][H:\...\tests\SizerBase.UnitTests.WinAppSdk\bin\x64\Debug\net6.0-windows10.0.19041.0\SizerBase.UnitTests.WinAppSdk.dll] Failed to discover tests from assembly H:\...\tests\SizerBase.UnitTests.WinAppSdk\bin\x64\Debug\net6.0-windows10.0.19041.0\SizerBase.UnitTests.WinAppSdk.dll. Reason:File does not exist: H:\...\tests\SizerBase.UnitTests.WinAppSdk\bin\x64\Debug\net6.0-windows10.0.19041.0\SizerBase.UnitTests.WinAppSdk.dll
No test is available in H:\...\tests\SizerBase.UnitTests.WinAppSdk\bin\x64\Debug\net6.0-windows10.0.19041.0\SizerBase.UnitTests.WinAppSdk.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
========== Test discovery finished: 0 Tests found in 5.1 sec ==========

The file exists on disk, everything built. Only change is updating NuGet reference from 1.0.3 to 1.1.x causes tests now to not be discovered properly/run.
Steps to reproduce the bug

Create a MSTest based unit test project for WinAppSDK with 1.0.3
Run tests.
Close VS
Clean environment
Update to 1.1.x
Re-run tests (fail)

Note, you have to close VS/clean environment as VS caches test discovery, didn't detect this issue at first on initial update as VS used prior cache to run tests. Issue seems to be with test discovery itself.
Expected behavior
Able to run MSTest projects as was able to with 1.0.3.
Screenshots
No response
NuGet package version
1.1.1
Packaging type
No response
Windows version
Windows 10 version 21H2 (19044, November 2021 Update)
IDE
Visual Studio 2022
Additional context
No response

Can reproduce. Here's log output from my test project w/ verbosity cranked up. Not very helpful.
[7/5/2022 2:45:33.994 PM]  Operation Dequeue : 'RunFromCodeLensOperation'
[7/5/2022 2:45:33.999 PM]  Building Test Projects
[7/5/2022 2:45:34.070 PM]  Start building 1 containers.
[7/5/2022 2:45:34.070 PM]  Triggering build for 1 IProjectBasedTestContainers.
[7/5/2022 2:45:35.599 PM]  No IBuildableTestContainers were found.
[7/5/2022 2:45:35.599 PM]  Completed building containers.
[7/5/2022 2:45:35.599 PM]  Start updating 1 containers.
[7/5/2022 2:45:35.599 PM]  Updating container C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll.
[7/5/2022 2:45:35.615 PM]  Successfully refreshed container: C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll
[7/5/2022 2:45:35.615 PM]  Completed updating containers.
[7/5/2022 2:45:35.615 PM]  DiscoveryOperation<RunFromCodeLensOperation> Changed container count is 1
[7/5/2022 2:45:35.654 PM]  Test run animation has started.
[7/5/2022 2:45:35.663 PM]  Test run progress has started.
[7/5/2022 2:45:35.663 PM]  Discovering the following containers :
[7/5/2022 2:45:35.663 PM]  	C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll
[7/5/2022 2:45:35.765 PM]  Starting test discovery for requested test run
[7/5/2022 2:45:35.921 PM]  Project testproject references test adapter: MSTest.TestAdapter, version 2.2.8
[7/5/2022 2:45:36.123 PM]  ========== Starting test discovery ==========
[7/5/2022 2:45:36.124 PM]  File timestamp changed from 7/5/2022 2:34:56 PM to 7/5/2022 2:45:35 PM for C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll
[7/5/2022 2:45:36.126 PM]  Grouped C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll : (AnyCPU, FrameworkCore10, net6.0, )
[7/5/2022 2:45:36.128 PM]  Test discovery settings for C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll:
 <RunSettings>
  <BoostTestInternalSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <VSProcessId>28340</VSProcessId>
  </BoostTestInternalSettings>
  <RunConfiguration>
    <ResultsDirectory>C:\Sources\was-repros\was_issue_2706\TestResults</ResultsDirectory>
    <SolutionDirectory>C:\Sources\was-repros\was_issue_2706\</SolutionDirectory>
    <CollectSourceInformation>False</CollectSourceInformation>
  </RunConfiguration>
  <GoogleTestAdapterSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SolutionSettings>
      <Settings />
    </SolutionSettings>
    <ProjectSettings />
  </GoogleTestAdapterSettings>
</RunSettings>.
[7/5/2022 2:45:36.565 PM] [Warning] [MSTest][Discovery][C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll] Failed to discover tests from assembly C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll. Reason:File does not exist: C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll
[7/5/2022 2:45:36.566 PM] [Warning] No test is available in C:\Sources\was-repros\was_issue_2706\tests\testproject\bin\Debug\net6.0-windows10.0.19041.0\testproject.dll. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
[7/5/2022 2:45:36.590 PM]  ========== Test discovery finished: 0 Tests found in 466.1 ms ==========
[7/5/2022 2:45:36.902 PM]  ========== Starting test run ==========
[7/5/2022 2:45:36.904 PM]  Attachments processing not needed
[7/5/2022 2:45:36.906 PM]  ========== Test run finished: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========
[7/5/2022 2:45:36.989 PM]  Test run animation has stopped.
[7/5/2022 2:45:37.021 PM]  Test run progress has stopped.

Thanks @riverar for confirmation on another machine. I was hoping to get more details from the CI on our GitHub action as well, but that's been stuck because of #2631 as well (which seems resolved for our main build with 1.1.2 but is failing for the test project still - it seems that 1.1.2 is still trying to install the 1.1.1 package still in that case?).

I tried to reproduce this issue using MSTest 2.2.10, and the test discovery seemed to work.
Were you using MSTest 2.2.10? If 2.2.10 still doesn't work, could you share a minimal repro project? (I'm new to using MSTest).

Concur @DefaultRyan. Looks like this is fixed in 2.2.10, suspect it was related to https://github.com/microsoft/testfx/pull/1064. @michael-hawker tag you're it.

Thanks folks, we were on 2.2.8 indeed. I believe I'll still be blocked from fully validating in our CI by the remaining issue with the fix for https://github.com/microsoft/WindowsAppSDK/issues/2631 though.
I tried locally, and I see test discovery may have found them now, but didn't appear to run them:
Log level is set to Informational (Default).
Connected to test environment '< Local Windows Environment >'
Test data store opened in 0.023 sec.
Loaded 0 test records from the solution cache in 0.416 sec.
========== Starting test discovery ==========
========== Test discovery finished: 5 Tests found in 5.6 sec ==========
Starting test discovery for requested test run
========== Starting test discovery ==========
========== Test discovery finished: 5 Tests found in 20.4 sec ==========
========== Starting test run ==========
========== Test run finished: 10 Tests (5 Passed, 5 Failed, 0 Skipped) run in 424 ms ==========

Though I don't see anything listed in the Test Explorer now either:

I'm on 17.2.4 of VS, so I'll try updating that as well.
Was able to grab the message from the bubble over the method:
Message:
    Initialization method SizerBase.Tests.ExampleSizerBaseTestClass.TestSetup threw exception. System.TypeInitializationException: The type initializer for 'CommunityToolkit.Labs.UnitTests.App' threw an exception. ---> System.TypeInitializationException: The type initializer for 'WinRT.ActivationFactory`1' threw an exception. ---> System.Runtime.InteropServices.COMException: Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).
    TestCleanup method SizerBase.Tests.ExampleSizerBaseTestClass.TestCleanup threw exception. System.TypeInitializationException: System.TypeInitializationException: The type initializer for 'CommunityToolkit.Labs.UnitTests.App' threw an exception. ---> System.TypeInitializationException: The type initializer for 'WinRT.ActivationFactory`1' threw an exception. ---> System.Runtime.InteropServices.COMException: Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).

  Stack Trace:
    BaseActivationFactory.ctor(String typeNamespace, String typeFullName)
    ActivationFactory`1.ctor()
    ActivationFactory`1.cctor()
    --- End of inner exception stack trace ---
    ActivationFactory`1.As(Guid iid)
    Window.Make___objRef_global__Microsoft_UI_Xaml_IWindowStatics()
    Window.get__objRef_global__Microsoft_UI_Xaml_IWindowStatics()
    Window.get_Current()
    App.cctor() line 41

Looks like something may be going on with accessing the Window.Current now that wasn't happening with 1.0.3:
public sealed partial class App : Application
{
#if WINAPPSDK
    private static Microsoft.UI.Xaml.Window currentWindow = Microsoft.UI.Xaml.Window.Current; // Line 41

@DefaultRyan I've invited you to our repo, so you can see the PR with the WinAppSDK and MSTest updates here: https://github.com/CommunityToolkit/Labs-Windows/pull/183 (it's working on our main with WAS 1.0.3 and MSTest 2.2.8).
I'd be curious if you just add the line above with the reference to Window.Current in your setup for App.xaml.cs, if you'll hit the same issue though?
I tried putting breakpoints on this line and in the constructor, but I don't see them being hit when I ask it to debug the test from the code bubble.

I updated to 17.2.6 and I can see the tests again now in Test Explorer, but still hit the WinRT activation issue now with all the WinUI tests.

We're using single-package MSIX projects for both app and tests:
  <ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnablePreviewMsixTooling)'=='true'">
    <ProjectCapability Include="Msix" />
  </ItemGroup>

Still seeing the same message with 1.1.3 locally, though still blocked from testing in our CI by https://github.com/microsoft/WindowsAppSDK/issues/2768.
Message:
Initialization method SizerBaseExperiment.Tests.ExampleSizerBaseTestClass.TestSetup threw exception. System.TypeInitializationException: The type initializer for 'CommunityToolkit.Labs.Tests.App' threw an exception. ---> System.TypeInitializationException: The type initializer for 'WinRT.ActivationFactory`1' threw an exception. ---> System.Runtime.InteropServices.COMException: Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).
TestCleanup method SizerBaseExperiment.Tests.ExampleSizerBaseTestClass.TestCleanup threw exception. System.TypeInitializationException: System.TypeInitializationException: The type initializer for 'CommunityToolkit.Labs.Tests.App' threw an exception. ---> System.TypeInitializationException: The type initializer for 'WinRT.ActivationFactory`1' threw an exception. ---> System.Runtime.InteropServices.COMException: Class not registered (0x80040154 (REGDB_E_CLASSNOTREG)).

  Stack Trace:
BaseActivationFactory.ctor(String typeNamespace, String typeFullName)
ActivationFactory`1.ctor()
ActivationFactory`1.cctor()
--- End of inner exception stack trace ---
ActivationFactory`1.As(Guid iid)
Window.Make___objRef_global__Microsoft_UI_Xaml_IWindowStatics()
Window.get__objRef_global__Microsoft_UI_Xaml_IWindowStatics()
Window.get_Current()
App.cctor() line 41
--- End of inner exception stack trace ---
App.get_DispatcherQueue() line 85
VisualUITestBase.EnqueueAsync(Func`1 function) line 19
VisualUITestBase.TestSetup() line 69
TestCleanup Stack Trace
App.get_DispatcherQueue() line 85
VisualUITestBase.EnqueueAsync(Func`1 function) line 19
VisualUITestBase.TestCleanup() line 79

Branch is here: https://github.com/CommunityToolkit/Labs-Windows/tree/llama/input-injection-test

I believe this issue is resolved in terms of VS, but would like to validate everything is still working in our CI with the latest version; however, that's still blocked by https://github.com/microsoft/WindowsAppSDK/issues/2768

New tracking issue for root cause of issues with 1.1.x is here: https://github.com/microsoft/WindowsAppSDK/issues/2829

Ah, looking at https://github.com/actions/runner-images (finally found this) it seems like the OS is still in LTSC from summer:
Current runner version: '2.299.1'
Operating System
  Microsoft Windows Server 2022
  10.0.20348
  Datacenter

I can open an issue there, but would be nice to validate E2E and ensure this and #2829 is indeed fixed.

+@Scottj1s

Hey @michael-hawker @Scottj1s ,
Sorry for the direct ping but issue was marked as solved in 1.2.X but we are having users saying they still have the issue in this version. What's the status here? Did 1.2.x solved the issue?


GitHub PR: Comment isn't cached when starting a comment, switching editors, and coming back to comment

I started a comment using '+' and entered some text. Then I switched to the PR description (which did still have some cached text in it). Then I switched back to the file with the comment I started. The comment was gone.
Windows, with a multi root PR. Found testing #62184

Duplicate of https://github.com/Microsoft/vscode/issues/62274


Text of the PDF is messing up

Recently the PDF rendering get a messed up text layer where text gets duplicated with the grey colored overlay.
No idea about how to fix it as lack of documentation over those functionalities
Im using pdfjsViewer.PDFPageView and it gives this behavior now
my code as follows
 getPdf() {

    var pdfDocument;

    if ( this._state !== 'inDOM' ) return false;

    pdfjsLib.disableRange = true;
    pdfjsLib.disableStream = true;

    let self = this;
    pdfDocument = pdfjsLib.getDocument(this.src);
    pdfDocument.promise.then(function(pdf) {
      self.set( 'pdfDocument', pdf );
      self.set( 'maxNumPages',  pdf.numPages );
      self.set( 'prevBtnDisabled', true );
      self.set( 'documentRendered', true );

      self.setViewportWidth();
      self.renderPdf();
    });

    return pdfDocument;
  },

  renderPdf() {

    var pdf = this.pdfDocument,
        maxNumPages,
        pagePromise;

    if ( !pdf ) return false;

    maxNumPages  = this.maxNumPages;

    pagePromise = this.getAndRenderPage( pdf, 1 );

    Array.apply( null, new Array( maxNumPages - 1 ) ).forEach( ( value, index ) => {

      pagePromise = pagePromise.then( () => this.getAndRenderPage( pdf, index + 2 ) );
    } );
  },

  getAndRenderPage( pdf, index ) {

    return pdf.getPage( index ).then( page => this.renderPage( page, index ) );
  },

  renderPage( pdfPage, pageNum ) {

    var parentWidth       = this.$().parent().width(),
        pageViewportScale = ( parentWidth >= this.get( 'breakpoints.mobile' ) ) ? 1.5 : 1.3,
        viewport          = pdfPage.getViewport( { scale: parentWidth / pdfPage.getViewport( { scale: pageViewportScale } ).width } ),
        container         = this.$().find( '.pdf_viewer--container' )[ 0 ],
        pdfPageView;

    pdfPageView = new pdfjsViewer.PDFPageView( {
      container: container,
      id: pageNum,
      scale: viewport.scale,
      defaultViewport: viewport,
     textLayerFactory: new pdfjsViewer.DefaultTextLayerFactory()

    } );
    var pages = this.get('pages');
    // Associates the actual page with the view, and drawing it
     pages.push( pdfPageView );
    this.set( 'pages', pages );
    this.set( 'scale', viewport.scale );

    pdfPageView.setPdfPage( pdfPage );

    return pdfPageView.draw();
  },

i have seen some of them asked this question in here. but the authors are closing those issues without giving a proper answer ! therefore please dont close these kinda of issue which users are facing.
Configuration:
Web browser and its version: Chrome  78.0.3904.108
Operating system and its version: Mac OS 10.15
PDF.js version:2.3.200
Is a browser extension: No
Steps to reproduce the problem:

Code using pdfviewer.pdfpageview option

renderPage( pdfPage, pageNum ) {

   var parentWidth       = this.$().parent().width(),
       pageViewportScale = ( parentWidth >= this.get( 'breakpoints.mobile' ) ) ? 1.5 : 1.3,
       viewport          = pdfPage.getViewport( { scale: parentWidth / pdfPage.getViewport( { scale: pageViewportScale } ).width } ),
       container         = this.$().find( '.pdf_viewer--container' )[ 0 ],
       pdfPageView;

   pdfPageView = new pdfjsViewer.PDFPageView( {
     container: container,
     id: pageNum,
     scale: viewport.scale,
     defaultViewport: viewport,
    textLayerFactory: new pdfjsViewer.DefaultTextLayerFactory()

   } );
   var pages = this.get('pages');
   // Associates the actual page with the view, and drawing it
    pages.push( pdfPageView );
   this.set( 'pages', pages );
   this.set( 'scale', viewport.scale );

   pdfPageView.setPdfPage( pdfPage );

   return pdfPageView.draw();
 },

Open the PDF document
grey colored text appears with  main text ( duplication of same text in the page twice)

What is the expected behavior?
correct pdf document to view ( it works when i removed   textLayerFactory: new pdfjsViewer.DefaultTextLayerFactory() )
What went wrong?

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension): None, Private Env

The only suggestion here would be to refer to the "pageviewer" example in https://github.com/mozilla/pdf.js/tree/master/examples/components

However, this issue is currently missing all of required information necessary for it to be valid, and as-is it will be closed as INCOMPLETE.
First of all, you need to provide all of the details requested in https://github.com/mozilla/pdf.js/blob/master/.github/ISSUE_TEMPLATE.md; and please also see https://github.com/mozilla/pdf.js/blob/master/.github/CONTRIBUTING.md (emphasis mine):

If you are developing a custom solution, first check the examples at https://github.com/mozilla/pdf.js#learning and search existing issues. If this does not help, please prepare a short well-documented example that demonstrates the problem and make it accessible online on your website, JS Bin, GitHub, etc. before opening a new issue or contacting us on the IRC channel -- keep in mind that just code snippets won't help us troubleshoot the problem.

Your Example is the one i have implemented also. but its not working fine. it gives the error of the issue that i mentioned above. anyways i will reformat the issue according to your specification. hope for a valid answer after that. cause i have seen this issue reported in several places ( even stackoverflow) . but you or anyone did not find a proper answer why it is happening after all.

Please keep in mind that this is, first and foremost, an open source bug tracker and not a general support forum; hence everyone opening an issue are required to provide actionable information.
Given that the "pageviewer" example linked to above does work, that would suggest an error in your code (e.g. that you didn't include the pdf_viewer.css in your HTML code); hence why https://github.com/mozilla/pdf.js/issues/11379#issuecomment-561066363 specifically asked you to provide a runnable example here.

Thanks for the help. really appreciate it. anyways i have raised this in here as there was no migration document or any help for resolve this kind of issues. we are not experts on "PDFJS". we just use this as a library and we are configuring it with the parameters your library supports. issue was that the we were using 2.2.228 version and it upgraded ( minor ) with this breaking change. and went through your release logs but couldn't find the exact root cause which you mentioned here that the css file needs to be added.
anyways PDFjs is used in wide range infact, we are using this with EmberJS where we have customized a component to use your library. so the implementation from our side is not just adding a js or css file and its bit complicated.
As a suggestion i would like to request to open a discussion or a help forum or community to support the issue that customers/users are experiencing. as i have search, i have some other people also faced issues and it is lack of support due to experts are not there in the environment( mentioned that most are use this just to render pdf or simple tasks)

Thanks for the help. really appreciate it.

Sure; and a piece of future advice: Down-voting a simple request for more information, as was done with https://github.com/mozilla/pdf.js/issues/11379#issuecomment-561066363, is probably not the best way to get people to actually assist you...

anyways i have raised this in here as there was no migration document or any help for resolve this kind of issues.

You need to keep in mind that this is an open source project, with most people contributing in their spare time and without any compensation.

issue was that the we were using 2.2.228 version and it upgraded ( minor ) with this breaking change.

The versioning of the PDF.js library is explained in https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#version
Looking at a general version number, i.e. x.y.z, then whenever the x and/or y part changes there's some API changes that you may need to account for in your code.

which you mentioned here that the css file needs to be added.

However, the fact that the "pageviewer" example requires the pdf_viewer.css file is nothing new, rather it has been included in that example ever since it was first created five years ago.

As a suggestion i would like to request to open a discussion or a help forum or community to support the issue that customers/users are experiencing.

Again, this is an open source project which you're able to use for free (thus the notion of "customers" doesn't fit here). Hence it's simply not reasonable to expect that unpaid volunteers will be able to provide the same level of support that you'd get with commercial software (for which you're paying).
Please understand that running a dedicated support forum is no easy task, and even if such a thing existed you'd not be guaranteed if/when questions were answered (since the few regular PDF.js contributors may not wish to spend their spare time acting as dedicated tech support).

I agree with https://github.com/mozilla/pdf.js/issues/11379#issuecomment-561102452. There is no runnable example, and it looks like the text layer just isn't offset correctly due to missing/overwritten CSS. Without an actual running example there is unfortunately nothing we can do here.


feat(head, gantry): enable the eeprom for the head and gripper boards

In order to continue with RLAB-291 The gantry and head boards need to have the eeprom and i2c system setup.
This adds the i2c read/write tasks and the eeprom task so that further PR's can build on top of it
Tested reading and writing from eeprom on a DVT bot

Codecov Report

Merging #621 (aad7643) into main (a191d37) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #621   +/-   ##
=======================================
  Coverage   84.71%   84.71%
=======================================
  Files          88       88
  Lines        3442     3442
=======================================
  Hits         2916     2916
  Misses        526      526


Initialize model with model from a previous coalition?

This could "save" a few epochs.

Indeed, it could save a few epochs and it could be very interesting in term of performances. In the other hand, I wonder how contributivity score could be impacted.
For example, we train a model on three partners with a federated approach. Then we want to add a partner and train a model on these 4 partners. If we use the model trained on the 3 partners to initialize the model for the 4 partners, isn't there a risk that the contributivity score might be biased?
I mean, in an extreme example, let's assume that the data from the 4th partner are totally new. This dataset should bring more information to the model than the three others.
What do you think? Obviously we can do some experiments to illustrate this intuition. @bowni @RomainGoussault @Thomas-Galtier @jeromechambost

Yes there is a risk that the optimisation of the loss would be trapped in a local minimum after being initialized like this.


Not working for Android N

When updating devices to Android N, preview 4, the library ceases to be able to write to preferences.
Upon starting the app I get this message:
E/System:  ********** PLEASE READ ************
E/System:  *
E/System:  * New versions of the Android SDK no longer support the Crypto provider.
E/System:  * If your app was relying on setSeed() to derive keys from strings, you
E/System:  * should switch to using SecretKeySpec to load raw key bytes directly OR
E/System:  * use a real key derivation function (KDF). See advice here :
E/System:  * https://stackoverflow.com/questions/13433529/android-4-2-broke-my-encrypt-decrypt-code-and-the-provided-solutions-dont-work
E/System:  ***********************************

I'm using HawkBuilder.EncryptionMethod.MEDIUM and saving it to SharedPreferences.

I believe this could related to this issue: http://android-developers.blogspot.com/2016/06/security-crypto-provider-deprecated-in.html
What I'm thinking now is, probably this will require adaptation to the new APIs. What would be the best way to migrate the existing data though?

Here's what I'm doing currently, if anyone is interested:
When the app starts, after initializing Hawk, I check if I can set an existing key to a new value. If it can, it gets reset to the previous value, otherwise, I do this:
Hawk.clear()
Hawk.resetCrypto()

// Initialize Hawk again after

Sorry for not being responsive. is this still an issue or still using work around? I'd be happy to work on it or request for a help.

This issue seems related to the older version, closing this one for now since new version uses a different encryption library to handle. Cheers


Off-Chain optimistic roots branch

Implement a PoC for off-chain features needed for the optimistic roots upgrade, in a feature branch.
Subtasks:

[x] DB schema migrations
[ ] Mock subgraph data
[ ] Mock DB data
[ ] Prototype Cartographer enhancements
[x] Prototype LH enhancements

Refactoring existing agents and adding new agents
Focusing on DB side of things today
Expecting few more days of work

Impact: 5
See the discussion in Backlog Prio 1
Powered by Parabol

Focusing on proveAndProcess side. Still some ways off from deploying to staging, targeting next week.

Complexity: 21
See the discussion in Sprint Poker #22
Powered by Parabol

Start with subgraph work. Test coverage around schemas, etc.

Need to figure out if subgraph latency causes issues with mode switch.

DB migration figured out. Working on subgraphs, based on current PR from DW.
Next steps:

Map subgraph to carto pollers.
New agent "lighthouse-proposer".

Yesterday: Finished subg mappings, carto pollers.
Today: Work on lighthouse agent.
Blocker: Waiting for final version of ABIs.

Latest changes in optimistic_roots branch

Need to fix build and tests, then bring their contracts into this branch.

Integrate contracts
Discuss with gotzen (DeFi Wonderland) pending tasks for the merge to staging

Handoff task list to Gotzen. Unit test coverage is poor, but core logic is likely to change while they work on it. Wait until staging env stabilizes, may need to disable unit test checks for deployment to staging.

Branch is ready to put into staging. Handoff done for task list to Gotzen. Covers pending tasks. Still fuzzy around coordination between the teams and sprints.

Branch is now staging. Further development to happen on staging.


Unable to import SAP Cloud Foundry SAML 2.0 Auth Flow policy

Hi @aadinigam,
I'm importing the SAP Cloud Foundry SAML 2.0 Auth Flow policy via zip file and I get the following error:

Invalid ID; ID can only contain alphanumeric characters, underscore(_) and hyphen(-).

Invalid ID; ID can only contain alphanumeric characters, underscore(_) and hyphen(-).[Request ID: 908984e1-2fbe-405d-be28-ee4e89986d20]

I'm in API Portal in a non-trial and successfully on boarded account (supposedly).
Additional info:
I'm importing the policy because I can't copy it from Discover. When doing so, I get an error because it already exists in my policies although it does not exist: (I'm going to create an oss ticket for this issue.)

Thanks in advance,
Marc

Hi Marc,
Thanks for sharing, we will look into this and update.
Please try workaround, which will help you to import the policy template

Unzip and open the file SAPCloudFoundrySAML2OAuthFlow.xml

Please update the name tag as shown in screenshot
Name : SAP Cloud Foundry SAML2OAuth Flow
work around update : SAP_Cloud_Foundry_SAML2OAuth_Flow

Now zip and try to import, this should work..
Please take care of folder structure when you zip

Regards,
Raghavendra Kulkarni

Hi Raghavendra,
thanks for the workaround. It works fine.
Regards,
Marc


[manuf] fix provisioning orchistrator

This fixes the provisioning orchestrator script and the CP/FT host binary build rules that was triggering errors at run time.

CC: @BenBenderOT


Center text in a toast message?

Is it possible to center text and change any other formatting?

I would be interested in this too. Right now the text looks weird, when it is bound to the top left. I would like to be able to set a margin or center the text. Can we use standart html inside the MessageBox?
Edit: Tested it and html does not work.

Hello
In my case I usually put more space characters, in order to get an center text, but, when the text length is major than 34 a new line is created..

Regards.

Fixed, update relased.
You can now use TextAlign, PaddingLeft, MarginLeft properties. See the sample file

Hello Krish..
How we use these properties when calling the object gDll.Toast?


[HOPSWORKS-522] Enforce kafka max topics in backend

Make sure there is no duplicate PR for this issue

Please check if the PR meets the following requirements

[X] Adds tests for the submitted changes (for bug fixes & features)
[X] Passes the tests
[X] HOPSWORKS JIRA issue has been opened for this PR
[ ] All commits have been squashed down to a single commit

Post a link to the associated JIRA issue
https://hopshadoop.atlassian.net/browse/HOPSWORKS-522

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Enforce kafka max topics in backend

What is the new behavior (if this is a feature change)?
Fix

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)

Other information:

Done.


Lush not consistantly using CursorLineNr element

Even after defining a CursorLineNr in my lush config file, it does not appear to want to use it for some reason. It shows up as if it was defined correctly, but when i try to go into something with neovim. ..

the color of the line does not change.
Weirdly enough, if i try to use my file browser, which is currently fern...

the highlighting works fine.
Currently, I'm using urxvt with a truecolor patch as my terminal, but I've tried with other terminals such as terminator and had the same results. The colorscheme is set right at the top of my init.lua, right after enabling truecolor. I'm not quite sure if this is an issue with lush, or if I just did something wrong when setting up lush/neovim.

Not sure, I can't reproduce the errant behaviour here. For what its worth, I set my colorscheme pretty late, almost last in my config, potentially there is a plugin that might be doing some thing funny with the CursorLineNr group?
Do you get the issue with a minimal config of just lush and your scheme?

Not sure, I can't reproduce the errant behaviour here. For what its worth, I set my colorscheme pretty late, almost last in my config, potentially there is a plugin that might be doing some thing funny with the CursorLineNr group?

I didnt know you had to use ':set cursorline' to get the cursorline/linenr highlighting to work.
sorry about that, I'm still getting comfortable setting up neovim.

No worries, Have fun!