There may be an interaction between softDelete and authentication

Someone reported authentication working with softDelete in feathers-hooks-common v3.2.0 but not v3.3.0.  The softDelete was on the users service.
@ekryski is tracking the issue down, and is not positive the problem is with softDelete.
softDelete used to do 2 gets for service.get, one with provider: undefined, the other with provider: hook.para,s.provider. Now it does just one with provider: hook.params.provider.

More info https://github.com/feathersjs/feathers-hooks-common/issues/163#issuecomment-300752881

I don't know if this is related, but I was trying out softDelete and it works as expected, the only problem I'm getting from it is it's still giving me
{
  "name": "NotFound",
  "message": "Item not found.",
  "code": 404,
  "className": "not-found",
  "errors": {}
}

Even though it was able to successfully patch the item with deleted: true. The before hooks from this service looks like this:
  before: {
    all:  [ softDelete() ],
    find: [],
    get: [],
    create: [
      authenticate('jwt'),
      associateCurrentUser({ as: 'ownerId' }),
    ],
    update: [...restrict],
    patch: [...restrict],
    remove: [...restrict],
  },

Am I correct in understanding you got the NotFound message during the patch call, even though that call changed the record as expected?
softDelete does not contain any after hooks, so it ran nothing after the successful patch call.
That would be the message you'd get if you tried a get after patching the record to be deleted.
Perhaps you can clarify the situation, or provide some code that shows the situation?

@eddyystop Hi eddy. Yeah sure, it's actually a new toy project, I'm familiarizing myself with Auk so I can update some of our legacy projects that were using older versions/styles. The code is mostly boilerplate code yet from the latest feathers-cli. And no, I'm not trying to do a get after the remove. I just send a delete request from Postman and that's what I get.
https://github.com/johncrisostomo/voting-backend/tree/master/src/services/polls

I couldn't find a softDelete in either polls or users in the link above. Could you provide a breaking example and instructions to cause it?
Could also run with feathers-hooks-common v3.2.0 rather than the current one? Thanks.

Sorry for the late response and sorry because yeah I removed it from that code. I brought it back and tried to roll back feathers-hooks-common to v3.2.0 and it is still the same. You can look at the same repo for reference. I'm just adding a poll and then trying to remove it with a DELETE request from Postman.

Could you try this with v3.4.0 which will be published soon?
https://github.com/feathersjs/feathers-hooks-common/pull/197 might affect this issue. In any case I want to eliminate it as a cause.
Thanks.

Just ran into this problem today, however I am using softDelete as an application hook rather than a service hook. I also have authentication on my service.
app.hooks.js
const {softDelete} = require('feathers-hooks-common')
module.exports = {
	before: {
		all: [softDelete()],
		find: [],
		get: [],
		create: [],
		update: [],
		patch: [],
		remove: [],
	},
...
}

agents.hooks.js
const {authenticate} = require('feathers-authentication').hooks
module.exports = {
	before: {
		all: [authenticate('jwt')],
		find: [],
		get: [],
		create: [],
		update: [],
		patch: [],
		remove: [],
	},
...
}

When I perform a REST DELETE on an agent, I get:
{
    "name": "NotFound",
    "message": "Item not found.",
    "code": 404,
    "className": "not-found",
    "errors": {}
}

and {deleted: true} does not get set on the agent.
When I move softDelete to agents.hooks.js, everything works. Or when I remove authenticate from agents.hooks.js everything works.
Here are my feathers versions:
"feathers": "^2.1.7",
"feathers-authentication": "^1.2.7",
"feathers-authentication-hooks": "^0.1.4",
"feathers-authentication-jwt": "^0.3.2",
"feathers-authentication-local": "^0.4.3",
"feathers-configuration": "^0.4.1",
"feathers-errors": "^2.9.1",
"feathers-hooks": "^2.0.2",
"feathers-hooks-common": "^3.5.5",
"feathers-nedb": "^2.6.2",
"feathers-rest": "^1.8.0",
"feathers-socketio": "^2.0.0",

I assume authenticate makes internal service calls itself and softDelete is not compatible with them. I wouldn't know more than that. Perhaps @ekryski can comment.

Perhaps you can add the debug() hook before softDelete and perhaps identify what, if any, the unexpected called service is. Then you can instead use when(context => context.path !== '...', softDelete());

Added debug hooks to app.hooks.all and agents.hooks.all. Here's the result.
* app.hooks.before.all
type:before, method: remove
query: {}
* app.hooks.before.all
type:before, method: get
query: { '$disableSoftDelete': true }
* agents.hooks.before.all
type:before, method: get
data: {}
query: {}
info: error: agents - Method: get: No auth token
error:  NotAuthenticated: No auth token
    at Error.NotAuthenticated (node_modules\feathers-errors\lib\index.js:100:17)
    at node_modules\feathers-authentication\lib\hooks\authenticate.js:102:31
    at process._tickCallback (internal/process/next_tick.js:109:7)
info: error: agents - Method: remove: Item not found.
error:  NotFound: Item not found.
    at Error.NotFound (node_modules\feathers-errors\lib\index.js:121:17)
    at node_modules\feathers-hooks-common\lib\services\soft-delete.js:74:15
    at process._tickCallback (internal/process/next_tick.js:109:7)

After reviewing the code for softDelete, it appears that when remove is called, it checks to see if the item has already been deleted, and it does this with a get. Since app hooks are called before service hooks, the user hasn't been authenticated when get is called, and that's where the error occurs.
The soft delete works after moving authenticate to app.hooks.before.all and before softDelete.
So, as long as authenticate comes before softDelete, everything works.

I think so. Please inform us of your results. Thanks.

Good to know. +1

Having the same problem here with the current version

