[server] sample udp echo server and ignore bin dir

This PR adds a sample UPD echo server; Ping @OskarBarsch
This can be tested:

gradle server:build && gradle :server:run
on Linux you can use: nc -u <IP_ADDRESS> 3000 which starts a UDP client that starts on that port and IP
type something into the terminal and press enter; the server should return the typed in data...

Please try to write a UnitTest for the recieve() method...

LGTM :+1:  Going to merge sample code to have sever base in main branch.


Chaincode should be addressed by a function of its code + initial parameters signature

 Issue by ghaskins
Tuesday Dec 08, 2015 at 19:34 GMT
Originally opened as https://github.com/openblockchain/obc-peer/issues/373

Ignoring multi-signatory/escrow-contract scenarios, basic asset-move transactions in a blockchain could be described as a uni-lateral "send" function which may only be initiated by the sender (validated by digital signatures from key-pairs associated with the account).  Therefore, it is important to have confidence in the destination address' legitimacy as the intended target, as the asset-move will generally be irrevocable  once the transaction confirms.  Short of a compensating transaction at the behest of, and initiated by the destination chaincode, there is no function to revoke a mistake.  Specificity with the location/function of the destination is therefore important to gain both confidence in the network (an initiator may verify that an address resolves as they expect) as well as to catch mistakes/discrepancies (validators would only know how to route messages to the "right" code).  Fortunately, this should be fairly easy to capture by creating chaincode addresses as a hash of the actual code and initial parameters: address = f(code, initparams) -> hash([code, initparams]).

 Comment by ghaskins
Tuesday Dec 08, 2015 at 19:37 GMT

Today chaincode is addressed by the tuple {url, version}.  This tuple is fine for identifying the code to instantiate initially but should be translated into a locally cached code+hash(code) as part of deployment

 Comment by binhn
Saturday Dec 12, 2015 at 16:24 GMT

related #202  @prjayach @muralisrini

 Comment by muralisrini
Thursday Dec 31, 2015 at 01:44 GMT

I've tried to summarize an implementation for this issue and #202 in the attached file. The implementation is in https://github.com/muralisrini/obc-peer/tree/chaincode_as_hash_of_code/issue/%23202
issues_202_303.docx
@ghaskins , @prjayach , @jeffgarratt , @angrbrd , @srderson , @binhn  - comments please

 Comment by muralisrini
Thursday Dec 31, 2015 at 04:11 GMT

Thanks @srderson

the name is the hashcode. ie, there is just one thing and not two. The hashcode returned from deploy will be the name used for invoke/query
the hashcode needs to be unique. In particular, if the hashcode generated from the tuple matches a previously generated hashcode retrieved from ledger, we need to return an error

I think the doc needs to clarify "name" better. As mentioned in (1) it is just the hashcode. In dev mode the user really supplies a "name" in lieu of a generated hashcode.

 Comment by srderson
Thursday Dec 31, 2015 at 03:06 GMT

Thanks for the summary. A few quick questions after reading though it once.

It states "CLI has a new 'name' parameter for invoke/query" but then later states "Invoke/query needs to provide the hashcode". Does it need both? Why would just the hashcode not be sufficient?

It states the deploy ID doubles as the transaction ID. Does the transaction still have an additional unique ID?

In the last part of your doc, you suggest dropping versioning. @ghaskins and I had this discussion on slack and our conclusion was that address = hash({hash(code), contructor, nonce) . If version is not a first class citizen, why should we keep name? Couldn't these both be in the "dns" contract?

 Comment by muralisrini
Thursday Dec 31, 2015 at 13:07 GMT

Thanks, @prjayach

To be clear, there were two builds getting done for a deploy request. (1) in devops before a transaction is submitted to the system and (2) in chaincode when the transaction was executed. I just got rid of 1 as unused and unnecessary (ie, its just a low level detail I wanted to call out). We just need to compute the targz and the hashcode for 2 to work. 2 is untouched.  Having said that, code currently does not recreate docker image if it got wiped out for some reason.  But now that the groundwork is in by way of generating hashcode from files, such a check will fit neatly in the framework - basically untar the bytes from the transaction (if it exists) and compute the hashcode again (should be idempotent as the transaction is immutable but good to check).
2 (Pro) -  Semantically version is identical to  nonce in @ghaskins and @srderson scheme, isn't it ? Everything else in the tuple remaining same, version would compute a different hashcode.  I'm fine with retaining it as long as we don't leverage underlying container support for supporting it at that low level. Docker supports that today but the new implementation does not leverage it. And a different container technology might not support versioining or might treat it differently. By making the version just another byte array that goes into the hashcode computation we keep implementation independent of container technology. From user level as they always deal with the hashcode for invoke/query, it doesn't matter how the image is generated.
2 (Con) - Version has the feel of higher level construct. Remote path's naturally have versioning schemes embedded in them. In the same vein, local paths too can have version in them imposed by a higher level versioning construct. To me it feels right that paths have version component in them making an extra version field superfluous.

 Comment by prjayach
Thursday Dec 31, 2015 at 06:17 GMT

Looks great, @muralisrini. Couple of questions/comments:

You mention that deploy no longer builds the docker image. Is there a check before every chaincode invocation as to whether a build is necessary? Is this already done in your implementation?
I vote for retaining version. Invariably, smart contracts will evolve over time and users will want to deploy newer versions of the contract, while still maintaining record of the older versions. Eventually, we should build in the ability to prevent invocations of old versions when newer versions have been deployed - this will be a very useful feature, in my opinion. I am in talks with a client for a trade finance application and they really like the versioning feature - specifically, they are interested in modifying a contract over time, maintaining a link to transactions that happened even in older versions (not having to call it an altogether new contract with no link to the past), prevent older versions from being used once newer versions have been deployed.

 Comment by muralisrini
Thursday Dec 31, 2015 at 13:27 GMT

Updated doc based on above comments :
issues_202_303.docx
Interesting ... the attachment link above is an example of the embedded versioning (or nonce) found in remote paths mentioned in "2 (Con)" above :-) . Same filename but different path.

 Comment by binhn
Thursday Dec 31, 2015 at 15:54 GMT

If I read correctly, the hash is computed by hash(bytes of files, path, version, init function name, init param values).
Our primary goal (1) is to satisfy #202; that is, when we exec the deploy TX, we can make sure that we are using the same code that's being sent without any modification -- kind of checksum. Our secondary goal (2) is to be able to tell if a chaincode has been deployed and reject the duplicates. Yet the third goal (3) is not to disable any future extension notion of a chaincode instance; that is, a chaincode may be instantiated multiple times with different representations (like, new Rectangle(3,2)) without redeploying.
I think @muralisrini 's solution meets all these goals. The question in my mind is whether there're any extra things in the hash computation that we don't need. Either version or path seems extra to me. Either one would satisfy @prjayach 's comments.
I agreed with @srderson that we should use utils.ComputeCryptoHash so that we can isolate any potential future changes to the hash function that we use in the system.

 Comment by srderson
Thursday Dec 31, 2015 at 15:46 GMT

@muralisrini
The doc states "detect identical deployments and flag error". What is "identical" here? The chaincode ID or the transaction? It should be impossible to have identical transactions as it contains a nonce. It should be possible to deploy multiple instances of a chaincode with the same code and init params.
Does deploy return hash(code) or hash(transaction) or both?
The doc mentions MD5. Why use MD5 over SHA which we're using elsewhere? There's an existing ComputeCryptoHash function in utils.go.

 Comment by prjayach
Thursday Dec 31, 2015 at 13:55 GMT

@muralisrini

Going back to the deploy transaction and recreating the image if needed is what I was asking about. I understand now that it needs to be added once this piece is in. All good.
Yes, not asking for supporting it at container level. Only one version of a chaincode will run in a container at any point of time. The versioning will help queries and analytics later (I can query for all transactions across versions, for instance). Leaving it implicit in the path means that the system does not know that one deployment is the next version of a previous deployment - then there is no way to prevent invocations of the older versions or querying for transactions across versions. You are leaving all that for higher layers to manage, which can be painful.

 Comment by srderson
Thursday Dec 31, 2015 at 16:28 GMT

MD5 has known collisions, SHA-2 and SHA-3 do not. I suggest not using MD5. I don't understand "smaller strings will avoid future limitations with different container technologies."

 Comment by srderson
Thursday Dec 31, 2015 at 17:48 GMT

@binhn do we have an existing issue open for "Yet the third goal (3) is not to disable any future extension notion of a chaincode instance" or should we open a new one?
If someone wants to create multiple instances today, is our suggestion to essentially put some type of instance ID in the chaincode constructor?
The original idea behind versioning was that you could say something like "invoke this chainchode and invoke the latest version, up to version 3.0". Now if the client is passing the transaction ID to invoke a chaincode and the transaction ID contains the hash of the code, it's too specific as different versions would presumably have different code.
One partial way to resolve this ... versions could be mini blockchains. For example, when I deployed version 3 and would like a previous deploy transaction to be version 2, the transaction ID would be hash(bytes, path, init params, version, AND, hash of version 2 transaction ID).  Version two could then reference a version 1. This way the client could securely reference version 3 and securely know that versions 2 and 1 are previous versions.
The problem remains for how to do things like reference version 1 and execute a future version or disable version 1 because there is a version 3. I think these require the OBC server to treat versions as a first class citizen or write system chaincodes that you call through to perform these functions.

 Comment by muralisrini
Thursday Dec 31, 2015 at 16:21 GMT

