ujson json attribute logic

[x] ./test_fast.sh works fine
Ran 8463 tests in 127.338
OK (SKIP=592)
[x] passes git diff upstream/master | flake8 --diff

A port of ujson 1.35 feature: object can define __json__ attribute for custom serialization. See
https://github.com/esnme/ultrajson/commit/a8f0f0f1010956b27bf0c2cb5e52d85bb84e273a
class ujson_as_is(object):
    def __init__(self, value):
        self.value = value
    def __json__(self):
        return self.value

df = pd.DataFrame([{"foo": ujson_as_is('{"parrot": 42.0}')}])
df.to_json(orient = 'records')

result [{"foo":{"parrot": 42.0}}]

could you add some tests specifically for this
how standard is the dunder json tag? other libraries use? can u give some examples?

Added some tests. I don't think __json__ is used anywhere except ujson.
I am building some restful API and using pandas dataframe heavily. So I would like to skip python loops as much as possible.
Primary use cases for me:

put raw json dump of another dataframe to DataFrame, so that it is not double encoded.
create nested json from df skipping python looping.
different parts of nested structure might require different decimal places & datetime formatting.

I can write a small section in io.html#json with example of how I am going to use it in rest api, like:
df_long = pd.DataFrame(... ,index = [1,1,1,2,2,2])
df_result = pd.DataFrame(columns = ["result", "rest_api_code"], index=[1,2,3])

df_result["rest_api_code"] = "not_found"
df_result.loc[df_long.index.unique(),"rest_api_code"] = "ok"

for idx, grp in df_long.groupby(level=0):
    df_result.loc[idx, "result"] = grp.to_json(orient='records')

df_result.to_json(orient='records')

I am actually using multiple levels of such dataframe json nesting.
Do you think its worth noting in docs? It's not like typical use case and not related to core functionality.