When I soft delete I received an item not found error, but the item is successfully soft deleted at the db. I`m using MongoDB.

The problem happen when restrictToOwner is used at the remove hook with soft delete

@rcostalenz Can you post a minimalist example reproducing this bug? To help identify the problem clearly and find a solution.

Here it is, if you remove the restrictToOwner from the remove hook it works just fine, but with it you will receive an item not found error from the SoftDelete, but the item will be soft deleted at the database, the function returning the error is the throwIfItemDeleted from the soft-delete module.
module.exports = {
  before: {
    all: [
      authenticate('jwt'),
      softDelete() ],
    find: [
      authHooks.queryWithCurrentUser({ idField: '_id', as: 'userId' })
    ],
    get: [
      authHooks.restrictToOwner({ idField: '_id', ownerField: 'userId' })
    ],
    create: [
      authHooks.associateCurrentUser({ idField: '_id', as: 'userId' }),
      setNow('createdAt', 'updatedAt')
    ],
    update: [
      authHooks.restrictToOwner({ idField: '_id', ownerField: 'userId' }),
      setNow('updatedAt')
    ],
    patch: [
      authHooks.restrictToOwner({ idField: '_id', ownerField: 'userId' }),
      setNow('updatedAt')
    ],
    remove: [
      // HERE IS THE PROBLEM:
      // authHooks.restrictToOwner({ idField: '_id', ownerField: 'userId' })
    ]
  },


Merge dev into master

This PR should not be merged until we get closer to the v0.8 release date.

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@84ffb38). Click here to learn what that means.
The diff coverage is 90.9%.

@@            Coverage Diff            @@
##             master     #650   +/-   ##
=========================================
  Coverage          ?   96.18%
=========================================
  Files             ?       33
  Lines             ?     1152
  Branches          ?        0
=========================================
  Hits              ?     1108
  Misses            ?       44
  Partials          ?        0

Impacted Files
Coverage Δ

src/uniq.js
100% <ø> (ø)

src/tempdir.js
100% <ø> (ø)

src/echo.js
37.5% <0%> (ø)

src/common.js
98.29% <100%> (ø)

src/sed.js
100% <100%> (ø)

src/grep.js
100% <100%> (ø)

src/sort.js
96.42% <100%> (ø)

src/exec.js
92.59% <91.66%> (ø)

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 84ffb38...a7ee6a2. Read the comment docs.

Closing in favor of #731


DLT Science Hackathon - Added Chain Assurance

Description:

Related issue(s):
Fixes #
Notes for reviewer:

Checklist

[ ] Documented (Code comments, README, etc.)
[ ] Tested (unit, integration, etc.)

@allanmukhwana We are only able to see Readme file in this PR. Can you please add Policy file and other required files and create a new PR.


Customer Entity is null in Documents

When you create an document (e.g. invoice) and dump out the "customer" variable in the base.html.twig file you'll get the following output:
#email<EMAIL_ADDRESS>" #orderId: "df29d6ba13d04fcfb4acaf9045c493a9
" #salutationId: "f2855d8bb01b4ae090495050b96ac9e7
" #firstName: "test
" #lastName: "test
" #title: "test
" #company: null
#customerNumber: "10087
" #customerId: "b772fcc315b54017accc4378036b1001
" #customer: null
#salutation: null
#order: null
#customFields: null
#_uniqueIdentifier: "4b8fa00e0f224b31b5e147988182d1aa
" #versionId: "0fa91ce3e96a4bc2be4bd9ce752c3425
" #translated
: [] #createdAt: DateTimeImmutable @1568746529 {#1644
date: 2019-09-17 18:55:29.752 UTC (+00:00)
} #updatedAt: null
#extensions: array:1 [
"internal_mapping_storage" => ArrayEntity^ {#1621
#data
: [] #_uniqueIdentifier: null
#versionId: null
#translated
: [] #createdAt: null
#updatedAt: null
#extensions
: []
}
] #id: "4b8fa00e0f224b31b5e147988182d1aa
" +"orderVersionId": "0fa91ce3e96a4bc2be4bd9ce752c3425
"
}
I expect the "customer" field to automatically beeing mapped to the customer. seems like there was no association set, when the entity has been created. I don't see any point in creating the association manually, this should be done by the core.

the "customer" variable in the documents is the order.orderCustomer and the customerEntity is not mapped for this call. If you need additional Information from the customerEntity you need to subscribe to the Event "order.search.result.loaded" but you can't rely on the fact that an orderCustomer has a customerEntity associated. This field can be null under some circumstances.
But I see the requirement to have an event when the order for documents is called and will discuss if we will implement it.
To get a better overview, can you tell me which values from the customer you need, which are not already present in the orderCustomer?

To get a better overview, can you tell me which values from the customer you need, which are not already present in the orderCustomer?

the custom_field entry :)

@ssltg maybe customFields need to be synced to the orderCustomers while creating them

yes. Same for the orderAddress.

Is this planned for the next release?
Currently i'm listening to the CartConvertedEvent and add the missing data by myself.
But in general, the AddressTransformer.php and the CustomerTransformer.php only need a new entry, or ?
'customFields' => $address -> getCustomFields(),

Sorry for the late answer.
The Event on the documentGeneration will come in the next Release. But we are still unsure what solution we will take for customFields for the orders. We don't want to duplicate every customField "just in Case". So currently you need to hook into the CartConvertedEvent and enrich the data there.

Hi @ssltg,
well, using the CartConverted Event won't work in every scenario.
The custom_fields field isn't just empty for the customer entity, it's also empty for the billingAddress and shippingAddress (for example).
I can understand the choice, why you don't want to copy every customField just in case.
Maybe the right approach would be to implement an event which fires after an entity has been transformed?
Like for these files:
Core/Checkout/Cart/Order/Transformer/AddressTransformer.php
..../CartTransformer
..../CustomerTransformer
..../DeliveryTransformer
..../LineItemTransformer
..../TransactionTransformer
after a transformation has been done, a developer should be able to add additional data to the transformed array by listening to an event.
Whats your opinion?

Thank you for pointing the Transformer event.
What we did on EA6.0 was to:

create a LineItemCustom that extends LineItem
LineItemCustom supports extra fields in customFields (with getters and setters for every key in customFields)
We add into cart the LineItemCustom and cart contains this entity with extra fields (make sure it is a persistent change)
After the order we have the extra fields in OrderLineItem with customFields // but we need to review the logic as it was not final

We will focus on events.


Experimental Codec Support

Description
We currently do not have a way to mark and validate the codecs as experimental in OpenSearch. With this, we would be able to safely introduce experimental codecs for consumption.
Related Issues
Resolves #13723
Check List

[x] New functionality includes testing.

[x] All tests pass

[x] New functionality has been documented.

[x] New functionality has javadoc added

[x] API changes companion pull request created.
[x] Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
[x] Commits are signed per the DCO using --signoff
[x] Commit changes are listed out in CHANGELOG.md file (See: Changelog)
[x] Public documentation issue/PR created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Agree with @reta's comment above. I still don't understand what is preventing us from implementing this capability within custom-codecs behind a setting defined by that plugin?

@andrross the issue is that the codecs are valdiated over at two places: EngineConfig and at CustomCodecService.
The validation that happens in the EngineConfig, the codecs are available via NamedSPI which in turn gets the codecs / services from resources file. I don't think there is a way to load granular resources/services/codecs based on the cluster settings.
We can definitely control whether to make the codecs available or not in CustomCodecService but I dont think there is way to make codecs not available in EngineConfig once loaded via resources.
If we don't make a validation change (as in the PR), we would always allow the experimental codec (as the codec was loaded through the resources), as it will be present in the NamedSPI. If the same experimental codec is not available in CodecService, the shards will fail.
If there is another way out by limiting the changes in custom-codecs plugin, we should go for it.
Tagging @reta @backslasht @mgodwan @shwetathareja @dblock @msfroh @ankitkala to add more thoughts.

The validation that happens in the EngineConfig, the codecs are available via NamedSPI which in turn gets the codecs / services from resources file. I don't think there is a way to load granular resources/services/codecs based on the cluster settings.

So we have 2 issues here:

Codecs SPI (that come from Apache Lucene)
CodecService that manages codecs on OS side

As you rightfully mentioned, Apache Lucene has no direct support of codecs filtering (the only way we could distinguish stable and non-stable codecs is by convention, Apache Lucene uses sandbox there). Let us enumerate the options here that target any codec that user may use (not relying on any additional OpenSearch specific interfaces):

add new node level setting to explicitly enable / disable codecs, that would work with EngineConfig (using dependent setting) and it would also cover any codec, either supplied by Apache Lucene or custom-codecs plugin
add new node level setting to explicitly enable / disable sandbox codecs (we could get that from the package), it will work with Apache Lucene codecs but not custom-codecs plugin since we didn't follow the convention, this is also not convenient since it is "all-or-nothing" approach, I think we should be able to give more control to the user which codecs to enable / disable

We could narrow the scope and try to contain the change with custom-codecs plugin only but the split between "codecs coming from anywhere" and "settings are validated in core" makes it difficult to implement, especially with the need to allow individual codecs to be enabled / disabled.

@reta What is the behavior of the system if we just implement runtime checks based on the value of some "experimental" configuration setting that dynamically chooses the codecs to add in the CodecService here? https://github.com/opensearch-project/custom-codecs/blob/main/src/main/java/org/opensearch/index/codec/customcodecs/CustomCodecService.java#L47

@reta What is the behavior of the system if we just implement runtime checks based on the value of some "experimental" configuration setting that dynamically chooses the codecs to add in the CodecService here?

@andrross that would not "hide" them from Apache Lucene: https://github.com/opensearch-project/custom-codecs/blob/main/src/main/resources/META-INF/services/org.apache.lucene.codecs.Codec

@reta What is the behavior of the system if we just implement runtime checks based on the value of some "experimental" configuration setting that dynamically chooses the codecs to add in the CodecService here?

@andrross that would not "hide" them from Apache Lucene: https://github.com/opensearch-project/custom-codecs/blob/main/src/main/resources/META-INF/services/org.apache.lucene.codecs.Codec

Right, but would they be usable to an OpenSearch user if CodecService prevent access?

@reta @andrross what should be the next course of action on this?

@reta I'm aligned with your suggestion. If we are able to restrict the experimental codec changes to custom-codecs, then we should go for it. Granular control over experimental codec would be ideal as well.

@reta I'm aligned with your suggestion. If we are able to restrict the experimental codec changes to custom-codecs, then we should go for it. Granular control over experimental codec would be ideal as well.

Thanks @sarthakaggarwal97 , let us close ti and move the discussion to https://github.com/opensearch-project/custom-codecs/issues/148


Clean up mastodon feeds

Mastodon generates RSS feeds for users and hashtags, but (at least for the hashtags, which I am trying out), the titles messily show raw HTML—usually. For example
<EMAIL_ADDRESS>“

I can see a few entries in a tag feed where the title lacks the HTML. And the body looks correct.

@adamjrice Which tags are you trying? I am not seeing issues with the rendering.

Have you got a screenshot? I followed #cycling on mstdn.social and it seemed ok.

See attached.

I am not seeing that issue. Is that a fork of NetNewsWire as it has a similar look, but isn't rendered like the current production build.

My screenshot is from Version 6.1 (6106) on the Mac. I haven't tried this in iOS (NNW takes forever to refresh feeds for me on iOS).

What type of account?

iCloud

iCloud explains the slow refresh. https://netnewswire.com/help/iCloud

Could I get the feed URL for one of these?

http://mastodon.cloud/tags/austintx.rss  Obviously that’s just my home instance.

I can reproduce this using that URL.
Here’s the thing: there are HTML tags inside the <title> element in that feed. But the HTML spec is silent on what to do in this case. Treat as HTML? Or show them as is? It doesn’t say.
It might seem like an obvious answer, but it’s not. What if the title is the The problem with non-semantic
 elements? The
 should show, obviously.
So the policy has been to treat the title as plain text, since treating it as HTML could result in parts of the title not being shown.
We could do a special case for Mastodon feeds, but there’s nothing in every Mastodon feed that identifies it as a Mastodon feed. We could make a guess, though, and just be wrong some of the time.

I am not this seeing this issue at all: https://mstdn.social/tags/cycling.rss

My bet is that different instances are configured differently and/or run different versions of the software.

Actually:

https://mastodon.cloud/tags/austintx.rss has issues
https://mastodon.social/tags/austintx.rss is fine

I assume it's an issue with the matsodon.cloud instance, which has a slightly different structure to the mastodon.social instance:

cloud is being served via Cloudflare
social appears to be coming directly from Mastodon.

@brentsimmons / @adamjrice This appears to be an issue with mastodon.cloud. Their server admins emailed me.


PHOENIX-5101 ScanningResultIterator getScanMetrics throws NPE

@ChinmaySKulkarni @twdsilva Please review.

Overall lgtm. Just one small change

+1 LGTM


Numerous XPC constants generate concurrency warnings when used

Describe the bug
Using many of the constants from /usr/include/xpc results in "Reference to var is not concurrency-safe because it involves shared mutable state" when -warn-concurrency is enabled.
To Reproduce

Enable -warn-concurrency.
Write code that references any of the following (non-exhaustive) list of constants:

XPC_ERROR_CONNECTION_INTERRUPTED
XPC_ERROR_CONNECTION_INVALID
XPC_ERROR_TERMINATION_IMMINENT

Additionally, all of the XPC_TYPE_* type declarations in /usr/include/xpc/xpc.h (such as XPC_TYPE_INT64) exhibit this behavior.
...
Expected behavior
Constants and XPC types should be safe to use concurrently.
Environment (please complete the following information):

OS: macOS 12.3.1
Xcode Version/Tag/Branch: 13E500a

As a sidenote, the entire xpc_object_t type itself should probably be Sendable, since XPC objects are by their very purpose intended to be thread-safe.


Integrate Trivy into project's workflow

Objective
Implement Trivy to add a layer of dependency vulnerabilities on project's CI/CD

Description
In order to achieve public-level dependency vulnerabilities analysis, I will have to implement Trivy in its CI/CD system (Github Actions)

Tasks

Research

[x] Study Trivy related documentation and implementation on its site
[x] Define most effective way to apply it on Reactive-bulma's CI/CD pipelines (for PRs or Merge)

Development

[x] Make previous configurations regarding technology integration (tokens, account configs, etc)
[x] Create a branch
[ ] Create or update the needed .yml file where the Github Action will be applied and apply its steps

Ticket relationships

Relationship
Involved tickets

Is related to
none

Is blocked by
none

It blocks
none

A point to have in mind after reading language-specific packages documentation is that devDependencies of a package-lock.json files are not being included in trivy scans.

I created a discussion on Trivy's repository in order to know how possible is to scan development-level dependencies on a npm project or I should look for other type of solution

I created a issue on trivy's repo to adress the problem rised on the discussion mentioned before. Hope this will go to somewhere

Closing issue because solution is not able to review development dependencies. I will work with another alternative in the near future.


Unable to reproduce OneHotEncoder example from the docs

This example from the API reference returns an error:
from dask_ml.preprocessing import OneHotEncoder
import numpy as np
import dask.array as da
enc = OneHotEncoder()
X = da.from_array(np.array([['A'], ['B'], ['A'], ['C']]), chunks=2)
enc.fit(X)
enc.categories_
enc.transform(X)

This is the traceback:

ValueErrorTraceback (most recent call last)
<ipython-input-1-f54891b18539> in <module>
      6 enc.fit(X)
      7 enc.categories_
----> 8 enc.transform(X)

~/myenv/lib/python3.7/site-packages/dask_ml/preprocessing/_encoders.py in transform(self, X)
    211         self, X: Union[ArrayLike, DataFrameType]
    212     ) -> Union[ArrayLike, DataFrameType]:
--> 213         return self._transform(X)
    214
    215     def _transform_new(

~/myenv/lib/python3.7/site-packages/dask_ml/preprocessing/_encoders.py in _transform(self, X, handle_unknown)
    243                 for i in range(n_features)
    244             ]
--> 245             X = da.concatenate(Xs, axis=1)
    246
    247             if not self.sparse:

~/myenv/lib/python3.7/site-packages/dask/array/core.py in concatenate(seq, axis, allow_unknown_chunksizes)
   3480         raise ValueError("Need array(s) to concatenate")
   3481
-> 3482     meta = np.concatenate([meta_from_array(s) for s in seq], axis=axis)
   3483
   3484     # Promote types to match meta

<__array_function__ internals> in concatenate(*args, **kwargs)

ValueError: zero-dimensional arrays cannot be concatenated

Environment:

Dask version: 2.19.0
numpy version: 1.18.5
Python version: 3.7.6
Install method (conda, pip, source): conda

Thanks for the report. Seems to be an issue with scipy.sparse matrices not being real ndarrays, so they don't work with all of NumPy's APIs that dask uses (concatenate in this case).
The typical solution is to use pydata/sparse instead. Something like
diff --git a/dask_ml/preprocessing/_encoders.py b/dask_ml/preprocessing/_encoders.py
index f14f6e62..173cfbb1 100644
--- a/dask_ml/preprocessing/_encoders.py
+++ b/dask_ml/preprocessing/_encoders.py
@@ -233,12 +233,14 @@ class OneHotEncoder(sklearn.preprocessing.OneHotEncoder):

         if is_array:
             # We encode each column independently, as they have different categories.
+            import sparse
             Xs = [
                 _encode_dask_array(
                     X[:, i],
                     uniques=self.categories_[i],
                     encode=True,
                     onehot_dtype=self.dtype,
+                    sparse_class=sparse.COO.from_scipy_sparse
                 )[1]
                 for i in range(n_features)
             ]
diff --git a/dask_ml/preprocessing/label.py b/dask_ml/preprocessing/label.py
index ab22cb3a..e3ddb07e 100644
--- a/dask_ml/preprocessing/label.py
+++ b/dask_ml/preprocessing/label.py
@@ -214,7 +214,7 @@ def _encode_categorical(
         return uniques

-def _check_and_search_block(arr, uniques, onehot_dtype=None, block_info=None):
+def _check_and_search_block(arr, uniques, onehot_dtype=None, block_info=None, sparse_class=None):
     diff = list(np.setdiff1d(arr, uniques, assume_unique=True))

     if diff:
@@ -226,12 +226,12 @@ def _check_and_search_block(arr, uniques, onehot_dtype=None, block_info=None):

     label_encoded = np.searchsorted(uniques, arr)
     if onehot_dtype:
-        return _construct(label_encoded, uniques)
+        return _construct(label_encoded, uniques, sparse_class=sparse_class)
     else:
         return label_encoded

-def _construct(x: np.ndarray, categories: np.ndarray) -> scipy.sparse.csr_matrix:
+def _construct(x: np.ndarray, categories: np.ndarray, sparse_class=None) -> scipy.sparse.csr_matrix:
     """Make a sparse matrix from an encoded array.

     >>> construct(np.array([0, 1, 0]), np.array([0, 1])).toarray()
@@ -242,9 +242,12 @@ def _construct(x: np.ndarray, categories: np.ndarray) -> scipy.sparse.csr_matrix
     data = np.ones(len(x))
     rows = np.arange(len(x))
     columns = x.ravel()
-    return scipy.sparse.csr_matrix(
+    mat = scipy.sparse.csr_matrix(
         (data, (rows, columns)), shape=(len(x), len(categories))
     )
+    if sparse_class:
+        mat = sparse_class(mat)
+    return mat

 def _encode_dask_array(
@@ -252,6 +255,7 @@ def _encode_dask_array(
     uniques: Optional[np.ndarray] = None,
     encode: bool = False,
     onehot_dtype: Optional[np.dtype] = None,
+    sparse_class = None,
 ):
     """One-hot or label encode a dask array.

@@ -300,6 +304,10 @@ def _encode_dask_array(
             new_axis = None
             chunks = values.chunks

+        if sparse_class:
+            import sparse
+            meta = sparse.ones((0, 0), dtype=onehot_dtype)
+
         return (
             uniques,
             values.map_blocks(
@@ -309,6 +317,8 @@ def _encode_dask_array(
                 dtype=dtype,
                 new_axis=new_axis,
                 chunks=chunks,
+                sparse_class=sparse_class,
+                meta=meta
             ),
         )
     else:

A few things to figure out though

Should we just do this by default? (I don't think sparse is a required dependency)
If it's optional, what should the API look like?

@SultanOrazbayev are you interested in working on this?

Thanks, it looks like you already resolved the problem! I will experiment with this code and update later.
re: 1. This discussion suggests that scipy.sparse support for ndarrays is at least a year away (maybe never?), so using PyData sparse seems to be a good default choice.
re: 2. There is a way of converting between PyData sparse and scipy.sparse, so it should be possible to map to other use cases with map_blocks(). Perhaps there is no need to introduce extra API.

re: 2. There is a way of converting between PyData sparse and scipy.sparse, so it should be possible to map to other use cases with map_blocks(). Perhaps there is no need to introduce extra API.

Yeah, and that's our typical approach: Return scipy.sparse by default, since that matches scikit-learn, but have the user convert to pydata/sparse if they're doing anything fancy that won't work on a Dask Array backed by scipy.sparse. In this case the error occurs as we're building the graph though. So I think the first-best solution is to adjust dask.array / how we call dask.array to not error when we're building the result.

Just FYI @SultanOrazbayev, this may be being fixed upstream in https://github.com/dask/dask/pull/6339.

This is great, thanks!

https://github.com/dask/dask/pull/6339 was just merged, so going to go ahead and close.
For now, you can install Dask from GitHub, or we'll have a release in a week or two.


Harmonize subnet variables

Description
Deprecates subnet_ids_gitlab_runner and subnet_id_runners and introduces subnet_id to make the module more readable as explained in #411 and #419. Thus it it no longer possible to place the runner and the executors in different subnets. For a resilient configuration deploy the module once per availability zone.
Closes #419
Migrations required
No, but migration should be done.
Replace subnet_ids_gitlab_runner and subnet_id_runners by subnet_id. Please notice that it is no longer possible to place the runner and executors in different subnet. For a resilient configuration, I suggest to deploy the module once per availability zone.
Verification
Still missing
Documentation
We use pre-commit to update the Terraform inputs and outputs in the documentation via terraform-docs. Ensure you have installed those components.

Missing:

verification
rewrite examples

Just some simple changes to the code how it could work and to discuss it. I will fix everything else to get a running version.

Verification still open and to be done as soon as I am back to work. ;-)

Verified

Great will check!


Add Bengali language support

 Issue by rafatbiin
Sun Jan  5 10:50:04 2020
Originally opened as https://github.com/codelucas/newspaper/pull/764

Bengali stopwords from https://github.com/stopwords-iso/stopwords-bn
Bengali test data (HTML + text) from prothomalo.com https://www.prothomalo.com/economy/article/1632310/ (publicly available news)
update Bengali as supported languages in

README.rst
docs/index.rst
docs/user_guide/quickstart.rst
newspaper/utils.py

rafatbiin included the following code: https://github.com/codelucas/newspaper/pull/764/commits

added 0.9.3


xclip does not work

I expect
echo hi| xclip && konsole

followed by Control-Shift-v  (default binding to paste something) while the KDE clipboard manager is running to paste hi to the now displayed terminal window.
Observed result: it pastes whatever was on the clipboard before the command was executed.
16.09.git.89c567c (Flounder)
Relevant configuration
services.xserver.desktopManager.kde5.enable = true;

Solution:
echo hi | xclip -selection clipboard.

Please reply to this issue if there is any desktop environment in which this doesn't work.
Thanks @puffnfresh

I think you want xclip -selection clipboard.

It does not work for me on current stable KDE Plasma


Debian10

Remove installation instructions for Debian 10

merging to fix build

Sorry, missed that one. Looks good, thanks JM!


Unnumbered bullet lists ("dash lists") should not be indented

Now:

Correct:

Issue I've just rectified in GB (https://github.com/riboseinc/asciidoctor-gb/issues/57): <ol>, <ul> need to have their left margin explicitly set to 0 in Word stylesheets, and the inherited stylesheets were expecting <p> for lists instead.


update for runelite-api 1.8.17

With the next runelite release the varbit api will change slightly. The following two commits detail the change:
https://github.com/runelite/runelite/commit/d129c49923beaf79ba3e4ccf10c0f097435a9cfa
https://github.com/runelite/runelite/commit/2bc2e867bdc1b07be38f486193faeadfa780845f
There is also a change to use more up to date MenuOptionClicked methods, changed in:
https://github.com/runelite/runelite/commit/45b85bff6a687f5c5eab94d9e97f90a30896ae8f

The remaining changes in this PR have been added in d98b89f


[embedding] Remove the temporary log file

This covert file is meaningless， need to remove it.

This has nothing to do with [embedding]. You just mistook submit that within a pull request for embedding api.


Slack support (references PR #55)

I've updated the integration of Slack made by @caseycrites in the PR #55:

Modified the migration to include cabotapp_instance
Added Icon URL

Any updates on this?  Cabot is basically useless to me without Slack integration, and as more people ditch HipChat in favor of Slack this will only become a bigger issue.

Sorry have been distracted with all sorts of stuff. Ideally @ethervoid would be able to reimplement as an alert plugin (see e.g. https://github.com/bonniejools/cabot-alert-hipchat) - plugin infrastructure landed a few weeks ago.

Hello guys,
https://github.com/lblasc/cabot-alert-slack I've modified original hipchat plugin to support slack, but I only tested it in ipython, but it should work, it's not on pypi yet, so clone and install the plugin with pip install -e cabot-alert-slack while in cabot virtualenv.
Pull request are welcomed !

@lblasc thanks for adding this - I will close this as redundant


Use different locations in test data file

Prior to this change, the testing data file contained a series of the same locations (excluding timestamp). On receiving a location update, we stamp the current millisecond-precision timestamp on it.
If during tests, mapbox enhanced updates come through very quickly (<1ms), they are registered on the publisher, but may not be sent to Ably.
This may be due to resolution, or because such a quick update would make the timestamp on subsequent updates the same. As everything else is the same, this would produce the same hashcode for the location update, which is also what we use as the message id for the Ably realtime service. So the message would be rejected for reasons of idempotency.
This change therefore makes sure that each data point in the file is different, so we can never have clashing hashcodes.
Fixes https://github.com/ably/ably-asset-tracking-android/issues/259

This has now run 3 times on CI without any failures.


[HTML] Change website's name

Currently websites name is 'Weather App'. Suggest a better name.

Replace 'Weather App' with your suggested name in head section in HTML
Create a PR

24/7 Weather Report?
Weather-to-go?
Forecast Friend?

Go ahead with Weather-to-go!


Accordion animation is not working

Fix 3144633 has broken collapse animation, because finally is triggered before animation ends.
http://plnkr.co/edit/pyqrBk?p=preview

That plunker doesn't have animations in it, if you put them:
http://plnkr.co/edit/iTxqx6?p=preview
It fails. But there is a patch in 1.4.5 that fixes it:
http://plnkr.co/edit/Mv0uGh?p=preview
Is that good for you?

I guess, ngAnimate contain correctly working version of $animateCss, because when we link it and use done callback - animation is working properly. Introduced in v1.4 angular contains $animateCss inside, and seems it is not working as it should.

I am confused sorry. Let's start from zero. What is the problem with your first plunker? I don't see any problem with that plunker. It doesn't have animations because ngAnimate is not loaded.

OK, I got it. There is no need to use $animate nor $animateCss for ui.bootstrap.collapse directive. In bootstrap animations are css-driven using transitions. We just need to add/remove classes in proper time. In original bootstrap it is done with setTimeout.
E.g. ui.bootstrap.collapse show procedure is next:

Initially panel body has class .collapse.
We click on trigger and script calculates height on the body and adds class .collapsing, removes .collapse. It has css transition, so there is no need to animate using js. We just start setTimeout for the same period as transition lasts (350ms).
CSS animation ends and so as timeout. On it's callback we remove class .collapsing (to prevent any other animations related to height change), adding .collapse in class and setting height to auto so prevent dynamic content to be hidden.

So I think it would be better to rewrite collapse directory to use the same approach as it is in original bootstrap, or add ngAnimate as required lib :blush:

If you want animations, you should add ngAnimate to it. I don't think there is a reason not to use it, but that is up to you.

If you say, that ngAnimate is required for animations, than there is no need to play with bs classes, just use $animateCss, see ui.bootstrap.collapse directive in http://plnkr.co/edit/AvLTUV?p=preview

ngAnimate is optional - it gives users the choices as to whether they want the animation or not. No sense making it more restrictive unnecessarily.


Request: Linking RPi_Cam_Web_Interfaces together

I run multiple cameras at the same time using the RPi Cam Web Interface software.
I want to trigger all of them at the same time from a single browser.
I would hit the "Record Image" button and that would activate on all the active RPi Cam Web Interface cameras on the network.  I would also use this to start and stop videos as well.
I would love it if more than just the basic start stop commands were possible.  The ability for you to link all the cameras so that one browser controls all of them would be amazing.  Possibly with a preview for all the cameras on a single browser screen.  I know I could use other software to do a multi-view and I currently use vMix to do that with my cameras.  So having a multi-view is not really the point.  The point is the ability to control and trigger multiple cameras across multiple RasPi's using the software at the same time..
Thank you very much for everything you all do the software is brilliant and amazingly awesome.
Rich Shumaker

To add to this I am looking at a way to use something like Docker with RPi_Cam_Web_Interface to allow an easy to set up, deploy, use & maintain system of multiple cameras.  Currently I am exploring FIFO pipe and I am trying to get all my settings spit back out as a command string in the same format you use to put it in.
Here is just a basic take image command.
echo 'im' >/var/www//html/FIFO`
Ideally I could set up my configuration on one RasPi Cam via the Web Interface.  Then I could easily migrate it using SSH to other systems.  Being able to easily spit out the full setup in command code would allow an easy dump to another RasPi via copy and paste.
I have a feeling I will need to create some code now to allow me to spit out all the current settings so they could be copied to another machine.  Probably best to spit it out to a text file and then copy from that file.
Does this already exist and I just need to know where it is to use it?

