text:
Unexpected handling of coefficient that could be zero in version 1.4.x

Describe the bug
Practically, when an expression in the objective has a coefficient (be it constant or parameter) that could potentially be zero, the solution for the scenario where the coefficient = 0 should be the same as if the term is removed from the objective. This seems to be the case for version 1.2 and 1.3, but not 1.4.
To Reproduce
A quick example in a portfolio optimization problem with ridge regularization:
import numpy as np
import cvxpy as cp

r =  np.array([-0.48,  0.11,  0.09, -0.39,  0.03])
Sigma = np.array([
       [2.4e-04, 1.3e-04, 2.0e-04, 1.6e-04, 2.0e-04],
       [1.3e-04, 2.8e-04, 2.1e-04, 1.7e-04, 1.5e-04],
       [2.0e-04, 2.1e-04, 5.8e-04, 3.3e-04, 2.3e-04],
       [1.6e-04, 1.7e-04, 3.3e-04, 6.9e-04, 2.1e-04],
       [2.0e-04, 1.5e-04, 2.3e-04, 2.1e-04, 3.6e-04]])

w = cp.Variable(5)
risk_aversion = cp.Parameter(value=1., nonneg=True)
ridge_coef = cp.Parameter(value=0., nonneg=True)  # <-- this causes the issue

obj_func = r @ w - risk_aversion * cp.quad_form(w, Sigma) - ridge_coef * cp.sum_squares(w)
objective = cp.Maximize(obj_func)
constaints = [cp.sum(w) == 1]
prob = cp.Problem(objective, constaints)
prob.solve(eps_abs=1e-8, eps_rel=1e-8)
print(w.value)

(Un)Expected behavior
In versions before 1.4, the snippet above will output:
[-1959.30787844   871.81166733   461.55434711  -409.40111681, 1036.34298081]
which is consistent with the result if we directly remove the ridge_coef * cp.sum_squares(w) term from the objective.
However, starting from 1.4, the output is None. If, instead of a Parameter, we directly set ridge_coef=0, the error becomes explicit and points to:
File ~/miniconda3/envs/dev/lib/python3.12/site-packages/cvxpy/utilities/coeff_extractor.py:189, in CoeffExtractor.extract_quadratic_coeffs(self, affine_expr, quad_forms)
    183 if 'P' in coeffs[orig_id]:
    184     # Concatenation becomes addition when constructing
    185     # COO matrix because repeated indices are summed.
    186     # Conceptually equivalent to
    187     # coeffs[orig_id]['P'] += P_tup
    188     acc_P = coeffs[orig_id]['P']
--> 189     acc_data = np.concatenate([acc_P.data, data], axis=0)
    190     acc_row = np.concatenate([acc_P.row, P.row], axis=0)
    191     acc_col = np.concatenate([acc_P.col, P.col], axis=0)

ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 1 and the array at index 1 has size 0

Version

OS: Ubuntu 23.10
CVXPY Version: >=1.4.0

Additional context
I also noticed discernable differences (between versions before and after 1.4) in the output values for cases where the coefficient is non-zero. Not sure if the issue is along the same line, but I do not have a simple snippet to reproduce it yet. May follow up later.

a more complete error stack:
     18 constaints = [cp.sum(w) == 1]
     19 prob = cp.Problem(objective, constaints)
---> 20 prob.solve(eps_abs=1e-8, eps_rel=1e-8)
     21 print(w.value)

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/problems/problem.py:503, in Problem.solve(self, *args, **kwargs)
    501 else:
    502     solve_func = Problem._solve
--> 503 return solve_func(self, *args, **kwargs)

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/problems/problem.py:1067, in Problem._solve(self, solver, warm_start, verbose, gp, qcp, requires_grad, enforce_dpp, ignore_dpp, canon_backend, **kwargs)
   1064         self.unpack(chain.retrieve(soln))
   1065         return self.value
-> 1067 data, solving_chain, inverse_data = self.get_problem_data(
   1068     solver, gp, enforce_dpp, ignore_dpp, verbose, canon_backend, kwargs
   1069 )
   1071 if verbose:
   1072     print(_NUM_SOLVER_STR)

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/problems/problem.py:691, in Problem.get_problem_data(self, solver, gp, enforce_dpp, ignore_dpp, verbose, canon_backend, solver_opts)
    688     s.LOGGER.info(
    689              'Compiling problem (target solver=%s).', solver_name)
    690     s.LOGGER.info('Reduction chain: %s', reduction_chain_str)
--> 691 data, inverse_data = solving_chain.apply(self, verbose)
    692 safe_to_cache = (
    693     isinstance(data, dict)
    694     and s.PARAM_PROB in data
    695     and not any(isinstance(reduction, EvalParams)
    696                 for reduction in solving_chain.reductions)
    697 )
    698 self._compilation_time = time.time() - start

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/reductions/chain.py:76, in Chain.apply(self, problem, verbose)
     74     if verbose:
     75         s.LOGGER.info('Applying reduction %s', type(r).__name__)
---> 76     problem, inv = r.apply(problem)
     77     inverse_data.append(inv)
     78 return problem, inverse_data

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/reductions/qp2quad_form/qp_matrix_stuffing.py:247, in QpMatrixStuffing.apply(self, problem)
    245 # Form the constraints
    246 extractor = CoeffExtractor(inverse_data, self.canon_backend)
--> 247 params_to_P, params_to_q, flattened_variable = self.stuffed_objective(
    248     problem, extractor)
    249 # Lower equality and inequality to Zero and NonNeg.
    250 cons = []

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/reductions/qp2quad_form/qp_matrix_stuffing.py:232, in QpMatrixStuffing.stuffed_objective(self, problem, extractor)
    229 def stuffed_objective(self, problem, extractor):
    230     # extract to 0.5 * x.T * P * x + q.T * x + r
    231     expr = problem.objective.expr.copy()
--> 232     params_to_P, params_to_q = extractor.quad_form(expr)
    233     # Handle 0.5 factor.
    234     params_to_P = 2*params_to_P

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/utilities/coeff_extractor.py:235, in CoeffExtractor.quad_form(self, expr)
    231 quad_forms = replace_quad_forms(root, {})
    233 # Calculate affine parts and combine them with quadratic forms to get
    234 # the coefficients.
--> 235 coeffs, constant = self.extract_quadratic_coeffs(root.args[0],
    236                                                  quad_forms)
    237 # Restore expression.
    238 restore_quad_forms(root.args[0], quad_forms)

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/utilities/coeff_extractor.py:189, in CoeffExtractor.extract_quadratic_coeffs(self, affine_expr, quad_forms)
    183 if 'P' in coeffs[orig_id]:
    184     # Concatenation becomes addition when constructing
    185     # COO matrix because repeated indices are summed.
    186     # Conceptually equivalent to
    187     # coeffs[orig_id]['P'] += P_tup
    188     acc_P = coeffs[orig_id]['P']
--> 189     acc_data = np.concatenate([acc_P.data, data], axis=0)
    190     acc_row = np.concatenate([acc_P.row, P.row], axis=0)
    191     acc_col = np.concatenate([acc_P.col, P.col], axis=0)

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

ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 1 and the array at index 1 has size 0

a more complete error stack:
     18 constaints = [cp.sum(w) == 1]
     19 prob = cp.Problem(objective, constaints)
---> 20 prob.solve(eps_abs=1e-8, eps_rel=1e-8)
     21 print(w.value)

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/problems/problem.py:503, in Problem.solve(self, *args, **kwargs)
    501 else:
    502     solve_func = Problem._solve
--> 503 return solve_func(self, *args, **kwargs)

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/problems/problem.py:1067, in Problem._solve(self, solver, warm_start, verbose, gp, qcp, requires_grad, enforce_dpp, ignore_dpp, canon_backend, **kwargs)
   1064         self.unpack(chain.retrieve(soln))
   1065         return self.value
-> 1067 data, solving_chain, inverse_data = self.get_problem_data(
   1068     solver, gp, enforce_dpp, ignore_dpp, verbose, canon_backend, kwargs
   1069 )
   1071 if verbose:
   1072     print(_NUM_SOLVER_STR)

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/problems/problem.py:691, in Problem.get_problem_data(self, solver, gp, enforce_dpp, ignore_dpp, verbose, canon_backend, solver_opts)
    688     s.LOGGER.info(
    689              'Compiling problem (target solver=%s).', solver_name)
    690     s.LOGGER.info('Reduction chain: %s', reduction_chain_str)
--> 691 data, inverse_data = solving_chain.apply(self, verbose)
    692 safe_to_cache = (
    693     isinstance(data, dict)
    694     and s.PARAM_PROB in data
    695     and not any(isinstance(reduction, EvalParams)
    696                 for reduction in solving_chain.reductions)
    697 )
    698 self._compilation_time = time.time() - start

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/reductions/chain.py:76, in Chain.apply(self, problem, verbose)
     74     if verbose:
     75         s.LOGGER.info('Applying reduction %s', type(r).__name__)
---> 76     problem, inv = r.apply(problem)
     77     inverse_data.append(inv)
     78 return problem, inverse_data

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/reductions/qp2quad_form/qp_matrix_stuffing.py:247, in QpMatrixStuffing.apply(self, problem)
    245 # Form the constraints
    246 extractor = CoeffExtractor(inverse_data, self.canon_backend)
--> 247 params_to_P, params_to_q, flattened_variable = self.stuffed_objective(
    248     problem, extractor)
    249 # Lower equality and inequality to Zero and NonNeg.
    250 cons = []

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/reductions/qp2quad_form/qp_matrix_stuffing.py:232, in QpMatrixStuffing.stuffed_objective(self, problem, extractor)
    229 def stuffed_objective(self, problem, extractor):
    230     # extract to 0.5 * x.T * P * x + q.T * x + r
    231     expr = problem.objective.expr.copy()
--> 232     params_to_P, params_to_q = extractor.quad_form(expr)
    233     # Handle 0.5 factor.
    234     params_to_P = 2*params_to_P

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/utilities/coeff_extractor.py:235, in CoeffExtractor.quad_form(self, expr)
    231 quad_forms = replace_quad_forms(root, {})
    233 # Calculate affine parts and combine them with quadratic forms to get
    234 # the coefficients.
--> 235 coeffs, constant = self.extract_quadratic_coeffs(root.args[0],
    236                                                  quad_forms)
    237 # Restore expression.
    238 restore_quad_forms(root.args[0], quad_forms)

File ~/miniconda3/envs/dev/lib/python3.10/site-packages/cvxpy/utilities/coeff_extractor.py:189, in CoeffExtractor.extract_quadratic_coeffs(self, affine_expr, quad_forms)
    183 if 'P' in coeffs[orig_id]:
    184     # Concatenation becomes addition when constructing
    185     # COO matrix because repeated indices are summed.
    186     # Conceptually equivalent to
    187     # coeffs[orig_id]['P'] += P_tup
    188     acc_P = coeffs[orig_id]['P']