@srderson : @binhn 's reading of the implementation is correct. Original goals of unique transaction ID for EVERY transaction has been modified to "unique transaction id for every unique deployment and for all invoke/query" transactions. This is what makes a deployed transaction id to also be a unique name. Note that if the deployed transaction id is not unique, we'll have to keep a map of (transactionid, hashcode). The modified semantics eliminates need to maintain that map.
On using one of Path or Version to compute hash : well, if we allow user to specify both, we'll have to include both to compute hashcode. Say user specifies 2 deploy's differing only in version. If we leave version out of the hash, we have to (1) use docker's version to differentiate and (2) have user provide version in addition to name for every invoke/query. Either we allow user to specify (path,version) or just (path) but in either case all specified elements will have to be in hash.... unless I'm missing something ?
On using SHA : we can use any algorithm that makes sense (indeed, there's a commented out SHA3 line in hashfromcode.go to hint that possibility). I used MD5 in the end as we get back smaller strings. There may also be some performance benefits with MD5.... So unless there's advantage of collision avoidance or something, perhaps we could standardize on both (say with a utils.ComputeMD5Hash) ? I'm mainly thinking smaller strings will avoid future limitations with different container technologies.

 Comment by muralisrini
Thursday Dec 31, 2015 at 17:40 GMT

@srderson : agreed. I just meant there may be name length restrictions if we move from docker to something else in future. but that's not strong enough to contend against collision / uniqueness arguments. I'll play with utils.ComputeCryptoHash and push the change if it works out.

 Comment by muralisrini
Thursday Dec 31, 2015 at 21:16 GMT

@kletkeman  hashcode ends up in the name of the image/container. One can imagine limits on image/container names. Also these names have to be used from CLI, browsers, apps, etc. As long as we don't end up with ridiculously long names, its fine. In any case the hashcode function is on the periphery of the implementation and quite independent and easy to change.

 Comment by kletkeman
Thursday Dec 31, 2015 at 18:16 GMT

@muralisrini Just curious how a container technology that had length restrictions incompatible with SHA could flourish in today's world?

 Comment by kletkeman
Thursday Dec 31, 2015 at 18:14 GMT

@srderson I raised a similar set of issues back some weeks. Versioning is usually required as a way to denote contract / API compatibility levels so that the user of a contract does not have to explicitly manage that. It also works very naturally with version control systems, which will presumably be used by the developers of said contracts. I'm not entirely comfortable with the use of version as somehow equivalent to a nonce in this discussion.
The mini blockchain idea is pretty interesting with the caveat that you would only think that way across incompatible versions. I.e. minor upversions stays in the same mini blockchain.
When I went to test multiple assets created by the same chaincode instance a few weeks back, I was rudely awakened to the idea that a chaincode instance must exist for every asset. Which sort of creates a blockchain per asset. I cannot quite grasp how a fairly high overhead design works in a contract based world, where everything in the IoT landscape could become an asset managed by a smart contract. So a design that allowed a new asset to be created without the complete build / deploy cycle would be very welcome I think.
Apologies if I have misinterpreted this discussion somehow.

 Comment by muralisrini
Monday Jan 04, 2016 at 19:24 GMT

After discussions, hashcode == transaction id == chaincode-reference satisfies all needs without requiring a special version field.
To summarize

hashcode is constructed from {path, func, args, codebytes-pointed-to-by-path}
hashcode will also be the transaction id for deploy transactions
invoke/query will use the hashcode (instead of {path, version})

Given hashcode is the transaction id, existing "ledger.GetTransactionByUUID" will retrieve the deploy transaction for the chaincode and can be used to build other queries.
@prjayach pointed out that we could go one step further to maintain an index for saying hashes x1, x2, x3 are from the same path. This would provide the "relationship" between the chaincodes.
@binhn, @frankyclu : re your desire to generalize "relationship" between chaincodes... there seems to be an opportunity here. What @prjayach is suggesting is a "same-path" relationship. Are relationships useful concepts to bubble all that way up so users can create relationships and bind chaincodes to them ?

 Comment by muralisrini
Saturday Jan 02, 2016 at 15:55 GMT

pushed change to use SHA3 in hashcodefromcode.go. Also cleaned up  test cases to use Paths. All tests ran successfully.
https://github.com/muralisrini/obc-peer/tree/chaincode_as_hash_of_code/issue/%23202.

 Comment by kletkeman
Monday Jan 04, 2016 at 20:23 GMT

@muralisrini : There was some discussion before Christmas suggesting that it would be useful to be able to deploy a chaincode and then call init repeatedly to create assets in the chain that would be managed in a sort of sub-chain way. For example, a shipment of cars with events recorded against each VIN as a separate asset. Using the method you describe, it seem that this will that require that every tracked car have its own instance of chaincode with a full build / deploy / init. Is my interpretation correct? Thanks.

 Comment by kletkeman
Tuesday Jan 05, 2016 at 04:46 GMT

@muralisrini There was a discussion about this a month or so ago. The chaincode deploy per resource is rather network and compute intensive and would thus limit us to slow cadence applications.
The single chaincode managing resources in a map (let's say) is better on system resources and could be the best way to go. There is the issue that the full state of the map may have to be hashed on each write, which does not scale very nicely. Has that been discounted as unnecessary? Or are the performance implications considered acceptable?
The compromise position would be to separate deploy from resource / asset creation and management. Of course, this would require that the blockchain be directly queried by resource ID rather than an internal map, which may have similar performance.
The map solution looks good if an Achilles' heel is not foreseen.

 Comment by ghaskins
Wednesday Jan 06, 2016 at 23:04 GMT

I think it is important to separate the functions of making code available for instantiation, and the actual instantiation of the chaincode to an instance.  While I have seen some mention of a delineation between Deploy and init(), both of these steps will have some similarities w.r.t hashIds requirements, however.  Therefore I think this is relevant to the to the OP subject.
Background
Rather than a single "Deploy" operation, I would argue that it should be something like a "Publish" + a "Create" operation, where the Create references a specific codebase from a previous Publish, and results in an instanceID that can serve as the target for further operations (such as Invoke).
This is partly because we need to recognize that in many use cases, the author of the chaincode will be a different entity from the parties that instantiate and/or invoke it.  It's also to allow the consensus layer to achieve agreement that all validators see the same code at the other end of the URL passed in before anyone agrees to consume it.
Publish
The basic notion with the Publish operation is to allow an entity or entities to publish chaincode in a coherent way across the network and to allow consumers of the chaincode (the instantiators and/or invokers) to have trust that they are instantiating the code they think they are.  The closest analogy I can think of is pushing an AMI to AWS as a discrete step from creating an instance from an AMI.  This operation makes it available "in the catalog" and can be displayed as such to a UI, etc.
Namespaces
Another component of this is the namespace associated with this push.  I envision a "github" like concept where anyone can create an account ("ghaskins"), and within that account, any number of repositories may be created.  Within a repository, any number of versions may be pushed.  The namespace would be hierarchical in nature, like a filesystem or REST/URI, e.g. username/repository/version, e.g. "ghaskins/gregs-swap-contract/v1".  Only "ghaskins" has authority to manipulate the ghaskins/* namespace, and publising new code to ghaskins/gregs-swap-contract creates a new version.  Each new version has a unique id as a function of hash(hash(code), username, repository, version) -> ImageID.
Reputation
Being able to attach trust to a namespace will be important.  E.g. if the system enforces that only an entity that possesses credentials for "ACME Corp" may publish repositories/versions under the namespace /acmecorp, then the burden of due dillgence and discovery is reduced for anything under /acmecorp/* vs a random pool of available code.
Versions
I agree with the comments that versions are important.  "ghaskins/gregs-swap-contract" may evolve over time.  Its important to allow other entities to be able to identify a specific version of a contract (e.g. v3 is the one our legal team vetted), as well as the relationship (e.g. I see there are newer versions of the contract we love so much...should we consider using the later version in future transactions?).  To that point, pushing a new version of a contract should not invalidate previous versions per se.  Current instances may not want to allow new code without specific considerations.  Future instances may wish to continue using versions of the code they have spent time vetting.  Therefore, allow the chaincode publisher to decide how to maintain their namespace (e.g. ghaskins/*.  Allow operations for creating new repositories, pushing new versions, or retiring old versions, deleting repositories, etc.  But don't do anything automatically.
Create
Create operations reference a (presumably previously established) ImageID, and couple it with the constructor parameters and an nonce:  e.g. hash(ImageID, parameters, nonce) -> InstanceID.
Summary
"InstanceID" in the above proposal carries the same crypto properties as defined earlier.  However, by splitting the operations we neatly provide the ability to re-use chaincode, build trust, provide a reputation system, etc.

 Comment by muralisrini
Tuesday Jan 05, 2016 at 00:40 GMT

@kletkeman : calling init repeatedly would create new chaincode instances, correct. However that same functionality can be achieved by a single application tracking all cars, couldn't it ? From discussions,  there are two models in general (1) 1 chaincode per resource (init with resource and deploy) and (2) chaincode managing resources via state (resource lifecycle managed via invoke).
Is there something in the approach you describe not covered by the above two ?

 Comment by kletkeman
Thursday Jan 07, 2016 at 05:43 GMT

@ghaskins Well stated. Agree completely.

 Comment by johncohn
Thursday Jan 07, 2016 at 14:45 GMT

@ghaskins Agree with your assessment. I  see the ability to create multiple instances of a single contract as key for two reasons. First it makes it easier to guarantee that multiple entities share exactly the same contract specifics. Second I believe it will be much more efficient for size and computation when you have very many instances intended to run the same contract.

 Comment by prjayach
Thursday Jan 07, 2016 at 18:36 GMT

I like the proposal, but seeking clarifications - in today's scheme we can maintain an index of chaincodeID to its path + code + initialization data. With this index, we can realize different versions (if multiple IDs use the same path, init data but different code, we can mark them as versions), different instantiations (multiple IDs using the same path, code but different init data). Once we realize from this index that a new deploy is only an instantiation of an older deploy, we can avoid rebuilding the image (if needed). Even otherwise, docker has a caching mechanism that is quite good at realizing that a new build has the same dockerfile instructions as a previous build, making subsequent builds of the same code very quick. What are the key benefits of splitting deploy and instantiate that aren't realizable with today's bundled deploy?

 Comment by muralisrini
Thursday Jan 07, 2016 at 16:05 GMT

Thanks @ghaskins @kletkeman @johncohn and others..
Let me attempt to summmarize above comments from an " implementation" point of view.
Currently deploy is a transaction with ( path + code + initialization data ).
In particular, this approach lumps code and data together. A common pattern is run the same code with different data (e.g., instantiate the same contract with different initialization data). This is naturally implemented by reusing the code as opposed to deploying the same code each time.
Some implementation notes

create a new "instantiate [reference to previous code, init func, init args]" command
the instantiate transaction would reference previously deployed code and start it up
the instantiate transaction would store reference to the previous deploy on the ledger instead of code
deploy, invoke and query would be unchanged (ie, invoke and query would just use the id returned by the instantiate transaction)

From user point of view, if above are the only changes, there isn't a functional difference between 2 deploys vs a deploy and an invoke (there would be performance and scalability benefits - @kletkeman @johncohn comments). However this separation allows us to extend the system (such as "Namespaces" in @ghaskins comment) and control instantiations.

 Comment by kletkeman
Thursday Jan 07, 2016 at 16:20 GMT

@muralisrini Good summary. There is one difference between 2 deploys and one deploy and 2 instantiations that you do not mention: every node in the network must deploy / build and instantiate for every resource / asset with the current scheme, whereas only one deploy / build will ever be necessary for any given version of the chaincode / contract under the proposed scheme. In a high-volume scenario, this could result in a fairly massive performance improvement at the network scale.

 Comment by prjayach
Thursday Jan 07, 2016 at 18:40 GMT

One possible advantage of the bundled deploy is that at the time of invoke, I need to refer back to only 1 previous transaction (the deploy) to ensure that the code I am running is actually the one that was initially deployed (for security, Issue #202 which was also covered with @muralisrini's implementation for this issue). In the proposed change, I might have to refer back to 2 transactions at the time of invoke?


HW #1 _ Create ReadMe file(with pull request)

title : meetup
category : meetup
date : 2019-11-19 18:00 ~ing
author : yeonuk44
Summary
check list

[x] Server_CRUD
[x] Server_SignUp
[x] Server_Login
[x] Server_Board
[x] Server_PublicAPI-utilization
[ ] Substantial develop
[ ] Linking Frontends with API

Well done!


close browser in oidc-signin-tool

github diff is messed up, use vscode (or github.dev) to view the diff


Use font and material icons from offline source

If we only import fonts from an online source there will be no icons displayed when you have no access to the Google servers.
We should download the font including the icons.

Added npm module for all Angular Material Icons


SCB-410 Alpha Service upgraded to Spring Boot 2.0

Support to build the Alpha Server with Spring Boot 2.0 by using -Pspring-boot-2
TODO: Upgrade the demos to Spring Boot 2.0

Coverage remained the same at 95.285% when pulling 8a29c87e7b8d6a1f16a8c6d3873441c2b70e44ae on spring-boot-2 into d71d1bc8315976b70e7566a0dc39ad2310cf9186 on master.


assertThatJson(jmyJsonObject).containsEntry(key, value) fails when value is numeric.

Expected to find numeric value in assertThatJson with .containsEntry when value is numeric
Example
      assertThatJson(agreementResponse)
          .isObject()
          .containsEntry("name", testAgreement.getName())
          .containsEntry("description", testAgreement.getDescription())
          // This seems like a bug on AssertJ.
          // This should work but doesn't. I assume is related to the Double type as other types work:
          // .containsEntry("reconsentPeriodDays", agreementResponse.getReconsentPeriodDays())
          // instead, we had to do this:
          .containsKey("reconsentPeriodDays")
          .extracting("reconsentPeriodDays")
          .isEqualTo(testAgreement.getReconsentPeriodDays());

Thanks for reporting this @chassum, could you add a reproducible test case?

I'll try to whip something up tomorrow ;)

Hi @chassum !
I've take a look on this issue.
I'm not sure if you use JsonUnit. But if, numbers are converted to BigDecimal.
A little bit hidden in den README of https://github.com/lukas-krecan/JsonUnit:
// AssertJ map assertions (numbers are converted to BigDecimals)
assertThatJson("{\"a\":1}").isObject().containsEntry("a", BigDecimal.valueOf(1));

@chassum any update on this one? If not are you happy for me to close it?

Thanks!


Changed "make" command om main Makefile to "$(MAKE) macro.

This allows for parallel compilation ("make -j4", for instance) to speedup process.

Very nice, thanks.


map_peptides_to_bed: py3

apparently biopython 1.62 can't be resolved because Galaxy first
searches in conda forge which does not provide this version. so
I update to the most recent one.

py3
code style

as far as I see only the order of the test-data changed

 tools/gffcompare_to_bed/gffcompare_to_bed.py:34:66: F821 undefined name 'unicode'
tools/gffcompare_to_bed/gffcompare_to_bed.py:40:67: F821 undefined name 'unicode'
tools/map_peptides_to_bed/map_peptides_to_bed.py:22:1: F401 're' imported but unused
tools/map_peptides_to_bed/map_peptides_to_bed.py:24:1: F401 'tempfile' imported but unused
tools/map_peptides_to_bed/map_peptides_to_bed.py:26:1: F401 'Bio.Seq.transcribe' imported but unused
tools/map_peptides_to_bed/map_peptides_to_bed.py:26:1: F401 'Bio.Seq.back_transcribe' imported but unused
tools/map_peptides_to_bed/map_peptides_to_bed.py:39:80: E501 line too long (145 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:60:80: E501 line too long (157 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:68:80: E501 line too long (132 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:75:80: E501 line too long (132 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:76:80: E501 line too long (96 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:119:80: E501 line too long (134 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:122:80: E501 line too long (90 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:124:80: E501 line too long (109 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:127:80: E501 line too long (87 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:129:80: E501 line too long (110 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:151:80: E501 line too long (127 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:154:80: E501 line too long (109 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:156:80: E501 line too long (176 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:157:80: E501 line too long (83 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:161:80: E501 line too long (85 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:166:80: E501 line too long (88 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:184:80: E501 line too long (101 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:187:80: E501 line too long (90 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:189:80: E501 line too long (94 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:206:80: E501 line too long (135 > 79 characters)
tools/map_peptides_to_bed/map_peptides_to_bed.py:207:80: E501 line too long (109 > 79 characters)


Compatibility with ESP-IDF 3.3 (stable)

When compiling this package in an esp-idf/adf project using the 3.3 version of idf, errors occur with the SoC component of the esp-idf library.
For example:
esp-idf/components/soc/esp32/include/soc/cpu.h:36:5: error: 'asm' undeclared (first use in this function)
     asm volatile ("mov %0, sp;" : "=r" (sp));

3.3 is the stable build of esp-idf. Not sure why this is happening, but i'll dig in a bit today.

Actually, it seems the flag
-std=c99
in the component.mk file is causing this, as discussed here:
https://stackoverflow.com/questions/35131350/error-asm-undeclared-first-use-in-this-function
Without this std=c99 flag it compiles with esp-idf 3.3. Can I make a PR?

I also had trouble with this flag, and needed to comment it out in order to remove some overwhelming number of warnings during compilation.
CFLAGS	+= -Wsign-compare

Yes please make a PR.
Also ignoring a few warnings sounds good. Especially Wsign-compare sounds ok to me.


Could not find browser revision latest

Bug description
I'm making a image scraper discord bot and i keep on getting errors here's the code:

Puppeteer version
v14.1.1
Node.js version
v17.0.1
npm version
v8.1.0
What operating system are you seeing the problem on?
Windows
Relevant log output
Error: Could not find browser revision latest. Run "PUPPETEER_PRODUCT=firefox npm install" or "PUPPETEER_PRODUCT=firefox yarn install" to download a supported Firefox browser binary.
    at FirefoxLauncher.launch (C:\Users\Administrator\Desktop\Simba\discordbotz\node_modules\images-scraper\node_modules\puppeteer\lib\cjs\puppeteer\node\Launcher.js:193:23)    at async GoogleScraper.scrape (C:\Users\Administrator\Desktop\Simba\discordbotz\node_modules\images-scraper\src\google\scraper.js:53:21)
    at async Object.execute (C:\Users\Administrator\Desktop\Simba\discordbotz\commands\image.js:18:31)

So did you run npm install with the specified env variables as the error message suggests?

Yes i have, and i still get the error

@Ibexlol what is the log output of the npm install command with the PUPPETEER_PRODUCT=firefox command? Note that on Windows you probably need to use a different syntax to set env variables depending on whether you use PowerShell or Command Prompt.


Wireframe and design sketch

Generate the wireframe and design sketch for the application.  A mock is available in the user story.

Here is a mockup of the sketch design.


Feature/regression test and user profile map for v1.7.0

Issue #, if available:
Description of changes:

Added the "Regression Testing" function in the Streamlit page 6 "Index Management". One click to test all sample SQL and show the result.
Added the "User Authorization Management" function in Streamlit. Admin can manage the frontend UI user-profile mapping. The record will be saved in DynamoDB.
Added "ENABLE_USER_PROFILE_MAP" in the application/.env file to control enabling the query profile by using the id function in the qa/option API.
Added the query user-profile mapping in the get_option API.

Known issues:

The user-profile mapping will not update while the admin deletes some data profiles.
If there is historical data in the local storage, and the admin sets ENABLE_USER_PROFILE_MAP=True, the default data profile will still be loaded from the local storage even if the profile is not in the qa/option API response.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

This branch has conflicts that must be resolved


Remove NextJS validation of appDirEnabled.

Clear and concise description of the problem
I understand that appDir support isn't coming anytime soon (or at all lol). But the appDir setting can no longer be disabled via config. It now just looks at the presence of the app directory.
But having the directory doesn't automatically mean that you are using appDir features.
For example we have app icon as metadata which are in the app dir by convention even though we exclusively use page routing.
Suggested solution
This error is not really necessary since the docs already point out that actual appDir usage is not supported.
Alternative
No response
Additional context
No response
Validations

[X] Read the Contributing Guidelines.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

If i dont block it completely ill get countless spam git issues on the subject - feel free to PR some kind of flag on the plugin to allow you to bypass it


Bump version on RubyGems?

Hi there,
Could you bump the version of this gem and publish the latest to rubygems? The most recent version there is from 2011... Would be much appreciated!

Hello,
Any update on this? Thank you!

Sorry, guys, I am so behind on this! 😭 I will get the version bumped on RubyGems this week.

@cvonkleist  Thank you for actively maintaining your gem. It brings value to people!

Thank you :)

The release on RubyGems works. Thanks! I guess this issue can be closed


Version 2.5.3

Landed in https://github.com/metarhia/impress/commit/b9b910bab520bb76f74bf5ecc67fd59646654e9c


Does reqwest support stream requests?

I'm looking for an equivalent for a python get request with stream=True, as documented here. This keeps the connection open and only download the body when you access the response content field. I've tried the following with reqwest:
let client = reqwest::Client::new();
let mut stream = client
    .get(url)
    .send()
    .await
    .unwrap()
    .bytes_stream();

while let Some(item) = stream.next().await {
    println!("Chunk: {:?}", item.unwrap());
}

But the connection is closed immediately. The target URL sends multipart data asynchronously and I need to keep listening to it. Is there a proper way to do this with reqwest?

Yes, reqwest by default will stream response bodies. The code you wrote should work, why does the server close the connection?

Thank you for your quick answer, @seanmonstar.
The server was closing the connection because I was wrongly using digest to authenticate. It's working as you explained now.

Out of curiosity, what does reqwest use to "chunk" the requests? How does it decide what to chunk on?


"Show passwords" checkbox not working

Describe the bug
Options to show password are not showing the password
To Reproduce

Enter the email of a non-SSO account
On the next page, click "Forgot password?" and enter email
Click "Change my password" link from the email
Enter any text into either or both boxes
Click the "Show passwords" checkbox
Observe that the password fields still show asterisks instead of what you typed

OR:

Log into a non-SSO account
Go to user profile page
Go to Change Your Password section
Type something into the three box
Click the "Show passwords" checkbox
Observe that the password fields still show asterisks instead of what you typed

Expected behavior
I expect that once that box is checked, the asterisks will turn into what I typed
Screenshots

Additional context
Happening on both Stage and Production

It DOES work on the Sign Up form


Pluggable Resolvers Architecture

Motivation
Bower resolvers mechanism is part of the Resolve process and is coupled with the Bower core; Therefore, extending Bower with custom (external) resolvers requires extending the Bower core project and having any resolver maintained by the Bower team.
In order to overcome this limitation, Bower needs a plugin-in system for resolvers, that will make it more flexible to extend Bower with custom resolvers and will allow external contributors to maintain these plugins.
Proposed Implementation Details
.bowerrc
A new section will be added to the configuration file, that will contain npm <package_name>: of external resolvers, added by users. When no version is specified, the latest version will be used.
For example:
       "resolvers":[
           "custom-resolver",
           "x-resolver:1.0.0",
       ]

Open discussion:

Considering the external resolvers order in the list

External Resolvers

A resolver will be independent NPM package, maintained and under the responsibility of a contributor.
As before, will implements the Resolver ("abstract class") methods, but with an addition of a new standard method that will decide if the current resolver matches the source (URL, git endpoint, etc.). For example: _matches(source)

Open discussion:

Should existing resolver logic and utils be extracted to external packages? This will allow using dependencies by contribute resolvers cleanly, without relative require() to Bower files location (require('../../../lib/core/resolvers/Resolver'))

Resolver Factory
Main flow:

Will go over the external resolvers in the .bowerrc, and will try to load them as Node modules (require)
For every module, invoke the resolver _match method, that will decide if the current resolver matches the source type
In case a resolver matches, use it (return it to PackageRepository)
In case no external resolver matches the source (or there aren't any), fall back to the list of internal resolvers (UrlResolver, GitRemoteResolver, etc.)

Open discussion:

Should ResolverFactory npm automatically install external resolvers in runtime, in case it cannot find a resolver installed in Bower. Npm can install the resolver to the node_modules folder under Bower package

Cons:

npm install behind the scenes without the user approval. Also counting on the default npm configuration. Should we support custom npm configuration?
Should auto-update of installed resolvers be allowed? Maybe a flag in .bowerrc

Pros:

Applying external resolvers with zero setup and zero config

Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

Summoning @yoav @drorb @liorhson

Hey!

In my opinion putting resolver in dependencies of package.json should be enough. Bower automatically requires resolver if necessary. This means no entry in .bowerc is requred.
Instead resolver matching use resolver prefix for dependency, just like JSPM does. e.g. bitbucket:jquery/jquery (it requires resolver with require('bower-bitbucket-resolver'), or maybe finds it some other way, e.g. based on meta info).
Yes, I think we should extract existing resolvers.
No, I don't think resolver should be installed automatically. Public packages should depend only on bower-provided default resolvers. You can put custom one explicitly in package.json.

What about resolver interface?

Sounds good,

Are you referring to bower's own package.json? That implies that user will need to update the list of dependencies with each new bower version. Is that ok?
So, if I understand correctly, every resolver would have a prefix that is used when declaring a bower dependency. How would you suggest to translate this npm package name to require()? Some form of naming convention, like bower-<resolver-prefix>-resolver?
We need to maintain some backward compatibility with existing registry URL values, no? How do you suggest we do that? Probably the bower registry need to supports this prefix convention also, for example: git:<URL>, svn:<URL>, etc.

The resolver interface would stay pretty the same, wouldn't it? I can submit a proposal for the fine details, if you wish.
Jfrog

Project's package.json. Bower's package.json can contain default resolvers.
I'm not sure about this. Either naming convention or metadata in package.json of resolver (like "bower_resolver" tag). I think it's up to discussion. I wonder how other packages handle plugins.
Of course we need to :) Practically all of registry's prefixes are either git: or svn:. Public registry won't accept custom prefixes (only from default resolvers), but you can create custom registry.

I think resolver's interface shouldn't stay the same. It's pretty messy, and coupled with bower. We have good opportunity to redesign API for resolvers and make them bower-independent. Good first step is to determine core & optional features for resolvers. I'd also love interface to be based on Promises.
Adam

Following our conversation, I want to summary some of the things we talked about:
Extraction
Extract needed features from the Bower core, in order to use them in the pluggable resolvers. The   main features are the Bower utils, renderers, and the extendable Base Resolver.
For POC, I created  repositories for the Utils, and the Base Resolver as standalone npm packages.

https://github.com/liorhson/bower-utils
https://github.com/liorhson/bower-resolver-base

Also POC Bower project repository, without the above features in the core (the tests are not modified yet), and add them as a dependencies in the Bower package.json.
"dependencies": {
    "bower-utils":"*",
    "bower-resolver-base":"*"
}

https://github.com/liorhson/bower

Pluggable/custom resolvers, will be a independent npm packages, that will contains the bower project in the peerDependencies. The resolverFactory will recognize them with the registry prefix source for example: **bitbucket**:jquery/jquery.
Of course we will need backward compatibility with old registry entries, that doesn`t support the new mechanism.
Something like:
    var pkgResolver;
    var registryPrefix = extractResolverPrefix(source);

    if(registryPrefix) {
        try {
            pkgResolver = require('bower-' + registryPrefix + '-resolver');

            return Q.fcall(function () {
                return [pkgResolver, source];
            });
        }
        catch (err) {
            //go to backward compatibility resolvers...
        }
    }

    //go to backward compatibility resolvers...

Default repositories (GitHubResolver, SvnResolver, etc.) will be also extract from the Bower core, and will be exists as dependencies in the Bower package.json.
"dependencies": {
    "git-hub-resolver":"*",
    "svn-resolver":"*"
}

Interface
The resolver interface will change for some improvements:
resolver.download(url, config = {}) something like
Resolver.download(
  'github:jquery/jquery', '1.2.3', { foo: 'bar' }
).then(function(tmpDir) {
  console.log(tmpDir);
});

Possible return types:

result: Promise & EventEmitter
{ logger: EventEmitter } : Promise
{ promise: Promise }: EventLogger

resolver.versions(endpoint, config = {}), that returns promises of available versions of the given endpoint, and also the calculation of the caching key will be decided by the resolver itself.
Return type, something like [{ version: '*', cacheKey: 'etag12345' }]
Overall view:

Implemented in #1871


Game Stacks

Hi Dima,
This is great, I really appreciate you creating this for us.
I see you can stack one team using optimizer.set_players_from_one_team({'PHO': 3}) , is there a way to Game Stack by setting the number of players from two different  teams?
For instance, tonight GS plays PHI, I'd like to know how to force the optimizer to give me several lineups containing the maximum 4 players from each team.
Thanks!

Hi, if you want to generate lineups with 4 players from GS and 4 players from PHI you can do:
optimizer.set_players_from_one_team({'GS': 4, 'PHI': 4})

Hi Dima,
How to set that number for every team currently loaded?

I ran them one at at time. It would be helpful to be able to do
optimizer.set_players_from_one_team({'GS': 4, 'PHI': 4}) N=10
optimizer.set_players_from_one_team({'BOS': 4, 'LAL': 4}) N=10
optimizer.set_players_from_one_team({'DET': 4, 'IND': 4}) N=10
I don't know anything about how to do this so not sure that is feasible. Either way, you've made a great tool Dima!

Hi Dima,
How to set that number for every team currently loaded?

I'm not sure what you want do with this, but if you set this constraint for every team you will get error because lineups has restricted number of players

I ran them one at at time. It would be helpful to be able to do
optimizer.set_players_from_one_team({'GS': 4, 'PHI': 4}) N=10
optimizer.set_players_from_one_team({'BOS': 4, 'LAL': 4}) N=10
optimizer.set_players_from_one_team({'DET': 4, 'IND': 4}) N=10
I don't know anything about how to do this so not sure that is feasible. Either way, you've made a great tool Dima!

Thanks. You could run 3 separate optimizers with different constraints, and for this situation optimizers will produce different lineups. But I'm not sure what you want to do with this, maybe I misunderstood.

I mentioned in another issue that in Captain mode optimizer can choose all 6 players from the same team thus making illegal lineup. So if I set max 5 from any team the problem will disappear.
On other hand, maybe I misunderstand set_players_from_one_team. I assume that it means max players from a team. No more than 4, for example. So 4+2 is correct and 3+3 is correct but not 5+1.
Otherwise maybe another method needed, something like:
max_players_from_same_team(5)

Yeah, I saw your issue, currently optimizer has incorrect settings for captain mode where max from one team restriction isn't set. I will fix it.
set_players_from_one_team set exact number of players, so if you pass 4 players, it will generate lineups with exact 4 players for passed team.

One more item I thought about for this...
Can you make a general setting to force the optimizer to stack? So, instead of telling the optimizer to select 'BOS': 4 , could you create something that goes 'Stack': 4, 'Stack':3  that would tell the optimizer to select 4 players from the same team and 3 hitters from another.
Ideally the Pitcher would not be included in the stack since you are trying to group hitters together to increase the correlation of your lineup. So if you try select 'Stack': 4, the pitcher spot would not be an option and the optimizer would insert 4 hitters from the same team in your lineup.

Added set_team_stacking method in version 2.4.0

Dima - one more question on this. Is there an easy way to exclude the P has part of a stack? Optimally we want to correlate the hitters and we need 3 teams represented. I think the best way is to have a P from one team and then two four man stacks of hitters. Right now I often get a 3 hitter stack with the Pitcher included.

Could you just modify this to make it same team?
optimizer.restrict_positions_for_opposing_team(['P'], ['1B', '2B', '3B', 'OF', 'SS', 'C'])
so -  optimizer.restrict_positions_for_same_team(['P'], ['1B', '2B', '3B', 'OF', 'SS', 'C'])

@brente33 There is no such functionality right now, I'll add it in feature release.


Provide a list of patterns associations with LOINC terms

After todays great meeting, @ShahimEssaid provided a good idea of how we can save some time in our quest for identifying different patterns.
Shahim, can you create a table for us that has three columns, one with the LOINC code (full assay), and one with the pattern (the logical definition entirely independent from the actual fillers)? Something like hasComponent some X and hasAnalyte some Y.). The goal is to group the LOINC terms by pattern and use that information to drive our own identification and prioritisation of patternisation.
cc @drseb

@ShahimEssaid @putmantime we are ready to resume this! Can you provide us with this list perhaps?

@matentzn I haven't had much time recently to work on this but I''ll be getting to this this week or next.  I'm not sure I understand the table yet.
col1: LOINC code as a string
col2: an example: "hasComponent some X and hasAnalyte some Y"
col3: ?
Our current tooling is LinkML based and I'm not yet sure about how to configure the dumping of the instances into such a table but we'll figure it out. I'm new to LinkML and I've only learned how to dump to OWL so far.

@ShahimEssaid did you get a chance to look at this yet?

A draft is here: https://drive.google.com/file/d/1UWNVcN06L9qaMX8FR_uMZW7bfjX8OvpC/view?usp=drive_link
Let me know what you think and I can adjust. It has all the LOINC codes, their names and classes, and the corresponding component and analyte entries.

Fantastic @ShahimEssaid . I was hoping for something else, but this may be even better - depending of what column C mean

LOINC CODE
LOINC NAME
?
?
?
COMPONENT
?
?
?
?
?
?

1-8
Acyclovir [Susceptibility]
ABXBACT
1
LP14522-4
COMPONENT
Acyclovir
Acyclovir
LP14522-4
COMPONENT
Acyclovir
Acyclovir

Can you fill in the column headers so I can understand them better?

I just noticed that I accidentally saved a resorted version of that file and the headers got moved to row 50797.  I saved a new file here: https://drive.google.com/file/d/1B2HBpyKj9wwBQPUsz0ZFNe-rzs07s9Xt
The headers are mostly self explanatory, and are based on the release files' header names,  but here are a couple of useful pointers:

loinc_class: https://loinc.org/kb/users-guide/classes/
loinc_class_type: 1=Laboratory class; 2=Clinical class; 3=Claims attachments; 4=Surveys  and see field "CLASSTYPE" here: https://loinc.org/kb/users-guide/loinc-database-structure/
The two columns filled with "COMPONENT" turned out to not be that useful but they represent the "PartTypeName" that is documented in the release file: AccessoryFiles/PartFile/PartFileReadMe.txt

Thank you @ShahimEssaid. Given this table, how would I be able to determine which LOINC terms would be part of the same "pattern", i.e. is associated to the same kind of logical axiom template?

Just linking this here; I think it may be related:

https://github.com/loinc/comp-loinc/issues/37#issuecomment-2286744388: Shows Unique combinations of decomposed analyte properties (patterns) by analyzing the supplementary part model (LoincPartLink_Supplementary.csv).


Added v7 and OpenTelemetry Stream support

cc @sfreitas-te @raul-te @jabrowne-te @brumarqu-te @pcortada-te

@ribejara-te @pcortada-te ^^ just in case you missed this.
BTW @antonjim-te has some thoughts too to allow for traces in this too.


Getting error while running the project:

ValueError: the truth value of an array with more than one element is ambiguous

Please add traceback

python main.py
training started
main.py:55: GtkWarning: Unknown property: GtkWindow.has-resize-grip
self.ui=self.glade.add_from_file(os.path.join(assets, "main_ui.glade")
)
ok
Got normalized RGB
Traceback (most recent call last):
File "main.py", line 180, in display_frame
self.final=self.getOutput_frames()
File "main.py", line 205, in getOutput_frames
rgb_planes=self.v.imagePlanes(norm_rgb)
File "D:\Hackathon_Demo\virtual-dressing-room-master\virtual-dressing-room-mas
ter\vdr\Video.py", line 36, in imagePlanes
if frame==None:
ValueError: The truth value of an array with more than one element is ambiguous.
Use a.any() or a.all()
Got normalized RGB
Traceback (most recent call last):
File "main.py", line 180, in display_frame
self.final=self.getOutput_frames()
File "main.py", line 205, in getOutput_frames
rgb_planes=self.v.imagePlanes(norm_rgb)
File "D:\Hackathon_Demo\virtual-dressing-room-master\virtual-dressing-room-mas
ter\vdr\Video.py", line 36, in imagePlanes
if frame==None:
ValueError: The truth value of an array with more than one element is ambiguous.
Use a.any() or a.all()
Got normalized RGB
Traceback (most recent call last):
File "main.py", line 180, in display_frame
self.final=self.getOutput_frames()
File "main.py", line 205, in getOutput_frames
rgb_planes=self.v.imagePlanes(norm_rgb)
File "D:\Hackathon_Demo\virtual-dressing-room-master\virtual-dressing-room-mas
ter\vdr\Video.py", line 36, in imagePlanes
if frame==None:
ValueError: The truth value of an array with more than one element is ambiguous.
Use a.any() or a.all()

python main.py
training started
main.py:55: GtkWarning: Unknown property: GtkWindow.has-resize-grip
self.ui=self.glade.add_from_file(os.path.join(assets, "main_ui.glade")
)
ok
Got normalized RGB
Traceback (most recent call last):
File "main.py", line 180, in display_frame
self.final=self.getOutput_frames()
File "main.py", line 205, in getOutput_frames
rgb_planes=self.v.imagePlanes(norm_rgb)
File "D:\Test\virtual-dressing-room-master\virtual-dressing-room-mas
ter\vdr\Video.py", line 36, in imagePlanes
if frame==None:
ValueError: The truth value of an array with more than one element is ambiguous.
Use a.any() or a.all()
Got normalized RGB
Traceback (most recent call last):
File "main.py", line 180, in display_frame
self.final=self.getOutput_frames()
File "main.py", line 205, in getOutput_frames
rgb_planes=self.v.imagePlanes(norm_rgb)
File "D:\Test\virtual-dressing-room-master\virtual-dressing-room-mas
ter\vdr\Video.py", line 36, in imagePlanes
if frame==None:
ValueError: The truth value of an array with more than one element is ambiguous.
Use a.any() or a.all()
Got normalized RGB
Traceback (most recent call last):
File "main.py", line 180, in display_frame
self.final=self.getOutput_frames()
File "main.py", line 205, in getOutput_frames
rgb_planes=self.v.imagePlanes(norm_rgb)
File "D:\Test\virtual-dressing-room-master\virtual-dressing-room-mas
ter\vdr\Video.py", line 36, in imagePlanes
if frame==None:
ValueError: The truth value of an array with more than one element is ambiguous.
Use a.any() or a.all()

Hi Akash,
Any luck to look at this issue?

Hi Akash,
I faced a problem while using my own camera,(640*480, and I've already changed that in config.py)
OpenCV Error: Sizes of input arguments do not match (The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array') in arithm_op, file /build/opencv-ys8xiq/opencv-<IP_ADDRESS>+dfsg/modules/core/src/arithm.cpp, line 1287
Traceback (most recent call last):
File "vdr/main.py", line 178, in display_frame
self.final=self.getOutput_frames()
File "vdr/main.py", line 209, in getOutput_frames
self.back.subtract_back(norm_rgb)
File "vdr/Back_sub.py", line 32, in subtract_back
dst=cv2.absdiff(self.back,self.foreground)
cv2.error: /build/opencv-ys8xiq/opencv-<IP_ADDRESS>+dfsg/modules/core/src/arithm.cpp:1287: error: (-209) The operation is neither 'array op array' (where arrays have the same size and the same number of channels), nor 'array op scalar', nor 'scalar op array' in function arithm_op
Any interest to have a look?

I kept and background image for testing in "train" folder. Make sure it's dimension matches with incoming camera frame. Try to run demo.

Hi Akash,
Thank you for your reply.
Which dimensions are we considering here?
On Sun, 21 Oct 2018, 10:37 Akash Shende<EMAIL_ADDRESS>wrote:

I kept and background image for testing in "train" folder. Make sure it's
dimension matches with incoming camera frame. Try to run
https://github.com/akash0x53/virtual-dressing-room#test-mode demo.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/akash0x53/virtual-dressing-room/issues/3#issuecomment-431639378,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AjDotkTN-MHu1WjKvu7WSF74qD-Lzpf-ks5unAEVgaJpZM4XIAAD
.


Missing region entries filling

Resolves  #3566

missing regions added to databricks-urd.json

@nayeem01 thanks for the PR, although looks like you have ended up making changes to 51 files, rather than just the 1 intended.

@marrobi hi, I have noticed the merge conflicts. I am considering closing this branch and creating a new one without conflicts. Would you agree?

Yes, that would be a good idea.


feat: Enable following of non-created profiles

Thank you for your contribution to the Koda - Generative Art Marketplace.
👇 __ Let's make a quick check before the contribution.
PR Type

[x] Feature

Needs Design check

@exezbcz please review

Needs QA check

@kodadot/qa-guild please review

Context

[x] Closes #10424
[x] Requires deployment https://github.com/kodadot/private-workers/pull/176

Did your issue had any of the "$" label on it?

[x] My DOT address: Payout

Screenshot 📸

[x] My fix has changed something on UI; a screenshot is best to understand changes for others.

build failing

build is failing

It's fixed by itself.

Closing for same reason as #10437


Fails to generate OpenAPI from API Blueprint

I'm trying to convert an API Blueprint document to OpenAPI but it fails with the following error: Type "extend" is not a valid type.
Here's a minmal test case of an API Blueprint document that fails:
FORMAT: 1A
HOST: http://<IP_ADDRESS>/api/v1

# Group Extensions

## Extensions [/extensions]

### Get extensions [GET]

+ Response 200 (application/json)
    + Attributes (Extension)

## Data Structures

### Extension (enum)

+ (Foo type)

### Foo type (object, fixed-type)

+ id (string) - the id

I used the following command to run the tool:
apib2swagger -i example.md --open-api-3 -o openapi.json

The full output of running the above command is:
Error
    at Object.<anonymous> (apib2swagger/node_modules/json-schema-to-openapi-schema/index.js:8:30)
    at Module._compile (node:internal/modules/cjs/loader:1255:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1309:10)
    at Module.load (node:internal/modules/cjs/loader:1113:32)
    at Module._load (node:internal/modules/cjs/loader:960:12)
    at Module.require (node:internal/modules/cjs/loader:1137:19)
    at require (node:internal/modules/helpers:121:18)
    at Object.<anonymous> (apib2swagger/src/requests.js:4:19)
    at Module._compile (node:internal/modules/cjs/loader:1255:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1309:10) {
  name: 'InvalidTypeError',
  message: 'Type "extend" is not a valid type'
}

Thank you for reporting!
I have fixed bugs around enum of MSON.
Please confirm the result.

Yes, it's working. Thanks.


Exclude 403 (4XX) Errors from the Log

Hello.
If I throw a Symfony\Component\Security\Core\Exception\AccessDeniedException
or a Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException I do not want a log about this exception, because I thrown it.
For the security, The Symfony\Component\Security\Core\Exception\AccessDeniedException is converted to a Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException in the Symfony\Component\Security\Http\Firewall\ExceptionListener::handleAccessDeniedException.
I think we can extends the configuration to all kind of exception in the namespace Symfony\Component\HttpKernel\Exception\*, because If I throw an HttpKernel exception, it don't want a log.
What do you think ?

I feel you shouldn't have closed this. Things like Sentry are becoming more common place and we should be able to tweak the output, there's no reason not to do it.

@dkarlovi I don't see how this related to tweaking output format to sentry..

@Seldaek sorry, I was unclear: I meant "output" as in "output to the underlying logging target", not related to formatting in any way.
In our case, we track a Symfony app (Sylius, to be more exact) which generates roughly 2,5k 404 events daily, most of which are from random bots and stuff we cannot control. The 404 itself is logged to Google Analytics so it will not go unnoticed, but it's not really an error (we the devs can do anything about). So we mute them in Sentry, but it still needs to process them for no reason.
It would be great to be able to filter events by status code or instance type, for example. I feel it's very similar to already existing NotFoundActivationStrategy, but more flexible and better matching common uses cases.

Yeah, I agree it might be nice to have more advanced config format (although doing it yourself in code is really not hard..), as I wrote in https://github.com/symfony/monolog-bundle/issues/89#issuecomment-57245247 PRs are welcome :)
You can still use excluded_404s to easily filter the 404 which is IMO the main problem. The rest if your API returns a lot of 400 or something then you can build your own activation strategy or PR something, but I am not going to spend time on it, and I don't think it's important enough to warrant having an open issue, that's why I closed it.

I'm trying to do the same (do not log 4xx errors) but I see some ERRORS which should be critical and I don't want to miss, like this one for example (it couldn't connect to the smtp server due to a firewall rule, and all the outgoing mail went lost):

app.ERROR: Exception occurred while flushing email queue: Connection could not be established with host <IP_ADDRESS> [Connection timed out #110] [] []

so I don't think excluding ERROR level logs is a good idea...

a simple solution is to add a custom activation strategy:
monolog:
    handlers:
        main:
            type:         fingers_crossed
            action_level: error
            handler:      nested
            activation_strategy: my.activation.strategy # service id

and then have a service like the following:
<?php

use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy;
use Symfony\Component\HttpKernel\Exception\HttpException;
use JMS\DiExtraBundle\Annotation as DI;

/**
 * Activation strategy for logs
 *
 * @DI\Service("my.activation.strategy")
 */
class LogActivationStrategy extends ErrorLevelActivationStrategy
{
    /**
     * LogActivationStrategy constructor.
     */
    public function __construct()
    {
        parent::__construct('error');
    }

    /**
     * @param array $record
     *
     * @return bool
     */
    public function isHandlerActivated(array $record)
    {
        $isActivated = parent::isHandlerActivated($record);
        if (
            $isActivated
            && isset($record['context']['exception'])
        ) {
            $exception = $record['context']['exception'];

            if ($exception instanceof HttpException) {
                // only log exceptions outside of 404 and 403
                return !in_array($exception->getStatusCode(), [403, 404]);
            }
        }

        return $isActivated;
    }
}

It seems that this only works fingers crossed type. Doesn't seem to work for a stream

You can achieve this by replacing the default twig.exception_listener service with one that has your own implementation of logException, i.e.
# in services.yml:
twig.exception_listener:
    class: AppBundle\Logging\MyExceptionListener
    arguments:
        - "%twig.exception_listener.controller%"
        - "@logger"
    tags:
        - { name: kernel.event_subscriber }
        - { name: monolog.logger, channel: request }

# MyExceptionListener.php
<?php

namespace AppBundle\Logging;

use Symfony\Component\HttpKernel\EventListener\ExceptionListener;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;

class MyExceptionListener extends ExceptionListener {

    /**
     * Override to turn down the log level on expected HTTP errors like
     * Not Found.
     */
    protected function logException(\Exception $exception, $message) {
        if (null !== $this->logger) {
            if ($exception instanceof HttpExceptionInterface
                && $exception->getStatusCode() == 404) {

                // Log at WARN level, which will still appear, but skip the
                // exception, as the stack trace will not be interesting but
                // will be large
                $this->logger->warning($message);
            } else {
                parent::logException($exception, $message);
            }
        }
    }
}

A doc page about this would probably help.
In fact, a doc page about how to override the standard services with your own ones would be helpful. I had to grep vendor to find twig.xml to implement this, and it doesn't look particularly stable against changes to twig's default settings.

@RichardBradley you can also decorate the service instead of replacing it, this should be somewhat more stable.

@dkarlovi, although that sounds like it would help, it doesn't really solve any of the fragility I'm worried about here :-(
Currently, if the constructor arguments or anything else of note in the ExceptionListener implementation changes in the next version of Symfony, then my replacement service will break.
If I were to try to use a service decorator instead of replacing the service, I would still need to inherit from ExceptionListener in order to override the logException method. So I would still need to hardcode the matching constructor arguments and would still be exposed to the same risks re future changes.
A decorator version might look like:
# in services.yml:
my_exception_listener:
    class: AppBundle\Logging\MyExceptionListener
    decorates: twig.exception_listener
    arguments:  # (can't pull these out of "inner" service, as they're protected)
        - "%twig.exception_listener.controller%"
        - "@logger"
    # "tags" may or may not still be needed?

# MyExceptionListener.php
<?php

namespace AppBundle\Logging;

use Symfony\Component\HttpKernel\EventListener\ExceptionListener;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;

class MyExceptionListener extends ExceptionListener {

    /**
     * Override to turn down the log level on expected HTTP errors like
     * Not Found.
     */
    protected function logException(\Exception $exception, $message) {
        if (null !== $this->logger) {
            if ($exception instanceof HttpExceptionInterface
                && $exception->getStatusCode() == 404) {

                // Log at WARN level, which will still appear, but skip the
                // exception, as the stack trace will not be interesting but
                // will be large
                $this->logger->warning($message);
            } else {
                parent::logException($exception, $message);
            }
        }
    }
}

Any news about this issue? I would like to be able to filter Monolog exceptions based on their HTTP status code or their exception code.
Is it possible?
Thanks.

@lukepass there's already a solution in this thread.

It is now possible in Symfony 4.1 https://symfony.com/blog/new-in-symfony-4-1-ignore-specific-http-codes-from-logs

Thanks fmonts! Would it be possible to backport this to 3.4 using a bundle?

Hi!
I have added excluded_http_codes: [403, 404] to all my logg-handlers, but I still receive alot of access-denied emails after ugprading from 4.0.8 to 4.1.0:
https://paste.gnome.org/panmtutis#line-37
https://i.imgur.com/s2X5mNb.png

Would be amazing to see this in 3.4, currently have to create services for each of my handlers and filter out there.


chore(deps): update pre-commit hook updates to v0.5.0

This PR contains the following updates:

Package
Type
Update
Change

astral-sh/ruff-pre-commit
repository
minor
v0.4.7 -> v0.5.0

Note: The pre-commit manager in Renovate is not supported by the pre-commit maintainers or community. Please do not report any problems there, instead create a Discussion in the Renovate repository if you have any questions.

Release Notes

astral-sh/ruff-pre-commit (astral-sh/ruff-pre-commit)
v0.5.0
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/0.5.0
v0.4.10
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.4.10
v0.4.9
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.4.9
v0.4.8
Compare Source
See: https://github.com/astral-sh/ruff/releases/tag/v0.4.8

Configuration
📅 Schedule: Branch creation - "* * 1 * *" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

:tada: This PR is included in version 1.0.6 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


fix missing dependency error for mongodb docstore

Related to yesterdays PR: https://github.com/run-llama/llama_index/pull/16632
I missed this in yesterdays PR 🥲 @logan-markewich

Could you please check the linting part, build is failing there

Could you please check the linting part, build is failing there

fixed now @anoopshrma 💯


“Not Supported In Your Region” text displayed with provider name  while adding funds with different countries using VPN from “Add Funds” screen

Frequency: 100%
Repro on build version: Test flight Build V1.20.1 using & Android Internal build V1.20.1
Repro on devices:  iPhone 12 (14.7.1), Redmi Note 8 (10.0), iPhone 6+ (12.5.4), Redmi Note 8 (9.0), OnePlus 7t (11.0), Samsung Galaxy J5 Prime (8.0)
Testing Account:<PHONE_NUMBER>/Account Key
Pre-condition: Make sure that user should have connected VPN to United States country
Repro Steps:

Launch the application & login with the test account
Go to “Add Funds”  screen from “Add & Withdraw” option in Hmburger Menu
Select “Celo Dollar (cUSD)”  as digital currency & Pay with “Bank Account” & tap on “Next” button
Now user is on “Add Funds Amount” page
Enter valid amount & tap on “Next” button
Observed that
Current Behavior: User is able to see Simplex provider with “Paying with the bank account is not supported in your region” text displayed
Expected Behavior: User should not able to see any non-supported provider name in list as per PR 1112
Investigation: Also we have observed same issue for Xanpool provider
Impact: Bad user experience as user able to proceed even that provider is not supported in their region
Attachment: NotSupportedTextStillDisplayedWithProviderName

Hi @ValoraQA please try again. I need to make a deployment to our backend

https://valora.testquality.com defect D193.

https://valora.testquality.com defect D194.

Hi @ValoraQA please try again. I need to make a deployment to our backend

Hey @tarikbellamine We have re-verified this issue using latest Test flight Build V1.20.2 using & Android Internal build V1.20.2 & observed that issue is still reproduced.
Attachment: TextStillDisplayedon1.20.2
Verified On Devices: Redmi Note 8 (9.0), iPhone SE (14.2)
Thanks.!!

https://valora.testquality.com defect D195.

https://valora.testquality.com defect D202.

Hi @ValoraQA in your video it shows "Bank account is not supported in your region". This is correct because bank account is not a valid option within the United States.

Hey @tarikbellamine according to PR 1174 we are supposed to see providers which only support for that region without any text about not supported or Not currently available. But currently we are able to see both texts for VPN change to. Attachment
Also FYI we are referring this doc for supported countries with different providers. And we are updating status according to this doc. So can you please let us know where we get idea that which providers are not supported for bank accounts  & which actually supported.


[NTR]conventional dendritic cell type i

Note - please check that the term does not already exist (check OLS: https://www.ebi.ac.uk/ols/ontologies/cl)
**Preferred term label:**conventional dendritic cell type i
Synonyms
Definition (free text, please give PubMed ID in format PMID:XXXXXX) conventional dendritic cell type I is the CD141+ conventional myeloid-origin dendritic cell subtype. Other markers include CLEC9A, CADM1, BTLA CD26. PMID: 29313948
Parent cell type term (check the hierarchy here https://www.ebi.ac.uk/ols/ontologies/cl): CL:0000990 conventional dendritic cell
What is the anatomical structure that the cell is a part of? Please check Uberon: https://www.ebi.ac.uk/ols/ontologies/uberonhttp://purl.obolibrary.org/obo/UBERON_0002405 immune system
Your nano-attribution (ORCID) https://orcid.org/0000-0001-9610-7627
Any additional notes or concerns

@addiehl could you comment, please?
This is the second of 4 immune-related queries that were just tagged as stale. Thank you.

I will work on the dendritic cells after the semester ends in mid-May.


Skip test when calling ".skip()" without parameter

Resolves https://github.com/japa/core/issues/52

Thanks for the PR 👍

You’re welcome 🤝


Remember username and show login window when starting the player again!

Closes #55

This PR also includes a Usings.cs containing global usings, that are used by all files in the OsuPlayer project by default which will reduce a lot of usings in those files, referencing almost the same namespaces over and over again!


Bug fix energy calculation when offset is not a float/int

fixes #498

thanks @pau557 for bug report!
i want cudos for good rebasing.

Codecov Report

Merging #499 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #499      +/-   ##
==========================================
+ Coverage   93.45%   93.45%   +<.01%
==========================================
  Files          49       49
  Lines        3344     3345       +1
==========================================
+ Hits         3125     3126       +1
  Misses        219      219

Impacted Files
Coverage Δ

dimod/binary_quadratic_model.py
95.44% <100%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


[Map] MH-MHF-[RMD]FV1Sironex

Hash: 3fdfbb7823933ee5b38fbc3a9c909f07495dd232
Current name: MH-MHF-[RMD]FV1Sironex
No problem with the archive - but is the map supposed to be serious?  The whole map is a water zone and the player is drowning, making drowning sounds all the time.

I've seen dozens of maps of that mapper and most of them all have the same poor quality, BSP errors, oversized monsters health, silly pawn settings (eg. Monster's AttitudeToPlayer set to ATTITUDE_Follow); sometimes his maps even crashes the server. facepalm

Yes - it's a pity in a way that MH-MHF-[RMD]Sironex is a variant of this map rather than the lead map as it were - at least that one is playable (to a certain extent anyway, notwithstanding the BSP holes and other 'errors', though only for 'fun' and not on a server or for serious/normal offline play).
One silly error is setting ScriptedPawns' PeripheralVision at 1000 (a plus value) which results in them being unable to see a Player - see this post and screenshots with Behemoths for confirmation https://ut99.org/viewtopic.php?f=12&t=3434&p=127909&sid=3b028b4868ae66eb3837a128ecf1b613#p127909

For the moment, I'm placing this one in Tests and Demos.


rbind(x,y) and unionAll(x,y)

Hello,
Seems that most of Spark functions are available and it's a real pleasure.
However i'm not able to perform an rbind(x,y) with x and y being 2 data.frame with identical columns. Which is a function natively implemented in Spark (and SparkR ;) ).
I also tried:
rbind_all(x,y)
rbind_list(x,y)
bind_rows(x,y)
Any ideas?

@l4mun How about using union_all? Example follows:
sc <- spark_connect(master = "local")

df1 <- copy_to(sc, data.frame(a = 1:5, b = 1:5), "df1")
df2 <- copy_to(sc, data.frame(a = 6:10, b = 6:10), "df2")
union_all(df1, df2)

spark_diconnect_all()

@l4mun I'm assuming union_all is sufficient in this case, if not, feel free to reopen this issue with details on what you are trying to accomplish and I'll take another look at addressing this.

Thank you for your help, it works. Sorry for the late answer, couldn't try it before.
I'll have a look at https://spark.apache.org/docs/1.5.1/api/R/ . Guess you based your work on it. I was looking at Spark 1.6.1 manual.
I'm thrilled about your work, thank you.
Best regards,

HI, Can I ask a little more about this?
I'm hoping to be able to follow this approach but am finding it difficult.
The example above is grand when you know how many dataframes you have .. but what if you have a variable number of them?
In my case I'm trying to load a bunch of files of tweets.. one file per day.. each file with 100's of tweets and combine them into on big dataframe...
I've no idea how many files there will be .. that would depend on whats available... so I need to handle  a variable number of files.
When I'm just using straight R and dplyr to do this,  I just loop and load each file into the same reused dataframe and then rbind onto the big dataframe... gradually building up the big dataframe...
And then do my processing..
But I think that approach would need to change for sparklyr.. right?
I'd have to create a new dataframe for each file .. each dataframe with a different name...
like this:
files = list.files(datafolder, pattern = "^201", full.names = TRUE, ignore.case = TRUE)
num_files = length(files)
for (i  in 1: length(files)){
loadedTweets <- parseTweets(files[i], verbose = FALSE)
newdf <- paste("loaded-",i,sep="")
assign(newdf , loadedTweets %>% select ("favorited","text"))
But NOW what??
}
But I'm a little confused as to how to create a copy_to statement and a union_all statement to combine all these in sparklyr...
Any help would be greatly appreciated...

@pjatinsight have you tried just passing the directory to spark_read_text()?

Hi Kevin,
Thanks so much for taking the time to reply.
Ehh.. no I hadn't thought of doing that as the tweets are in json format.. so I'm using the streamr library to get the data into a dataframe so I can trim off excess columns etc...
Maybe I should look at spark_read_json ....
But wouldn't that kill my PC if it loads all of them at once?
I was trying to be cautious and load a file, pass it on to Spark (DCOS), load the next file.. etc etc..
Then when all the files were loaded into Spark I was hoping to do the manipulations that I need to do..
Thanks again
PJ

Hi Kevin,
Thanks, I'll try get the spark_read_json working ..
Our cluster doesn't have a local storage solution just yet.. our devops guys are just getting to grips with DC/OS etc...
So I'm developing on a laptop with 16Gb and using a local cluster on that machine for now..
Its an i7 so I've 3 or 4 cores to play with..
I'll work with a subset of the 400ish tweet files for now and just get the POC done.
All I'm really doing is wading through a pile of tweets and finding the ones that are of interest...
Shouldn't be this hard I'd have thought.. heh heh..
Thanks again
PJ

I suppose this is the bit where I have to start learning whats implemented and whats not...
Much like sdf_nrow instead of nrow....
Can I ask what I can use instead of str_detect ??
I had been counting retweets like this:
total_retweets <- sum(str_detect(all_tweets_full$text, "(RT|via)((?:\\b\\W*@\\w+)+)"))
But that doesn't work with a sparlyr dataframe it would appear...

@pjatinsight Could you look at https://github.com/rstudio/sparklyr/blob/133b2028e653d896f9eb762bf480113381b0d2ef/tests/testthat/test-dplyr-hive-operators.R to see if any of the examples there fit your use case? If not, feel free to open an issue.

Thanks Kevin, I'll do that right now..
I think I might be on the right track lookin at using spark_apply...
https://github.com/rstudio/sparklyr/issues/729
Seems to be the right way to use stringr with sparlyr.
Thanks
PJ

Hi,
looking at those tests I see %regexp%
What version of sparklyr is this in?
I am getting the error:
Error in all_tweets_full$text %regexp% "(RT|via)((?:\\b\\W*@\\w+)+)" :
  could not find function "%regexp%"

On code like this:
total_retweets <- sum(all_tweets_full$text %regexp% "(RT|via)((?:\\b\\W*@\\w+)+)" )

You have to manipulate the data using dplyr, e.g.
tweets %>% filter(text %regexp% "(RT|via)((?:\\b\\W*@\\w+)+)") %>% count()

Hi Kevin,
Thanks very much for that.
I've finally got my head around a few more of the concepts and generally have it all working..
But I'm havin a bit of trouble using %regexp% ... its not producting results.. or matches.. when it should be...
For example.. this R statement produces a match..

regexpr("(RT|via)((?:\b\W*@\w+)+)", "RT @username I voted for @KarlTowns to win #BestBreakthroughAthlete")

But using the same regular expression with %regexp% doesn't provide a match...

all_tweets_full = spark_read_json(sc = sc, name = "all_tweets_full", path = files_to_load, memory=FALSE)
retweets_table_sql <- tbl(sc, "all_tweets_full") %>%
           select("created_at", "id_str", "text" )   %>%
           filter(text %regexp% "(RT|via)((?:\\b\\W*@\\w+)+)") %>%
           arrange(created_at)

sdf_register(retweets_table_sql, "tweets_spark")
tbl_cache(sc, "tweets_spark")
total_retweets <- tbl(sc,"tweets_spark") %>% count() %>% collect()

..and I'm getting a 0 in total_retweets. And the tweets_spark table is empty when I inspect it..
Despite the fact that one of the files being loaded contains the test string shown above..
And I've grepped the files on he command line and got back aound 300 matches on "RT @"
Interestingly, if I run the same code with just the first group of that regular expression I do get matches...
So, if I run the code like this..

retweets_table_sql <- tbl(sc, "all_tweets_full") %>%
          select("created_at", "id_str", "text" )   %>%
          filter(text %regexp% "(RT|via)") %>%
          arrange(created_at)

..it will find tweets that contain "RT" or "via" .
But I need it to take the second group into account so I only matcht strings like "RT @thisguy " etc..
What do you think?
Am I doing something obviously wrong?
Thanks for you time.
PJ

@pjatinsight You might need to double escape, e.g. \\\\ vs \\.

Ahh haahhh!!!
You're TOO good.!
Its working perfectly now!
And I've been able to distill the code down to:
all_tweets_full = spark_read_json(sc = sc, name = "all_tweets_full", path = files_to_load, memory=FALSE)
total_retweets <- tbl(sc, "all_tweets_full") %>%
  select("created_at", "id_str", "text" )   %>%
  filter(text %regexp% "(RT|via)((?:\\\\b\\\\W*@\\\\w+)+)") %>%
  arrange(created_at)  %>% count() %>% collect()

.. which is very nice!
Thanks again!
PJ

BTW, not working on my full dataset..but this code is now loading json for 218904 tweets and wading through it to count retweets... all in under 20 seconds...
WOW.

I just can't find any docs anywhere on %regexp%
Can you tell me which regex syntax it works with?
Just trying to do things like case insensitive matches etc..

Think I have it working as follows:
mutate(info_type="NONE_OF_ABOVE") %>%
mutate( info_type = ifelse((text %regexp% '(?i)(banana )'),  'FRUIT', info_type))

which matches Banana , banana, BANANA


[EXPLORER] Connect Wallet button not working

Describe the bug
A user's transaction from Ethereum to Polygon was initiated with 0 as the relayer fee. When trying to bump the transaction on the explorer, the user isn't able to connect their wallet to the site to make the transaction. They tried with both Exodus wallet and Metamask.
https://connextscan.io/tx/0xfa490eea9f7a8da911f948da66da9843e3c46d9e380f85c39ce1c016a6c5c3cc
Link to ticket in discord
https://discord.com/channels/454734546869551114/1195063888773926915/1195065359422717972

Bumped on their behalf. Wallet issues are not reproducible, likely user env related. Closing out.


Current Device Name is Nil Immediate After Link

If immediately after pairing the device, you call -getCurrentDevice, it returns nil. It seems to me that it ought to be set as soon as the link succeeds.

Hi David,
Thanks for reporting this issue. The only way I've been able to recreate this is if the device is not linked. I noticed that the success/failure blocks on -registerUser withDevice aren't being called appropriately so this could be the cause of that issue. That will be fixed in the maintenance release  but just to make sure, if you call -getCurrentDevice within a check of [[WhiteLabelManager sharedClient] isAccountActive] to be sure that you're linked, do you still get nil returned?

Just had this happen again with 2.2. Immediately after linking, our UI loads the main view, checking -isAccountActive, which returns true, and -checkActiveSessions, which returns false. Note, however, that I'm also calling -getCurrentDevice before calling -getDeviceList:. So could that be it?

I don't believe that could be it because I also tested that theory out last week and was able to get the current device name successfully before calling getDevicesList. I will look into this further to see what could be causing the nil return. Thanks for letting me know!

Just to follow up, has this issue been fixed with WhiteLabel v2.2.1? I haven't been able to recreate it ever since adding the success/failure blocks to -registerUser withDevice.
If you're still seeing nil returned then I'll investigate further. Just let me know, thanks!

It seems better, it didn't happen to me at all yesterday, but it just now happened again. :-( All I did was link the device, then immediately go to the view that calls -getCurrentDevice.

Sorry to hear that =( I'll keep trying to hit this issue and see what I can find. Thanks for letting me know!

I just tried to force it by doing this:
WhiteLabelManager.sharedClient().registerUser(code, withSuccess: {
    self.submitting(false)
    // Let's get the name!
    let dvc = DevicesViewController.init(parentView: nil)!
     It worked fine. Grrr. I'll see if I can reduce the case in between meetings today.

No worries. One thing that would cause a -nil return would be if the DevicesViewController was not initialized before calling -getCurrentDevice but based off the code snippet above, it looks like you're definitely initializing it. I've tried recreating this many times and still haven't succeeded. I will keep looking into this though.

I believe this issue was due to the creation of a DevicesViewController before linking the device, as described in #5 ([this comment(https://github.com/LaunchKey/launchkey-ios-whitelabel-sdk/issues/30#issuecomment-238735118). Apologies for the wild goose chase.


Question on defining facts and flow structure

Hi @jruizgit - thanks so much for your work on this! It's very well documented and the architecture seems easy to bring into an existing project.
I'm still new to and learning about rete, but this seems like a system we'll need to adopt. I've been able to get a number of your examples up and running, but I could use some help in understanding how to lay out different facts in our system. In particular, when there might be many different types of facts (vs just a single stream of transaction events, for example).
A simple example that aligns with my project is an Amazon warehouse. There are boxes to be shipped and places they need to be stored in the warehouse as they move through process.

Boxes might have facts like dimensions, weight, fragile or not, temperature requirements, shipping date, etc.
The warehouse stations would have facts like current capacity/usage, location, cold room or not, perhaps shipping date ranges for boxes within it, etc.

Could I have multiple fact types like this that are both evaluated in my rules? Example, if the current box being processed requires a cold room and the cold room has capacity, move it there next to boxes with the same shipping date.
Any clarification on this use-case and flow structure to be used would be a big help. Thank you again!

To manage multiple kinds of fact, you need a fact property named "object" to check the object type and use it in your @when_any() condition. e.g.: @when_any(m.object = 'box')
As for your use case, I'm not so sure RETE is a fit for you. RETE is more useful to react on things. I would need more details about your use case. e.g.: Do you try to optimize the location ? Do you try to maximize the space, reduce the number of boxes to be moved ? If so, linear optimization might be a better fit for you.
Btw, I made the same mistake awhile back trying to use RETE for the wrong use cases. I've wasted 3 months on it trying to tweak it to solve my problem. While, once I knew about Linear Programming, it took me 2 weeks to get it working.

Thanks @ikus060 for the reply! Good to know about "object".
Interesting. I will look into linear optimization, but happy to explain more on my use case and why I was thinking RETE.
At this stage in our process, we aren't really looking to optimize. We're more so looking to make a set of decisions for the given boxes that we have on hand for the day. Eventually in the future, I think earlier steps in our process (that lead us into this stage) will be optimized. For example, the boxes that we deal with each day will be easier to make decisions on due to earlier optimizations. Some more facts:

We have box types A, B, C
Boxes can be in stages 1, 2, or 3 based on a date property
If available, boxes should be moved to certain locations when advancing stage (we have limited # of locations)
Box A's like being located next to other Box A's. If no spots next to A, B is fine, but not C.
Boxes should ideally be next to other boxes with the same shipping date.
Certain boxes are large and might take up 2 spots.

Any other input on this would be much appreciated. My thought re: RETE is a lot of these rules/decisions will be affecting others and the larger state of the process.

If optimization is not your first goal, RETE might be a match for you...
For this use case: Box A's like being located next to other Box A's. If no spots next to A, B is fine, but not C.
When a new spot is available for a Box. What are you planing to do ? You want to dispatch someone to move a box to fill the spot ? You need to find the best box to fill the spot ?
How is the software interacting with the real world ? Whats are your actors ? Someone scanning the boxes, when, how, why ? Who/what is moving the box ?

Great questions @ikus060.
At the start of the process we'd have our set of boxes that need to go somewhere and we'd know which spots are currently open. My thought is we'd have these boxes/spots fully described as facts and then rules to best position them. I figured it would be less "when a new spot is available" and more just evaluating all the boxes and best filling them in the spots.
For now, yes - the output would be instructions or a task list for someone to move the boxes. They would then mark the action complete in a simple UI or scanner. Eventually the result of all of this could trigger automation.

Hi ksheurs and ikus060, thanks a lot for posting the questions and comments. Few more comments:

Yes, as ikus006 mentions, you can model different types of facts by using a property in your object: @when_any(m.t ==  'box'. In contrast with other rules engines, durable_rules  type system is JSON. That is, durable_rules is agnostic of the language specific types.
RETE helps when your system needs to remember a set of preconditions to infer an action. In RDBMS terms, think of RETE as a reverse query, which incrementally resolves a join as soon as enough data is available.
Rules are declarative, they define the 'what' (not the 'how') of your system. First intuition: model boxes and locations as facts. Use rules to define the relation between boxes and locations.

Thanks @jruizgit. Will give this a try today and tomorrow. I'll report back if any questions come up before closing.

In a ruby example, is there a way to enable better logging or exceptions? As I'm testing things, it be good to see some output of processing and if the server is in a loop, etc. I'm currently running scripts solely via ruby myscript.rb (not the API).
Separately, this may be a confusing question, but in trying to understand how these rules are executed... is there a concept of completion of execution (or do things just continually run until all rules are no longer satisfied). In statechart's I see usage of delete which maybe seems related, but curious for other flows, as well.

Per the question above, I'm trying to capture the completed/finished state like so (doesn't seem to exactly be working, though):
when_all c.box = (m.type == "box"), all(+m.position_id) do
  puts "Complete!"
end

Hi ksheurs, yes you can log exceptions by looking at the exception property is the state context. For example:
require "durable"

Durable.ruleset :flow do
  when_all m.action == "start" do
    raise "Unhandled Exception!"
  end

  # when the exception property exists
  when_all +s.exception do
    puts "#{s.exception}"
    s.exception = nil
  end

  when_start do
    post :flow, { :action => "start" }
  end
end

Durable.run_all

Regarding your second question, rules continue running until no rules are satisfied. You can define the execution lifecycle by using a state property in an object. You can also use a state_chart.
The rule you pasted above, if type and position are part of the same object, you might want to write it like this:
when_all c.box = ((m.type == "box") & (+m.position_id)) do
  puts "Complete!"
end

If you are trying to reason about two different facts, you might want to write the rule like this:
when_all (c.box = (m.type == "box"), +m.position_id) do
  puts "Complete!"
end

Thanks Jesus - both responses are very helpful! Is it possible handling of nil is not working as expected in the Ruby implementation? The below +position_id seems to fire for nil values:
Durable.ruleset :nilcheck do
  when_all c.box = ((m.type == "box") & (+m.position_id)) do
    puts "Fires for nil?"
  end

  when_start do
    post :nilcheck, { type: "box", position_id: nil }
    post :nilcheck, { type: "box", position_id: nil }
  end
end

Durable.run_all

The + operator test for the existence of a field. A field with nil value does exist. You might need to do something like this:
Durable.ruleset :nilcheck do
  when_all c.box = ((m.type == "box") & ((+m.position_id) & (m.position_id != nil))) do
    puts "Shouldn't fire for nil"
  end

  when_start do
    post :nilcheck, { type: "box", position_id: nil }
    post :nilcheck, { type: "box", position_id: nil }
  end
end

Got it - thanks! I'm sure I'll have some more questions, but I'll close this issue out. Thank you again.


Dact 371 return filing id in post body

https://companieshouse.atlassian.net/browse/DACT-371
Return the filingId in response body to avoid having to parse it from the Location header.

Code looks fine and tests all pass.
We're having difficulties testing the endpoint using postman, issues relating to company appointments service.
2023-02-20T11:15:44.094Z error: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.data.mapping.model.MappingInstantiationException: Failed to instantiate java.util.List using constructor NO_CONSTRUCTOR with arguments ] with root cause
We're looking into this further and will update when possible.


Update PULL_REQUEST_TEMPLATE.md

Purpose / why
Depends on https://github.com/Islandora/documentation/pull/1683 being merged first.
Adds another checkbox to look for an updated "last updated on." Technically, this is included under the second checkbox, "Does the proposed documentation align with the Islandora Documentation Style Guide?", but I think that since the date should be common to all docs pages and it's probably going to be something that's easy to overlook, it merits its own callout in the checklist.
What changes were made?
Added a new checkbox for reviewers.
Verification
I think preview and review should do it for this one.
Interested Parties
@Islandora/8-x-committers once the other PR is merged.

Checklist

Pull-request reviewer should ensure the following

[ ] Does this PR link to related issues?
[ ] Does the proposed documentation align with the Islandora Documentation Style Guide?
[ ] Are the changes accurate, useful, free of typos, etc?

Person merging should ensure the following

[ ] Does mkdocs still build successfully? (This is indicated by TravisCI passing. To test locally, and see warnings, see How To Build Documentation.)
[ ] If pages are renamed or removed, have all internal links to those pages been fixed?
[ ] If pages are added, have they been linked to or placed in the menu?
[ ] Did the PR receive at least one approval from a committer, and all issues raised have been addressed?

The Style Guide PR is in, so this is ready for review.