The default settings are in the /etc/raspimjpeg file and then any changes to these made from the web interface are stored in the uconfig file held in the web run folder (e.g. /var/www/html). The programs actually read the default file followed by the uconfig file so the latter takes precedence.
A user can manually edit the defaults if so wished and then any subsequent settings changes made from the web interface are stored in uconfig.

Thanks @roberttidey I will look into that.  I guess I could set up the first system the way I want using the RasPi Cam Web Interface then copy the uconfig file from one system to the next.  I was looking at a way to 'inject' the code from one RasPi to another by using the FIFO Pipe via SSH.  That way I might inject the settings from one system to all of them via a group SSH command somehow.
If I wanted a more permanent setup I could use the default file instead of the uconfig which is subject to change once you modify the web interface.
Is the uconfig file 'executable' via SSH FIFO pipe or does it need to be modified to run that way?

The uconfig file is just a text file in the same format as the raspimjpeg config file. They are just read one after another by the raspimjpeg process when it starts up. If it was updated by something else then the raspimjpeg can be halted (ru 0) and restarted (ru 1) which would cause the config files to be read again.
You should be able to do a remote write into the FIFO pipe to execute commands on other raspberry pis.

You should be able to do a remote write into the FIFO pipe to execute commands on other raspberry pis.

How would I do that?
I have researched a bit except I couldn't quite make it happen.
Ideally I have another computer that could send commands to all the Pi's via FIFO except that is beyond me still.
Thank you very much for all the help.
Rich Shumaker