--> 189     acc_data = np.concatenate([acc_P.data, data], axis=0)
    190     acc_row = np.concatenate([acc_P.row, P.row], axis=0)
    191     acc_col = np.concatenate([acc_P.col, P.col], axis=0)

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

ValueError: all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 1 and the array at index 1 has size 0

It looks like a BUG in "cvxpy/utilities/coeff_extractor.py" (Commit https://github.com/cvxpy/cvxpy/commit/ee392e6637d977ed9f08d77dbab5742d8d6c6496).
In the lines 173-179, zeros will be eliminated as described in the comment.
                else:
                    # Eliminate zeros from data by tracking
                    # which indices of the global parameter vector are used.
                    nonzero_idxs = c_part[0] != 0
                    data = P.data[:, None] * c_part[0:, nonzero_idxs]
                    param_idxs = np.arange(c_part.shape[1])[nonzero_idxs]
                P_tup = COOData(data, P.row, P.col, P.shape, param_idxs)

However, what happens if data is empty after elimination?
I could get the result @codeterm expected after adding two lines as follows:
                else:
                    # Eliminate zeros from data by tracking
                    # which indices of the global parameter vector are used.
                    nonzero_idxs = c_part[0] != 0
                    data = P.data[:, None] * c_part[0:, nonzero_idxs]
                    param_idxs = np.arange(c_part.shape[1])[nonzero_idxs]
                    param_idxs = np.arange(c_part.shape[1])[nonzero_idxs]
                if data.size == 0:
                    continue
                P_tup = COOData(data, P.row, P.col, P.shape, param_idxs)

@chofchof your fix works for the non-parameterized case and makes good sense. I'm not sure what is going on in the parameterized case though.

@chofchof your fix works for the non-parameterized case and makes good sense. I'm not sure what is going on in the parameterized case though.

You're right. My fix does not work in the parameterized case.

I tried to test @codeterm's example above by changing the value of (nonzero) ridge_coef.
In the first test, ridge_coef = 0.01 is applied. Here you may see slight differences between optimal values.

ridge_coef = cp.Parameter(value=0.01, nonneg=True) gives prob.value and w.value as

7.769344007383085 [-17.39885522  12.09783917  11.0972133  -12.8954201    8.09922285]

ridge_coef = 0.01 gives prob.value and w.value as

7.772702321035973 [-17.28389047  11.8893989   10.82810669 -12.45822335   8.02460823]

In the second test, ridge_coef = 0.001 is applied. You can see differences between optimal values.
Do you assure that the optimal value given by the parametrized method is true?

ridge_coef = cp.Parameter(value=0.001, nonneg=True) gives prob.value and w.value as

66.06361129116742 [-175.78908486  119.17787707  109.17271607 -130.75360007   79.19209178]

ridge_coef = 0.001 gives prob.value and w.value as

68.79479601533353 [-163.98248933  101.4983404    87.40704913  -96.89783518   72.97493498]

In the final test of ridge_coef = 0.0001, the parametrized method failed to give optimal values.

ridge_coef = cp.Parameter(value=0.0001, nonneg=True) gives prob.value and w.value as

-618.59122699193 [-1759.69138117  1189.97825605  1089.92774367 -1309.33539968  790.12078113]

ridge_coef = 0.0001 gives prob.value and w.value as

333.0980223364909 [-946.14228401  475.87043917  316.83241896 -301.7307055   456.17013139]

@SteveDiamond There may be some serioud BUG in the parametrized method.
I suspect the reduction chain: FlipObjective -> CvxAttr2Constr -> Qp2SymbolicQp -> QpMatrixStuffing -> OSQP.

@codeterm @chofchof Thank you for providing additional details for this issue!
We are working on a fix here: https://github.com/cvxpy/cvxpy/pull/2406

@codeterm The PR has been merged. Feel free to test your original problem on the latest master version while we are working on the patch release.

@codeterm The PR has been merged. Feel free to test your original problem on the latest master version while we are working on the patch release.

I can confirm that the issue in my system (including unit tests) is gone. Thanks for the fix!

The patch is out now: https://pypi.org/project/cvxpy/1.4.3/
Thanks again for reporting and the elaborate exploration of the issue.

authors: SteveDiamond chofchof codeterm phschiele

repo: cvxpy/cvxpy


text:
ortools 9.10.4067 support missing

(CVXPY) Jun 13 11:17:04 AM: Encountered unexpected exception importing solver GLOP:
RuntimeError('Unrecognized new version of ortools (9.10.4067). Expected < 9.10.0. Please open a feature request on cvxpy to enable support for this version.')
(CVXPY) Jun 13 11:17:04 AM: Encountered unexpected exception importing solver PDLP:
RuntimeError('Unrecognized new version of ortools (9.10.4067). Expected < 9.10.0. Please open a feature request on cvxpy to enable support for this version.')

Even worse: doing
pip install --upgrade ortools
makes cvxpy unusable (with the error message above), even if ortools is not going to be used!

@mlubin any thoughts?
Probably worth only erroring if people try to use ortools too

I can't test it right now, but I would guess that 9.10 will just work if you bump the bounds.
No objections to moving the version check to a less disruptive spot.

@mlubin I agree with @PTNobel that this should only be raised if necessary.

I agree as well.
On Sat, Nov 23, 2024, 16:52 Carlos Martin @.***> wrote:

@mlubin https://github.com/mlubin I agree with @PTNobel
https://github.com/PTNobel that this should only be raised if necessary.
—
Reply to this email directly, view it on GitHub
https://github.com/cvxpy/cvxpy/issues/2470#issuecomment-2495665065, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AANHIM66E3HIXIGFANSDVED2CD2KPAVCNFSM6AAAAABJICVKLSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJVGY3DKMBWGU
.
You are receiving this because you were mentioned.Message ID:
@.***>

I'm going to reopen the issue to track moving the error so it's hopefully less disruptive

source: gharchive/issue

authors: PTNobel carlosgmartin keithbriggs mlubin

license_type: permissive

license_source: github-api


text:
Issues with new Username authentication flow

Update
I'm not actually sure whats going on here, it seems to authenticate and then the request is rejected with a 401.
File "espnTool.py", line 188, in <module>
   displayMenu()
 File "espnTool.py", line 171, in displayMenu
   getScores()
 File "espnTool.py", line 40, in getScores
   league = League(leagueID, year, username, password)
 File "/usr/local/lib/python3.7/site-packages/ff_espn_api/league.py", line 55, in __init__
   self._fetch_league()
 File "/usr/local/lib/python3.7/site-packages/ff_espn_api/league.py", line 65, in _fetch_league
   checkRequestStatus(self.status)
 File "/usr/local/lib/python3.7/site-packages/ff_espn_api/league.py", line 24, in checkRequestStatus
   raise Exception("Access Denied")
Exception: Access Denied

Oh, my apologies, I've figured out my issue. I was using my username, but in reality, the API expects the email associated with the account (which can be different than username). The documentation should probably be updated to reflect that.

Interesting I thought I used my username to test out the Authentication. I will look into and make sure the documentation is updated!
Thanks!

Oh interesting, I wonder if its contingent on how you created your account or something like that...in my case my username was always denied and email always accepted but I'm not sure if thats universally the case.

Actually, now I'm not too sure anymore. I'm failing to authenticate at all, unless going with a public league. Must've had a false positive before with the email. So I'm not sure what's broken but unfortunately the only output I get is Access Denied so not immediately sure what the issue is

Hmm could you show me an example on how you are calling the League constructor with your sensitive info faked

Sure, I created a mini script just to test this...
`from ff_espn_api import League
from prettytable import PrettyTable
from collections import Counter
from os import system, name
league = League(SAMPLE_ID, 2019)
print(league)
league = League(SAMPLE_ID, 2019, 'SAMPLE_USER', 'SAMPLE_PASS')
print(league)
`
First one will succeed, second throws the error. Worth noting that with the latest changes I still can successfully authenticate with the old swid method.

From your error message in the beginning it looks like you got past the username and password authentication and then it failed on _fetch_league. Was there any other messages printed to the console? If it fails the username and password it should print to the console.

No, no other message. Just what I copied over here.
I suppose if thats the case its failing on https://github.com/cwendt94/ff-espn-api/blob/660ef8b3a98fad03e1bebcaf1375a57a52b4af23/ff_espn_api/league.py#L66 ... so not auth, but API key? It seems like you're right and I've already authenticated and it isn't allowing me to make the request. This works fine for you, right?

Yeah it does seem weird. When you initialize the League object are you writing out the input variables like League(league_id=123, year=2019, username=“username”, password=“pass”)

My little script which he was using did not input the variables that way.
https://github.com/drippyer/ESPN_FF_Tool/blob/d80ce0ed744d1b24586043c19b75c1a52c28562b/espnTool.py#L40

interesting! I've got it working but it took a little messing around. I think the issue was simply that I had somehow not gotten the updated version of the library installed correctly. Basically I needed to python3 -m pip uninstall ff_espn_api then python3 -m pip install ff_espn_api but it appears to be working now...Sorry for the confusion! I'll close the issue out.

No worries! When the new authentication was put in I didn’t realize it switched the order of variables which could mess up programs that didn’t assign the variables in the constructor

Yeah, had this issue with https://github.com/dtcarls/fantasy_football_chat_bot/issues/64 a quick way to make it backwards compatible would be make the contructor
def __init__(self, league_id: int, year: int, espn_s2=None, swid=None, username=None, password=None)
instead of
def __init__(self, league_id: int, year: int,  username=None, password=None, espn_s2=None, swid=None)
I'll submit a PR

I'll be setting specific variable assignments going forward just in case, thanks for the info!

authors: cwendt94 drippyer dtcarls voicelessreason

license: MIT


text:
🛑 Menzer.net is down

In 035d334, Menzer.net (http://menzer.net) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Menzer.net is back up in e413b5f.


text:
Pinning babel b/c a recent change broke our code

Latest babel didn't allow us to use foo={foo} in jsx

@job13er it looks like the build failed. I noticed babel-loader version 5.0.0 actually explicitly wants babel-core version 5.0.0.

No longer needed: babel was fixed in 5.4.7

source: gharchive/pull-request

repo: cyaninc/beaker

license: mit

license_source: bigquery


text:
Module supports using the Deferred Type to execute lookups on the remote node

As a Puppet operator, I want to be able to leverage Puppet's new Differed Type, so that I can use the remote node's identity to retrieve secrets from Conjur, without having those secrets transferred to the master.
GIVEN a Puppet master and an un-configured node which is enrolled in Conjur and have permission to access a credential
WHEN the module is run against the node
THEN credential are placed on the node
AND that credential does not flow through the master
Developer Notes
Overview and example of how this can be done in the upcoming Puppet 6 release: https://gist.github.com/turbodog/06d3fecef403bfefd9c8174ede4d9174

Adding note from #20
To follow Puppet 6 best practices for secrets retrieval, we will update the Puppet integration to use deferred actions by default.

Note: this would be a breaking change for current Puppet integration users that conjurize their agents (a method of bootstrapping host identity that is not documented for Conjur OSS / DAP). These users would have to upgrade to another identity bootstrapping mechanism to use the new version with this change.

Additional notes from the original definition of #20
With the arrival of Puppet 6's deferred data types, we can move credential retrieval off the Puppet master and onto the node being configured. Deferred data types reduce the security challenges by eliminating the Puppet Master as a conduit for credential delivery.
This effort will address the following areas:

Credentials delivered through the deferred data type, falling back to the current approach for Puppet version < 6.
Puppet module can be run on the following operating systems:

Windows
Red Hat Linux
CentOS
Ubuntu
Debian

README is updated to include examples for the deferred data type

References

Docs on deferred actions
Puppet 6 best practices for secrets retrieval

Related issues

[ ] Module supports using the Deferred Type to execute lookups on the remote node - parent of #13
[ ] Module supports a variety of common Operating Systems - parent of #23

There is an initial implementation of this in #179. This issue will remain open until a more complete implementation is done.

Per the new code that is now on the main brach, method signature has to change to accommodate the Deferred use.
New signatures:

Using agent-side identity:

$dbpass = Sensitive(Deferred(conjur::secret, ['production/postgres/password']))

Using server-provided configuration:

$sslcert = @("EOT")
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
|-EOT

$dbpass = Sensitive(Deferred(conjur::secret, ['production/postgres/password',
  "https://my.conjur.org",
  "myaccount",
  "host/myhost",
  Sensitive("2z9mndg1950gcx1mcrs6w18bwnp028dqkmc34vj8gh2p500ny1qk8n"),
  $sslcert
]))

The longer signature may also change again depending on if #184 gets implemented.

Released with v3.0.0rc3. Closing.

authors: izgeri jvanderhoof sgnn7

repo: cyberark/conjur-puppet


text:
Add code coverage to conjur-puppet

Add code coverage to this project.
Acceptance Criteria:

Code coverage should be measured across all tests defined in this repository every time a build is run in any branch.
Coverage report should include:

Line Coverage  (including highlighting which lines are covered and which are not - not just giving a percentage)
Conditional Coverage
Optionally, other kinds of coverage such as Package, Class, File, or Method coverage

Coverage report should be created in or converted to Cobertura format as part of build to allow for ingestion into coverage aggregation tools
Coverage report should be archived in the Jenkins build using the cobertura command as shown at https://github.com/cyberark/conjur-api-ruby/blob/072d21e01e46382ee4d577e180c1269f8ff9f36e/Jenkinsfile#L27
Coverage report should be uploaded to Code Climate with each build

With PR #196 merged, this looks complete and reporting the data:

Closing


text:
ONYX-15241: Add fixing line in conjur provider to support authn-jwt

Allow authn-jwt flow in conjur provider
Connected Issue/Story
Resolves #[relevant GitHub issue(s), e.g. 76]
ONYX-15241
Definition of Done
At least 1 todo must be completed in the sections below for the PR to be
merged.
Changelog

[ ] The CHANGELOG has been updated, or
[x] This PR does not include user-facing changes and doesn't require a
CHANGELOG update

Test coverage

[ ] This PR includes new unit and integration tests to go with the code
changes, or
[x] The changes in this PR do not require tests

Documentation

[ ] Docs (e.g. READMEs) were updated in this PR
[ ] A follow-up issue to update official docs has been filed here: insert issue ID
[x] This PR does not require updating any documentation

Behavior

[ ] This PR changes product behavior and has been reviewed by a PO, or
[ ] These changes are part of a larger initiative that will be reviewed later, or
[x] No behavior was changed with this PR

Security

[ ] Security architect has reviewed the changes in this PR,
[ ] These changes are part of a larger initiative with a separate security review, or
[ ] There are no security aspects to these changes

lgtm

authors: benoaviram tzheleznyak

repo: cyberark/secretless-broker


text:
Update API version in deployment.yaml

Summary
The deploylment.yaml uses apiVersion: extensions/v1beta1 for the deployment declaration. This is deprecated on newer clusters and should be apps/v1. Also, you need to add in a selector to the deployment once you do change to apps/v1.
Steps to Reproduce
Steps to reproduce the behavior:

kubectl apply -f deployment.yaml
See error that

Expected Results
Deployment should successfully load.
Actual Results (including error logs, if applicable)
kubectl complains that there is no Type deployment in extensions/v1beta1

Resolved by https://github.com/cyberark/sidecar-injector/pull/27

authors: CaptainFluffyToes doodlesbykumbi

repo: cyberark/sidecar-injector


text:
Declare removal and filter logic outside of TodoItem

Previously, we had to pass removeComplete$ and filter$ into each
TodoItem and let them filter their own view/decide to remove if
complete.
Now thanks to selector functions we can declaratively state this logic
inside of TodoList, which means TodoItem can be much simpler!

@Hypnosphi would love your feedback on this. Which style is more understandable? Passing in as sources or using selector functions in the parent?

Look nice! I will adapt the task runner example to this approach. Btw, I've just noticed that we pass task name as a plain value. Can we change it to stream?

authors: Hypnosphi Widdershin

repo: cyclejs/collection


text:
Facility archetypes now have a string-based color

Fixes #24
However, we should probably consider a better palette for VisFunctions.stringToColor().
This is a good task for @opotowsky and her viz class :)

noting that @opotowsky is free to update based on her newly-gained expertise, I will merge

authors: gidden gonuke


text:
Dependency problem with estree-walker

I'm getting Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in .../node_modules/vite-plugin-cjs-interop/node_modules/estree-walker/package.json
I'm fairly certain this is https://github.com/Rich-Harris/estree-walker/issues/26, but with no solution forthcoming on their side I'm wondering how you got this to work?

I'm wondering how you got this to work?

Seems like I didn't. I probably never tested the CJS build (since Vite SSR defaults to ESM now) :)
Thanks for the heads-up. I'll have a look.

On a second thought, why do you need this plugin if you're building CJS?

Fixed. Looks like estree-walker is an ESM only package. So I resorted to doing this:
Replaced:
import { walk } from "estree-walker";
...
walk(...);

with:
const walker = import("estree-walker");
...
const { walk } = await walker;
walk(...);

Using dynamic imports is the only way to use ESM packages from CJS.
(I still think this particular package doesn't need a CJS build though. I did this out of curiosity.)

Using vite-plugin-ssr on build imports of Mui components deep linked eg import Box from '@mui/material/Box' come out on the default property.

I can confirm with this update I can now do import Box from '@mui/material/Box' thank you 🙏

Using vite-plugin-ssr on build imports of Mui components deep linked eg import Box from '@mui/material/Box' come out on the default property.

That makes sense. Let's keep the CJS build then :)


text:
grid layout scroll triggers directly to load more - bug

I have discovered the grid layout mechanism on the line mentioned here.
There is a missing in the Grid layout configuration and it leads to on load more function triggers when the scroll touch is triggered.
   mVisibleItemCount = layoutManager.getChildCount();
   mTotalItemCount = layoutManager.getItemCount();

if (!isLoadingMore && (mTotalItemCount - mVisibleItemCount) <= mFirstVisibleItem) {
          //todo: there are some bugs needs to be adjusted for admob adapter
          onLoadMoreListener.loadMore(mRecyclerView.getAdapter().getItemCount(), lastVisibleItemPosition);
             isLoadingMore = true;
             previousTotal = mTotalItemCount;
}

We need to fix this as it triggers constantly with unnecessary rate. Lets focus also focus on grid layout support as more people will be using this for tablet version of the app. This is also mentioned in #247, #241, #125

I think in my case to solve this issue is to implement a predefined lookupspan to control everything inside the gridlayoutmanager.

    final GridLayoutManager manager = new GridLayoutManager(this, 3);
            manager.setSpanSizeLookup(new GridLayoutManager.SpanSizeLookup() {
                @Override
                public int getSpanSize(int position) {
                    if(adapter.isFooter(position)){

if(!isLoadingMore){
      onLoadMoreListener.loadMore(mRecyclerView.getAdapter().getItemCount(), lastVisibleItemPosition);
      isLoadingMore = true;
}

                        return manager.getSpanCount();
                    }
                    return  1;
                }
            });

please now read #276

#285 done

repo: cymcsg/UltimateRecyclerView


text:
Add node 12.16.0 base image

Browser image can be merged after this PR
https://github.com/cypress-io/cypress-docker-images/pull/290

Question: why do we need both 12.16.0 (this) and 12.16.2 image (#290)? I would go with 12.16.2

it's a typo in the commit message/PR title, I'll fix it.
this adds 12.16.2 base image, the other one adds the browser image (which uses this as the base)

@bahmutov commit message/PR message changed (the content is the same)
this PR should be merged first (base image only), and then #290 (browsers image only) can be merged afterwards

@sampi does it make much difference from 12.16.1?

Closing in favor of https://github.com/cypress-io/cypress-docker-images/pull/307

authors: bahmutov sampi

repo: cypress-io/cypress-docker-images


text:
Reason for XHR request and response inside JavaScript workers no being logged.

Hi,
I am trying to log all the XHR requests and responses from a website. However, I
see some  XHR requests and responses  not captured by  Network.requestWillBeSent and  Network.responseReceived event handlers. What could be the reason for this?
Note that, I can see this XHR requests and responses, that my script failed to capture,
in the network tab in my chrome debug tools. So what could be
the reason for the script to miss this request and response?
Following is the code snippet that I am using:
Network.requestWillBeSent((params) => {
        fs.appendFile(requests, params.requestId +
        ',' + params.request.url + '\n', function(err){});
    });
    Network.responseReceived((params) => {
      	  downloadFile[params.requestId] = params.type;
    });

  Network.loadingFinished((params) => {
        if (downloadFile[params.requestId]) {
            Network.getResponseBody({
                requestId: params.requestId
            }).then(response => {
                fs.appendFileSync(path.join(folder, downloadFile[params.requestId] + "-" + params.requestId),
                response.body, function(err){});
            });
        }
    });

Can you set up a minimal working example so I can try to reproduce it?
Also, what's the point of not filing up the issue template?

@cyrus-and,
Here is the script I used. https://gist.github.com/karthikrish9/44aef343d0d27ef0d082fd34169297b0
Run the following command:
node test.js https://websightjs.com/
Then, we don't see a XHR GET request to https://websightjs.com/cv-wasm.wasm and the response getting logged.  But this is visible in chrome debug tools.  Kindly let me know why is it no logged.

This happens because those requests are performed inside JavaScript workers and from a Chrome perspective they are separate (sub) targets. Bad news is that handling this case requires to write a much more complex code since you cannot use the usual JavaScript API, but if you're just interested in events from workers you can get away pretty easily:
const CDP = require('chrome-remote-interface');

CDP(async (client) => {
    const {Page, Target} = client;

    Target.attachedToTarget(({sessionId, targetInfo: {url}}) => {
        console.log(`ATTACHED ${sessionId}: ${url}`);
        // enable networks events in this target, you can't use the regular API
        // here, so you have to manually build the messages and take care of
        // ids; it's not really a big deal unless you need to match commands and
        // responses
        Target.sendMessageToTarget({
            sessionId,
            message: JSON.stringify({ // <-- a JSON string!
                id: 1,
                method: 'Network.enable'
            })
        });
    });

    Target.receivedMessageFromTarget(({sessionId, message}) => {
        const {id, method, params} = JSON.parse(message); // <-- a JSON string!
        // you can handle massages from the target here; the same apply about
        // the fact that you can't use the regular API here
        switch (method) {
        case 'Network.requestWillBeSent':
            {
                const {request: {url}} = params;
                console.log(`FROM ${sessionId}: ${url}`);
            }
        default:
            // skip...
        }
    });

    try {
        // automatically attach to newly created target so you don't have to do
        // that manually; you might not interested in all of them though...
        await Target.setAutoAttach({
            autoAttach: true,
            waitForDebuggerOnStart: false
        });
        await Page.navigate({url: 'https://websightjs.com/'});
    } catch (err) {
        console.error(err);
    }
}).on('error', (err) => {
    console.error(err);
});

@cyrus-and,
To extend the solution you suggested to also need to retrieve the body of the ServiceWorker responses I'm proceeding with the following code:
       case "Network.responseReceived":{
          console.log("RECEIVED: " + params.requestId + " " + params.type);

        }
	case "Network.loadingFinished" :{
          console.log("LOADED: " + params.requestId + " " + params.type);
            Target.sendMessageToTarget({
              sessionId,
              message: JSON.stringify({
                id : tid++,
                method: "Network.getResponseBody",
                params: {requestId: params.requestId}
              })
            }).then(response => {
                  console.log(response);
                  fs.appendFileSync(path.join(folder,params.requestId),
                  response.body, function(err){});
              });
        }

From my understanding I should be able to receive the response with the body from the worker but instead the response is always empty {}.
Am I missing anything trivial?

@emanuelevineti this is about "but if you're just interested in events from workers you can get away pretty easily", in this case you can't. The reply of a method is not the reply of Target.sendMessageToTarget, instead you have to wait for a message from the target with a matching id field, that would be in the form:
{"id": ..., "result": {...}}

See enqueueCommand and handleMessage.

Hi @cyrus-and ,
So what should be the approach to log the response data from the requests generated from a
Javascript worker thread? Any pointers appreciated.
Thank you

@karthikrish9 as I said you have to listen for the result message and match the id with the id you used in the request. The code from @emanuelevineti is a good starting point but the response will arrive inside the Target.receivedMessageFromTarget handler. It is likely that you'll need an additional data structure (e.g., a map: message id -> callback/info), please see the links in the above comment.

Thanks @cyrus-and !
With your suggestions I managed to finally get also the body of the worker responses.
Since I'm working with @karthikrish9  I guess now our issue is solved.
Cheers!

Okay, will try that. thank you.

Great, you're welcome!

This issue is closed, yet I'm posting here in case someone else got stuck with this issue as I did.
Apparently just connecting to the service worker doesn't worker, as it further uses a dedicated worker to actually make the network requests. So you'll have to send a message from the main target to the service worker, which in turn should another message to the dedicated worker.
Just to extend @cyrus-and 's solution, something like this should work
Target.attachedToTarget(({sessionId, targetInfo: {url}}) => {
                console.log(`ATTACHED ${sessionId}: ${url}`);
                // enable networks events in this target, you can't use the regular API
                // here, so you have to manually build the messages and take care of
                // ids; it's not really a big deal unless you need to match commands and
                // responses
                Target.sendMessageToTarget({
                    sessionId,
                    message: JSON.stringify({ // <-- a JSON string!
                        id: 1,
                        method: 'Network.enable'
                    })
                });
                Target.sendMessageToTarget({
                    sessionId,
                    message: JSON.stringify({ // <-- a JSON string!
                        id: 2,
                        method: 'Target.setAutoAttach',
                        params: {autoAttach: true, waitForDebuggerOnStart:false}
                    })
                });
            });

            Target.receivedMessageFromTarget(({sessionId, message}) => {
                const {id, method, params} = JSON.parse(message); // <-- a JSON string!
                // you can handle massages from the target here; the same apply about
                // the fact that you can't use the regular API here
                // console.log(message);
                switch (method) {
                case 'Network.responseReceived':
                    {

                        //params is the data you need
                        break;
                    }
                case "Target.attachedToTarget":{
                    const childSessionId = params.sessionId;
                    console.log("ATTACHED : " + childSessionId);
                    Target.sendMessageToTarget({
                        sessionId,
                        message: JSON.stringify({
                            id:3,
                            method: 'Target.sendMessageToTarget',
                            params: {
                                sessionId: childSessionId,
                                message: JSON.stringify({
                                    id:1,
                                    method:'Network.enable'
                                })
                            }
                        })
                    });
                    break;
                }
                case "Target.receivedMessageFromTarget": {
                    const childMsg = JSON.parse(params.message);
                    // console.log(childMsg.method);
                    switch (childMsg.method){
                        case "Network.responseReceived" :{
                            //childMsg.params is the data you need
                            break;
                        }
                    }
                    break;
                }
                default:
                    // skip...
                }
            });

authors: cyrus-and emanuelevineti goelayu karthikrish9

repo: cyrus-and/chrome-remote-interface


text:
[BUG] cython --gdb crashes with "Compiler crash in DebugTransform"

Describe the bug
cython --gdb a.pyx errors out with "Compiler crash in DebugTransform".
Removing --gdb option resolves the problem.
Code to reproduce the behaviour:
# filename: a.pyx

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=True

cdef class A:
    def __cinit__(self):
       pass

    @staticmethod
    def wait_for(args):
        cond2 = all(isinstance(el, A) for el in args)

OS
Linux
Python version
(dev_dpctl) opavlyk@opavlyk-mobl:~/repos/cython-crash$ python --version
Python 3.9.12

Cython version
3.0.2
Additional context
(dev_dpctl) opavlyk@opavlyk-mobl:~/repos/cython-crash$ cython --gdb a.pyx

Error compiling Cython file:
------------------------------------------------------------
...
# distutils: language = c++
^
------------------------------------------------------------

a.pyx:1:0: Compiler crash in DebugTransform

Compiler crash traceback from this point on:
  File "Cython/Compiler/Visitor.py", line 182, in Cython.Compiler.Visitor.TreeVisitor._visit
  File "/home/opavlyk/miniconda3/envs/dev_dpctl/lib/python3.9/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 4033, in visit_ModuleNode
    self.visit_FuncDefNode(nested_funcdef)
  File "/home/opavlyk/miniconda3/envs/dev_dpctl/lib/python3.9/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 4093, in visit_FuncDefNode
    self.tb.start(arg.name)
  File "/home/opavlyk/miniconda3/envs/dev_dpctl/lib/python3.9/site-packages/Cython/Debugger/DebugWriter.py", line 42, in start
    self.tb.start(name, attrs or {})
  File "src/lxml/saxparser.pxi", line 841, in lxml.etree.TreeBuilder.start
  File "src/lxml/saxparser.pxi", line 769, in lxml.etree.TreeBuilder._handleSaxStart
  File "src/lxml/apihelpers.pxi", line 179, in lxml.etree._makeSubElement
  File "src/lxml/apihelpers.pxi", line 1754, in lxml.etree._tagValidOrRaise
ValueError: Invalid tag name '.0'

Smaller command reproducing the behavior: cython --cplus --gdb dpctl/_sycl_event.pyx

Smaller reproducer:
# filename: a.pyx

# distutils: language = c++
# cython: language_level=3
# cython: linetrace=True

cdef class A:
    def __cinit__(self):
       pass

    @staticmethod
    def wait_for(args):
        cond2 = all(isinstance(el, A) for el in args)

Now: cython --gdb a.pyx causes the error:
(dev_dpctl) opavlyk@opavlyk-mobl:~/repos/cython-crash$ cython --gdb a.pyx

Error compiling Cython file:
------------------------------------------------------------
...
# distutils: language = c++
^
------------------------------------------------------------

a.pyx:1:0: Compiler crash in DebugTransform

Compiler crash traceback from this point on:
  File "Cython/Compiler/Visitor.py", line 182, in Cython.Compiler.Visitor.TreeVisitor._visit
  File "/home/opavlyk/miniconda3/envs/dev_dpctl/lib/python3.9/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 4033, in visit_ModuleNode
    self.visit_FuncDefNode(nested_funcdef)
  File "/home/opavlyk/miniconda3/envs/dev_dpctl/lib/python3.9/site-packages/Cython/Compiler/ParseTreeTransforms.py", line 4093, in visit_FuncDefNode
    self.tb.start(arg.name)
  File "/home/opavlyk/miniconda3/envs/dev_dpctl/lib/python3.9/site-packages/Cython/Debugger/DebugWriter.py", line 42, in start
    self.tb.start(name, attrs or {})
  File "src/lxml/saxparser.pxi", line 841, in lxml.etree.TreeBuilder.start
  File "src/lxml/saxparser.pxi", line 769, in lxml.etree.TreeBuilder._handleSaxStart
  File "src/lxml/apihelpers.pxi", line 179, in lxml.etree._makeSubElement
  File "src/lxml/apihelpers.pxi", line 1754, in lxml.etree._tagValidOrRaise
ValueError: Invalid tag name '.0'

Duplicate https://github.com/cython/cython/issues/5552

authors: da-woods oleksandr-pavlyk

repo: cython/cython


text:
Issues when migrating project to angular 6

Package "angular-svg-icon" has an incompatible peer dependency to "rxjs" (requires "^5.5.2", would install "6.1.0").

Published angular-svg-icon@6.0.0 to work with Angular 6.

authors: arangates czeckd

repo: czeckd/angular-svg-icon


text:
Seek(k) returns the first item of the tree even if item's key is larger than k

Based on the doc:
Seek returns an Enumerator positioned on an item such that k >= item's key.

However, here's a test that appears to be a special case with item's key > k:
func TestSeekBeforeFirst(t *testing.T) {
	r := TreeNew(cmp)
	r.Set(42, 314)
	enum, ok := r.Seek(10)
	if ok {
		t.Fatal("WTF")
	}
	k, v, err := enum.Next()
	t.Logf("K: %v, V: %v, Err: %v", k, v, err)
}

Output:
=== RUN   TestSeekBeforeFirst
--- PASS: TestSeekBeforeFirst (0.00s)
	all_test.go:181: K: 42, V: 314, Err: <nil>

Would be nice to update the doc about this behavior or even better have nil, nil, io.EOF returned.

However, here's a test that appears to be a special case with item's key > k:

The observation is that k >= item's key means item's key <= k, not item's key > k.
AFAICT, the behavior seems correct to me. After Seek(10) (and up Seek(41)), the returned Enumerator is positioned before item (42, 314), so Next returns that item. (Seek(42) should return an enumerator with the same position but an ok == true result and finally Seek(43) should return an enumerator positioned after the only item in the tree and ok == false).
IOW, Seek(k) prepares to enumerate, using Next, items with key >= k, that's why the resulting position is before an item with key >= k.
It may help to imagine the tree has two virtual items always present: a negative infinity item before the first item and a positive infinity after the last item. Considering these thougth items, the invariant "k >= item's key" holds.
Does it make sense?
Please feel free to propose documentation improvements. If you would like to send a PR, please include yourself in the AUTHORS and/or CONTRIBUTORS files, thank you.

The observation is that k >= item's key means item's key <= k, not item's key > k.

My bad, I meant to say that the test exposes a special case where we get item's key > k instead of item's key <= k.

After Seek(10) (and up Seek(41)), the returned Enumerator is positioned before item (42, 314), so Next returns that item.

So shouldn't the item before item (42, 314) be a negative infinity item as (42, 314) is the first item? And since Next() returns the current item and then moves the enumerator, it should return negative infinity?

When the Next or Prev would have to return infinity it says io.EOF ;-)

And since Next() returns the current item and then moves the enumerator, it should return negative infinity?

Next moves in collating order, Prev in the reversed collating order. IOW, Next can never attempt to return negative infinity, only the positive one. Invert for Prev.

Alright, I see now and agree with Seek+Next pattern, but it seems like the Seek+Prev doesn't hold to similar logic unless I'm missing something.
Here're couple examples:
func TestSeekBeforeFirst(t *testing.T) {
	r := TreeNew(cmp)
	r.Set(42, 314)
	enum, ok := r.Seek(10)
	if ok {
		t.Fatal("WTF")
	}
	k, v, err := enum.Prev()
	t.Logf("K: %v, V: %v, Err: %v", k, v, err)
}

Output:
=== RUN   TestSeekBeforeFirst
--- PASS: TestSeekBeforeFirst (0.00s)
	all_test.go:181: K: 42, V: 314, Err: <nil>

and
func TestSeekBeforeFirst(t *testing.T) {
	r := TreeNew(cmp)
	r.Set(42, 314)
	r.Set(45, 314)
	enum, ok := r.Seek(43)
	if ok {
		t.Fatal("WTF")
	}
	k, v, err := enum.Prev()
	t.Logf("K: %v, V: %v, Err: %v", k, v, err)
}

Output:
=== RUN   TestSeekBeforeFirst
--- PASS: TestSeekBeforeFirst (0.00s)
	all_test.go:178: K: 45, V: 314, Err: <nil>

I would expect in the first case to get io.EOF, and in second case (42, 314)

Well, it seems like a bug in Prev to me as well :disappointed:
Not sure I've ever used Prev at all. Are there are any tests for i? Will investigate as time permits (give me a couple of days). Feel free to look into the issue if you like to.

Ok cool, I'll try to take a look this week. Might be a tricky problem though, since when we Seek we don't know if Next or Prev is going to be called

Fixed by https://github.com/cznic/b/pull/7

authors: Timoha cznic

repo: cznic/b


text:
Database Dump Analyzer

There should be a new analyzer to find pastes which contain a database dump.
To solve this issue there needs to be a new analyzer added in the analyzers directory. The analyzer must follow the example of the other analyzers in this directory. Don't forget to add the analyzer to the analyzer package file.
The most simple example for such an analyzer is the AlwaysTrueAnalyzer which always returns True.
This analyzer should match different kinds of database dumps. There are different formats for database dumps. It's up to you how many of those you want to implement. On haveibeenpwned.com there is a nice explanation on database dumps in pastes which should serve as a source for ideas.
Tests are not necessary but highly appreciated. If there are questions, don't hesitate to contact me.

#76

happy to own this

Hey @trixpan you are of course free to work on this - BUT there have been two PRs already for this issue (#76 and #75). In order to prevent duplicate work I would suggest picking another issue. All issues I marked as hacktoberfest are pretty easy to implement in no longer than ~30 minutes max.

Merged #76

authors: d-Rickyy-b sedaboni trixpan

repo: d-Rickyy-b/pastepwn


text:
about  experiments hyperparameters

Hello, thanks for sharing your excellent work!
I have some specific questions about the selection of hyperparameters in experiments and hope you can answer them:

In the GDN.py class OutLayer , there is code for multiple layers (i.e., layer_num > 1), but when calling OutLayer, layer_num =1. Why is this? Are there any experimental results and analyses supporting this parameter choice?
In   class GraphLayer, there is a design for a multi-head attention mechanism (heads > 1), but when selecting parameters, heads=1. I think that multiple heads can help us mine richer temporal information. Why wasn't this done, and have you conducted experiments related to this decision?

I think this is an excellent paper, and I hope to know more experiment details and analysis. Is there a version of the paper with an appendix?

Thanks for your kind words and interest in our work.

layer_num is not necessarily to be set as 1. For example, it could be set with other values in run.sh. The choice of values could be varied based on the datasets. For example, when we test on SWaT, the performance of layer_num=2 is close to the result of layer_num=1, so we choose layer_num=1 for simplicity in this case. In short, the hyperparameter could be chose based on the model performance, such as reconstruction error on validation set during training.
Yes, I agree that multi-head attention should be better compared to using single head. We have also tested using multi-head, but it seems in our cases, it would not improve too much or just close to the result of using single-head. But still, this could be potentially varied given different datasets.

We don't have an additional appendix for the paper, but please feel free to ask if there are any other questions. Thanks!

repo: d-ailin/GDN


text:
EventSubChannelRedemptionUpdateEvent broadcaster/userName returns an empty string

Bug Report
EventSubChannelRedemptionUpdateEvent broadcasterName and userName properties returns an empty string
Expected behavior
It should return the login name or username of the broadcaster/user

Actual Behavior
It returns an empty string

Environment

Version: 4.4.2
Node version: v15.6.0
Operating system: Windows 10

This is a Twitch issue, please track https://github.com/twitchdev/issues/issues/299 instead.

authors: d-fischer kuroshiropanda

repo: d-fischer/twitch


text:
V2V2 New Streamer

This is a new version of feature/new-streamer that has been rebased onto v2v2. I kept these all new branches just in case I messed something up in the process and we needed to go back easily.

Up to date with 1.9.1

authors: aferditamuriqi kristojorg


text:
Error: Unexpected intrinsicName Error, [object Object]

I'm using this extension in a Deno project, not a Node project. Maybe that's relevant.
The error only appears when I position the cursor on anything I've imported from an external library.
All my imports of external libraries are done the Deno way, so they look like:
import { xml2js as xml2pojo } from "https://deno.land/x/xml2js@1.0.0/mod.ts";

And they are cached locally by Deno.
When I hover over the line where I call the function, VSCode is able to show my the type definition of the function, so VSCode itself is not having any troubles:

I am just unsatisfied that I can't see what the type of the 2nd function argument (userOptions: Xml2JsOptions) expands into without cmd + click on the function name to navigate to the source file. I was hoping this extension could fix that.
But when I position my cursor on the function name xml2pojo the extension shows nothing and the logs say:
Error: Unexpected intrinsicName Error, [object Object]

Edit
I'm doing a little debugging and I think I have found some useful information. When I cmd + click to go to the source file of the imported xml2js library then this extension doesn't work in that file at all. It raises the error:
SourceFile not found: /https/deno.land/x/xml2js@1.0.0/xml2js.ts

So I'm just guessing this extension can't work with Deno because:

It doesn't know where Deno caches its imported libraries locally.
And it can't open up a typescript file from a web URL either.

Is that a fair assessment? Please I would super appreciate it if you could fix this.

Thank you for reporting this issue and providing detailed information about the problem you encountered while using this extension in a Deno project.
You are correct that this extension was primarily designed with Node.js in mind, and currently, it does not support other platforms. While it might work seamlessly with bun, Deno has a different module resolution mechanism, which is causing the extension to fail in your project.
Supporting Deno would require collaboration with the Deno extension for VSCode, and given my limited experience with Deno's inner workings, it might be challenging for me to implement a solution quickly. However, based on the logs you provided, it seems that with a few modifications, it might be possible to add support for Deno.
I believe that supporting Deno would be a great addition to this extension, and I appreciate you bringing this to my attention. When time permits, I will investigate the issue further and attempt to implement the necessary changes.
Thank you once again for your valuable feedback and for taking the time to report this issue. Your contribution is much appreciated, and I will keep you updated on the progress of adding Deno support to the extension.

@Evertt
I took a look at the implementation of vscode_deno.
As an overview, it seems that by disabling most of the functionality of VSCode's standard tsserver and building a Language Server for deno, it supports deno's URI-based imports and performs type checking.
This extension depends on that tsserver is built and resolving types. This is because it receives type information from tsserver using tsserver's Language Server Plugin(with CompilerAPI). Since the deno Language Server only has the correct type information, it might be possible to support it if the Language Service Plugin is supported by deno. However, the following document states that it is not supported.
https://docs.deno.com/runtime/manual/advanced/typescript/faqs#why-dont-you-support-language-service-plugins-or-transformer-plugins
I apologize for piquing your interest, but it appears that supporting deno is difficult.

Ah, that's too bad, but I understand.

authors: Evertt d-kimuson

repo: d-kimuson/ts-type-expand


text:
.URL を置き換える

hugo server で以下のWARNが出たので対応する
WARN 2019/08/17 00:35:34 Page's .URL is deprecated and will be removed in a future release. Use .Permalink or .RelPermalink. If what you want is the front matter URL value, use .Params.url.

pagination や header, footer のナビゲーション周りにあるのでそこを変更することになる

repo: d-kusk/minimage


text:
Scrum 1

Comment your scrum reports below.
https://blogs.ubc.ca/cpsc4552023s/assessment-rubrics/#sec-2
Scrum Report Steps
Post a comment in this issue with:

Your Name
Answer these 3 questions

What did you work on this past iteration (2 weeks)?
What were any major issues/challenges you ran into?
What do you plan to work on for this coming iteration (2 weeks)?

Ensure answers are 5 sentences MAX

Grading Rubric:
2:
Includes all 3 points. Demonstrates a bit of meaningful reflection on at least one item in the report.
1:
Simplistic, or no meaningful, specific information.
0:
Missing or Late.

Scrum Report for Kenny Cheng

I worked with the team brainstorming requirements and project ideas and designed a low fidelity Figma prototype describing the core task of requesting a fitness plan with the layout of our home page.
There were no major challenges this sprint.
I will bootstrap our project with MUI, React Router, and finding a suitable ESLint style guide. I will work on front end components for updating and adding info to user profiles. I will be brainstorming what kind of data is needed as "additional profile information".

Scrum Report for Kevin Wu

I helped with brainstorming the project idea together with my other teammates and designing the low-fi Figma prototype for editting a user profile.
None at this time.
I plan on helping refine the Figma prototypes for creating and editing a user profile, then start developing frontend components for creating a profile. If I have additional time available and made strong progress with the previous items I'll investigate the backend requirements for creating a user (APIs and DB).

Scrum Report for Jack Ji

Assist in brainstorm project requirements. Break down of basic requirement for Schedule Request
None so far
Investigate API calls to ChatGPT, investigate prompt to generate schedule, start creating frontend components for Schedule page

Scrum Report for Kevin Chung

What did you work on this past iteration (2 weeks)?

Contributed to the development of the project idea and the project task requirements, and also completed the breakdown of a minimal requirement (Create Profile).

What were any major issues/challenges you ran into?

None at the moment.

What do you plan to work on for this coming iteration (2 weeks)?

Dig deeper into the aforementioned requirement (Create Profile) - fetch/upload profile image, birthdate entry - and implement feature for deletion of the account.

Scrum Report for Davis Song

Jira setup for documentation and process, creating and configuring Git repository, and prototyping profile creation in Figma.
None at the moment.
Frontend project setup, including initial DOM structure as was prototyped in Figma. Initial dashboard, navigation bar, and profile creation components are part of the plan for this sprint.

repo: d-x-s/airon-fitness


text:
🛑 Staging Homologation API is down

In b91c8d6, Staging Homologation API ($STAGING_HOMOLOGATION_API) was down:

HTTP code: 503
Response time: 734 ms

Resolved: Staging Homologation API is back up in b6ad188.


text:
Update scalafmt-core to 3.5.1

Updates org.scalameta:scalafmt-core from 2.7.5 to 3.5.1.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.scalameta", artifactId = "scalafmt-core" } ]

labels: library-update, early-semver-major, semver-spec-major, commit-count:1

Superseded by #236.


text:
.attr(object) no longer works

.attr(object) which works in the previous version of d3 doesn't appear to work in this version.
Instead of it returning the selection it appears to return a null property value as the namespace function returns "[object Object]".

That's been removed from the d3-selection core, but you can get it by using the d3-selection-multi plugin. You just require it after requiring d3-selection, and it adds that behavior.

Correct. Thanks for answering, @jimkang.
The multi-value methods have been moved to d3-selection-multi as an optional add-on, and have been renamed to their plural form to avoid ambiguity. However, not all multi-value methods have yet been implemented, including selection.classed and transition methods.
When D3 4.0 is closer to release, I will be writing release notes that cover all changes since 3.x, along with a 3-to-4 migration guide. (The API reference only covers the current version of the code.) I previously maintained a list of changes incrementally during the development of 4.0, but I found it overly tedious to describe changes as they were being made; hence my decision to postpone documentation of changes until the API is finalized at release.

authors: jimkang mbostock umbra268

license: isc


text:
Some clarification when appending SVG shapes using document.createElement()

Stumbled across this question on StackOverflow.
It might be be useful to clarify the differences between document.createElement() and document. createElementNS() when appending SVG shapes and not using the more common syntax .append('rect').

Thanks for the pull request. I appreciate the desire to help, however this edit doesn’t look accurate. I’m closing the request, but if you reply we can try to improve the language in the README.
The sentence you’ve added refers to “the last two methods”, which based on the context or the current paragraph I interpret to mean as (1) name having a namespace prefix (e.g., “svg:g”) or (2) name not having a namespace prefix (e.g., “g”). However, you then say “with either one of the last two methods” you should then pass a function to selection.append, but how can you pass a function if name is a string?
Meaning, either you pass a string name to selection.append, in which case d3-selection chooses to use document.createElement or document.createElementNS as appropriate and as described in the README, or you pass a function to selection.append, in which case you are responsible for calling document.createElement or document.createElementNS yourself as appropriate.
Perhaps there’s just a dropped “not” here and you meant to say if you are not using either of the last two methods? Or perhaps your “last two methods” refers to the two preceding code blocks, which pass a function to selection.append not for the purposes of demonstrating how you should use selection.append, but to demonstrate how selection.append works?

authors: mbostock nobitagit


text:
d3 Display issues on Windows server 2012

the home page of d3 does not display well. some of the items are merge and others so small and cannot be seen.
Please help me resolve it as soon as possible. Going for a presentation at client site tomorrow.

Please use Stack Overflow tag d3.js to ask for help. Although I make an effort to assist everyone that asks, I am not always available to provide help promptly or directly. Stack Overflow provides a better collaborative forum for self-help: tens of thousands of D3-related questions have already been asked there, and some answered questions may be relevant to you.
When asking for help, please include a link to a live example that demonstrates the issue, preferably on bl.ocks.org. It is often impossible to debug from code snippets alone. Isolate the issue and reduce your code as much as possible before asking for help. The less code you post, the easier it is for someone to debug, and the more likely you are to get a helpful response.
If you have a question about D3’s behavior and want to discuss it with other users, also consider the d3-js Google Group or joining the d3-js Slack.
Thank you! 🤗

authors: Kpieleh mbostock


text:
Softstack contract audit recomendations

Changes

Separate the whitelist disabling and ownership renouncement into two distinct functions to ensure clear and independent management of these actions.
Implement a time-lock mechanism for the whitelist disabling to allow a grace period before the change takes effect, providing an additional layer of security.
Made public the whitelist functions.

changes approved by auditor

authors: ricardohdacxi softstackio

repo: dacxi/dacxi-coin-contract


text:
Add docs for multiplatform support.

Signed-off-by: Erik Sipsma erik@sipsma.dev
I ended up just leaving the getting started guide alone. Any changes I made to it seemed like it over complicated it.
Instead, I just created a dedicated document for all the multiplatform features.
TODO before merge:

[x] Decide on a better place in the sidebar. Seems like there could be a "Guide" section?
[x] Double check all the code examples actually run (I was writing it in anticipation of the no-more-ID change, so haven't had a chance to check it works yet)

@sipsma can you fix the conflicts and then we will merge this asap. Thanks!

authors: mircubed sipsma

repo: dagger/dagger


text:
Module engine version tracking

Currently based on top of https://github.com/dagger/dagger/pull/6386, 3 most recent commits are unique
Goals:

Add engine version module was most recently updated with to dagger.json for the purposes of tracking as metadata

Currently updates on dagger mod init/install/sync
This also opens up a path to serving modules compatible schemas based on their version

This PR doesn't include all the internal functionality for doing so, but in the future if we make backwards incompatible changes we'll at least have the version available so we could implement this if we felt compelled.

Fix problem where module cache is not invalidated when engine version changes

This problem impacted dagger devs all the time since a change to the engine implementation often did not result in test execution being invalidated, causing us to typically have to manually clear the dev engine cache before running module tests to be sure they were actually testing our changes.
However, this same problem could also manifest for users if they updated their engine but ended up using local/cloud cache from older engines.

Publish engine builds off main to an image tag w/ their git commit rather than a global+mutable "main" tag

We've wanted to do this for a while since it makes it easier to just download a CLI built off main and use it with the right corresponding engine.
This is not strictly required to be here, but it felt like a good time to fix while I was in this general area
cc @gerhard, let me know if there's any concerns around publishing those images. We'll have a new image tag per engine commit on main, so a lot more tags than previously.

Remove CLI from being embedded in the engine image + in nested execs

This hasn't been needed for a while and may as well be removed since it's slightly increasing the size of the engine.

Individual commit messages w/ more details on the above:

Support engine versioning by commit+local changes.
Add engine version to ModuleConfig in dagger.json.
Invalidate nested exec cache if engine version changes.

TODOs:

[ ] Rebase to remove commits from https://github.com/dagger/dagger/pull/6386 once that's merged

Just a note: looking at this again I'm realizing that it's technically a backwards compatible change, so can be safely done post v0.9.8. Will want it ASAP either way, but is okay if it's not until the next release.

Sorry, just needed to give CI a kick, bunch of jobs from the incident earlier :D

RE: https://github.com/dagger/dagger/pull/6469#discussion_r1482513933 I'm realizing how much manual testing + infra setup this is going to require to fully validate before the release tomorrow, which just doesn't feel worth it since we're gonna do a v0.9.10 next week anyways. So I'm going to move this to that milestone but we can merge this right after v0.9.9 is done so it doesn't sit around any more.
It's in a good place now after rebasing, only TODO left is the aforementioned manual testing, which will be my focus tomorrow post release.

Also, while working on this locally I started seeing the behavior @marcosnils had reported recently of local imports always re-transferring in full. I found the one-line fix... https://github.com/dagger/dagger/pull/6469/commits/23d93469e7439fe9d284469b654123b00405db40#diff-375c41f6a94e797edee687b8fa151865e2192d8aa9088acaffa174d0de2c3578R228
I had previously seen this behavior occasionally but thought it usually worked as expected because I'd still see "reusing ref for local" in engine logs, but I'm pretty sure those logs only applied within the context of a single session. Setting the shared key to that value there meant local import mutable refs would never be used across sessions....
So we should pick up that very nice performance improvement after merging this tomorrow too 😅

Okay tested the publish workflows with this PR in my fork, feel good about it. Tested:

Engine+CLI publish off main

publishes image with git commit SHA (rather than main)
uploads CLIs archives; unpacking and running dagger version shows git commit SHA

e.g. dagger aa10fe84ae0c6fd19dea8d101a8666604c79a598 (registry.dagger.io/engine) linux/arm64

provision workflows pass, running some tests locally w/ _EXPERIMENTAL_DAGGER_RUNNER_HOST=... passes

Engine+CLI publish off semver tag

publishes image with semver tag (i.e. :v0.0.9)
uploads CLIs archives, dagger version shows semver tag
I eventually hit errors here because I don't have nixpkgs setup or homebrew setup to publish to, but feel decent enough that the parts impacted by this PR work here

I did run into some independent problems along the way (besides the normal GHA nonsense):

https://github.com/dagger/dagger/pull/6632 (easy fix)
https://github.com/dagger/dagger/issues/6630

No clue why this was happening to me in the publish workflow yet, it seems like some obscure corner case in the shim's secrete scrubbing Trie is getting hit?
I included a low-risk simple fix to that problem here, though when I was hitting that panic it was in the stable engine, so won't get picked up by our runners until we actually finish the release.

I will leave it up to @gerhard and @jedevc to decide if you want to merge this before the release tomorrow or right after (I will be out so need someone else to press the merge button). I feel good about it now and it would be nice to get it out sooner than later, but up to you 🙂

authors: jedevc sipsma


text:
Migrate to ES6

ECMAScript 6 provides features that can make the implementation more readable and maintainable. Let's consider migrating to it. I would especially prefer to see the use of classes to make the code simpler.
On the other hand this is not compatible with IE11. However, ES6 works well in Edge, Firefox, Chrome, Safari, and node 6.5 and above. It also works on mobile browsers. Backwards compatibility can potentially be achieved with polyfills, which websites needing old browser support will have to likely use anyway.
What is are the compatibility requirements for this library and do you think such a migration is warranted? If so, we can start by replacing prototype with class.

IE11 is a target of my project which uses dagre.
ES5 seems like a more reasonable target, or use ES6 for the source but distribute transpiled to ES5

Agree. While it would be really nice probably still too early for ES6. Using a compiler would be an option. Either change would require a bunch of work, tools keep evolving and currently not seeing anybody that can commit the time to maintain those dependencies.

I'm working on modernizing the library.

authors: dionyziz lutzroeder mwaldstein rustedgrail

repo: dagrejs/graphlib


text:
[dagster-pipes-tests] refactor and modularize tests

Summary & Motivation

How I Tested These Changes

Changelog
Ensure that an entry has been created in CHANGELOG.md outlining additions, deletions, and/or modifications.
See: keepachangelog.com

#48  👈 (View in Graphite)
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

repo: dagster-io/community-integrations


text:
Dependency cycle detected

Describe the bug
https://docs.microsoft.com/nl-nl/nuget/reference/errors-and-warnings/NU1108
To Reproduce
Open vs2022
install nuget package staskscheduler and/or taskschedluereditor
receive errors:

Expected behavior
installs correctly
Environment (please complete the following information):
win10
vs2022 vb.net forms app

didn't work unfortunately :/

ah it worked now, didnt work because my project was the same name

repo: dahall/TaskScheduler


text:
Don't work with react 18.2

Components used useContextSelector with return save value always rerenders.
Example https://codesandbox.io/s/musing-poincare-hz2g6g?file=/src/App.js

I have more than 1000 components with useContextSeletor. Any changes in context value trigger call render function of all components.
Even if it doesn't cause effects and update the DOM(only call render function), it takes a lot of computing resources.
I change example and add Redux example: https://codesandbox.io/s/muddy-bush-ndqqwg?file=/src/App.js
With 10 components i has next stats:
aRender: 100
aEffect: 21
aChange: 2

bRender: 22
bEffect: 21
bChange: 2

100 components:
aRender: 800
aEffect: 201
aChange: 1

bRender: 202
bEffect: 201
bChange: 1

one more example - symetric updates states + calc render time, 1000 nodes: https://codesandbox.io/s/muddy-bush-ndqqwg?file=/src/App.js
stats:
change: 100

aRender: 206000
aEffect: 2200
aTime: 321.1000003814697

bRender: 2400
bEffect: 2200
bTime: 11.500000953674316

Even if it doesn't cause effects and update the DOM(only call render function), it takes a lot of computing resources.

One workaround is to useMemo.
Another would be to use subscription based state management such as Redux / Zustand / ...
You can also implement a simplified useContextSelector without concurrency support pretty easily.
Seel also #100

import {
  createContext as createContextOrig,
  useContext as useContextOrig,
  useRef,
  useSyncExternalStore,
} from 'react';

export const createContext = (defaultValue) => {
  const context = createContextOrig();
  const ProviderOrig = context.Provider;
  context.Provider = ({ value, children }) => {
    const storeRef = useRef();
    let store = storeRef.current;
    if (!store) {
      const listeners = new Set();
      store = {
        value,
        subscribe: (l) => { listeners.add(l); return () => listeners.delete(l); },
        notify: () => listeners.forEach((l) => l()),
      }
      storeRef.current = store;
    }
    useEffect(() => {
      if (!Object.is(store.value, value)) {
        store.value = value;
        store.notify();
      }
    });
    return <ProviderOrig value={store}>{children}</ProviderOrig>
  };
  return context;
}

export const useContextSelector = (context, selector) => {
  const store = useContextOrig(context);
  return useSyncExternalStore(
    store.subscribe,
    () => selector(store.value),
  );
};

import {
  createContext as createContextOrig,
  useContext as useContextOrig,
  useRef,
  useSyncExternalStore,
} from 'react';

export const createContext = (defaultValue) => {
  const context = createContextOrig();
  const ProviderOrig = context.Provider;
  context.Provider = ({ value, children }) => {
    const storeRef = useRef();
    let store = storeRef.current;
    if (!store) {
      const listeners = new Set();
      store = {
        value,
        subscribe: (l) => { listeners.add(l); return () => listeners.delete(l); },
        notify: () => listeners.forEach((l) => l()),
      }
      storeRef.current = store;
    }
    useEffect(() => {
      if (!Object.is(store.value, value)) {
        store.value = value;
        store.notify();
      }
    });
    return <ProviderOrig value={store}>{children}</ProviderOrig>
  };
  return context;
}

export const useContextSelector = (context, selector) => {
  const store = useContextOrig(context);
  return useSyncExternalStore(
    store.subscribe,
    () => selector(store.value),
  );
};

This works in React 18.2

Great to hear that, because I haven't tried it. 😁

However, useContextSelector could only return a single result. I was tring to get multiple entries such as const { a, b } = useContextSelector(context, (root)=>({a: root.a, b: root.b})) the would cause useSyncExternalStore enter a infinity loop.

I tried to add a cache with shallowEqual, from redux, to workaround but I'm not sure if that is ok. I'm not familiar to React.
export function useContextSelector<T, Selected>(
  context: React.Context<ContextStore<T>>,
  selector: (value: T) => Selected,
) {
  const store = useContext(context);
  let cache: any;
  return useSyncExternalStore(store.subscribe, () => {
    const value = selector(store.value);
    if (cache === undefined || !shallowEqual(cache, value)) {
      cache = value;
    }
    return cache;
  });
}

Use https://www.npmjs.com/package/use-context-selector instead and pass shallowEqual.

authors: Jayatubi dai-shi liknenS

repo: dai-shi/use-context-selector


text:
平板上，左滑自动收回

左滑打开菜单，会马上自动关闭

检查item布局。是否在某个自定义view的绘制流程方法里调用了requestlayout

authors: ChenPengHuang gengqiquan

repo: daimajia/AndroidSwipeLayout


text:
No file named 'model-200.eval.0.txt'

Thank you for your code, it helps me a lot!
I am a fresh man, and my English is really poor,
I run the code following your  README
when I run the eval code, there is an error like this:
[FileNotFoundError]: No such file or directory: 'XXX/runs/fb15k237/checkpoints/model-200.eval.0.txt'

In the directory "checkpoints",there are
checkpoint   model-200.data-00000of-00001   model-200.index  model-200.meta
four files

I splits the dataset into smaller groups for a faster evaluation. You should run each command in evalFB15k-237.sh, this will generate the evaluation files.

I'm very sorry. In the end I still couldn't run your test code because of missing files.
I ran the evalFB15k.sh， still missing model-200.eval.4.txt
can you tell me, How does your model have hit@3 and hit@1 effects on each dataset?
Thank you very much!

Hi I found a similar problem when I was trying to run the code. In my runs/fb15k237/checkpoints directory, I only had "checkpoint  model-200.data-00000-of-00001  model-200.index  model-200.meta" these four files and I am confused how to generate model-200.eval.0,1,2,3.txt (txt files).
Thanks in advance!

You can see the commands in the evalFB15k.sh file that I updated for a higher tf version. You just run the evalFB15k.sh file. You can also test an example command like: python eval.py --embedding_dim 100 --num_filters 50 --name FB15k-237 --useConstantInit --model_name fb15k237 --num_splits 8 --testIdx 7. The command will generate the text file model-200.eval.7.txt.

You can see the commands in "evalFB15k-237.sh" that I just updated for a higher tf version. You can execute "evalFB15k-237.sh". You can also test an example command like: python eval.py --embedding_dim 100 --num_filters 50 --name FB15k-237 --useConstantInit --model_name fb15k237 --num_splits 8 --testIdx 7. The command will generate the text file model-200.eval.7.txt.
In case your machine is out of memory when executing "evalFB15k-237.sh", you should run each command in the file, and check RAM-consuming in your GPU, so you know how many command you should run at the same time. See the "evaluation metrics" section.

authors: ShangYuming daiquocnguyen yuhaozhang666

repo: daiquocnguyen/ConvKB


text:
navigator.shareがSlackでは有効に機能しない

現在のnavigator.share機能からslackに送信しようとすると添付ファイルが無視されてしまう。
（LINEはファイルになる、が、テキスト/URLは無視される）
Slackに送れないと業務で使いにくいので原因を調べて直す。
コード上の該当箇所はこちら
https://github.com/daisuke-nogami/cocoa-tools/blob/master/counter.html#L272

textとurlを指定するとfileが無視される仕様の模様なので、textとurlを含めないように変更したら解決

repo: daisuke-nogami/cocoa-tools


text:
Separate local packages from 3rd party with newline?

My normal company policy is "standard lib/company packages/3rd party" groups, each separated by newlines.
Basically "most" to "least" trusted packages.
I see that I can define "local" packages from 3rd party packages so they are at the end, but is there a way have a new line between them? e.g.
import (
	"bytes"

	"github.com/aws/aws-sdk-go-v2/aws"

	"awesomeLocalEnterpriseGit.company.com/pkg1"
)

It is kindly of multiple imports support, would support soon.

Support multiple prefix:
sections:

Standard
Prefix(github.com/local)
Prefix(github.com/daixiang0)


text:
Incorrect explanation of Unsafe usages

https://github.com/dalek-cryptography/subtle/blob/b4b070c3faf87cb8f324bd0ed0a5e5ec32d3a5b0/src/lib.rs#L223 remarks that u8 is neither Send nor Sync, however u8 has auto-trait implementations for both: https://doc.rust-lang.org/std/primitive.u8.html#impl-Sync

I think a good point is being raised here. I am not sure whether the documentation changed in the meantime, or whether I missed something last time. However, we could update the comment with new argumentation following the current requirements for volatile reads:

https://doc.rust-lang.org/core/ptr/fn.read_volatile.html#safety
https://doc.rust-lang.org/core/ptr/index.html#safety

IIUC it's bad to mix volatile and non-volatile reads.
The current implementation seems to be built on a non-volatile write (to create the u8) followed by a volatile read.
It seems like it would be better to use volatile_write to write the value to the Choice, and volatile_read to retrieve it, making Choice something of a VolatileCell type, although even that doesn't provide a proper abstraction when used with references, and without Pin it may change locations with moves.
Some other options include cmov-like predication instructions as well as #96

authors: KaiserKarel dsprenkels tarcieri

repo: dalek-cryptography/subtle


text:
Clicking "parameter tuning" header should hide panel.

Because I click the heading to open the panel, I expect to be able to close it by clicking the header again.

This turns out to be more difficult than I thought.
The header is designed for dragging and moving the GUI while the footer is what you click to expand/collapse. See the source code (pretty short) https://github.com/braitsch/ofxDatGui/blob/master/src/components/ofxDatGuiControls.h.
This won't be a trivial change.

Okay, it's not a big deal so probably not worth doing right now if it's complicated.

authors: damellis nebgnahz

repo: damellis/sensors


text:
HA Error

This custom component has been working well for me for some time. A few days ago it stopped working. I have tried rebooting HA and unplug/plugging in the Emu2 unit, but so far the error has been persistent
Log:
2022-01-31 18:34:52 WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.rainforest_energy_monitoring_unit (<class 'custom_components.rainforest.sensor.EMU2Sensor'>) implements device_state_attributes. Please report it to the custom component author.
On lovelace card it shows:
Entity is non-numeric: sensor.rainforest_energy_monitoring_unit
Much appreciate any resolution - thx

RESOLVED!
Turns out my wife switched the usb port. Changed my config and it is now working. Always the last place you look.


text:
我用Trained Models and logs (Size 256) 下面表格中的模型进行评估测试，报错KeyError: 'base.cls_token'

请问这是什么原因呢。我看了表格中模型对应的log，模型名字和下载的不一样，是否是这个原因。我看了log里面的配置文件信息，和我加载yml一样，除了模型名字。

我也遇到了这个问题，veri的TransReID用下载的模型跑出来效果也很差，不知道什么情况

repo: damo-cv/TransReID


text:
connection timeouts (TLS)

I'm getting intermittent connection timeouts when connecting to a compose rethinkdb instance using TLS.  Restarting my app fixes the issue; however, i'm not sure how to debug these timeouts that are happening.  The app is running in a docker container hosted on a azure vm.
api_1 | 2016/03/07 18:43:05 read tcp 172.17.0.8:46752->xx.xx.xx.xx:11329: read: connection timed out
api_1 | 2016/03/07 18:50:47 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 18:57:44 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 18:58:44 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 18:59:40 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 19:00:43 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 19:01:37 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 19:03:08 read tcp 172.17.0.8:48800->xx.xx.xx.xx:11329: read: connection timed out
api_1 | 2016/03/07 19:11:19 read tcp 172.17.0.8:49865->xx.xx.xx.xx:11329: read: connection timed out
api_1 | 2016/03/07 19:25:44 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 19:25:51 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 19:26:24 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 19:27:50 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out
api_1 | 2016/03/07 19:30:40 dial tcp xx.xx.xx.xx:11329: getsockopt: connection timed out

Its quite difficult to tell what is going on just from those logs, are you specifying a connection timeout in Connect()? Also are the addresses in the logs valid addresses for your RethinkDB cluster?

Hey Dan,
I apologize for the late reply.  I was able to track down my issue and I created pull request #279 that fixes my issue.
The bulk of of my issue was that the connections in the pool were dying after a certain period (typically around 5 minutes).  I saw in NewConnection there was SetKeepAlive called but SetKeepAlivePeriod was not.  I made the keep alive period configurable (in ConnectOpts) and now the connections in the pool are not dying.

Hey thanks for the PR! I had a look over it and it looks great. I hope to merge it some time this weekend

Hey thanks for the PR! I had a look over it and it looks great. I hope to merge it some time this weekend however I have a couple of things that I need to spend some time looking into first.
Regarding the connections not being removed from the pool. That sounds slightly worrying and I will look into that as well.

I think this might fix the issue that prevented the  connection from being removed from the pool https://github.com/dancannon/gorethink/commit/46e8669d3889fe78731c4e8d4d46207c8996f576

authors: DefinitelyCarter dancannon

repo: dancannon/gorethink


text:
GROUP BY + LIMIT rewrite incorrect

Please answer these questions before submitting your issue. Thanks!
Which version of Sharding-Jdbc do you using?
1.5.0
Expected behavior
SELECT user_id FROM t_order GROUP BY user_id LIMIT ?

=>
SELECT user_id FROM t_order GROUP BY user_id ORDER BY user_id ASC LIMIT ?

Actual behavior
SELECT user_id FROM t_order GROUP BY user_id LIMIT ?

=>
SELECT user_id FROM t_order GROUP BY user_id LIMIT ORDER BY user_id ASC

fixed at 1.5.1

repo: dangdangdotcom/sharding-jdbc


text:
[Issue] Files selection dialog does not show on Ionic mobile app for iOS

Synopsis:
I work on hybrid Web SPA , iOS & Android mobile app using Ionic & Angular Material frameworks. On one of the app's view, I put ng-file-upload for picking an image file and display it on the view, when the ng-file-upload's button is clicked/touched. Here is the code:

Ng-file-upload works fine on major desktop browsers ( chrome, firefox, safari) & on Ionic Cordova app runs on Android platform. However, when I build the app as an Ionic Cordova for iOS app, runs the app on my iPhone 6 which runs iOS version 9.3.1, the file selection dialog does not show when I touch the ng-file-upload's button.
Replication Steps:

Setup Ionic framework on your development environment (http://ionicframework.com/getting-started/)
Create a new Ionic app with a simple view.
Add ng-file-upload button on the view which takes image file.
Run the app as a web application & click the ng-file-upload button. Confirm that pick file dialog is shown.
Attach your android phone to your machine with USB debugging mode is turned on. Ensure that the phone is detected by your machine ( run adb devices command).
Build the app as an android app ( run ionic run android). Confirm that the app is build as an android app & running on your attached android phone.
On the android app version, touch the ng-file-upload button. Confirm the pick file dialog is shown.
Attach your iPhone which runs iOS 9.3.1 to your machine.
Build the ionic app for IOS platform (run ionic build ios).
Open the created iOS project from the prior build process on your XCode 7.3
Build & run the project on your iphone.
On the iOS app version, touch the ng-file-upload button. Confirm that the pick file dialog does not show. If we debug it using safari browser's developer tool and touch the ng-file-upload button, no error appear on the developer tool's console log window.

System Environment:

https://github.com/danialfarid/ng-file-upload/issues/1049

repo: danialfarid/ng-file-upload


text:
Insecure Flash embed parameter

Hi!
Could you please check for this issue:
https://www.owasp.org/index.php/Reviewing_Flash_Applicationsfrom this source:
This it vulnerability that can be used in different kind of attacks
You are using that in FileAPI.js

A parameter called allowScriptAccess governs if the Flash object has access to external scripts. It can have three possible values: never, same domain, always. The default value is sameDomain which means that the SWF must be hosted on the same FQDN as the calling HTML in order to have access to the HTML's DOM. If allowScriptAccess is set to always then the SWF is granted access to the HTML's DOM regardless of where the SWF is hosted.

Did you get any solution?

authors: Fermiy shanmugam-sekar


text:
[Question] How can I make my items flow in 3 columns?

Each of the column should be 1/3 of the available width.
[      ][      ][      ]
[      ][      ][      ]
[      ][      ][      ]
[      ][      ]

Just set FlowColumnCount property to 3 :)

authors: SuperJMN daniel-luberda


text:
Don't always open all recent projects when starting Atom

Hey,
maybe it's just me haven't found a way to set this up yet, but I really would like an option that when I start Atom, the project-manager doesn't open up all projects I've opened last time (and all the according opened files).
In Atom's core settings I've enabled "Open Empty Editor on Start". I suggest project-manager should respect this if it's set. What do you think?

Regards from Germany,
Dennis

Project manager shouldn't have anything to do with this. It only tells atom to open a project when you use the projects list view, never on start.

So is this a bug in Atom or do I completely miss something?

@dkerzig That or another package. Have you tried safe mode to see what happens?
Atom provides project manager with the loaded project, so it doesn't automatically load one.

Unfortunately the behavior the same in safe-mode :( I've filed a bug https://github.com/atom/atom/issues/12075 maybe these guys can help.
Thanks!!

authors: danielbrodin dkerzig

repo: danielbrodin/atom-project-manager


text:
🛑 DevOps App Roadmap Prod is down

In 651ce22, DevOps App Roadmap Prod (https://roadmap-app.onrender.com/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: DevOps App Roadmap Prod is back up in 66ac98f after 11 minutes.

repo: danielitogomez/upptime


text:
Make Code Able to Run Immediately After Download

Redesign the code and file structure for user to be able to run Kairos right after downloading.
Currently, the user must write the email.txt, sms.txt, OPENWEATHERMAP_API_KEY.txt, and GMAIL_APP_PASSWORD.txt.

Perhaps, make the input take those parameters. However, that would mean the user would have to edit the code to make it stop requesting those parameters. That is quite tedious.

Make an app, where you can input those data. It will be a lot easier to follow and navigate.

repo: danieljbk/kairos


text:
UTF-8 WITH ROM BUG

UTF-8 WITH ROM BUG. The outher fonts The font is displayed as ???
When i change to UTF-8 WITHOUT ROM , it displayed correct .But the codes error.

UTF-8 WITH ROM

Do you mean Romanian characters not being displayed?

UTF-8 WITH ROM

Do you mean Romanian characters not being displayed?

No. I mean the UTF-8 with signature cant displayed some characters,not the language, and if save as UTF without signature, some characters codes running erros.

UTF-8 WITH ROM

Do you mean Romanian characters not being displayed?

I think it's influenced by ImWchar ranges.The same translation in a character code becomes correct.

UTF-8 WITH ROM

Do you mean Romanian characters not being displayed?

I think it's influenced by ImWchar ranges.Sometimes it will be ok that translate with another agreed word.

Okay, should be fixed in f12c106daa4f380e2630846ca70d1bc6260632d4

Okay, should be fixed in f12c106

TKS A LOT i WILLTRY

authors: danielkrupinski jackieyiwu

repo: danielkrupinski/Osiris


text:
Jumpbug prediction

Hello. I cant add a simple jumpbug using engine prediction, it dont work for some reason.
The code:
  if (!config->misc.jumpbugkey.isDown())
    return;
  if (!EnginePrediction::getFlags() & 1 && localPlayer->flags() & 1)
  {
    cmd->buttons |= UserCmd::IN_DUCK;
    cmd->buttons &= UserCmd::IN_JUMP;
  }
}

I don't know how to fix it

are you putting it between the flags?

are you putting it between the flags?

Yes


text:
Ashley Madison reorder

Instead of alphabetical order, it would be better to order the list according to frequency of occurrence.
I could provide this if you want (with and/or without count).
Greetings

Yes please!

authors: danielmiessler whoot

repo: danielmiessler/SecLists


text:
Add HTTP request methods

http-methods.txt

Hey @arjunshibu ,
Great list !
I think this is not an issue. Make it a pull request 😀
Cheers

Will do😊

https://github.com/danielmiessler/SecLists/pull/519


text:
[Question]: How to use context/session parameters?

What is your question?
After reading the README, the -h help and parts of the code, I am still not clear about what are context/session parameters for and how to use them?
(Same for temperature, topp, frequency, etc. but for these I assume I would need to have more knowledge about how LLM work..)

@xssdoctor Can we add an example to the README?

authors: danielmiessler makampf

repo: danielmiessler/fabric