@TurnaevEvgeny I think what people want is an easy way to do this (then we would expose pd.to_json(...) as a top-level general serializingfunction
In [2]: pd.io.json.to_json(None, df)
Out[2]: '{"A":{"0":1,"1":2,"2":3},"B":{"0":"a","1":"b","2":"c"}}'

In [3]: pd.io.json.to_json(None, {'foo' : df})
NotImplementedError: 'obj' should be a Series or a DataFrame

IIRC this was a very easy fix
cc @cpcloud

xref to #9166

@jreback Sorry, I didn't get why #9166 is referenced, seems irrelevant. I didn't completely get your reply that people want to pd.to_json(), although that aligns with my point that __json__ has nothing to do with dataframe serialization in general. Its just a way to allow to store pre-dumped json in df and then output without double/triple encoding. Well and ujson compatibility also. So whats the status of this pull? I can add docs if needed.

serializaing nested structures that include pandas objects can almost be done now
I would rather fix to_json than add a dunder method

I would argue that __json__  helps in different scenarios than serializing df with nested structures.
With __json__ one can store json dumps in arbitrary format in DataFrame df.loc[...] = ujson_as_is(df.to_json(orient='records')) and have different orientation, float formatting, and just store anything even not another dataframe dump, but arbitrary json dump. It also helps to store instances of objects that knows how to dump themselfs and have a cached dump representation in hands.

can u post a short compelling example (with output)
as if u were writing docs

In [185]: class ujson_as_is(object):                                                                                def __init__(self, value):
        self.value = value
    def __json__(self):
        return self.value
    __repr__ = __json__
   .....:

In [186]: df_company_info = pd.DataFrame([{'name': 'Google', 'est': '1998-09-04'}, {'name': 'Microsoft', 'est': '1975-04-04'}, {'name': 'Microsoft', 'est': '1976-04-01'}],index = ['goog', 'msft', 'aapl'])

In [187]: df_company_info
Out[187]:
             est       name
goog  1998-09-04     Google
msft  1975-04-04  Microsoft
aapl  1976-04-01  Microsoft

In [188]: names = np.random.choice(['aapl', 'goog', 'msft'], 10)

In [189]: dates = pd.date_range('1/1/2000', periods=10, freq='D')

In [190]: df = pd.DataFrame({'date': dates, 'price': np.random.random(10)}, index = names)

In [191]: df
Out[191]:
           date     price
msft 2000-01-01  0.488865
aapl 2000-01-02  0.717899
goog 2000-01-03  0.294098
msft 2000-01-04  0.738852
aapl 2000-01-05  0.073533
goog 2000-01-06  0.471874
aapl 2000-01-07  0.516558
msft 2000-01-08  0.057388
aapl 2000-01-09  0.901766
aapl 2000-01-10  0.244769

In [192]: for company,grp in df.groupby(level=0):
    df_company_info.loc[company, "stock_history"] = ujson_as_is(grp.to_json(orient='records', double_precision = 3, date_format = 'iso'))
   .....:

In [193]: df_company_info
Out[193]:
             est       name                                      stock_history
goog  1998-09-04     Google  [{"date":"2000-01-03T00:00:00.000Z","price":0....
msft  1975-04-04  Microsoft  [{"date":"2000-01-01T00:00:00.000Z","price":0....
aapl  1976-04-01  Microsoft  [{"date":"2000-01-02T00:00:00.000Z","price":0....

In [194]: df_company_info.to_json(orient='records')                                                                                Out[194]: '[{"est":"1998-09-04","name":"Google","stock_history":{"value":"[{\\"date\\":\\"2000-01-03T00:00:00.000Z\\",\\"price\\":0.294},{\\"date\\":\\"2000-01-06T00:00:00.000Z\\",\\"price\\":0.472}]"}},{"est":"1975-04-04","name":"Microsoft","stock_history":{"value":"[{\\"date\\":\\"2000-01-01T00:00:00.000Z\\",\\"price\\":0.489},{\\"date\\":\\"2000-01-04T00:00:00.000Z\\",\\"price\\":0.739},{\\"date\\":\\"2000-01-08T00:00:00.000Z\\",\\"price\\":0.057}]"}},{"est":"1976-04-01","name":"Microsoft","stock_history":{"value":"[{\\"date\\":\\"2000-01-02T00:00:00.000Z\\",\\"price\\":0.718},{\\"date\\":\\"2000-01-05T00:00:00.000Z\\",\\"price\\":0.074},{\\"date\\":\\"2000-01-07T00:00:00.000Z\\",\\"price\\":0.517},{\\"date\\":\\"2000-01-09T00:00:00.000Z\\",\\"price\\":0.902},{\\"date\\":\\"2000-01-10T00:00:00.000Z\\",\\"price\\":0.245}]"}}]'

In [5]: class ujson_as_is(object):
   ...:     def __init__(self, value):
   ...:         self.value = value
   ...:     def __json__(self):
   ...:         return self.value
   ...:     __repr__ = __json__
   ...:

In [6]: df_company_info = pd.DataFrame([{'name': 'Google', 'est': '1998-09-04'}, {'name': 'Microsoft', 'est': '1975-04-04'}, {'name': 'Microsoft', 'est': '1976-04-01'}],index = ['goog', 'msft', 'aapl'])

In [7]: df_company_info
Out[7]:
             est       name
goog  1998-09-04     Google
msft  1975-04-04  Microsoft
aapl  1976-04-01  Microsoft

In [8]: names = np.random.choice(['aapl', 'goog', 'msft'], 10)

In [9]: dates = pd.date_range('1/1/2000', periods=10, freq='D')

In [10]: df = pd.DataFrame({'date': dates, 'price': np.random.random(10)}, index = names)

In [11]: df
Out[11]:
           date     price
msft 2000-01-01  0.168259
msft 2000-01-02  0.731906
msft 2000-01-03  0.695573
goog 2000-01-04  0.974679
aapl 2000-01-05  0.275977
goog 2000-01-06  0.222568
msft 2000-01-07  0.808226
aapl 2000-01-08  0.795945
aapl 2000-01-09  0.025651
aapl 2000-01-10  0.720885

In [12]: for company,grp in df.groupby(level=0):
   ....:     df_company_info.loc[company, "stock_history"] = ujson_as_is(grp.to_json(orient='records', double_precision = 3, date_format = 'iso'))
   ....:

In [13]: df_company_info
Out[13]:
             est       name                                      stock_history
goog  1998-09-04     Google  [{"date":"2000-01-04T00:00:00.000Z","price":0....
msft  1975-04-04  Microsoft  [{"date":"2000-01-01T00:00:00.000Z","price":0....
aapl  1976-04-01  Microsoft  [{"date":"2000-01-05T00:00:00.000Z","price":0....

In [14]: df_company_info.to_json(orient='records')
Out[14]: '[{"est":"1998-09-04","name":"Google","stock_history":[{"date":"2000-01-04T00:00:00.000Z","price":0.975},{"date":"2000-01-06T00:00:00.000Z","price":0.223}]},{"est":"1975-04-04","name":"Microsoft","stock_history":[{"date":"2000-01-01T00:00:00.000Z","price":0.168},{"date":"2000-01-02T00:00:00.000Z","price":0.732},{"date":"2000-01-03T00:00:00.000Z","price":0.696},{"date":"2000-01-07T00:00:00.000Z","price":0.808}]},{"est":"1976-04-01","name":"Microsoft","stock_history":[{"date":"2000-01-05T00:00:00.000Z","price":0.276},{"date":"2000-01-08T00:00:00.000Z","price":0.796},{"date":"2000-01-09T00:00:00.000Z","price":0.026},{"date":"2000-01-10T00:00:00.000Z","price":0.721}]}]'

In [15]:

In [16]: class ujson_as_is(object):
   ....:     def __init__(self, value):
   ....:         self.value = value
   ....:     def __json__(self):
   ....:         return self.value
   ....:     __repr__ = __json__
   ....:

In [17]: df_company_info = pd.DataFrame([{'name': 'Google', 'est': '1998-09-04'}, {'name': 'Microsoft', 'est': '1975-04-04'}, {'name': 'Apple', 'est': '1976-04-01'}],index = ['goog', 'msft', 'aapl'])

In [18]: df_company_info
Out[18]:
             est       name
goog  1998-09-04     Google
msft  1975-04-04  Microsoft
aapl  1976-04-01      Apple

In [19]: names = np.random.choice(['aapl', 'goog', 'msft'], 10)

In [20]: dates = pd.date_range('1/1/2000', periods=10, freq='D')

In [21]: df = pd.DataFrame({'date': dates, 'price': np.random.random(10)}, index = names)

In [22]: df
Out[22]:
           date     price
msft 2000-01-01  0.280379
aapl 2000-01-02  0.120819
aapl 2000-01-03  0.471827
aapl 2000-01-04  0.789162
aapl 2000-01-05  0.649434
msft 2000-01-06  0.858836
goog 2000-01-07  0.440876
aapl 2000-01-08  0.523965
aapl 2000-01-09  0.860230
msft 2000-01-10  0.215722

In [23]: for company,grp in df.groupby(level=0):
   ....:     df_company_info.loc[company, "stock_history"] = ujson_as_is(grp.to_json(orient='records', double_precision = 3, date_format = 'iso'))
   ....:

In [24]: df_company_info
Out[24]:
             est       name                                      stock_history
goog  1998-09-04     Google  [{"date":"2000-01-07T00:00:00.000Z","price":0....
msft  1975-04-04  Microsoft  [{"date":"2000-01-01T00:00:00.000Z","price":0....
aapl  1976-04-01      Apple  [{"date":"2000-01-02T00:00:00.000Z","price":0....

In [25]: df_company_info.to_json(orient='records')
Out[25]: '[{"est":"1998-09-04","name":"Google","stock_history":[{"date":"2000-01-07T00:00:00.000Z","price":0.441}]},{"est":"1975-04-04","name":"Microsoft","stock_history":[{"date":"2000-01-01T00:00:00.000Z","price":0.28},{"date":"2000-01-06T00:00:00.000Z","price":0.859},{"date":"2000-01-10T00:00:00.000Z","price":0.216}]},{"est":"1976-04-01","name":"Apple","stock_history":[{"date":"2000-01-02T00:00:00.000Z","price":0.121},{"date":"2000-01-03T00:00:00.000Z","price":0.472},{"date":"2000-01-04T00:00:00.000Z","price":0.789},{"date":"2000-01-05T00:00:00.000Z","price":0.649},{"date":"2000-01-08T00:00:00.000Z","price":0.524},{"date":"2000-01-09T00:00:00.000Z","price":0.86}]}]'

In [26]:

Is there anything I can help further?

I am still confused what problem does this solve
in the example above, why wouldn't you simply df.to_json(...)

In the example above if I do the same without __json__ support in pandas the output will be
Out[194]: '[{"est":"1998-09-04","name":"Google","stock_history":{"value":"[{\\"date\\":\\"2000-01-03T00:00:00.000Z\\",\\"price\\":0.294},{\\"date\\":\\"2000-01-06T00:00:00.000Z\\",\\"price\\":0.472}]"}},{"est":"1975-04-04","name":"Microsoft","stock_history":{"value":"[{\\"date\\":\\"2000-01-01T00:00:00.000Z\\",\\"price\\":0.489},{\\"date\\":\\"2000-01-04T00:00:00.000Z\\",\\"price\\":0.739},{\\"date\\":\\"2000-01-08T00:00:00.000Z\\",\\"price\\":0.057}]"}},{"est":"1976-04-01","name":"Microsoft","stock_history":{"value":"[{\\"date\\":\\"2000-01-02T00:00:00.000Z\\",\\"price\\":0.718},{\\"date\\":\\"2000-01-05T00:00:00.000Z\\",\\"price\\":0.074},{\\"date\\":\\"2000-01-07T00:00:00.000Z\\",\\"price\\":0.517},{\\"date\\":\\"2000-01-09T00:00:00.000Z\\",\\"price\\":0.902},{\\"date\\":\\"2000-01-10T00:00:00.000Z\\",\\"price\\":0.245}]"}}]'

stock_history columns becomes double json encoded, like json.dump(json.dump({'foo': 'bar'})).
to_dict() partially solves this in the example above, but to_dict() doesn't help with different representation formats. Also I bet to_dict() will be slower because of python object creation while to_json() can convert pretty wide frames to string skipping intermediate python object creation. Besides with __json__ its just more handy to build final json dump gradually.

Does that explains the problem & motivation?

I still don't see any utility in doing that. You can simply construct the frame as you like, then serialize the entire thing.
In [21]: df_company_info['history'] = df.groupby(level=0).apply(lambda x: x.to_dict())

In [22]: df_company_info
Out[22]:
             est       name                                            history
goog  1998-09-04     Google  {u'date': {u'goog': 2000-01-10 00:00:00}, u'pr...
msft  1975-04-04  Microsoft  {u'date': {u'msft': 2000-01-08 00:00:00}, u'pr...
aapl  1976-04-01      Apple  {u'date': {u'aapl': 2000-01-09 00:00:00}, u'pr...

In [23]: df_company_info.to_json(orient='records')
Out[23]: '[{"est":"1998-09-04","name":"Google","history":{"date":{"goog":947462400000},"price":{"goog":0.4752710922}}},{"est":"1975-04-04","name":"Microsoft","history":{"date":{"msft":947289600000},"price":{"msft":0.1898955714}}},{"est":"1976-04-01","name":"Apple","history":{"date":{"aapl":947376000000},"price":{"aapl":0.7407572394}}}]'

See in your example "date":{"goog":947462400000}, thats my first point - different formatting at the different levels.
My second point is performance:
In [26]: %timeit -n 100 df.groupby(level=0).apply(lambda x: x.to_dict())
100 loops, best of 3: 21.8 ms per loop

In [27]: %timeit -n 100 df.groupby(level=0).apply(lambda x: ujson_as_is(x.to_json(orient='records')))
100 loops, best of 3: 8.21 ms per loop

Not a big deal, but not a big df also, and no futher to_dict() higher in call stack.
In the above examples its just one level nesting, but for the api I am building I am going to have: {'a': {'b': [ {'c': {'d': df_slice_dump_here}, 'e': other_df_slice_dump_here } ] }, 'z':  other_dump_here }. So suppose I have a function that prepares 'e': other_df_slice_dump_here part of output, what I really want to do in that function is to finalize work as intermediate json. If I go to_dict() in that function - I am going to have troubles with formatting later up in stack and also that will impact performance. Also I want to be able to put arbitrary json dumps in that function that prepares 'e': other_df_slice_dump_here not only other dataframe. See its like gradually building final json bottom up. I think that was exactly the intention why ujson added __json__.

why are you putting arbitrary json in dataframes? this is not useful or performant at all
you are just adding an artifice which doesn't enable much of anything, and will cause user confusion
I still don't see how his is actually useful - where are you exporting this json to? and what are you doing with it?

Ok, let me start from beginning. I am building REST api (flask application) that supposed to return json. Internally I am working with dataframes fetched from different sources or cached in memory. During processing api calls I often have 2-3 dataframe that somehow related (often not a straigthforward merge way). The options for me to output final json: 1) Loop though those 2-3 dataframes and construct giant dict and then json.dump it. 2) Use pandas dataframes, df.to_json() and build json gradually.
The first option is a mix of .apply(), to_dict(), .iterrows(), which I would like to skip for performance and readability reasons.
I understand this all is not a pandas problem at all, and this was my original doubt that this functionality should not be put into docs because it is specific of json dumping. But I've found ujson __json__ implementaiton and idea. The code is much simpler, smoother, and more performant with the second approach.
I understand your concern of bringing unneeded complexity into codebase, on the other hand from my perspective this is just ujson compliance that potentially opens new way to prepare json output with pandas dataframes for the cases like rest api.

cc @Komnomnomnom any thoughts here

I'd be more in favour of supporting a default handler which can return encoded / raw json, similiar to the cls arg in the built-in json.dumps e.g. something like
df.to_json(default_enc=lambda obj: json.dumps(obj))

@Komnomnomnom isn't that what default_handler is doing?

No it converts an unsupported object into one that can be JSON serialised i.e. by converting to a dict or a string.
default_enc would be expected to return valid JSON.

why 2 different ways? couldn't default_handler just return valid JSON? (and if its not it would be an error)?

If default_handler returned JSON it would just be treated as a regular string and thus end up double encoded. default_handler must convert the object into a different JSON-serializable object i.e. MyClass -> dict representation of MyClass.
The idea is that

default_handler allows you to easily serialize objects that are not natively supported by the JSON serializer, but you must return a new, supported object to the encoder and it will encode the new object using the params you invoked it with (iso dates, fast numpy and so on).
default_enc would be required to return valid JSON and would allow allow you to override the encoder for a subset of your data. So you could change encoder params or use a different encoder entirely, along with supporting the use case above and avoiding double encoding. The caveat is it would only get invoked for objects that the regular encoder doesn't support.

closing as won't fix.
default_handler covers these cases


Add index.js that exposes constants for method names

Implementation of idea discussed here https://github.com/fantasyland/fantasy-land/issues/92#issuecomment-172357516

This is a simple, pragmatic solution to a very real problem. Well done!
I suggest not touching symbols with a barge pole.

:+1:

Someone who has access should publish this to npm now, so we could start migrating our libs.

@puffnfresh @joneshf ping. What do you think about releasing this thing to npm?

Sounds good.

@puffnfresh I was hoping you or @joneshf could actually do this, since you have access to npm. I can submit a PR with version bump if that will help.

Or if someone gave me push access then I can do it for people.
On Wed, 27 Jan 2016, 13:15 Roman Pominov<EMAIL_ADDRESS>wrote:

@puffnfresh https://github.com/puffnfresh I was hoping you or @joneshf
https://github.com/joneshf could actually do this, since you have
access to npm. I can submit a PR with version bump if that will help.
—
Reply to this email directly or view it on GitHub
https://github.com/fantasyland/fantasy-land/pull/120#issuecomment-175618062
.

@SimonRichardson I think you have write access to this repo and collaborator access on npm. Do you need something else?

I thought I didn't have access to npm, if I do, sorry for my mistake.
On Wed, 27 Jan 2016, 20:28 Brian McKenna<EMAIL_ADDRESS>wrote:

@SimonRichardson https://github.com/SimonRichardson I think you have
write access to this repo and collaborator access on npm. Do you need
something else?
—
Reply to this email directly or view it on GitHub
https://github.com/fantasyland/fantasy-land/pull/120#issuecomment-175839640
.


implementation of scroll in directive vue js

Make sure these boxes are checked before submitting your issue -- thank you!
hello I was trying to implement the script to vue js as a directive, but the bar always appears to the left, it seems that it is a problem with the styles, try putting it in! important the right position but it seems that it does not read it well.

Please check if the container has position style and other styles are imported correctly. For detailed usage, please refer to How to use. vue-perfect-scrollbar may help, but it's not maintained by us and I've not yet tried it.
If there is still an issue, please provide an example page or a fiddle. Thanks!

Thanks for your helping. I was have imported good the file css . Well i will try el vue-perfect-scrollbar . thanks so much

@sebastian-yabiku I'm using this implementation as a Directive:
import PS from 'perfect-scrollbar'

export default {
  name: 'scroll',
  inserted (el, binding, vnode) {
    if (binding.value) {
      const callback = typeof binding.value === 'function'
        ? binding.value
        : binding.value.callback

      el.addEventListener('scroll', callback, { passive: true })
    }

    el.style.position = 'relative'
    PS.initialize(el)

    let ticks = 0
    const interval = setInterval(() => {
      PS.update(el)
      ticks++
      if (ticks >= 20) clearInterval(interval)
    }, 200)
  },
  unbind (el, binding) {
    if (binding.value) {
      el.removeEventListener('scroll', binding.callback, { passive: true })
    }

    el.style.position = 'static'
    PS.destroy(el)
  },
  componentUpdated (el) {
    PS.update(el)

    let ticks = 0
    const interval = setInterval(() => {
      PS.update(el)
      ticks++
      if (ticks >= 20) clearInterval(interval)
    }, 200)
  }
}


ParameterExpression with unbound parameters (dict_keys([Parameter(__gθ0)])) cannot be cast to a float

Qiskit Algorithms runs a couple of CI jobs against the main branch here to keep an eye on ongoing changes here. Last nights CI nightly run failed https://github.com/qiskit-community/qiskit-algorithms/actions/runs/7282997053/job/19846228142
Could this be related to #11428 ? @jakelishman
Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):

      File "/home/runner/work/qiskit-algorithms/qiskit-algorithms/qiskit_algorithms/gradients/lin_comb/lin_comb_sampler_gradient.py", line 125, in _run_unique
    results = job.result()

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/qiskit/primitives/primitive_job.py", line 55, in result
    return self._future.result()

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/concurrent/futures/_base.py", line 444, in result
    return self.__get_result()

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
    raise self._exception

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/qiskit/primitives/sampler.py", line 101, in _call
    probabilities = [

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/qiskit/primitives/sampler.py", line 102, in <listcomp>
    Statevector(bound_circuit_to_instruction(circ)).probabilities_dict(

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/qiskit/quantum_info/states/statevector.py", line 91, in __init__
    self._data = Statevector.from_instruction(data).data

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/qiskit/quantum_info/states/statevector.py", line 768, in from_instruction
    return Statevector._evolve_instruction(vec, instruction)

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/qiskit/quantum_info/states/statevector.py", line 948, in _evolve_instruction
    statevec._data *= np.exp(1j * float(obj.definition.global_phase))

      File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/qiskit/circuit/parameterexpression.py", line 415, in __float__
    raise TypeError(

    TypeError: ParameterExpression with unbound parameters (dict_keys([Parameter(__gθ0)])) cannot be cast to a float.

It's almost certainly related - I'll have to do a little digging and see what's going on, but I feel like I saw something similar while initially making the change, which I started before algorithms was removed.  I assumed I'd fixed all of those issues, but I can look into it.

Ok, one bug is in QuantumCircuit.remove_final_measurements, which I could have sworn I fixed, but maybe got lost in a rebase.  That's fixed in #11455.
The other is in BlueprintCircuit.copy, or perhaps more completely, it's because the data model and principle of BlueprintCircuit is at best flawed, and at worst just invalid.  It's totally unreliable to append to, or generally otherwise mutate a BlueprintCircuit (which the algorithms tests do), but that's something that people try all the time, because there's no indication that you can't.  Any time something does something that BlueprintCircuit considers a "modification", it invalidates itself, which involves scrubbing (some of) its state.  In this case, the part of QuantumCircuit.copy_empty_like that refreshes the qregs list is counted as a modification, so BlueprintCircuit scrubs itself, including zeroing out the global phase, but copy_empty_like doesn't know that it's done that (nor should it need to know), so it doesn't restore it.  This will have been zeroing the global phase out before #11428, but that PR caused it to get noticed.  I've put in an override of QuantumCircuit.copy_empty_like in #11456, but this won't be the last time we find some weirdness where BlueprintCircuit is invalidating itself and throwing away data.

Which BlueprintCircuit classes are most commonly used in the algorithms? For instance, in #11463 I am adding QftGate class that should in principle replace the QFT bluecircuit class.

Sasha: in my informal survey, it's like 90% NLocal and subclasses like RealAmplitudes. Those could have probably been factory functions for regular QuantumCircuit instances, or potentially very simple subclasses adding an extra attribute, but I think the ship has sailed on that for Qiskit 1.0.


Docupdate: Info about exception that can be thrown

Description
Docupdate: Info about exception that can be thrown. It is unlikely to happen, but can indeed happen for one long context.
Type of change

[ ] Refactor
[ ] New feature
[ ] Bug fix
[ ] CVE fix
[ ] Optimization
[x] Documentation Update
[ ] Configuration Update
[ ] Bump-up dependent library

Checklist before requesting a review

[x] I have performed a self-review of my code.
[x] PR has passed all pre-merge test jobs.
[ ] If it is a core feature, I have added thorough tests.

Testing

N/A
How were the fix/results from this change verified? Please provide relevant screenshots or results.

/lgtm

/approve


Mettack for directed graphs

The original implementation of Mettack is designed only for undirected graphs.  I've added an option undirected to MetaBase, Metattack, MetaApprox and utils.likelihood_ratio_filter and adapted their codes to support both undirected and directed graphs.  I set the default value of undirected to True so that it is supposed be compatible with existing code.

Thank you!


[Dropdown] Clicking on label won't open dropdown

I'm not sure if this is expected behavior but when clicking on selected option label it won't open the dropdown
http://semantic-ui.com/modules/dropdown.html#label

select label e.g. "Important"
click on the red label

It will not open the dropdown menu.
I found this is issue when I tried to have only label as a select option (for color picker).
EDIT: as a workaround i just used my own custom label(span) seems to work. I just wanted to report this if it's possible bug.

Confirmed bug on Chrome 49 - OS X.

Confirmed bug.


fix: Fix is_atom handling of single-Symbol keyword argument parameters

Codecov Report
Patch coverage: 66.66% and project coverage change: -0.10% :warning:

Comparison is base (5b92177) 86.51% compared to head (eb483f4) 86.41%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
- Coverage   86.51%   86.41%   -0.10%
==========================================
  Files          15       15
  Lines        1201     1215      +14
==========================================
+ Hits         1039     1050      +11
- Misses        162      165       +3

Files Changed
Coverage Δ

src/computational_graph.jl
84.01% <57.14%> (-0.02%)
:arrow_down:

src/show_diff/common.jl
75.63% <75.00%> (-0.05%)
:arrow_down:

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


WhileLoop doesn't conform to ASDL

Example from asr-expr1-dde511e.stdout has three parameters:
(WhileLoop
                                        () ;; one
                                        (NamedExpr
                                            (Var 2 a)
                                            (IntegerConstant 1 (Integer 4 []))
                                            (Integer 4 [])
                                        ) ;; two
                                        [(=
                                            (Var 2 y)
                                            (IntegerConstant 1 (Integer 4 []))
                                            ()
                                        )] ;; three
                                    )

but ASDL from ASDL_2023_APR_06_snapshot.asdl specifies only two:
    | WhileLoop(expr test, stmt* body)

The first argument in the Example is mysterious. I'll work around it for now.

The current ASR definition is WhileLoop(identifier? name, expr test, stmt* body), the first argument is probably a "goto target" to jump to, this is needed if you have multiple nested loops and you are doing "break name" to a specific parent loop. There might be a better way to do it, but for now we use this mechanism. Python doesn't allow breaking to a parent loop, but Fortran does.

ok, that's neat! goto doesn't deserve its bad reputation!
Should the goto target perhaps be a symbol-ref? Or do we want a nice,
refined type for goto-targets? or even labels, generically? What about
computed gotos, where all the labels are numerical? perhaps the labels
ought to be (s/or :numerical ::nat, :symbolic ::symbol-ref)?
On Thu, May 11, 2023 at 7:20 PM Ondřej Čertík @.***>
wrote:

The current ASR definition is WhileLoop(identifier? name, expr test,
stmt* body), the first argument is probably a "goto target" to jump to,
this is needed if you have multiple nested loops and you are doing "break
name" to a specific parent loop. There might be a better way to do it, but
for now we use this mechanism. Python doesn't allow breaking to a parent
loop, but Fortran does.
—
Reply to this email directly, view it on GitHub
https://github.com/rebcabin/masr/issues/33#issuecomment-1545011038, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABSRR3F2LKM3GTOUHXFWOTXFWM6NANCNFSM6AAAAAAX6ZGHEU
.
You are receiving this because you authored the thread.Message ID:
@.***>

many many times in intense numerical code i wanted to jump to a parent
loop. "Structured Programming" without gotos forces truly pornographic
contortions. Goto is exactly the right answer. Ditto finite-state automata.
Absolutely the fastest FSA's use gotos, not switch stmts, which have extra
jumps to the jump table!
Avoiding gotos is like avoiding mutation: sometimes it's just the wrong
thing to do. Fundamentalist Structured Programming is like Fundamentalist
Declarative Programming. Ever seen real-world Prolog with "cut" and "fail?"
Fundamentalism is too rigid for the real world.
ok this whole issue was settled in the 1980's. I'm just reminding myself of
some engineering taste and judgment principles.
On Fri, May 12, 2023 at 5:54 AM Brian Beckman @.***> wrote:

ok, that's neat! goto doesn't deserve its bad reputation!
Should the goto target perhaps be a symbol-ref? Or do we want a nice,
refined type for goto-targets? or even labels, generically? What about
computed gotos, where all the labels are numerical? perhaps the labels
ought to be (s/or :numerical ::nat, :symbolic ::symbol-ref)?
On Thu, May 11, 2023 at 7:20 PM Ondřej Čertík @.***>
wrote:

The current ASR definition is WhileLoop(identifier? name, expr test,
stmt* body), the first argument is probably a "goto target" to jump to,
this is needed if you have multiple nested loops and you are doing "break
name" to a specific parent loop. There might be a better way to do it, but
for now we use this mechanism. Python doesn't allow breaking to a parent
loop, but Fortran does.
—
Reply to this email directly, view it on GitHub
https://github.com/rebcabin/masr/issues/33#issuecomment-1545011038, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AABSRR3F2LKM3GTOUHXFWOTXFWM6NANCNFSM6AAAAAAX6ZGHEU
.
You are receiving this because you authored the thread.Message ID:
@.***>

reopening as documentation reminder as requested by @certik


Unwanted TRACE output in v2.23.1 with -Dlog4j.debug=false

Description
The effect of -Dlog4j.debug=false has changed in v2.23.1
Configuration
Version: 2.23.1
Operating system: Windows
JDK: zulu17.46.19-ca-jdk17.0.9-win_x64
Reproduction
Consider the following Java program:
package org.example;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class Main {

    public static void main(String[] args) {
        System.setProperty("log4j.debug", "false");

        Logger log = LogManager.getLogger(Main.class);
        log.error("Hello world!");
    }
}

With Log4j v2.23.0 it prints:
15:20:02.690 [main] ERROR org.example.Main - Hello world!

as expected.
However, when version is upgraded to  v2.23.1, the output becomes a lot more verbose:
...
2024-07-03T14:23:42.658351400Z main TRACE Using default SystemClock for timestamps.
2024-07-03T14:23:42.658351400Z main DEBUG org.apache.logging.log4j.core.util.SystemClock supports precise timestamps.
2024-07-03T14:23:42.658351400Z main TRACE Using DummyNanoClock for nanosecond timestamps.
2024-07-03T14:23:42.658351400Z main DEBUG Reconfiguration complete for context[name=1d44bcfa] at URI NULL_SOURCE (org.apache.logging.log4j.core.LoggerContext@67e2d983) with optional ClassLoader: null
2024-07-03T14:23:42.658351400Z main DEBUG Shutdown hook enabled. Registering a new one.
2024-07-03T14:23:42.659352600Z main DEBUG LoggerContext[name=1d44bcfa, org.apache.logging.log4j.core.LoggerContext@67e2d983] started OK.
15:23:42.661 [main] ERROR org.example.Main - Hello world!
2024-07-03T14:23:42.663882800Z pool-1-thread-1 DEBUG Stopping LoggerContext[name=1d44bcfa, org.apache.logging.log4j.core.LoggerContext@67e2d983]
2024-07-03T14:23:42.664881900Z pool-1-thread-1 DEBUG Stopping LoggerContext[name=1d44bcfa<EMAIL_ADDRESS>2024-07-03T14:23:42.664881900Z pool-1-thread-1 TRACE Unregistering 1 MBeans: [org.apache.logging.log4j2:type=1d44bcfa]
...

which is unexpected.

Thank you for your report and the patch!


CLI: Allow short contractIDs

See https://github.com/stellar/stellar-contract-cli/pull/43#discussion_r926161225

@sisuresh would you mind if I took this up?

@sisuresh would you mind if I took this up?

Nope go ahead. Thanks!


Where I can deploy it ?

How I can deploy it to Heroku .

Like I said in #77, I don't provide support for Heroku. You could try it if you want - some forks of this bot support it.
As for where else to deploy, pick any VPS provider that works for you.


lib: Simplify float handling

Motivation for this change
See https://github.com/NixOS/nixpkgs/commit/73be1b147da3d4db8ed585ce958a4c704e64ade1 for details. The  tl;dr is we had too many sources of truth before.
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

Success on x86_64-darwin (full log)
Attempted: gcc
The following builds were skipped because they don't evaluate on x86_64-darwin: glibc
Partial log (click to expand)
assertion failed at /private/var/lib/ofborg/builds/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-ndnd/pkgs/development/libraries/glibc/default.nix:8:1

these paths will be fetched (37.20 MiB download, 155.10 MiB unpacked):
  /nix/store/7j56b0vlaw1klmvscjz7sgkaplah7dyn-gcc-wrapper-7.3.0
  /nix/store/g73xs45jy9cpqj326gkw6xh9chqfdp8x-gcc-7.3.0-lib
  /nix/store/hx3siphz67qji0ag17hnnblywi3136z2-gcc-7.3.0
copying path '/nix/store/g73xs45jy9cpqj326gkw6xh9chqfdp8x-gcc-7.3.0-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/hx3siphz67qji0ag17hnnblywi3136z2-gcc-7.3.0' from 'https://cache.nixos.org'...
copying path '/nix/store/7j56b0vlaw1klmvscjz7sgkaplah7dyn-gcc-wrapper-7.3.0' from 'https://cache.nixos.org'...
/nix/store/7j56b0vlaw1klmvscjz7sgkaplah7dyn-gcc-wrapper-7.3.0

Success on x86_64-linux (full log)
Attempted: gcc, glibc
Partial log (click to expand)
/nix/store/487kalv9jm8g5fs3bm5yhby63mcpnbfv-gcc-wrapper-7.3.0
/nix/store/27x7pinqdsl9f3rpbm8bsszd9fhwq266-glibc-2.27

Success on aarch64-linux (full log)
Attempted: gcc, glibc
Partial log (click to expand)
/nix/store/b671sg6x66clhzq5i9flgfx9abhrdjcj-gcc-wrapper-7.3.0
/nix/store/14wyhz52r2fz8gxjrjk3h7gr1h1qpb0j-glibc-2.27


Install Error (Editable mode, Py 3.7)

Environment

Qiskit Terra version: 0.20.2
Python version: 3.7.13
Operating system: macOS 12.0.1
PIp version*: pip 22.1.2

What is happening?
There is an error installing the requirements in editable mode.
How can we reproduce the issue?
pip install -e .

...
Collecting scipy>=1.5
  Using cached scipy-1.7.3.tar.gz (36.1 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
 ...
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Terminal session permalink: https://app.warp.dev/block/8tDR0kwXIxGM446zCJf9Gk
What should happen?
Requirements should install
Any suggestions?
It is likely a version support issue. When I run the same commend using python 3.10.0 it works perfectly fine.

The underlying error is not actually coming from installing qiskit, it never gets that far along as it's starting by processing the dependencies. The errors you're hitting are trying to build scipy from source because pip doesn't think that any of the versions it can find are compatible with your python 3.7 environment. This normally points to a local python environment issue. As such I'm going to close this issue as it's not anything we can fix directly in qiskit.
That being said to debug this what you can try to minimally recreate this is by running pip install "scipy>=1.5" in your 3.7 environment. Normally using the verbose flags for pip will tell you why pip is rejecting the precompiled scipy wheels from pypi. You can also try `pip install --prefer-binary scipy "scipy>=1.5"``to see if that helps. Normally when this happens it's because your pip version is out of date and it doesn't know how to handle the tags on the wheels, but if you're running with 22.1.2 on 3.7 that is the latest version.


TeaVMRunner hang

I regularly use TeaVM version 0.5.0-dev-328 to compile my SnapKit demos, but when I try the latest version (by cloning the project and gathering the jars), TeaVMRunner hangs. You can download and build the SnapKit library like this:
prompt> cd /tmp; git clone http://github.com/reportmill/SnapKit.git
prompt> cd SnapKit; mvn install

Then you can try a TeaVM compile against a little built-in demo:
prompt> java -cp /<TeaVM-jar-dir>/*:/tmp/SnapKit/target/classes/ org.teavm.cli.TeaVMRunner snap.viewx.TextPane
INFO: Running TeaVM
Analyzing classes...

For me (on MacOS) this never returns - but works fine for the old version. Note, this sample doesn't include my SnapTea adapter library, but that shouldn't stop it from compiling. You can also delete the src/snap/swing package and the only reference (via reflection) in the method snap.view.ViewEnv.setDefaultEnv (ViewEnv.java:47). But that doesn't matter either.

Did you try to increase maxium heap size available for JVM?

Could not reproduce. I need more info. What is the Java version? What is the TeaVM version? What is TeaVM-jar-dir?

I just tried with -Xmx1500m, but no change.
I built a directory (/tmp/tvm-new) with all the teavm jars with this:
prompt> cd /tmp/teavm/tools/cli
prompt> man install
prompt> mvn dependency:copy-dependencies -DoutputDirectory=/tmp/tvm-new
prompt> cp target/teavm-cli-0.6.0-SNAPSHOT.jar /tmp/tvm-new/teavm-cli.jar
I'm not sure if that's sufficient to get all the TeaVMRunner dependencies, but I was thinking it would throw a ClassNotFound error if it wasn't so.

I just did a pull from your latest commit and that seems to have fixed the hang. Although, now I am getting a bunch of "claimed to be synchronous, but it is has invocations of asynchronous methods" errors. I need to read the docs on this to figure out what is causing it - although I don't see all of these errors with version 0.5.0-dev-328.

Strange. The last commit did not fix anything related to compilation itself. It just fixed lack of diagnostic messages from CLI. Right, you did not see any error messages before since CLI runner did not report them to the console (but compiler generated them). The article that explains the error message you get is here: http://teavm.org/docs/runtime/coroutines.html


New version: MLStyle v0.3.1

Registering package: MLStyle
Repository: https://github.com/thautwarm/MLStyle.jl
Created by: @thautwarm
Version: v0.3.1
Commit: 2d1bdb2cd794dc08279d79a3518f595a8bf2dbc2
Reviewed by: @thautwarm
Reference: https://github.com/thautwarm/MLStyle.jl/commit/2d1bdb2cd794dc08279d79a3518f595a8bf2dbc2#commitcomment-34771062

Needs a [compat] section in Project.toml with at least an entry for julia itself, e.g.:
[compat]
julia = "1"

would mean that the package is compatible with Julia versions [1.0.0, 2.0.0).

TagBot tag

Is that okay if I've created the release manually?


Change required node version to 14

As far as I see there is no reason to require node 16, 14 works too.
Our build pipeline only supports node 14 at the moment

As far as I see there is no reason to require node 16, 14 works too. Our build pipeline only supports node 14 at the moment

I was getting an error when building using node <16 - see https://github.com/capacitor-community/file-opener/issues/23#issuecomment-1359415831


Docs should show preview packages under "Latest" in addition to "Preview" if there is no GA version

Customers visiting a docs page for the first time may not know to go to the "Preview" moniker to see docs for a preview package. This can be especially confusing in situations where the package in question only has preview versions and no GA versions. If the user doesn't immediately see the package they are searching for under the "Latest" moniker they may incorrectly conclude that package documentation does not exist.
To address this it is proposed by @elraikhm that in cases where there is no GA version (i.e. only preview versions of a package) we onboard the preview package in both "Latest" and "Preview" monikers. When there is a GA version then the GA version will always be onboarded to the "Latest" moniker and "Preview" will be onboarded using the existing logic.

Talked with Scott Addie - we do not plan to pursue this.

Closing, as I don't believe this is the right direction.


Also space-pad data, event, and retry fields.

data and event for correctness, retry for consistency.
This was meant to be part of #693, but I gitted too fast.

This also looks good so long as Travis is happy. I'll let you merge it though, just in case...


WeakMap memory leak

package gojatest

import (
	"runtime"
	"testing"
	"time"

	"github.com/dop251/goja"
)

func TestWeakMap(t *testing.T) {
	for i := 0; i < 100; i++ {
		r := goja.New()
		r.RunScript("", "var x = {}; new WeakMap().set(x, {})")
		r = nil
	}
	runtime.GC()
	time.Sleep(100 * time.Millisecond)
	runtime.GC()
	time.Sleep(100 * time.Millisecond)
}

$ go test weakmap_test.go -memprofile=/tmp/heap

There are still tons of inuse_objects:

Still have no idea why (it seems to be related with runtime.SetFinalizer).

new WeakMap().set(x = {}, {})

There is a circular reference:
x.weakColls references to the runtime via the value {}, while the runtime references x (in globalObject).

You are right. I tried to make the implementation as unobtrusive as possible because many people don't use weak collections. Unfortunately, I failed 😞
Your particular case could be fixed by introducing a wrapper around Runtime, so that the current runtime becomes unexported:
type Runtime struct {
    *runtime
}

then setting a finalizer on *Runtime which clears the globalObject.
However, this will not work if an object is used as its own value in a weak collection (i.e. if you do m.set(x, x)).
The only way I can see to solve this would be doing the same wrapper trick on *Object. This would mean, however, an extra pointer for each object (even if they are never part of any weak collection and even if weak collections are not used). Not sure this will help the GC and the overall performance and not sure I want to do this, seems a rather drastic change for a corner case.
What I could do instead is detect this and remove the finalizer, so that at least the object is garbage-collected when the weakmap itself becomes unreferenced.
Unless there is a better suggestion, I'll do it.

In fact, it won't work in a more generic case: if the value has a reference to the key, i.e. m.set(x.y, x))

Your particular case could be fixed by introducing a wrapper around Runtime [...] then setting a finalizer on *Runtime which clears the globalObject.

I actually encountered this problem in core-js, enforceInternalState(value) operates as m.set(value, {}) to an internal WeakMap while the key value is a function which overwrites Function.prototype.toString. So I should clear the runtime.global.FunctionPrototype as well.

In fact, it won't work in a more generic case: if the value has a reference to the key, i.e. m.set(x.y, x))

Yes, I'm also thinking over if there is a better solution which can also cover this case.

Giving it more thought, I don't think adding a finalizer to Runtime is a good idea. Imagine there is a custom struct that refers to Runtime and this struct is put into the globalObject. Suddenly this makes the whole Runtime not garbage-collectable.
And even the trick with *Object won't solve all cases. In fact I believe there is no perfect solution within the current Go functionality. There is simply no way to guarantee there are no circular references (for example the key may be the map itself).
I know Go authors don't want to make improvements with finalizers because they believe they are "overused". Maybe it's worth making a case to them?

I know Go authors don't want to make improvements with finalizers because they believe they are "overused". Maybe it's worth making a case to them?

I agree that Go should improve finalizers, however, not likely in the short term.
Currently, maybe we could implement a "lazy gc" on WeakMap? That is, clean the keys only when accessing the map such as m.has, m.get and m.set (or periodly in background / every N instructions?).
In that case, a weakCollection would not hold a reference to the data of WeakMap (hence no circular references), but simply a struct that records the keys to be removed.
type weakMap struct {
	// need to synchronise access to the data map because it may be accessed
	// from the finalizer goroutine
	sync.Mutex
	data     map[uint64]Value
	removals *removals
}

// TODO: locks.
type removals struct{
	keys []uint64
}

func (r *removals) removeId(id uint64) {
	r.keys = append(r.keys, id)
}

func (vm *weakMap) gc() {
	for _, id := range vm.removals.keys {
		vm.removeId(id)
	}
	vm.removals.keys = nil
}

func (wm *weakMap) set(key *Object, value Value) {
	wm.gc()
	...
	refs.add(wm.removals)
}

I was thinking along the same line. This approach seems the most reasonable. Hopefully the change will fix the problem and will not create any unwanted side effects.

good job!


Update dlcall, as -g is now the default.

Verified by testing on Fedora 21 x64.

This is a straightforward mechanical transformation, right? Sed -i -e
's|dlcall -g|dlcall|' or so? Sounds good to me, I'll be online to look
later.
Thanks
On Aug 23, 2015 3:28 PM, "Tavis Ormandy"<EMAIL_ADDRESS>wrote:

Verified by testing on Fedora 21 x64.
You can view, comment on, or merge this pull request online at:
https://github.com/cemeyer/httpd.sh/pull/1
Commit Summary

Update dlcall, as -g is now the default.

File Changes

M err.sh https://github.com/cemeyer/httpd.sh/pull/1/files#diff-0
(8)
M fcntl.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-1 (4)
M httpd.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-2 (4)
M netdb.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-3 (10)
M stdlib.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-4 (4)
M string.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-5 (10)
M sys_select.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-6 (2)
M sys_sendfile.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-7 (4)
M sys_socket.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-8 (16)
M sys_stat.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-9 (8)
M unistd.sh
https://github.com/cemeyer/httpd.sh/pull/1/files#diff-10 (2)

Patch Links:

https://github.com/cemeyer/httpd.sh/pull/1.patch
https://github.com/cemeyer/httpd.sh/pull/1.diff

—
Reply to this email directly or view it on GitHub
https://github.com/cemeyer/httpd.sh/pull/1.

Oh, also are you ok with all of these changes being MIT-licensed? I guess they're pretty trivial but it doesn't hurt to ask.

Sure, fine with me!
On Aug 23, 2015 9:13 PM, "Conrad Meyer"<EMAIL_ADDRESS>wrote:

Oh, also are you ok with all of these changes being MIT-licensed? I guess
they're pretty trivial but it doesn't hurt to ask.
—
Reply to this email directly or view it on GitHub
https://github.com/cemeyer/httpd.sh/pull/1#issuecomment-134025639.


Make it easy to fork and release a modified version of lucide.

Package

[ ] lucide
[ ] lucide-angular
[ ] lucide-flutter
[ ] lucide-preact
[ ] lucide-react
[ ] lucide-react-native
[ ] lucide-solid
[ ] lucide-svelte
[ ] lucide-vue
[ ] lucide-vue-next
[ ] Figma plugin
[X] all JS packages
[ ] site

Description
I would love if I could press fork and with minimal effort release my changes to NPM as new packages.
Use cases

People want to build their own icon library from scratch (fresh start with 0 icons but all the boilerplate your heart desires)
People want to extend lucide with icons that won't make it into lucide i.e., praying-hands, poo-with-eyes, etc.
People creating custom variants of lucide icons (what I want to do)

Checklist

[X] I have searched the existing issues to make sure this bug has not already been reported.

@danielbayley would you also be interested in this?

Ok, I've maybe a good idea for this. I don't want to call it a "fork". But more a "extended" version of lucide.
We could add a special function to each package named createFromIconNodes.
import createFromIconNodes from './createFromIconNodes';
import iconNodes from './myIconNodes';

const myIcons = createFromIconNodes(iconNodes);

// Now you can use the created icons in your React components
function MyComponent() {
  return (

      <myIcons.MyIcon1 />
      <myIcons.MyIcon2 />
      <myIcons.MyIcon3 />
      {/* ... */}

  );
}

Ok, I've maybe a good idea for this. I don't want to call it a "fork". But more an "extended" library version of lucide.
Creating icon components from icon nodes & second repo idea
We could add a special function to each package named e.g: createFromIconNodes. Which creates icon components from icon nodes. We already have a similar function in the library but that is for single use.
// React example
import { createFromIconNodes, createLucideIcon } from '@lucide/react';
import iconNodes from './myIconNodes';
import { PooWithEyes }  from '@lucide/extended';

// This function will create object components, which can be destructed as well.
const myIcons = createFromIconNodes({
   ...iconNodes,
   PooWithEyes
});

// Alt: Single icon component generation, every library has already this function.
const PooWithEyesIcon = createLucideIcon('PooWithEyes', PooWithEyes)

// Now you can use the created icons in your React components
function MyComponent() {
  return (

      <myIcons.MyIcon1 />
      <myIcons.MyIcon2 />
      <myIcons.MyIcon3 />
      <myIcons.PooWithEyes />
      {/* ... */}

  );
}

With this, we could make a second repo for all these extra icons that don't make the "main" library. The rules and acceptance criteria of this repo will be more relaxed.
Another useful usecase is: for the deprecation of the brand icons in the library. We could move this to a separate library: @lucide/brands. This library will contain all the brand icons we currently have in our library, but then in the form of icon nodes.
Why not do this with all our icons/packages?
Yeah, probably some people will think of this. The basic answer: is developer experience. Importing icons as components is super easy to work with all these libraries. Changing all our APIs to this format will create a lot of extra steps for devs. So this API should be more for special occasions.
Custom icons
This could be a separate library containing useful functions like createIconNodeFromSVG. That for example converts your svgcode in an icon node. So you can use the Lucide API with your own icons.
For Example
import { createIconNodeFromSVG } from '@lucide/utils'

const myIconNode = createIconNodeFromSVG('<svg> .... </svg>');

export const MyIconComponent = createLucideIcon('MyIcon', myIconNode)

But under the hood, it will basically do this:
Svgcode -> IconNode -> SvgCode

Let me know what you think of this idea.

I'm biased because of https://github.com/lucide-icons/lucide/discussions/1594 but that looks like a great idea.

A nice approach could be to create a release action that builds the package and pushes it to NPM for you.
https://github.com/jguddas/icon-library-structure-example/blob/main/.github/workflows/release.yml#L26

@danielbayley would you also be interested in this?

@jguddas 100%!


Issue #1266 fix: Max score validation in question metadata form

@vinukumar-vs

Can you rise this PR against release-1.10.0. Branch is not yet created, this can go in next release.


Initial rendering looks not nice

Do you want to request a feature or report a bug?
a bug
What's the current behavior?
Then we enter the calendar page, we can see this (see screenshot) for a few miliseconds. It looks like blinking. When we have a lot of initial data that comes via SSR, we can see it for a second or even longer.

What's the expected behavior?
Calendar should be rendered in its final state at the first rendering with all sizes, positioned correctly etc...

what you are seeing is the css not being loaded by the time the calendar renders, commonly refered to in web dev as a Flash Of Unstyled Content. You should defer rendering your app until all the required styles are loaded


Upgrade org.checkerframework:checker-qual 3.30.0 -> 3.31.0

This PR contains the following updates:

Package
Type
Update
Change

org.checkerframework:checker-qual (source)
compile
minor
3.30.0 -> 3.31.0

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

Suggested commit message:
Upgrade Checker Framework Annotations 3.30.0 -> 3.31.0

See:
- https://github.com/typetools/checker-framework/releases/tag/checker-framework-3.31.0
- https://github.com/typetools/checker-framework/compare/checker-framework-3.30.0...checker-framework-3.31.0


limit OSM downloads to 2 download threads

https://operations.osmfoundation.org/policies/api/

have new build request system


Derive clone for TradingEnvironment

I hope you don't mind me throwing some issues at you. If I collect enough of them and they start to become urgent I'll open a PR myself.
Another quality-of-life improvement would be to make TradingEnvironment Clone. Consider
fn run(env: TradingEnvironment) {
    let mut kalshi = Kalshi::new(env); // <- env is consumed here
    ...
    // so I can't use it later, like this
    if env == TradingEnvironment::Demo {
        ....
    }
}

Currently, I have to manually clone it by adding
let env_clone = match &env {
    TradingEnvironment::DemoMode => TradingEnvironment::DemoMode,
    TradingEnvironment::LiveMarketMode => TradingEnvironment::LiveMarketMode,
};

Yep! Strong suggestion and should be a quick implementation, I'll work on this :)


hime: init at unstable-2020-06-27

Motivation for this change
Add hime input method
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[X] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[X] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
Result: No diff detected, stopping review...
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[X] Fits CONTRIBUTING.md.

ref: HIME team build script on Arch
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=hime-git

Hi @marsam, @worldofpeace,
Could you take a look at this PR?  I am a new user of NixOS and want to use the input method which I used in Archlinux.
Many thanks.


Make loading screen progress fill whole chambers + more

filled half chambers before -_-
use different secret name for the mower, isn't rhythmic no more
add more loading screen tips

The loading icon looks so much better with whole chambers filled. Mower name and loading screen tips good :). Doesn't seem to be a problem with this PR, but where did the ammo for the seeker go in the tutorial map?

Those ammo boxes were removed temporarily since the gun reassembly doesn't work in builds.


Zip up Rule directories and unzip on demand

Each language file is about 500k. As the number of languages gets bigger, this is means a substantial size increase for MathCAT.
There is a huge amount of compression that can happen when these are zipped up. Typically, only one or two languages will get used, so zipping up each language directory can save a lot of space.
Implementation ideas:

Directory structure is Languages/xx/xx.zip and Braille/yy/yy.zip
Need some way to know the Speech Styles that are supported. Maybe add a ._Rules.txt file that has the rules listed, one per line (SimpleSpeech, ClearSpeak).
When SetPreference sets a language, it unzips the file for language if the files don't exist. This moves the unzip time to when the preference is set (probably via the user saying "ok" or "apply") from the time it needs the Rule files. It also means the up-to-date checks don't need to change.
Potentially I can get rid of build.rs so that rule changes are quick during development. The zipping could move to a github action and/or shell script.
The WASM code probably needs to change

I can see this is at least partially implemented. Should I be able to set the Language preference from a web assembly and then process MathML?
I've made a stab at creating a basic wasm/javascript interface: https://github.com/brichwin/MathCATForWeb/
If I try to set the Language preference to en (or other value like es), the set_preference call executes w/o error and other calls to set_preferences execute. However, a call to set_mathml will fail with:
[Error] Error processing MathML: – "Couldn't open zip file Rules/Languages/en/Auto.zip: Didn't find Auto.zip in dir Rules/Languages/en in zip archive." 	(anonymous function) (index.html:39)
If I don't set the Language preference then calls to set_mathml, get_spoken_text, and get_braille work as expected.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>MathCAT Web</title>
</head>
<body>
    <script type="module">
        import init, { wasm_set_rules_dir, wasm_get_version, wasm_set_preference, wasm_set_mathml, wasm_get_spoken_text, wasm_get_braille } from './pkg/mathcat_web.js';

        async function set_mathcat_pref(pref, value) {
          try {
            await wasm_set_preference(pref, value);
            console.log(`${pref} Preference set to ${value}`);
          } catch (error) {
            console.error(`Error setting ${pref} preference to ${value}: ${error}`);
          }
        }

        async function run() {
            await init();

            console.log('MathCAT Version:', wasm_get_version());

            try {
                await wasm_set_rules_dir('Rules');
                console.log('Rules directory set');

                await set_mathcat_pref('Language', 'en');
                await set_mathcat_pref('SpeechStyle', 'ClearSpeak');

                try {
                    const canonicalMathML = await wasm_set_mathml(`<math><mrow><mi>x</mi><mo>=</mo><msup><mi>y</mi><mn>2</mn></msup></mrow></math>`);
                    console.log('Canonical MathML:', canonicalMathML);
                    const spokenText = await wasm_get_spoken_text();
                    console.log('Spoken Text:', spokenText);
                } catch (error) {
                    console.error('Error processing MathML:', error);
                }

                try {
                    const braille = await wasm_get_braille('');
                    console.log('Braille:', braille);
                } catch (error) {
                    console.error('Error getting braille:', error);
                }

            } catch (error) {
                console.error('Error setting rules directory:', error);
                console.error('Cannot continue, rules directory must be set before calling other MathCAT functions.')
            }
        }

        run();
    </script>
</body>
</html>

Ah, okay. I'm a little bit more awake now and realized it doesn't look like my calls to set_preference are working appropriately.

If try setting preferences to ClearSpeak Verbose, I still get speech text as if on ClearSpeak Medium.
If I try setting a bogus preference name, then I get an appropriate unknown MathCAT preference error
If I try setting SpeechStyle to SimpleSpeak, then I get the Didn't find auto.zip error again.

Since I can compile the MathCATDemo project and that works I'm guessing that my MathCATForWeb isn't configuring the build of MathCAT correctly to trigger all the right conditional compiles.

Looks like I didn't check in the latest thing I found I could do in Cargo.toml: I think you want to add
[patch.crates-io]
MathCAT= { path = "../path/to/MathCAT" }
Because I didn't publish the latest version which has the zip file fixes, you can't use directly refer to 0.6.4 from another project. But this "patch" feature allows you to get around that by telling Rust not to looking in crates.io for a published version. I'm not 100% sure I have the syntax right. I copied and modified it from some Rust documentation. That might help.


Add support for controller specific secrets and configmaps

Is your feature request related to a problem?
Currently there is one secret and one configmap in the ack-system that is used by every controller installed on OpenShift. A user may want to use different IAM keys/secret per controller.
Describe the solution you'd like

Update the user-env.yaml.tpl found here to include ServicePackageName.
Update the Github documentation to reflect this change.

Describe alternatives you've considered
I think the above will accomplish the use case, but this needs to be tested with multiple controllers.

/assign

/remove-lifecycle stale


Add Solarized color palette

Please add Solarized as an option.
https://ethanschoonover.com/solarized/
GitLab uses it as a default
https://gitlab.com/gitlab-org/gitlab-ce/blob/master/.gitlab-ci.yml
Thank you for considering.

See https://github.com/jrunning/github-solarized
any problems are - I think - solved in GitLab

This is best served by a separate userstyle/extension


Update for Mocha 4.x line

The section that's a copy of mocha --help needs to be updated, as must the detailed explanation of --no-exit (now --exit), if nothing else. Helps with mochajs/mocha#3044

[ ] Update "Usage"
[ ] Add --compilers deprecation note
[ ] Add info about --exit

Here you go


Front Port: Imporvement - admin services to call through the local transport in the dashboard app

For a previous release(IS 5.6.0), there was an improvement for support local transport for the dashboard application. Shall we front port this improvement for IS 5.7.0 as well.

This issue is being closed due to extended inactivity. Please feel free to reopen it if further attention is needed. Thank you for helping us keep the issue list relevant and focused!


Intermittent failure to connect with wait_for_connect on StaticPool

Hello, I have written a test using testcontainer with the following code and I'm seeing an error of: Redis Error - kind: Unknown, details: Redis connection is not initialized every once in a while. For the most part it works fine, but sometimes that .expect fails at the call to .ping. It seemed to me that the rate of failure decreased with an increase in the size of the StaticRedisPool so I wonder if there's some condition under which .wait_for_connect returns before every client has connected?
    use testcontainers::{clients::Cli, images::redis::Redis, Docker};

    #[tokio::test]
    async fn test_condition() {
        let docker = Cli::default();
        let container = docker.run(Redis::default());

        let port = container
            .get_host_port(6379)
            .expect("should be able to get host port");

        let pool = StaticRedisPool::new(
            RedisConfig {
                server: ServerConfig::new_centralized("<IP_ADDRESS>", port),
                ..Default::default()
            },
            3,
        )
        .unwrap();

        let _ = pool.connect(None);
        pool.wait_for_connect().await.unwrap();

        pool.ping().await.expect("should be able to ping");
    }

Please let me know if you would benefit from any further details or I missed something.

Hi @DnMllr, thanks for looking into this. Some of the pooling code looks suspect so I'm guessing you're right about there being some inconsistent behavior here. I'll take a look this weekend and update here shortly. This may also be related to https://github.com/aembke/fred.rs/issues/13

Hi @DnMllr, I just merged some changes that should address this. The issue was in the implementation for the static pool wait_for_connect as you suspected. I was able to repro the issue in the tests and after these changes the issue no longer repro's for me.
I'll wait to close this until you have a chance to check on your side though.


'Can only add notification blocks from within runloops.'

Running the demo thats provided, I am getting a 'Can only add notification blocks from within runloops.' RLMException. This is happening on Realm 0.97.0, everything appears to be working fine on versions < 0.97.0.

Yes this is actually an issue that needs to be addressed in: https://github.com/Roobiq/RBQFetchedResultsController
Right now it is possible that RBQFetchedResultsController will attempt to add a notification block on a thread without a run loop. This is occurring with ABFRealmGridController because the network response for the NYT stories is being processed on a thread without a runloop.
I will work to fix this issue which you can track here: https://github.com/Roobiq/RBQFetchedResultsController/issues/52

This is now fixed as of v2.6 of RBQFetchedResultsController: https://github.com/Roobiq/RBQFetchedResultsController/commit/ba8c5595e48e9f6a50638f3f33a9a986e48b9c41
Run pod update to get the latest.

I encounter this problem on RealmSwift 0.99.1 by creating multiple notification tokens instances inside a loop.

Hmm I need to update this library to remove RBFRC which will solve this, since realm support fine grained notifications now directly

I am facing the same issues with 0.99.1.


Errors at the API / root level

I have 5 errors that are used on every one of my 10 endpoints. I'd like to add them in my api.yml because they apply to all endpoints.

This is done!


Support authz module by a contracts (MsgGrant, MsgExec)

In order to use the authz module to grant permissions to contracts or users, the contract should be able to create, query and execute sdk.Authorizations
Grant
Support auth.MsgGrant
With following Authorizations:

Generic extension
Bank extension
Staking extension
Wasmd extension
Others?

Execute
In order to execute a granted Authorization, the contract should be able to emit a authz.MsgExec
Query
The SDK supports the linked queries

Ther hard part here for both MsgGrant and MsgExec is handling the protobuf Any nicely in JSON. We don't have any infrastructure or experience for this.

Ther hard part here for both MsgGrant and MsgExec is handling the protobuf Any nicely in JSON. We don't have any infrastructure or experience for this.

i dont necessarily have any answers on how it SHOULD be codified. but it feels somewhat useful to show HOW I'm personally doing MsgExecs in my own contracts atm. would be more than happy to contribute to a better solution for cw in general
https://gist.github.com/kakucodes/0e9ba819bc0e0afe30a5d439a7577d75

Would love this as well. Querying and creating grants from contracts would be useful.


[turborepo] Using Turborepo, PNPM, MUI and TS causes builds to fail when using StyledComponents

What version of Turborepo are you using?
1.9.1
What package manager are you using / does the bug impact?
pnpm
What operating system are you using?
Linux
Describe the Bug
Background
My project use a combination of Typescript + MUI + PNPM. I recently ported the project to use Turborepo using a simple structure with a shared UI library exporting MUI components that the main web app can use. The build however fails caused by a conflict in the shared UI library whenever they export a styled component (https://mui.com/system/styled/). Styled components is a big part of how MUI works and impossible to work without them. The issue only appear when using the project in combination with Turborepo.
Error
The build error when exporting a styled component looks like the following:
src/index.ts(4,7): error TS2742: The inferred type of 'StyledComponent' cannot be named without a reference to '.pnpm/@mui+system@5.12.1_@emotion+react@11.10.6_@emotion+styled@11.10.6_@types+react@18.0.35_react@18.2.0/node_modules/@mui/system'. This is likely not portable. A type annotation is necessary.

Expected Behavior
The inferred type should be correctly resolved and exported in a d.ts file in the dist folder.
To Reproduce
Use the provided repo to reproduce the problem:

Either install latest PNPM (8.2.0) or preferably enable corepack in node.
Run pnpm i followed by pnpm build.
Build should fail and show The inferred type of ... in the ui package.

Reproduction Repo
https://github.com/Pettor/bug-turborepo-pnpm-mui-ts

Hey thanks for the issue! This is not an issue with Turborepo, but with pnpm workspaces. You can validate this by just running pnpm build within packages/ui (which removes turbo from the equation) - you will get the same error.
It looks like this answer on SO has some options that should work:
https://stackoverflow.com/a/73861438/701449

Thanks for the answer @tknickman . I have tried some of those options but can't get it to work in my context. It's a bit different, at least the type resolution path. I will investigate this a bit further 🙂


Add further administrative metadata

[ ] Programming language
[ ] more

There may be more in the future but added everything that's currently agreed.


Problem with default bx series: Name and font substitution

Description
The mtpro2 math package (and also the newtxmath math package, etc.) assumes that text font has a b series. Most traditional text font packages either provide the b series or make sure that font substitutions from b to bx and vice versa happen. This is not the case with fontspec.
Check/indicate

[x] Relevant for XeTeX
[x] Relevant for LuaTeX
[x] Issue tracker has been searched for similar issues?
[x] Originated from https://tex.stackexchange.com/a/479540

Minimal example demonstrating the issue
\documentclass{article}
\usepackage{fontspec}
\setmainfont{texgyretermes}[
  Extension=.otf,
  UprightFont=*-regular,
  ItalicFont=*-italic,
  BoldFont=*-bold,
  BoldItalicFont=*-bolditalic,
]
\usepackage[lite]{mtpro2}
%%% or
%\usepackage{newtxmath}
\begin{document}
\verb|      \mathnormal|: $012abc$\par
\verb|          \mathit|: $\mathit{012abc}$\par
\verb|          \mathbf|: $\mathbf{012abc}$\par
\verb|\boldmath+\mathit|: \boldmath$\mathit{012abc}$
\end{document}

Further details
One of the default font series set by fontspec is bx.

AFAIK, bx is supposed to be “bold extended”, so the naming here is arguably wrong.
Should fontspec make sure that font substitution between b and bx happen?

Take t1ntxtlf.fd from the newtx collection for example, we find the following declarations:
\DeclareFontFamily{T1}{ntxtlf}{\ntx@spacing}
\DeclareFontShape{T1}{ntxtlf}{b}{sc}{<-> \ntx@scaled ntx-Bold-tlf-sc\ntx@lsfx-t1}{}
\DeclareFontShape{T1}{ntxtlf}{b}{n}{<-> \ntx@scaled ntx-Bold-tlf-t1}{}
...
\DeclareFontShape{T1}{ntxtlf}{bx}{sc}{<->ssub * ntxtlf/b/sc}{}
\DeclareFontShape{T1}{ntxtlf}{bx}{n}{<->ssub * ntxtlf/b/n}{}
...

i.e., newtxtext naturally only has bold. For compatibility reason, e.g., in case other packages do, say, \SetSymbolFont{operators}{bold}{\encodingdefault}{\rmdefault}{bx}{n}, then it will fall back from the non-existing bold extended to bold.

A different point of view, as mentioned in your comment here, is to move the following code block:
  \DeclareSymbolFont{operators}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\updefault
  \SetSymbolFont{operators}{normal}\g_fontspec_encoding_tl\g_@@_mathrm_tl\mddefault\updefault
  ...

to follow
  \bool_if:NT \g_@@_math_bool
   {
    \@@_info:n {setup-math}
    \fontspec_setup_maths:
   }
  % Add block here:

Thus, the \mathXX declarations are always executed regardless of the no-math option.
BTW, in the true branch of \tl_if_empty:NTF \g_@@_bfmathrm_tl, I think it is still necessary to set up
    \SetMathAlphabet\mathrm{bold}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\updefault % This line may be redundant
    \SetMathAlphabet\mathbf{bold}\g_fontspec_encoding_tl\g_@@_mathrm_tl\bfdefault\updefault

and in the false branch, the \mddefault choice is… debatable…

It appears that only a few number of fonts (e.g., Computer Modern) provides the bx series.

mtpro2 assumes that series b exists.
newtxmath assumes that either b or sb exists. Its text package counterpart substitutes every bx series with b (in the .fd file).
lmodern also substitutes every occurrence of bx with b.

An excerpt from the documentation:
https://github.com/wspr/fontspec/blob/c1fdf6d52c75017656c4d99ca5b4711353da125d/fontspec-doc-fontsel.tex#L486-L487

@RuixiZhang42 — yes, that's right, the new default in LaTeX2e will be b. Sorry for my silence on this issue... I will be adding bx↔b substitution some time soon...


Move to the julia-actions organization?

I'd like to move this package to a more suitable GitHub organization.
How about https://github.com/julia-actions?
@saschamann @davidanthoff @christopher-dg what do you think?

Sure, seems reasonable.

Done.


We need better logging of people being removed from events.

What kind of an issue is this?

Bug report

What is the expected behaviour?
We need to know who removed a person, which person and what time.
What is the current behaviour?
We don't quite know what we have logged.
How do you reproduce this problem?

Other information

I'd suggest also implementing an email notification to the organizing committee if a person is unattended after the unattend_deadline.

Fixed by #2138

Does #2138 log when users are removed from events through the adminpanel? @martinlunde

Unfortunately no, however the option of deleting attendees is removed from the adminpanel, so it should not cause any problems.


Advisor Profiles Created in the people Table without a Name

Since 18 March 2017, there have been hundreds of advisor profiles automatically created with a:

blank name
status is new
email address is NULL
phone number is NULL
biography is NULL
role is an advisor
domain user name has a valid value
country is null
gender is null
end of tour is null

The profiles are created in all network domains.
On 6 September 2017, I deleted all of the records created since 18 March 2017.  That was 755 records.
As of 8 October 2017, there are now 168 of these records.  I suspect new users to Active Directory are automatically being inserted.

On 8 November 2017, I deleted 282 of these records created since 6 September 2017.

We should look into can this happen if the user dismisses/does not complete the onboarding

Doesn't the program make a call to active directory?  That's over 1,200 profiles created that look exactly alike.
Before every class I also delete these records.  Otherwise there is weird data for one of the exercises.

@VassilIordanov Adrian Ganea found out how and when these ghost accounts are being created.  When someone (without a domain user name in the database) logs into the program, they are greeted with the create an account page.  Even though the person leaves the page without creating an account, a record is still inserted into the people table.

The way the authentication backend currently works is: if a user correctly authenticates but does not yet exist in the database, a Person object is immediately created in the database; subsequently they are redirected to the onboarding process. Everything from that point on assumes that the Person object already exists in the database.
This means that the current behaviour is 'by design', and that the simplest remedy would probably be some form of garbage collection: periodically sweep the database and delete all Person objects older than X days with status NEW_USER (those would be the users that logged on but didn't complete the onboarding).
I did a quick investigation of the code, and while it would probably be possible to change the current behaviour to not create a new Person object until the onboarding process is completed (object validated and saved from the Create Profile page), it is non-trivial.
(E.g. creating a new person is currently only allowed by super users/admins; this would need to be changed to allow people to create 'themselves', as it were.)

@VassilIordanov @gjvoosten There has been a work around for several months.  A job is run every hour from 0900 to 2000 that deletes these ghost accounts.  Since this job started, there have not been any more issues.
The job is called: Delete_ANET_Profiles_Automatically_Created
The stored procedure is called: DeleteNullPeople

I am closing this issue and removing it from the feature project.  The execution of the hourly stored procedure eliminates this bug.


entc generate template error

working through the Quick Introduction on https://entgo.io/docs/getting-started/

User with no fields defined generates correctly.
adding the 2 fields to the User schema step fails to generate:

go version info:
go version go1.13.8 linux/amd64
project/ent/schema/user.go
package schema

import (
	"github.com/facebookincubator/ent"
	"github.com/facebookincubator/ent/schema/field"
)

// User holds the schema definition for the User entity.
type User struct {
	ent.Schema
}

// Fields of the User.
func (User) Fields() []ent.Field {
	return []ent.Field{
		field.Int("age").
			Positive(),
		field.String("name").
			Default("unknown"),
	}
}

// Edges of the User.
func (User) Edges() []ent.Edge {
	return nil
}

$ entc generate ./ent/schema
entc/gen: execute template "create": template: templates:39:47: executing "create" at <ne $f $.ID>: error calling ne: invalid type for comparison

Hey @jordan0420,
Any reason for not using Go 1.14? Go 1.13 templates don't support comparing pointers.

Anyway, I've created #446 to fix this, but I'll revert it once Go 1.15 is out.
Thanks for reporting this, closing

Thanks for the quick resolution!


fixed code quality issues

Hi, This PR is with reference to PR #8932
summary of changes

~.deepsource.toml config for DeepSource~
Fix dangerous default argument
Merge isinstance calls
Remove unnecessary generator
Use is to compare type of objects

@castrapel Did I really submit a PR without the fixes? :fearful:
Submitting a new PR with the fixes. Apology.


json response issue

We are using  your client in our TLS automation, on line #426 the following change was made since this client just began to fail on 26 May 2016:
+    #challenges="$(printf '%s\n' "${response}" | sed -n 's/.*\("challenges":[^\[]*\[[^]]*]\).*/\1/p')"
+    challenges="$(printf '%s\n' "${response}" | tr -d '\n' |sed -n 's/.*\("challenges":[^\[]*\[[^]]*]\).*/\1/p')"

Notice that we needed to delete all newlines in the json response.  Perhaps the response is now pretty format as opposed to a single line?

You also could just have downloaded the newest version which also includes a similar change. Thanks anyway.

ok thanks did not realize that.  appreciate the response.
On Fri, May 27, 2016 at 1:37 PM, Lukas Schauer<EMAIL_ADDRESS>wrote:

You also could just have downloaded the newest version which also includes
a similar change. Thanks anyway.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/lukas2511/letsencrypt.sh/issues/213#issuecomment-222247353,
or mute the thread
https://github.com/notifications/unsubscribe/AAi4OS6WcKqzW0jRRRdqaIKqaPUEJz7Iks5qF1X1gaJpZM4IoqQH
.


Add async BufReader

cc https://github.com/rust-lang-nursery/futures-rs/issues/1519

Blocked on https://github.com/rust-lang-nursery/futures-rs/pull/1533.


⚠ Bofrost.de has degraded performance

In 12eeb11, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 928 ms

Resolved: Bofrost.de performance has improved in 1d65590 after 20 minutes.


Roll Engine from 79f750d4a541 to 806d8bc03867 (9 revisions)

https://github.com/flutter/engine/compare/79f750d4a541...806d8bc03867
2021-12-10<EMAIL_ADDRESS>Roll Dart SDK from 2091ff49c513 to 7b6056f9db7f (1 revision) (flutter/engine#30259)
2021-12-10<EMAIL_ADDRESS>Test shell/platform/common a11y code on Windows (flutter/engine#30262)
2021-12-10<EMAIL_ADDRESS>Fix TestAccessibilityBridgeDelegate event caching (flutter/engine#30260)
2021-12-10<EMAIL_ADDRESS>Simplify win32 platform node delegate GetParent (flutter/engine#30258)
2021-12-09<EMAIL_ADDRESS>Call IAccessible::accFocus to move a11y focus (flutter/engine#30256)
2021-12-09<EMAIL_ADDRESS>Revert the latest rolls of the Fuchsia SDK (flutter/engine#30254)
2021-12-09<EMAIL_ADDRESS>Win32: Handle OnAccessibilityEvent (flutter/engine#30176)
2021-12-09<EMAIL_ADDRESS>Roll Dart SDK from 2ace65b1b408 to 2091ff49c513 (8 revisions) (flutter/engine#30251)
2021-12-09<EMAIL_ADDRESS>[fuchsia] Use network-legacy-deprecated pkg in embedder test (flutter/engine#30244)
Also rolling transitive DEPS:
fuchsia/sdk/core/linux-amd64 from dNYehjXUMKo9 to 3rLypXNTd-2y
fuchsia/sdk/core/mac-amd64 from 9asn8qJFpKxa to EcjcLVqarcKv
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


Added an option to sort by Full Name

In projects where folders are used to organise pipelines or collections of jobs, it is convenient to have these jobs appear next to each other.  If we sort by name, this does not take the folder names into account, and separates these related jobs.  This is a small fix to include another option for ordering jobs which includes the folder names.

Nice idea! Thanks for your contribution, @luke-tsekouras-sirca :-) I'll get this merged soon.


Update Readme.md

Fixed an error in the README of 'Status Overwrite' policy.

This breaks compatibility.


iOS 11.4b6

Can you support iOS 11.4b6?

no

This is a place for issues - not suggestions.

This is not a code-level issue and is therefore closed.
Please submit all eta/wen/halp/etc to https://reddit.com/r/jailbreak or https://discord.gg/jb


[Suggestion]

I have a suggestion, How about a button which uploads, installs and hides a virus on every IP on your hacked database?
It would save alot of time.
Thank you :)

Sure. It can be implemented soon. A new bot implementation is in course, started the scratch: https://github.com/perfilrobo/hexbot/tree/hexbot-jSpaghetti
I guess a new module can be implemented to do that.


Small important improvement

When we create a chat, we should have the option to add headers, like:
import { Configuration, OpenAIApi } from "openai";

const configuration = new Configuration({
    apiKey: process.env.OPENAI_API_KEY,
    basePath: "https://oai.hconeai.com/v1",
    baseOptions: {
    headers: {
        "Helicone-Auth": `Bearer ${process.env.HELICONE_API_KEY}`,
    },
});

const openai = new OpenAIApi(configuration);

Thanks!

Would accept a PR for this


xen-guest-agent: remove unneeded environment variable, install systemd service

Description of changes

Removes an unnecessary clang environment library by adding bindgenHook. (As recommended here)
Installs the minimal systemd service provided by upstream from $src/startup to $out/lib/systemd/system.

Things done

Built on platform(s)

[x] x86_64-linux

[x] Tested, as applicable:

No automated tests, as xen-guest-agent must be ran inside a Xen domU.

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review pr 335641". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[x] (Package updates) Change is minor, so no changelog.

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 335641 run on x86_64-linux 1

1 package built:

xen-guest-agent


Delete S3 bucket content before the publish

When amplify publish starts, it builds and uploads files to s3, but doesn't delete the actual S3 bucket content, so we end up after a month of updates with a bucket with over hundreds and hundreds of files,
Describe the solution you'd like
Before the Amplify uploads files, delete everything in the bucket.
Describe alternatives you've considered
i do aws s3 rm s3://bucket --recursive before the amplify publish -c

@Temkit We've considered this and we decided not to delete S3 bucket contents by default from users S3 bucket since it might contain sensitive data which the CLI might delete and which won't be recoverable later on.
What we can do is provide a flag to do so as a part of the publish command which would first delete the contents of the S3 buckets before the next publish. I'll mark this as a feature request.

@kaustavghosh06 - is the flag you mention available ?

@kaustavghosh06 - is the flag you mention available ?

+1


CUDA error : no kernel image is available for execution on the device

I've successfully run the model using the CPU backend, but switching to the CUDA 11 backend is causing an error.
Interestingly, my computer can execute the same model when using the llama-cppy-python with the cuBLAS backend.
My computer setup
======================================================
Cpu : Intel(R) Xeon(R) (14 cores, 28 logical processors)
RAM : 64 GB
OS  : Windows 10 x64
Device 0: Quadro P400, compute capability 6.1
Device 1: Quadro K620, compute capability 5.0
======================================================
Visual studio
=======================================
Visual studio 2022
Net 6.0
LLamaSharp(0.51)
LLamaSharp.Backend.Cuda11(0.51)
Cuda toolkit installed: 11.7
Model : llama-2-7b-guanaco-qlora.Q4_K_M.gguf
https://huggingface.co/TheBloke/llama-2-7B-Guanaco-QLoRA-GGUF
Console app with ChatSessionStripRoleName.cs example
var parameters = new ModelParams(modelPath)
{
GpuLayerCount = 2,
LowVram = true,
ContextSize = 1024,
BatchSize = 512,
Threads = 18,
Seed = 1337,
UseMemoryLock = true
};
=========================================
Error Message
=========================================
llama_new_context_with_model: kv self size  =  800.00 MB
llama_new_context_with_model: compute buffer total size =  111.41 MB
llama_new_context_with_model: not allocating a VRAM scratch buffer due to low VRAM option
The chat session has started. The role names won't be printed.
Transcript of a dialog, where the User interacts with an Assistant named Bob. Bob is helpful, kind, honest, good at writing, and never fails to answer the User's requests immediately and with precision.
User: Hello, Bob.
Bob: Hello. How may I help you today?
User: Please tell me the largest city in Europe.
Bob: Sure. The largest city in Europe is Moscow, the capital of Russia.
User:CUDA error 209 at D:\a\LLamaSharp\LLamaSharp\ggml-cuda.cu:6041: no kernel image is available for execution on the device
=============================================

I've recompiled the llama.cpp project using CMake with the following commands:
+++++++++++++++++++++++++++++++++++++++++++++++++++
mkdir build
cd build
cmake .. -DLLAMA_CUBLAS=ON -DBUILD_SHARED_LIBS=ON
cmake --build . --config Release
+++++++++++++++++++++++++++++++++++++++++++++++++++++
Afterwards, I replaced the existing libllama.dll file in the /bin/debug/.../ directory with the newly compiled one (llama.dll).
Unfortunately, I'm still encountering the same error message.

I don't really know a lot about CUDA, so I'm not sure how much I can help debug this.
The error "no kernel image is available for execution on the device" seems to mean that the library was not compiled with support for your device. From this issue that probably means you need to adjust the build script to add some additional architectures to support your specific hardware.

Thanks! The issue has been resolved. It turns out that the problem was due to the compute capability of my Quadro K620, which is 5.0(50). The CMake configuration was initially set to support version 5.2(52) and up, hence the mismatch.
https://en.wikipedia.org/wiki/CUDA
Cuda toolkit 11.7 support
Changed CMakeLists.txt
+++++++++++++++++++++++++++++++++++++++++++++++
compute capability 5.0 (50)  is working with cuda 11. may be with cuda 12
+++++++++++++++++++++++++++++++++++++++++++++++
From :
set(CMAKE_CUDA_ARCHITECTURES "52;61;70") # lowest CUDA 12 standard + lowest for integer .......
To:
set(CMAKE_CUDA_ARCHITECTURES "50;52;61;70") # Added 50 for Maxwell early version
+++++++++++++++++++++++++++++++++++++++++++++++++++
Recompiled and copied the "llama.cpp\build\bin\Release\llama.dll" to "myproject\bin\x64\Debug\net6.0\runtimes\win-x64\native\libllama.dll"


Fix issue here source directive was not getting mapped to the correct types after multiple transformations

🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of
the pull request.
Description
The @source directives are added to the schema before schema transformations. Hence, need to be remapped after possible renames, replacements, and type merging. This was not happening with the existing code causing the @source directives to point to type names that either no longer existed (due to rename merges) or were pointing to the wrong type (type replacement transforms).
This fix introduces changes to the field mapper that happens after transformations, and make sure to map the @source directives to the correct or existing types.
Fixes https://github.com/ardatan/graphql-mesh/issues/7771
Type of change
Please delete options that are not relevant.

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

Screenshots/Sandbox (if appropriate/relevant):
Adding links to sandbox or providing screenshots can help us understand more about this PR and take
action on it as appropriate
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can
reproduce. Please also list any relevant details for your test configuration

[ x] Ran the solution on local machine to verify it fixed issues where issues were manifesting themselves before.

Test Environment:

OS: MacOS Sonoma
@graphql-mesh/1.1.0:
NodeJS: 20.12

Checklist:

[ ] I have followed the
CONTRIBUTING doc and the
style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works, and I have added a
changeset using yarn changeset that bumps the version
[ ] New and existing unit tests and linter rules pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

See https://github.com/ardatan/graphql-mesh/issues/7771#issuecomment-2527943645


Add dividends_annual property for Portfolio

dividends_annual property exists in AsssetList. The same should be in Portfolio.

I submitted a commit for this issue. Please let me know if there are any issues. I included the test file that passed.

The pull request is now live.


Get ndkVersion from main projects' gradle config

I was facing a problem in my main project when syncing with gradle files
(androidProjectResult.androidProject::getNdkVersion, "") must not be null
This PR is a fix for that

@staltz is it ok to add this line in build.gradle? Is there a reason why it was missing ndkVersion?

I have not tested this, but I think this is a good change to make. Without this nodejs-mobile will use the default version of NDK to build native modules, not the ndk version specified in the project app/build.gradle. This used to cause us many headaches with CI whenever the Android SDK was updated. We fix this in our project with a patch that hard-codes the android.ndkVersion in the same place that this PR updates it. This looks to me like a good solution to this issue.

Yes, it's a good PR! Sorry it took a while to review and merge.


Fix replacement of variable in Keycloak template

the problem seems to be that the travis user has uid 2000 but the jboss user inside the keycloak container has uid 1000 so it doesn't have permission to write to the mounted directory

I know 503ad6a is not the dynamic configuration we all want for keycloak and the user will be required to start the platform with make start (unless they create their own keycloak configuration) -- however, until we have clarified why docker mounts directories under different uids depending on the host system, I think this is the safe option to avoid failing builds elsewhere.


Document generator

Title of ticket:
Description
Analyze and select a document generator for letter templates
Dependencies
Are there any dependencies?
DOD

[ ] Review NR Common Service Document Generator
[ ] Review Registries document generator
[ ] Analyze any additional options
[ ] Recommend solution
[ ] PO approval

Additional documentation on NR service.


ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)

Operating system: Linux Ubuntu 14.04
Last upstream commit (run git log --author="Robert Lord" | head -n 1): ✍ TODO
Browser version(s): Chrome 60.0.3112.78 (64-bit)
Ruby version (run ruby -v):  ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]

root@iZ23s8agtagZ:/home/www/slate# bundle install
/usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- bundler (LoadError)
	from /usr/local/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from /usr/bin/bundle:7:in `<main>'

Will you post the output of gem list?

Yea, bundler installation isn't really something we can help with. Maybe ask around in the bundler repo instead?


[CO] run_single_simu readability + print None type

Thank you for your contribution :)

Thank you for your contribution :)


Saved filter "save new filter"-mask style not correct

Via https://opencast.jira.com/browse/MH-11231
The division between the buttons and the content of the table filter modal do not match the rest of the system.
To Reproduce

recordings -> events -> tablefilter -> save

Actual Results:
style of tablefilter save dropdown does not look right (note the incomplete division line)

Expected Results:
style should look like saved tablefilter list

I am interested to work on this issue.

Happy to hear that.

@nfatma Happy to see you are interested and helping to fix this!
Assuming you are new to Opencast, here some hints:
First screenshot: https://github.com/opencast/opencast/blob/develop/modules/admin-ui/src/main/webapp/scripts/shared/partials/tableFilters.html#L98
Second screenshot: https://github.com/opencast/opencast/blob/develop/modules/admin-ui/src/main/webapp/scripts/shared/partials/tableFilters.html#L131
Hope this helps and good luck!

Unassigning since @nfatma  does not seem to be working on this.
Let us know if you still are.
Everyone else: Feel free to grab this issue.

Still exists in OC11. And I learned that you can save filters 😹