There are various ways, e.g. setting up samba shares but the easiest way is to exploit the web interface existing on the raspberries with cameras. This allows you to access a URL to send a command into the pipe.
E,g http://cameraip/cmd_pipe.php?cmd=ca 1
will start a video recording by sending 'ca 1' into the pipe.
Note that camerip needs to include any subfolder you are using (e.g. ip/html)
The %20 is a space character.
In python this would be something like
import urllib2
urllib2.urlopen("http://cameraip/cmd_pipe.php?cmd=ca 1").read()

Thanks @roberttidey that rocks.  I will try to inject a few commands tonight.
Do you know of any windows methods to send commands to multiple IP addresses at the same or similar time?  You mentioned Python so I will try to create a script with that.
Ideally I could have one Master Page that would feed all the other Pages, each page being a different camera on the network.

You can use curl for windows to provide url access from the command line and then create batch files to send out the urls you want.
If you are aiming to send out the same command to multiple cameras from a web page then it might be worth adapting the multiview facility. This currently provides simple view windows to multiple camera but by changing multiview.html and multiview.php one could add command buttons to it and then have the modified multiview.php send the commands to the hosts list.

@roberttidey that sounds amazing.  I injected my first commands tonight and they worked great.  I will try Curl next and maybe a batch to see if I can do that.
I will definitely look at adapting the multiview facility in multiview.html/.php I like that idea a lot.  Is there anywhere I can read more about multiview facility and how to work with it.  I didn't read that anywhere yet so I must have missed it.
Thank you again for all the help.

There is a section on wiki about multiview under additions and tricks.
If you get that working as a basic multiview then it should be pretty simple to enhance to add on global functions.

Found the Multiview section on the wiki and I will be experimenting today to see what I can create.
I will post my findings and thank you very much again @roberttidey for helping me figure this all out.

I am starting my testing now and I had a question, how would you add commands to this page.  Ideally I could start / stop recording and take an image.  I am sure once I have those things on the Mutliview I will want more, heheh.
I am also exploring bluetooth and having some type of bluetooth device to start stop recording and also to take pictures.
Thanks again for your help @roberttidey.

Commands in general from the web interface work by using the send_cmd function in the javascript script.js The function accesses the cmd_pipe.php page on the server which then issues the command.
That is normally  in the context of 1 server/ 1 camera.
Here you want the command to be sent to the appropriate camera. The way to do this is to extend the multiview.php so that it can accept command call, look up the appropriate hosts like multiview.php already does and then access the cmd_pipe.php on that host to pass the command on.
So steps needed are.

Add one or more buttons to multiview.html that have an action to call a new javascript function (e.g. send_cmdmulti with 2 parameters to identify the host (or all of them if a global action is wanted) and the command required. A hostnumber of say -1 could be used to indicate it is a command for all hosts.

Define the new javascript function to script.js which will access the multiview.php passing on the host and command. Something like

function send_cmd (hostNumber ,cmd) {
ajax_cmd.open("GET","multiview.php?hostnumber=" + hostnumber + "&cmd=" +cmd ,true);
ajax_cmd.send();
}

Modify multiview.php to check if a hostnumber argument is included. If so look up the host address and access its cmd_pipe.php with the cmd parameter. If global then the multiview.php would do the cmd_pipe access on all the hosts in its table one by one.

I took the multiview.jsonD template and updated it with my 3 cameras, unfortunately I didn't know where to comment out the fourth camera, d'oh!!! IT WORKS GREAT!!! Adding a button to multiview seems to be a bit beyond my skill set right now. I know multiview is the fastest way for me to trigger or start/stop all my cameras. I don't need the previews although those are very cool and I like them. Ideally I would just have the IP's of all the cameras on screen or a link to see them to keep the page from getting cluttered. 5 Cameras Online - then you click(5 Cameras Online) and it lists the IP's as links so you could go to them that way. For the Main Multiview Page I would have 2 buttons, 1. Take Picture 2. Start/Stop Video
Thanks again for your help I will need to keep digging on this. Except I know this will work once I can figure it all out. I need to learn more quickly that way I can close this out as it has dragged on and that is my fault.

Hi @RichShumaker ! I saw that you worked on the Multiview.php file to create a common command for several cameras. You know what? I've been working on it for 4 weeks without success! I still don't understand all the subtleties of the program, and I have only a very small experience of dev, I'm usually rather web...

Do you think you could help me? I can't make my buttons work, they don't have any value (ex record video start). Could you send me some files that you have modified? I don't think they are in your github directory! You would save my life!

Les commandes en général de l'interface Web fonctionnent en utilisant la fonction send_cmd dans le script javascript.js La fonction accède à la page cmd_pipe.php sur le serveur qui émet ensuite la commande.
C'est normalement dans le contexte de 1 serveur/1 caméra.
Ici, vous voulez que la commande soit envoyée à la caméra appropriée. La façon de le faire est d'étendre le multiview.php afin qu'il puisse accepter l'appel de commande, rechercher les hôtes appropriés comme multiview.php le fait déjà, puis accéder au cmd_pipe.php sur cet hôte pour transmettre la commande.
Donc, les étapes nécessaires sont.

Ajoutez un ou plusieurs boutons à multiview.html qui ont une action pour appeler une nouvelle fonction javascript (par exemple send_cmdmulti avec 2 paramètres pour identifier l'hôte (ou tous si une action globale est souhaitée) et la commande requise. Un numéro d'hôte de dire -1 peut être utilisé pour indiquer qu'il s'agit d'une commande pour tous les hôtes.
Définissez la nouvelle fonction javascript à script.js qui accédera au multiview.php en passant l'hôte et la commande. Quelque chose comme

function send_cmdmulti (hostNumber ,cmd) { ajax_cmd.open("GET","multiview.php?hostnumber=" + hostnumber + "&cmd=" +cmd ,true); ajax_cmd.send(); }

Modifiez multiview.php pour vérifier si un argument hostnumber est inclus. Si c'est le cas, recherchez l'adresse de l'hôte et accédez à son cmd_pipe.php avec le paramètre cmd. S'il est global, le multiview.php ferait l'accès cmd_pipe sur tous les hôtes de sa table un par un.

Hi @roberttidey are you still here? I would like to go deeper into your great project, and i have a lot of difficulties with the steps you described here!
Thanks for your answer that would be so cool!


(Feature) Adds fonts, and disable keyboard on mobile

This PR closes #165529434 & #166106884, by:

Adding num pad on Amount page
Adds Roboto fonts to Android, iOS and web.

@kbardi, on mobile it's working great!
On desktop, I find it hard to make focus on the input. See vid: http://bit.ly/2WSQq3x

@fernandomg snapshots update seems to be the opposite of whats on travis. why is that?

@fernandomg snapshots update seems to be the opposite of whats on travis. why is that?

@sirpy, yes. Already talk about that with @kbardi on Friday. Seems that the content varies from run to run of tests. He had already dealt with a similar situation, so I asked him to look into it.


Fix your trash mod

you gotta survive off copying outdated versions of ae2 lol

Can you please fix this issue its causing me lots of lag as well when people start mass crafting.

why close this its not fixed

With the upcoming version 1.6 the crafting system will be improved.
At the same time, it is understandable that this issue was closed. See the author's behavior.


feat: change the way of options pass into postcss-loader because the update of postcss-loader

feat: change the way of options pass into postcss-loader because the update of postcss-loader
chore: fix lint

CI failed reason: @builder/rax-pack has not been released.

Codecov Report

Merging #993 (5f687c4) into hotfix/3.8.15 (307227a) will not change coverage.
The diff coverage is n/a.

@@              Coverage Diff               @@
##           hotfix/3.8.15     #993   +/-   ##
==============================================
  Coverage          51.59%   51.59%
==============================================
  Files                 48       48
  Lines               1283     1283
  Branches             297      297
==============================================
  Hits                 662      662
  Misses               621      621


Update README.md

Fixed what appears to be a typo in the README. This repo is not the extractor suite.

Thanks for noticing, we definitely didn't copy/paste it ;)


feat(ui): add pagination on test cases page

Pull Request Template
Description
Added fix for the issue:  https://github.com/keploy/ui/issues/24
Changed offset to 0 and limit to  pageSize*(pageIndex+1)+1. The extra 1 ensures that the next arrow pointer is enabled.
Fixes # (issue)
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue).
[x] New feature (non-breaking change which adds functionality).
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).
[ ] This change requires a documentation update.

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Additional Context (Please include any Screenshots/gifs if relevant)
...
Checklist:

[x] My code follows the style guidelines of this project.
[x] I have performed a self-review of my own code.
[ ] I have made corresponding changes to the documentation.
[ ] I have added corresponding tests.
[ ] Any dependent changes have been merged and published in downstream modules.

The UI was showing the wrong total cases count if we query data in chunks. It is so because we are using the DataGrid module and it takes the total count as the count of the total test cases queried. So after talking with Shubham, we decided to query all the data in one go.

LGTM! Found a couple of new good-first issues while reviewing this.
Keep it up! 🎉


test player updates

What does this pull request do? Explain your changes. (required)

Adds mute/volume control to player
Sets player to muted by default
Fixes issue where video won't play if the the browser has an ad blocker (brave and firefox)
Formats profile settings inside a code block

@wohlner just pushed up a fix that address the issue where playback only worked for admin users.


Product id fix

Codecov Report

Merging #66 (fd54bed) into main (d10efd8) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
+ Coverage   96.66%   96.68%   +0.02%
==========================================
  Files           5        5
  Lines         300      302       +2
==========================================
+ Hits          290      292       +2
  Misses         10       10

Impacted Files
Coverage Δ

service/models.py
100.00% <100.00%> (ø)

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 d10efd8...fd54bed. Read the comment docs.


Allow passing of pathlib objects instead of string paths

Passing a Python standard library pathlib.Path object to read_plink leads to:
TypeError: expected string or bytes-like object

The implementation with that will be release in the next hour. Please, have a look!


Fix repo name consistency

It seems homebrew-repo refers to user/repo. It probably should be user/homebrew-repo.

[X] Have you followed the guidelines in our Contributing document?
[X] Have you checked to ensure there aren't other open Pull Requests for the same change?
[X] Have you added an explanation of what your changes do and why you'd like us to include them?
[ ] Have you written new tests for your changes? Here's an example.
[ ] Have you successfully run brew style with your changes locally?
[ ] Have you successfully run brew tests with your changes locally?

Actually, you don't need to include homebrew- in the tap command; it's a bit more concise this way. For https://github.com/Homebrew/homebrew-test-bot you use:
brew tap homebrew/test-bot

I see! My bad for not checking that, it seems obvious...


Question: Defining bson ID response from mongoDB

Struggling with go-swagger and mongoDB:
_id returned from mongoDB using mgo driver is of type bson.ObjectId.
Example model:
Message:
  type: object
  required:
    - text
  properties:
    id:
      type: string
      readOnly: true
    text:
      type: string

When I get Messages from DB by
...
messages := []*models.Message{}
if err := c.Find(nil).All(&messages); err != nil {
  log.Print("Error on getting messages: ", err)
}
return message.NewGetMessageOK().WithPayload(messages)

The API response omitting the id property. Actually it's even stored as an empty string in mongoDB.
HTTP/1.1 200 OK
Content-Length: 774
Content-Type: application/json
Date: Sat, 21 Jan 2017 20:53:08 GMT

[
  {
    "text": "string"
  }
]

Is there any way to cast the bson.ObjectId to something that the generated server can work with or do I have to use the opposite approach by writing the server and generate the swagger spec afterwards?
And by the way, what effect do readOnly have since it's possible to POST that parameter against the API?

If you named your field _id instead of id I think you'd be able to read it. Like:
Message:
  type: object
  required:
    - _id
    - text
  properties:
    _id:
      type: string
    text:
      type: string

Already tested that. _id gets translated into id and returns as id="".
Even if I try to insert a model with _id as readOnly, it inserts as id into database.

Weird, not sure why it gets translated. I'm using go-swagger with mongo models and it works ok. For example this model spec generates this struct. The swagger client is generated with this command.
🤔

And by the way, what effect do readOnly have since it's possible to POST that parameter against the API?

Let me answer that question using the official specification:

Relevant only for Schema "properties" definitions. Declares the property as "read only". This means that it MAY be sent as part of a response but MUST NOT be sent as part of the request. Properties marked as readOnly being true SHOULD NOT be in the required list of the defined schema. Default value is false. - https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#schema-object

@CuBiC3D can you please to try to explain the problem in a different way, as I fail to understand the exact issue here. Also do you have a link to your project, or is it closed source?
Everything you describe in your issue description seems to behave as normal, AFAIK. So please help me help you, by helping me understand your situation exactly.

@rjeczalik escaping with \_id leads to a more weird behavior. It generates
// id
// Required: true
ID *string `json:"\_id"`

But the actual output by return message.NewGetMessageOK().WithPayload(messages) gives me a capitalized ID.
HTTP/1.1 200 OK
Content-Length: 794
Content-Type: application/json
Date: Sun, 22 Jan 2017 10:44:40 GMT

[
  {
    "ID": null,
...

@GlenDC Can't publish the source at this time, but can make a complete example if needed. But let me explain to make it clear: I can't use the generated models to interact with a mongoDB. Tried a bit around and found out where the actual problem is. Object transmission in mongoDB is using bson, not json.  But here is the exception: _id which is represented in Go as ID *string 'json:"_id"'. mongoDB ignores the json tagged fields, and always translates ID into id. So storing requests or responding with any results from mongoDB is impossible.
If I edit the tags manually into ID *string 'bson:"_id" json:"_id"' it works:
HTTP/1.1 200 OK
Content-Length: 891
Content-Type: application/json
Date: Sun, 22 Jan 2017 10:50:39 GMT

[
  {
    "_id": "X��w�g��3&�",
...

Ok, actually it's garbage, but just because it's actually not a string but a bson.ObjectId. Changing it into ID bson.ObjectId 'bson:"_id" json:"_id"' gives me:
HTTP/1.1 200 OK
Content-Length: 840
Content-Type: application/json
Date: Sun, 22 Jan 2017 11:06:54 GMT

[
  {
    "_id": "5883ed779e67b09e3326b67f",
...

This is exactly what I expected to see as a response.
So the main question will be: Is it possible to set custom tags on fields for generation or any chance to set the bson.ObjectId type?
In my eyes the only way to handle this, is to make the project the 'other way' by writing the server in Go, make comments for swagger and generate the swagger file instead of the server right?
By the way, thank you for the help ;)

@rjeczalik escaping with _id leads to a more weird behavior. It generates

Oh, I meant Markdown in github comments - I've noticed you escape _id with italics _id so just wanted to share with my finding. Sorry for confusion.

Currently there are no bson tags generated. However I don't think it would cause any harm if we would generate bson annotation tags alongside the json annotation tags. This would require an enhancement PR with updates for the generator->template code.
I think that would be a neat way to resolve your issue. However perhaps @casualjim has another idea on this topic, as it would be great to get his input on this, before any work is done related to this. As he might know a way to make it all work for you, as swagger is in its current state.
By the way @CuBiC3D can you also please mention your swagger version?

That would definitely allow to store and read swagger generated models in/from mongoDB with readOnly: true and 'bson: "variable,omitempty"', but that could be a breaking change in some special cases, where special characters has been used.
Another thing is the special type bson.ObjectId used by bson.
@GlenDC
$ swagger version
version: 0.8.0
commit: d1a0b6c1007402b2ccde73702eb0e8e43a5e7498

Yeah custom templates should fix this right? I tried forking structfield.gotmpl because it seemed to define the tags. But I get back an error message saying: "Cannot overwrite protected template tuplefieldIface"
Would it otherwise not be an idea to allow additional tags? I'd say that this use case happens in more cases than just bson, json.
The type "bson.ObjectId' would just be another type like github.com/go-openapi/strfmt I suppose. Wrapping it around the original bson objectId.

Some templates can't be overridden as they are protected (https://github.com/go-swagger/go-swagger/blob/master/generator/template_repo.go#L135-L175), others are not (all other templates).
In case you require to modify such templates, you are most likely either hitting a wall because of limitations in go-openapi/go-swagger, or you are doing something weird. In case of the first option, the starting point would be to open an issue about this, describing your situation, such that a discussion can start and a solution can be found.
@iain17 is correct, you might need to add support for bson specific objects in github.com/go-openapi/strfmt. By default these are used: https://github.com/go-openapi/strfmt/blob/master/default.go
@CuBiC3D, Related is this open PR https://github.com/go-openapi/strfmt/pull/7/files; in that PR @roytan883 is providing Setters and Getters for the DateTime time. You might want to help him out with this, by also providing those for the other types. Would allow you to use the existing types, and still interact with BSON.

but that could be a breaking change in some special cases, where special characters has been used.

can you give an example of a breaking case?

@GlenDC seems to me that this issue here: https://github.com/go-swagger/go-swagger/issues/353 is also connected with this problem with tags. I understand that the OpenApi spec isn't allowing go tags, so maybe this is more an issue with openapi.
However for the time being it seems to me that the only way around this problem, is to have an external application go through the generated structs (models) from goswagger. The program would add the tags after the fact. (Bit hackish tho, I'd love to hear an alternative solution)
https://github.com/favadi/protoc-go-inject-tag?files=1

Ok there are a number of issues here :)

yes we should allow for adding custom struct tags, this can be supported by defining a vendor extension to drive that process. With that we should be able to support some form of bson, protobuf etc.
However json-schema is very elaborate and there are cases where a custom interface needs to be implemented to get to the right result, but for simple cases the tags would work. Things like additionals properties, or allOf etc they'd get problematic.  We can extract the tags for struct from struct field and put them in a unprotected template. The reason the model templates are protected is because of the complexity of json-schema

It's never been a goal of go-swagger to allow for direct insertion in the database because this grows the problem space significantly and I personally think that for anything but the simplest of applications you shouldn't store things you receive from the API directly into the database. In most cases you probably want to denormalize these data structures.

If you do decide you want to mix up external and internal concerns in your application, then somebody will need to add the right interface methods to https://github.com/go-openapi/strfmt, it's been done for sql, mapstructure and json. You can add the bson interfaces there.

If you really want to use bson.ObjectId directly then you can define a new format to indicate that. I think it's a common enough problem people run into for it to be worth it. This would require changes in the generator code too because it has a map of serializers.

@GlenDC as soon the time makes it possible, I will support that PR with the new type.
A breaking case would be every request that used a special character, got converted and resent to another external resource by bson. I don't think, that anybody did that outside the mongoDB context, but in combination with mongoDB for sure! Data fields from the database would map completely different on models.
_example -> example
example_var -> exampleVar
$var -> dollarVar

@casualjim 2. It also regards reading from the database and responding. I understand that from the relational database point of view, it's fine to normalize data coming from a request, but on object orientated databases it's common to store/read subdocuments as-they-are or as the API spec describes them.

In order to resolve the breaking case @CuBiC3D, you will probably have to work on issue (1), mentioned by @casualjim. Other then that, I'm looking forward to welcome your contribution to https://github.com/go-openapi/strfmt :)


Edit es6-const paragraph

This is my attempt to fix #50

Thanks for getting us closer to improving this one! The more I examine this subsection I think a lot of it needs to be improved. I'm going to remove it for now until the community can think of something better. There's that great article by Eric Elliott, that I will mention and paraphrase as best as possible. The over-arching goal thought would be to explain how using const leads to cleaner code, because it helps in the last of the 3 Rs (readability, reusability, refactorability)
Thanks so much again for fixing all of the instances of var/let/const!


Update index.md

Added Metadata for ms.author and description
When creating a new PR, please do the following and delete this template text:

Reference the issue number if there is one:
Fixes #Issue_Number

The "Fixes #nnn" syntax in the PR description causes
GitHub to automatically close the issue when this PR is merged.

Updating per conversation with @Rick-Anderson


Type detection of enumerations

Automatic type detection on an enum fails, as the symbol_type returned by ADSIGRP_SYM_INFOBYNAMEEX (in adsGetSymbolInfo) is the name of the enum itself (e.g. E_something) instead of the underlying integer type.
Some testing showed that SAdsSymbolEntry.dataType i.e. the adsDataType of symbol matches the underlying type of the enum e.g. ADST_INT16 for INT and ADST_UINT16 for UINT.
I found this explanation why dataType is not used normally https://github.com/stlehmann/pyads/blob/fd78232c1e14c9ba6e3fea8332403b93dbf03d87/pyads/symbol.py#L176-L179 But it could be used in addition to the symbol_type to detect unknown type names.

@dgl-cw thanks for bringing this up. Could you elaborate what the exact problem is that arises from this? E.g. will there be an error when reading/writing a value?


packet: Improve BGP support on workers

This patch series just improves the usage of BGP on worker nodes:

It is possible to disable BGP on worker pools that don't need it (default is false, so no backwards incompatible change is done)
There was an interpolation issue causing BGP sessions from all nodes to be deleted when a node was added/removed from the pool

The commits explain this in more detail.

@invidian PTAL :)

@invidian thanks!


Visibility Not Kept When Replying

Summary

If you reply to a post with non-default visibility, such as direct or followers only, your new post should copy the visibility of the post you are replying to by default. If replying to a direct post, the "to" parameter should be filled as well
Expected Behavior

Replies keep original visibility and if are replies to direct, fill in the "to"
Actual Behavior

Visibility defaults to public instead
Steps to Reproduce

Receive a direct status
Click reply

Environment

ダイレクトとかのときだけ効かない

(noob question) I've tried to reply to a https://mastodon.social/@tom79/101359453831240906 post using<EMAIL_ADDRESS>is this allowed?
The popup page loads forever.
https://misskey.xyz/authorize-follow?acct=https%3A%2F%2Fmastodon.social%2Fusers%2Ftom79%2Fstatuses%2F101359453831240906


replace hope with kobalte and pigment. Add another solid-codemirror

Hope is now unmaintained, so deleting in favor of kobalte and pigment. Also added another solid-codemirror

Thank you @AlexErrant


Optimize for Speed [-O]  can not work

I can execute swift -O xx.swift by ternimal, and get correct result.
but when I follow this method, I configured my Xcode project.
Once I execute my project, I will get an error.
let x = Tensor<Float>([[1, 2], [3, 4]])
print(x)

Whether or not I set this, Optimize for Speed [-O] , TensorFlow can't work.

Which macOS toolchain did you download? I see eGPUOverrides in the error message, which makes me a bit suspicious.

I create a empty macOS project, and run it with default toolchain
[default] Unable to load Info.plist exceptions (eGPUOverrides)

It still prints in my console.

It appears that you used a Swift for TensorFlow development snapshot (which is correct), not the default toolchain.
Let me try to reproduce this and get back to you.

@rxwei
Firstly, No matter which toolchain I choose, this log still exist
[default] Unable to load Info.plist exceptions (eGPUOverrides)

Secondly, I choose this chain Swift for TensorFlow development snapshot 208-09-17, run this code. that will crash.
let x = Tensor<Float>([[1, 2], [3, 4]])
print(x)

I'm unable to reproduce this error. Here's how I set up a "Command Line Tool" project in Xcode in project settings:

Set "Runpath Search Paths" to
/Library/Developer/Toolchains/swift-tensorflow-DEVELOPMENT-2018-09-17-a.xctoolchain/usr/lib/swift/macosx
Set "Library Search Paths" to
/Library/Developer/Toolchains/swift-tensorflow-DEVELOPMENT-2018-09-17-a.xctoolchain/usr/lib/swift/macosx
Set "Swift Compiler - Code Generation" - "Optimization Level" to "Optimize for Speed [-O]"

Then I can build and run a trivial program in main.swift:
import TensorFlow

var x = Tensor<Float>([[1, 2], [3, 4]])

for _ in 1...5 {
  x += x • x
}

print(x)

@rxwei  you are right, I set up a "Command Line Tool" project in Xcode and that works, NO Crash
I set up the "Cocoa app" project before. that crash. :)
thanks


Automatically provide github.token

Some actons provide a "default" token.
So there is no need to define them as a action input.
This can be done in the actions.yml like this:
  repo-token:
    description: 'Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.'
    required: false
    default: ${{ github.token }}

Here the default github.token will be used.
Only if you want to change that, you have to define the repo-token input.
See also:
https://github.com/actions/stale/blob/3f3b0175e8c66fb49b9a6d5a0cd1f8436d4c3ab6/action.yml#L6-L8

This is already the case 🙈


Xarray method injection

DataArray has a new mixin superclass, which injects methods via init_subclass. This blows away all our existing operations defined on Score. Replaced the methods with a mixin that intercepts the init_subclass call. There's still a bug where some methods return DataArray where they used to return a DataAssembly subclass.

@jjpr-mit is this still relevant?

@jjpr-mit is this still relevant?

Yes.  We will not be able to to use new versions of xarray going forward until we fix this.

ok because it looks like tests are failing right now

ok because it looks like tests are failing right now

Which tests?  Travis looks green.

ah seems like it's fine now, it was failing before merging master

@jjpr-mit https://github.com/brain-score/brain-score/pull/287#discussion_r771009664

closing due to inactivity, please re-open when fix the merge conflict + address the comment @jjpr @jjpr-mit


Deep Rock Galactic

Heyo, Any chance support for this could be added please? There's a razer chroma profile for it.
Thanks!

I can confirm this game is working with razer wrapper applied to the exe folder.


Text set to black in light mode

issue #985

@mdazfar2 Please check it and merge !
Thank You !

@zalabhavy can you add here a button comment where after clicking on comment it will send comment successfully for all the blog posts which will come in future.

@mdazfar2 Yes I will do it !
I will create an issue


HSEARCH-295 Automatically determining filter key based on all parameter names and values

The @Key method is optional now; By default a StandardFilterKey will be used which is based on all presented parameter names and values
Avoiding filter (factory) instantiation if not needed

@Sanne Is that what you had in mind for HSEARCH-295?

@Sanne re-worked some of the commits; So best to re-pull on your side.

Pushed one more commit for the optimized filter key implementation and changed one commit message to refer to HSEARCH-818.
Waiting a bit for feedback to your mail, then I'll do the suggested deprecation / doc removal.

@Hibernate-CI retest this please

I actually realized this PR doesn't need to wait for a consensus on the deprecation decision; I've separated that into a separate issue: https://hibernate.atlassian.net/browse/HSEARCH-1785

Closing as already merged by @Sanne.


Race conditions in view component load

There is the following race condition in the way Volto treats router links:

Suppose I have two distinct view page implementations, for example a HomepageView component and the DefaultView. They have completely different look and they are immediately distinguishable.
From page X on the website, click on the Home link. The router immediately loads the HomepageView component, but the getContent fetch hasn't arrived yet, so the HomepageView component displays, for its content slot, the global store.content from the old page X. The browser URL nav field is correct for the component, but not for the actual content being displayed.

From my perspective, clicking on links should not immediately invoke the router. The getContent request should be executed, the content stored in the global store (namespaced by the pathname) and current view component content should be kept reduced to the current pathname. When the content has finished loading, the router should be invoked to transition to the destination path, and the loaded component would get its proper content.
I'm looking for feedback on these issues and ideas, I'm very much willing to tackle them but I'd rather do it with some guidance from the community.

I've implemented the poor-man's method described above with a couple of midlewares in store.js. The first one intercepts the @@router/LOCATION_CHANGE action and dispatches instead a PREFETCH action that saves the initial action. In the SUCCESS handler of the PREFETCH action, it saves the content for the route in the global store and dispatches the initial LOCATION_CHANGE action. Just to make sure the global state content never gets displayed for the wrong route, the content is saved namespaced by its path and the view components retrieve it based on current route pathname. It's not elegant but it works.


stickyScroll does not works when the function method name is not in the same line as the opening bracket

Type: Bug
For example
If the code is formatted like this (PHP) at least
function method a(){
Then the sticky will be shown correctly
but if instead code is formated with
function method()
{
....
Then, the sticky part will be " {   "
Which is not usefull because the function method info gets lost
VS Code version: Code 1.73.1<PHONE_NUMBER>f055b99068d3688932416f2346dd3b, 2022-11-09T04:27:29.066Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz (8 x 2295)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: enabledvideo_encode: unavailable_offvulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
undefined

Memory (System)
15.89GB (3.64GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (46)

Extension
Author (truncated)
Version

vscode-icalendar
af4
1.0.1

atlascode
atl
2.10.12

vscode-intelephense-client
bme
1.8.2

path-intellisense
chr
2.8.4

vscode-eslint
dba
2.2.6

auto-close-tag
for
0.5.14

auto-rename-tag
for
0.1.10

copilot
Git
1.67.7944

gitkraken-authentication
git
1.0.3

gc-excelviewer
Gra
4.2.56

php-awesome-snippets
hak
1.1.3

vscode-phpfmt
kok
1.0.31

git-graph
mhu
1.30.0

dotenv
mik
1.0.1

vue-volar-extention-pack
Mis
1.1.6

vscode-apache
mrm
1.2.0

vscode-azureresourcegroups
ms-
0.5.6

vscode-azurestorage
ms-
0.15.0

data-workspace-vscode
ms-
0.3.0

mssql
ms-
1.16.0

sql-bindings-vscode
ms-
0.3.0

sql-database-projects-vscode
ms-
0.19.0

isort
ms-
2022.8.0

python
ms-
2022.18.2

vscode-pylance
ms-
2022.12.20

azure-account
ms-
0.11.2

powershell
ms-
2022.12.1

php-docblocker
nei
2.7.0

prettier-standard-vscode
num
1.0.2

prettier-vscode-with-tabs
pas
1.1.0

vscode-phpcbf
per
0.0.8

vscode-yaml
red
1.10.1

format-html-in-php
rif
1.7.0

LiveServer
rit
5.7.9

vue-vscode-snippets
sdr
3.1.1

vscode-scss-formatter
sib
2.4.3

prettier-vscode
Sim
2.0.7

autoimport
ste
1.5.4

sass-indented
syl
1.8.23

tabnine-vscode
Tab
3.6.36

volar
Vue
1.0.16

vscode-typescript-vue-plugin
Vue
1.0.16

gitblame
wad
10.0.0

vscode-todo-highlight
way
1.0.5

vue
Wsc
1.0.26

JavaScriptSnippets
xab
1.8.0

(2 theme extensions excluded)

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.74.3. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

yes updating to lastest made no difference.

This is controlled by the extension that is providing the php outline and breadcrumbs. So, I would recommend to reach out to that extension directly

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.
Happy Coding!


Rely on response's Content-Type to determine if it is JSON or CSV

In several places, we pass content_type to functions, e.g.
data = self.castor_get(url=url, params=None, content_type="JSON")

However, just by inspecting the response's Content-Type header, we can figure out if it is JSON or something else.

Fixed in forthcoming update.


Rebranding

What about new name?
Variants:

Storio — Storage IO com.pushtorefresh.storio

CC @nikitin-da

Storio +
2. Rx Storage
3. Rx DAO
3. Deposit =)   ̶h̶t̶t̶p̶:̶/̶/̶d̶f̶i̶l̶e̶s̶.̶r̶u̶/̶r̶u̶/̶ com.pushtorefresh.deposit

Rx Storage — too much Rx
Rx DAO -> NO DAO, NO ORM, NO ACTIVERECORD!!11 :smile:
Deposit? May be DataBank? :)

DataBank - nice

Storio seems to be more hipster name in 2015 than DataBank, such as Node.js, IO.js

On, let it be. xD

Cool, I'll rename the repo

Rename done, now rename package


Linux Mint Font and Icons not detected correctly

Description
Linux mint 18 Sarah, the font is being detected as size 9 (default size) when I have it set to 12. It also detects my icon theme as Mint-X (also the default) when I have it set to ultra-flat-orange.
Only fill in the fields below if relevant. If you're
suggesting a new feature then just a description will suffice.
Neofetch version
latest 2.0.1 ubuntu ppa
Screenshot
Icons: Mint-X
Font: Noto Sans 9
Verbose log

Run neofetch -vv 2> neofetchlog
Upload the contents of neofetchlog to pastebin, gist or equivalent.

http://pastebin.com/RqzMLvzb

Thanks for opening this bug report.
Does Screenfetch display the correct info?

No, screnfetch detects the font and icon theme correctly.

I just pushed a commit to master that should fix the issue.
Can you try the latest master?

My current version is from the ubuntu ppa. Give me a minute to get the latest one working.

Update, yeah the fixed worked. Thanks for the quick repair. You can safely close this bug report it looks like.

Thanks for testing! :)


Minor edits.

Misc comments:

links within the same doc set should use relative paths (not complete URLs) -- I've updated links accordingly
the distinction between relationships and properties will be going away soon (when we start auto-generating docs), so I've removed mention of 'relationships' in this article.
Note formats in OPS use a special markdown syntax -- I've updated the note in this article to use that syntax.

Also, maybe consider adding code samples for the Suspend calculation temporarily section and the Convert between range and table section?

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/excel/performance.md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


fix: optimize even if we have to make the HLG

@martindurant this seems like a bug to me, so I am removing it.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (73c80f8) 93.06% compared to head (7aafd96) 93.06%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #465   +/-   ##
=======================================
  Coverage   93.06%   93.06%
=======================================
  Files          23       23
  Lines        3290     3290
=======================================
  Hits         3062     3062
  Misses        228      228

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


No more jQuery in {{ghost_foot}}

http://dev.ghost.org/no-more-jquery/
I don't know if this theme suffers from this change (version 0.7.0), I just notify you about it.
I'll wait for you to check before upgrading my blog version. =)

I've updated the theme, thank you for the notice!

Are there any dependencies to the old jQuery? Would it be possible to upgrade to jQuery 2?


fix: store codebaseId in depencencyCheck

:tada: This PR is included in version 3.0.8 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Fail to initialise the map view in home page

The JS console printed out the following error
[Error] Failed to load resource: the server responded with a status of 401 (Unauthorized) (5, line 0) https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/4/7/5?access_token=${{secrets.APP-MAPBOX-TOKEN}}

Fixed via 8577402


vendor: Update ttrpc to latest

Signed-off-by: Kevin Parsons<EMAIL_ADDRESS>

/test all

ttrpc is now at v1.1.0 (more recent than this draft PR's update); I assume we can close @kevpar


Allow Users add comments in Github.Party

Like 大众点评 for Github repos:)

I don't understand what this service wants to archive :D

Comments, every opensource project need comments :)
G.P like yelp, for repos.Check FAQ for more info.

Hmm.. thanks for your PR, but I don't think it's a good time to add this badge.


After Video Processing Save Video with Audio as Well

After Video Processing Save Video with Audio as Well
Question

Hello, first for all thanks for the awesome library. I am using vidgear for downloading video streams from twitter and youtube. The video is downloaded perfectly but on the other hand, the audio is not being downloaded, i am using CamGear which supports youtube platform. Can u please help me out with this issue? I will happy to share my code. Can u help me with this? I want to download audio of the video as well after processing.
Acknowledgment

[ x] I have searched the issues for my issue and found nothing related or helpful.
[ x] I have read the FAQs.
[ x] I have read the Documentation.

Context

I am trying to perform object detection on incoming frame but i also want the audio to be stored along the video

Doing object detection for research purposes by using vidgear CamGear api
Your Environment

VidGear version: 0.2.5
Branch: Master
Python version: 3.8.10
PiP version: 21.3
Operating System and version: Ubuntu 18.00

Code

import cv2
from vidgear.gears import VideoGear
from vidgear.gears import WriteGear
from vidgear.gears import CamGear

# Open input video stream
options = {"STREAM_RESOLUTION": "480p"}

try:
    stream = CamGear(source='https://youtu.be/M8kcjRrroOE',stream_mode=True,**options).start()
except:
    stream = CamGear(source='https://youtu.be/M8kcjRrroOE',stream_mode=True).start()

output_params = {
    "-input_framerate": stream.framerate,
    "-thread_queue_size": "512",
    "-ac": "2",
    "-ar": "48000",
    "-f": "alsa",
    "-i": "hw:1" # i don't know what to insert here audio
}

writer = WriteGear(output_filename='/home/Downloads/vidgear_try/downloads/temp.mp4', logging=True,**output_params, )

# infinite loop
while True:

    frame = stream.read()
    # read frames

    # check if frame is None
    if frame is None:
        # if True break the infinite loop
        break

    # write frame to writer
    writer.write(frame)

cv2.destroyAllWindows()

stream.stop()
# safely close video stream
writer.close()
cv2.destroyAllWindows()

stream.stop()
# safely close video stream
writer.close()

@DanielOX audio is not supported in CamGear yet. Follow #148 that will resolve this issue.


[Cub] Height of form elements vary

Describe the bug
The height of the elements in the form is not fixed. When the height of the viewport is decreased (due to opening of a keyboard on mobile phones) their height decrease.
To Reproduce
Steps to reproduce the behavior :

Open Cub's Contraption on a mobile device
Tap on "Enter episode number"
Your keyboard will open and you can see that height of all form elements has changed.

Expected behavior
The height of the elements should be the same.
Screenshots
Before:

After:

Hey, can I try and fix this?

This issue has re-appeared in Cub's Contraption latest release.

This issue requires several fixes. I have stated some of the problems faced while fixing the issue.

Normal conditions:

Applied height: max-content as @Sashankr mentioned in PR #25:

As you can see the content gets cut.
Applied overflow: auto:

You can scroll down but not up.

On applying height: max-content, these issues also occur.

The height of Remove Background Image button needs thinking:

The Download button needs to be taller:

I will try to fix it before Sunday! I'm a bit busy with work!
Have a great day!

As you wish

@mmaismma I should have time this week to take a stab at this.

@mmaismma I should have time this week to take a stab at this.

@mmaismma I should have time this week to take a stab at this.

Why not? No stress. Good luck!

@mmaismma I should have time this week to take a stab at this.

Why not? No stress. Good luck!


bidirectional QRNN

Hi @JonathanRaiman
Thank you for sharing this. Looks awesome.
Have you tried to stack multiple bidirectionnel QRNNs ?
If so, how did you manage to combine them and handle the fact that all samples do not have the same length ?
Best regards

I haven't trained many models with qrnns -- I tried stacking for POS tagging.
I usually do masking on the outputs, so with bidirectional data masking is bit trickier, and I didn't look into handling this explicitly


Symbol not found: ____chkstk_darwin

d7495476e17b33038d000e0f506bb6f3cc924c3c
. OSX 系统10.12.6 (16G1510)
. 全部日志如下：
log4j:WARN No appenders could be found for logger (org.scijava.nativelib.NativeLibraryUtil).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/8d/c3s4z1_97x536pd0xhrd5s3m0000gn/T/nativelib-loader_7745203063363062974/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/8d/c3s4z1_97x536pd0xhrd5s3m0000gn/T/nativelib-loader_7745203063363062974/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

. 我猜测这个____chkstk_darwin函数是高版本添加的
. 2020年03月14日10:23:15
. 我重新编译了libunicorn_java.dylib但是作者应该是改动了吧，缺少内容，看样子不行

ios模拟现在还有很多问题没解决

libunicorn_java.dylib已重新编译，更新最新代码试下

objc[78327]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x10439b4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1043f24e0). One of the two will be used. Which one is undefined.
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

OSX  10.13.6貌似也有问题..

objc[78327]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x10439b4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1043f24e0). One of the two will be used. Which one is undefined.
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

OSX 10.13.6貌似也有问题..

最新的代码已经重新编译，请试下

objc[78327]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x10439b4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1043f24e0). One of the two will be used. Which one is undefined.
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

OSX 10.13.6貌似也有问题..

最新的代码已经重新编译，请试下

10.13.6测试结果一样，我换到10.14就正常了。

晚点再发布一个重新测试下，这次用ida打开看了没有导入____chkstk_darwin符号

objc[78327]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x10439b4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1043f24e0). One of the two will be used. Which one is undefined.
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

OSX 10.13.6貌似也有问题..

最新的代码已经重新编译，请试下

10.13.6测试结果一样，我换到10.14就正常了。

已发布，再试下

objc[78327]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/bin/java (0x10439b4c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x1043f24e0). One of the two will be used. Which one is undefined.
dyld: lazy symbol binding failed: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: ____chkstk_darwin
  Referenced from: /private/var/folders/j2/21bx3mm57jxd9l163l8r2c340000gn/T/nativelib-loader_8361975855201403714/libunicorn_java.dylib
  Expected in: /usr/lib/libSystem.B.dylib

OSX 10.13.6貌似也有问题..

最新的代码已经重新编译，请试下

10.13.6测试结果一样，我换到10.14就正常了。

已发布，再试下

可以了，正常跑起来了。