Add battery_quantity attribute to battery_type entity

Checklist

[X] I have filled out the template to the best of my ability.
[X] This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
[X] This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.
first of all thank you for this integration. I previously built my battery information base using customization (customize.yaml) like this:
sensor.first_floor_landing_motion_sensor_battery_level:
  battery_type: CR123A
sensor.first_floor_landing_smoke_sensor_battery_level:
  battery_type: CR123A
sensor.first_floor_landing_lcd_battery:
  battery_type: LR03/AAA
  quantity: 2
sensor.aqara_opple_switch_2x2_battery:
  battery_type: CR2032
sensor.anemometer_battery:
  battery_type: LR06/AA
sensor.attic_staircase_motion_sensor_battery:
  battery_type: CR2450

This way I added the battery type and quantity to the device's existing battery. You can find more details on my github https://github.com/nechry/ha-battery-inventory
The goal is to reproduce a list of batteries by battery type with the total number of batteries by type and % charge remaining. This is very useful for planning battery ordering.
Describe the solution you'd like
If it would be possible to add the quantity to the battery_type information as an attribute it would be very useful for producing battery reports
Describe alternatives you've considered
it is possible to parse the text sensor with a regex to cut the quantity of the type but I think it would still be cumbersome
Additional context
nothing to add at first but remains available to discuss it

Nice idea, I can add some attributes to split the quantity and type, ironically I'll have to write a regex as well as I have it as one combined string when it is assigned to the device.

great thank for your positive feedback, next step will be to mix information of the battery level with type to reproduce my previous battery remplacement report.

I have a rough version working with a bit of regex

And yes I always test with Sun & Forecast because they are always in a fresh HA install 😄

This is now available in version 1.4.0 which is in pre-release

thank-you I will try it soon


work only in debug mode

Describe the bug
exe didn't launch
To Reproduce
Steps to reproduce the behavior:
1 create a rat
Expected behavior
didn't run
Desktop (please complete the following information):

OS:  Windows 10
Python Version:  3.11.4

Additional context

i disabled windows defender and it still doesn't work


Add web UI > Organizations content

Towards https://github.com/giantswarm/giantswarm/issues/16473
This PR adds the following pages under UIs and APIs > Web user interface:

Organization management

Creating, inspecting, deleting
Access control

Also a shortcode organization_mgmt_mapi_disclaimer is added. Preview:

TODO

[x] Consistently use Management API spelling
[x] Clarify whether customers will be able to create own Organization CRs. Adapt content accordingly.
[x] Update content to reflect the situation that non-admin users will not yet be permitted in the next stage.

@Oshratn With the changes I made, can you un-block the PR?

This has been updated once more and is now considered to be ready. If you want to give it a final review, this is your chance.


Slice out of range error

Calling to GetLanguage method, sometimes we receive this error:
panic: runtime error: slice bounds out of range
goroutine 17 [running, locked to thread]:
bytes.Count(0x7f627818c0d0, 0x4b, 0x0, 0x1c420038c20, 0x1, 0x20, 0x0)
/home/travis/.gimme/versions/go1.8.linux.amd64/src/bytes/bytes.go:62 +0x21d
gopkg.in/src-d/enry.v1.getHeaderAndFooter(0x7f627818c0d0, 0x4b, 0x0, 0x0, 0x0, 0x0)
/home/travis/gopath/src/gopkg.in/src-d/enry.v1/common.go:161 +0x9d
gopkg.in/src-d/enry.v1.GetLanguagesByModeline(0x7f627818f4a0, 0x0, 0x7f627818c0d0, 0x4b, 0x0, 0x7f62482e6c08, 0x0, 0x0, 0x0, 0x0, ...)
/home/travis/gopath/src/gopkg.in/src-d/enry.v1/common.go:142 +0x5c
gopkg.in/src-d/enry.v1.GetLanguages(0x7f627818f4a0, 0x0, 0x7f627818c0d0, 0x4b, 0x0, 0x0, 0x0, 0x0)
/home/travis/gopath/src/gopkg.in/src-d/enry.v1/common.go:126 +0x129
gopkg.in/src-d/enry.v1.GetLanguage(0x7f627818f4a0, 0x0, 0x7f627818c0d0, 0x4b, 0x0, 0x1c420038e48, 0x1c42001a500)
/home/travis/gopath/src/gopkg.in/src-d/enry.v1/common.go:38 +0x55
main.GetLanguage(0x7f627818f4a0, 0x0, 0x7f627818c0d0, 0x4b, 0x0, 0x0, 0x0)
/home/travis/build/src-d/enry/shared/enry.go:11 +0x55
main._cgoexpwrap_f7db11756761_GetLanguage(0x7f627818f4a0, 0x0, 0x7f627818c0d0, 0x4b, 0x0, 0x0, 0x0)
command-line-arguments/_obj/_cgo_gotypes.go:58 +0x9a

@ajnavarro how can I reproduce it?

I would try to send to GetLanguagesByModeline an empty or nil content param.

Enry already has a test with nil content, as you can see here. It's for the general functions GetLanguage, but GetLanguagesByModeline is the firs strategy to run, so it should raise a fail if any problem.
Anyway, I added a couple of cases with nil and []byte{} as content to the test TestGetLanguagesByModeline and they pass without problems.
There is a weird thing, the function where the process is raising a panic (bytes.Count) works well with nil or []byte{] content, demonstration here
For the moment, I couldn't reproduce the panic in local.
Keep on it.

Eventually I couldn't reproduce the panic, so I didn't check if #130 fix the problem at all.
About the previous comment, some other things should be known about this issue:

bytes.Count() function implementation depends on the platform it's running on. You can found these differences under $GOROOT/src/bytes in files bytes.go,bytes_generic.go,bytes_amd64.go,bytes_s390x.go
Currently travis it's using go version 1.8, I changed it to 1.8.x to use the latest minor release of this version. Maybe it would fix something.
Another weird behavior from bytes.Count(), sep argument it's always required except if s is nil. In that case, the function returns 1, check out here

Anyway, PR #130 try to fix this checking for empty or nil content before call bytes.Count() function

I can reproduce it too and it blocks us.
panic: runtime error: slice bounds out of range

goroutine 17 [running, locked to thread]:
bytes.Count(0x7f23e02849b0, 0xa, 0x0, 0x1c42003cc20, 0x1, 0x20, 0x0)
	/home/travis/.gimme/versions/go1.8.linux.amd64/src/bytes/bytes.go:62 +0x21d
gopkg.in/src-d/enry%2ev1.getHeaderAndFooter(0x7f23e02849b0, 0xa, 0x0, 0x66, 0x6, 0x7f23b80bc5f0)
	/home/travis/gopath/src/gopkg.in/src-d/enry.v1/common.go:161 +0x9d
gopkg.in/src-d/enry%2ev1.GetLanguagesByModeline(0x7f23e02f4710, 0x2, 0x7f23e02849b0, 0xa, 0x0, 0x7f23b99cdc08, 0x0, 0x0, 0x0, 0x0, ...)
	/home/travis/gopath/src/gopkg.in/src-d/enry.v1/common.go:142 +0x5c
gopkg.in/src-d/enry%2ev1.GetLanguages(0x7f23e02f4710, 0x2, 0x7f23e02849b0, 0xa, 0x0, 0x7f23b8ef9a73, 0xc, 0x1c420020de0)
	/home/travis/gopath/src/gopkg.in/src-d/enry.v1/common.go:126 +0x129
gopkg.in/src-d/enry%2ev1.GetLanguage(0x7f23e02f4710, 0x2, 0x7f23e02849b0, 0xa, 0x0, 0x1c42003ce48, 0x1c420016f00)
	/home/travis/gopath/src/gopkg.in/src-d/enry.v1/common.go:38 +0x55
main.GetLanguage(0x7f23e02f4710, 0x2, 0x7f23e02849b0, 0xa, 0x0, 0x1c42001a1d8, 0x1c4200007e0)
	/home/travis/build/src-d/enry/shared/enry.go:11 +0x55
main._cgoexpwrap_f7db11756761_GetLanguage(0x7f23e02f4710, 0x2, 0x7f23e02849b0, 0xa, 0x0, 0x0, 0x0)
	command-line-arguments/_obj/_cgo_gotypes.go:58 +0x9a
panic: runtime error: slice bounds out of range

I will try to reproduce it because I am desperate and cannot work forward.

I've just released v1.6.0, which includes #130. Check if the error is solved with this release.

@ajnavarro I think it makes sense to allow enry crash and just skip the corresponding file, recording it to the errors list together with stderr output. E.g. we used to do it in our Python pipeline.

@abeaumont I confirm that there is no panic with the latest release.

great, closing then.

Hi,
it looks like that this issue still exists. It appears quite rarely, so it should be tricky to debug.
https://github.com/src-d/engine/issues/243
should a new issue be created? Or reopen this?
@abeaumont , @mcarmonaa , what do you think?

@egorbu You need to prove that Engine uses the updated version. When I used to have similar issues, I ran Engine locally, without a container, and replaced libenry.so in the engine's JAR with the manually built binary. And for sure in that case you need to prove that your patched JAR is used - sometimes Maven decides to overwrite it.

@vmarkovtsev , from https://github.com/src-d/engine/issues/243#issuecomment-349267539 - it should be enry  1.6.1

The issue can be reopened if needed. Do you have a file sample causing the crash? Does the problem also happen when enry cli is used?

@abeaumont , unfortunately - no. Because it rarely happens. Most of the times - everything works well, and sometimes it fails.
If you may tell which information could be useful for debugging - I may try to find way how to collect it

Even if frequency is low, it must happen with some file... that would be best information for debugging. Apart from that, an updated stack trace would also help.

Do you want stack trace like in https://github.com/src-d/engine/issues/243#issue-278961577 ? Or something else?
BTW - does some kind of DEBUG version of enry exist? I may try to modify jar as @vmarkovtsev  mentioned in https://github.com/src-d/enry/issues/129#issuecomment-349979513

@EgorBu yes, that one. Apparently you're passing an empty filename and that's causing the problem. I'll fix enry to avoid that crash, you may want to workaround it by filtering files without name in the meantime.

Interesting that it works most of the times if it always should be empty

We can hit two different problems here: breaking on empty filenames and the engine probabilistically supplying empty file names due to some crazy race or whatever.

sounds reasonable.
What do you think, @ajnavarro? Can it happen?


Use of uninhabited enums

This library suggests using uninhabited enums to represent opaque types. From the first example:
mod foo_sys {
    pub enum FOO {}

    extern {
        pub fn FOO_free(foo: *mut FOO);
    }
}

I'm not entirely sure, but I think using uninhabited enums are here is undefined behaviour (though it currently emits the same LLVM IR), see this entry in The Rustonomicon. The recommended approach should be zero sized #[repr(C)] structs (or extern types when they stabilize).

The specific concern in that page is accidentally creating references to uninhabited types, not raw pointers.


[ENH] Add percentile function(s)

I'd like to compute median using percentiles of a column (this is also supported in Spark SQL):
>>> import pandas as pd
>>> from dask_sql import Context
>>> c = Context()
>>> df = pd.DataFrame({'thing': ['a', 'b', 'c'], 'value': [0, 1, 2]})
>>> c.create_table('things', df)
>>> c.sql("select percentile(value, 0.5) from things")

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rgelhausen/conda/envs/dsql-12-09/lib/python3.8/site-packages/dask_sql/context.py", line 458, in sql
    rel, select_names, _ = self._get_ral(sql)
  File "/home/rgelhausen/conda/envs/dsql-12-09/lib/python3.8/site-packages/dask_sql/context.py", line 868, in _get_ral
    raise ParsingException(sql, str(e.message())) from None
dask_sql.utils.ParsingException: Can not parse the given SQL: Encountered "( value" at line 1, column 18.
Was expecting one of:
    "." ...
    "(" "*" ...
    "(" ")" ...
    "(" "DISTINCT" ...
    "(" "ALL" ...
...
The problem is probably somewhere here:

        select percentile(value, 0.5) from things

I also tried Postgres's percentile_disc:
>>> c.sql("""
... select
...   percentile_disc(0.25) within group (order by things.value),
...   percentile_disc(0.5) within group (order by things.value),
...   percentile_disc(0.75) within group (order by things.value)
... from things
... """)

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/rgelhausen/conda/envs/dsql-12-09/lib/python3.8/site-packages/dask_sql/context.py", line 458, in sql
    rel, select_names, _ = self._get_ral(sql)
  File "/home/rgelhausen/conda/envs/dsql-12-09/lib/python3.8/site-packages/dask_sql/context.py", line 868, in _get_ral
    raise ParsingException(sql, str(e.message())) from None
dask_sql.utils.ParsingException: Can not parse the given SQL: Encountered "percentile_disc (" at line 3, column 3.
Was expecting one of:
    "/*+" ...
    "*" ...
    "+" ...
    "-" ...
    "NOT" ...
...
The problem is probably somewhere here:

        select
          percentile_disc(0.25) within group (order by things.value),
          ^
          percentile_disc(0.5) within group (order by things.value),
          percentile_disc(0.75) within group (order by things.value)
        from things

Interesting. I can take a look at this

https://github.com/rapidsai/cudf/issues/4706 probably a blocker

For percentile(col) use case may not be blocked by https://github.com/rapidsai/cudf/issues/4706 , as the top-level DataFrame has a quantile implementation and delegates appropriately.
import dask
import dask_cudf

ddf = dask.datasets.timeseries(
    start='2000-01-01',
    end='2000-01-31',
    freq='10s',
)
gddf = dask_cudf.from_dask_dataframe(ddf)
print(gddf.x.quantile([0.5]).compute())
print(gddf.x.quantile(0.5).compute())
0.5    0.019074
Name: x, dtype: float64
0.019073669821518924

For group / window percentiles (approx or otherwise), we'd likely want to resolve the linked issue and implement this in Dask

Happy to look into this a bit more


Add yield optimization

@axelvonkamp  I'm having trouble calling this line 105 from CellNetAnalyzer/code/cnap_methods/yield_optimization.m
via the octave engine:
https://github.com/ARB-Lab/CNApy/blob/38e192b5bc78a16f199d056a99f12c2fb32a18c8/cnapy/gui_elements/yield_optimization_dialog.py#L219
I get this error:
Traceback (most recent call last):
  File "/home/sthiele/Projects/cnapy/cnapy/gui_elements/yield_optimization_dialog.py", line 219, in compute
    a = self.eng.eval("[constraints, c_macro]=CNAreadMFNValues(cnap);")
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 493, in eval
    resp = self.feval('evalin', 'base', cmd,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 380, in feval
    return self._feval(func_name, func_args, dname=dname, nout=nout,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 582, in _feval
    raise Oct2PyError(msg)
oct2py.utils.Oct2PyError: Octave evaluation error:
error: get: invalid handle (= nan)
error: called from:
    get_rates at line 28, column 8
    CNAreadMFNValues at line 30, column 5

Do you know what the problem might be?

Hi,

CNAreadMFNValues(cnap) ist dafür da um die Werte aus der (Matlab) CNA Karte auszulesen, kann also in CNApy weggelassen werden.

-Axel

Gesendet: Mittwoch, 11. November 2020 um 13:57 Uhr
Von: "Sven Thiele"<EMAIL_ADDRESS>An: "ARB-Lab/CNApy"<EMAIL_ADDRESS>Cc: "axelvonkamp"<EMAIL_ADDRESS>"Mention"<EMAIL_ADDRESS>Betreff: Re: [ARB-Lab/CNApy] Add yield optimization (#55)

@axelvonkamp I'm having trouble calling this line 105 from CellNetAnalyzer/code/cnap_methods/yield_optimization.m
via the octave engine:
https://github.com/ARB-Lab/CNApy/blob/38e192b5bc78a16f199d056a99f12c2fb32a18c8/cnapy/gui_elements/yield_optimization_dialog.py#L219
I get this error:
Traceback (most recent call last):
File "/home/sthiele/Projects/cnapy/cnapy/gui_elements/yield_optimization_dialog.py", line 219, in compute
a = self.eng.eval("[constraints, c_macro]=CNAreadMFNValues(cnap);")
File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 493, in eval
resp = self.feval('evalin', 'base', cmd,
File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 380, in feval
return self._feval(func_name, func_args, dname=dname, nout=nout,
File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 582, in _feval
raise Oct2PyError(msg)
oct2py.utils.Oct2PyError: Octave evaluation error:
error: get: invalid handle (= nan)
error: called from:
get_rates at line 28, column 8
CNAreadMFNValues at line 30, column 5
Do you know what the problem might be?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

Ok, next on
a = self.eng.eval(
                "[maxyield,flux_vec,success, status]= CNAoptimizeYield(cnap, c, d, fixedFluxes, c_macro, solver, verbose);", nargout=0)

I get:
GLPK is used as LP solver.
warning: Denominator of yield term can become zero.
glp_simplex: unable to recover undefined or non-optimal solution
Traceback (most recent call last):
  File "/home/sthiele/Projects/cnapy/cnapy/gui_elements/yield_optimization_dialog.py", line 252, in compute
    a = self.eng.eval(
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 493, in eval
    resp = self.feval('evalin', 'base', cmd,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 380, in feval
    return self._feval(func_name, func_args, dname=dname, nout=nout,
  File "/home/sthiele/miniconda3/envs/cnapy/lib/python3.8/site-packages/oct2py/core.py", line 582, in _feval
    raise Oct2PyError(msg)
oct2py.utils.Oct2PyError: Octave evaluation error:
error: 'getReport' undefined near line 271 column 14
error: called from:
    CNAoptimizeYield at line 271, column 5


adding support for yaml on fulcio config

Description of the change
It adds support for yaml format on fulcio config.
It algo expects that the config has a property called format defining if it is a yaml or a json. To avoid any breaking changes, if the field is not set, the json format and defaults are used.

Existing or Associated Issue(s)

Additional Information

Checklist

[ ] Chart version bumped in Chart.yaml according to semver. Where applicable, update and bump the versions in any associated umbrella chart
[ ] Variables are documented in the values.yaml and added to the README.md. The helm-docs utility can be used to generate the necessary content. Use helm-docs --dry-run to preview the content.
[ ] JSON Schema generated.
[ ] List tests pass for Chart using the Chart Testing tool and the ct lint command.

Its missing to follow the checklist. on it

Do we also need to update
https://github.com/sigstore/helm-charts/blob/6359bda228d0d69cfa0399609d851e954a5f3325/charts/fulcio/templates/_helpers.tpl#L153
?

I don't think so, because we are just using it when the format is different of "yaml". Like, I just created the logic for yaml format, otherwise, it will use the current flow for json. Does it make sense?

@javanlacerda to follow up if converting yaml to json would make this cleaner.


generate from local pdf failed

I am trying on JupyterLab and tried to generate audio from a local pdf file but failed.
from podcastfy.client import generate_podcast

audio_from_local_pdf = generate_podcast(
    urls=["./sample.pdf"],
)

embed_audio(audio_from_local_pdf)

2024-10-20 13:08:32,660 - podcastfy.client - ERROR - An error occurred: Failed to extract content from ./sample.pdf: URL has an invalid label.
---------------------------------------------------------------------------
InvalidURL                                Traceback (most recent call last)
File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/podcastfy/content_parser/website_extractor.py:50, in WebsiteExtractor.extract_content(self, url)
     49 headers = {'User-Agent': self.user_agent}
---> 50 response = requests.get(normalized_url, headers=headers, timeout=self.timeout)
     51 response.raise_for_status()  # Raise an exception for bad status codes

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/requests/api.py:73, in get(url, params, **kwargs)
     63 r"""Sends a GET request.
     64
     65 :param url: URL for the new :class:`Request` object.
   (...)
     70 :rtype: requests.Response
     71 """
---> 73 return request("get", url, params=params, **kwargs)

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/requests/api.py:59, in request(method, url, **kwargs)
     58 with sessions.Session() as session:
---> 59     return session.request(method=method, url=url, **kwargs)

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/requests/sessions.py:575, in Session.request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json)
    563 req = Request(
    564     method=method.upper(),
    565     url=url,
   (...)
    573     hooks=hooks,
    574 )
--> 575 prep = self.prepare_request(req)
    577 proxies = proxies or {}

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/requests/sessions.py:484, in Session.prepare_request(self, request)
    483 p = PreparedRequest()
--> 484 p.prepare(
    485     method=request.method.upper(),
    486     url=request.url,
    487     files=request.files,
    488     data=request.data,
    489     json=request.json,
    490     headers=merge_setting(
    491         request.headers, self.headers, dict_class=CaseInsensitiveDict
    492     ),
    493     params=merge_setting(request.params, self.params),
    494     auth=merge_setting(auth, self.auth),
    495     cookies=merged_cookies,
    496     hooks=merge_hooks(request.hooks, self.hooks),
    497 )
    498 return p

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/requests/models.py:367, in PreparedRequest.prepare(self, method, url, headers, files, data, params, auth, cookies, hooks, json)
    366 self.prepare_method(method)
--> 367 self.prepare_url(url, params)
    368 self.prepare_headers(headers)

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/requests/models.py:456, in PreparedRequest.prepare_url(self, url, params)
    455 elif host.startswith(("*", ".")):
--> 456     raise InvalidURL("URL has an invalid label.")
    458 # Carefully reconstruct the network location

InvalidURL: URL has an invalid label.

During handling of the above exception, another exception occurred:

Exception                                 Traceback (most recent call last)
Cell In[58], line 3
      1 from podcastfy.client import generate_podcast
----> 3 audio_from_local_pdf = generate_podcast(
      4     urls=["./sample.pdf"],
      5 )
      7 embed_audio(audio_from_local_pdf)

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/podcastfy/client.py:322, in generate_podcast(urls, url_file, transcript_file, tts_model, transcript_only, config, conversation_config, image_paths, is_local)
    317         if not urls_list and not image_paths:
    318             raise ValueError(
    319                 "No input provided. Please provide either 'urls', 'url_file', 'transcript_file', or 'image_paths'."
    320             )
--> 322         return process_content(
    323             urls=urls_list,
    324             tts_model=tts_model,
    325             generate_audio=not transcript_only,
    326             config=default_config,
    327             conversation_config=conversation_config,
    328             image_paths=image_paths,
    329             is_local=is_local,
    330         )
    332 except Exception as e:
    333     logger.error(f"An error occurred: {str(e)}")

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/podcastfy/client.py:81, in process_content(urls, transcript_file, tts_model, generate_audio, config, conversation_config, image_paths, is_local)
     79 content_extractor = ContentExtractor()
     80 # Extract content from links
---> 81 contents = [content_extractor.extract_content(link) for link in urls]
     82 # Combine all extracted content
     83 combined_content = "\n\n".join(contents)

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/podcastfy/client.py:81, in <listcomp>(.0)
     79 content_extractor = ContentExtractor()
     80 # Extract content from links
---> 81 contents = [content_extractor.extract_content(link) for link in urls]
     82 # Combine all extracted content
     83 combined_content = "\n\n".join(contents)

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/podcastfy/content_parser/content_extractor.py:69, in ContentExtractor.extract_content(self, source)
     67 		return self.youtube_transcriber.extract_transcript(source)
     68 	else:
---> 69 		return self.website_extractor.extract_content(source)
     70 elif source.lower().endswith('.pdf'):
     71 	return self.pdf_extractor.extract_content(source)

File ~/work/podcastify-work/.venv/lib/python3.11/site-packages/podcastfy/content_parser/website_extractor.py:66, in WebsiteExtractor.extract_content(self, url)
     64 except requests.RequestException as e:
     65 	logger.error(f"Failed to extract content from {url}: {str(e)}")
---> 66 	raise Exception(f"Failed to extract content from {url}: {str(e)}")
     67 except Exception as e:
     68 	logger.error(f"An unexpected error occurred while extracting content from {url}: {str(e)}")

Exception: Failed to extract content from ./sample.pdf: URL has an invalid label.

seems is_url in ContentExtractor cannot handle local path correctly?
     67 		return self.youtube_transcriber.extract_transcript(source)
     68 	else:
---> 69 		return self.website_extractor.extract_content(source)
     70 elif source.lower().endswith('.pdf'):
     71 	return self.pdf_extractor.extract_content(source)

using podcastfy==0.2.6

Thanks. I've reviewed the issue and it looks like it's a bug regression.
Feel free to install and try a earlier version for instance v0.2.0 and let
me know.
I will fix this simple bug when I'm back to keyboard in a couple of days.
On Sun, Oct 20, 2024, 2:23 AM Kuniaki Shimizu @.***>
wrote:

using podcastfy==0.2.6
—
Reply to this email directly, view it on GitHub
https://github.com/souzatharsis/podcastfy/issues/87#issuecomment-2424569248,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADTMY3MTSTRWJHV7MM2FJN3Z4MV5RAVCNFSM6AAAAABQIDX3QOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRUGU3DSMRUHA
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

using v0.2.0:
from podcastfy.client import generate_podcast

audio_file = generate_podcast(
    urls=["./sample.pdf"],
)

embed_audio(audio_file)

failed
File ~/work/podcastify-work2/.venv/lib/python3.11/site-packages/podcastfy/content_parser/content_extractor.py:72, in ContentExtractor.extract_content(self, source)
     70 		return self.youtube_transcriber.extract_transcript(source)
     71 	else:
---> 72 		return self.website_extractor.extract_content(source)
     73 elif source.lower().endswith('.pdf'):
     74 	return self.pdf_extractor.extract_content(source)

File ~/work/podcastify-work2/.venv/lib/python3.11/site-packages/podcastfy/content_parser/website_extractor.py:65, in WebsiteExtractor.extract_content(self, url)
     63 except requests.RequestException as e:
     64 	logger.error(f"Request error: {str(e)}")
---> 65 	raise Exception(f"Failed to extract content from {url}: {str(e)}")
     66 except Exception as e:
     67 	logger.error(f"Unexpected error: {str(e)}")

Exception: Failed to extract content from ./sample.pdf: 422 Client Error: Unprocessable Entity for url: https://r.jina.ai/

In v0.2.0, additional Jina API key is required (and set), but the reason of failure seems same as v0.2.6.

v0.2.7 works. Thanks!


python 3.7 support

I have tried to update one of my projects to Python 3.7, but right now this is only dependency left that is not yet supporting it, so here is a patch to fix that:)
In case you are wondering what was broken on Python 3.7:
In [1]: object(a=1)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-5acd2be7f9d9> in <module>()
----> 1 object(a=1)

TypeError: object() takes no arguments

the message changed from no parameters to no arguments. Anyway, I don't think it is a good idea to relay on message text anyway so instead I just check does class redefine __init__ method or not.

@rooterkyberian have you signed the individual CLA for OASIS?

@emmanvg I just did

Thank you for the PR @rooterkyberian!


Debugging front-end code easily

Currently, we're doing an npm run build and then serving the built content. Which gives us the output file app.js in the browser which has all the transpiled content and does not let us debug easily.
Can we use webpack-dev-server for serving the front-end for development allowing us to debug the code in the raw source files instead of app.js?

Watch and logging is enough in our case.


Bodega full details page

Is your feature request related to a problem? Please describe.
Each bodega deserves a specific page where all details are listed in a nicely formatted way
Describe the solution you'd like
Dedicated page with all details we can find in the "Details" sidebar when navigating on the map, but with some differences / additional benefits:

Bigger carrussel of pictures
Better SEO (og:image, schema.org, etc.)

Describe alternatives you've considered
Not having such a dedicated page per bodega
Additional context

That page might not be super useful at first but with additional info in the future it might become quite a rich page
dev info: use https://unhead-schema-org.harlanzw.com/

SEO already handled nicely for individual bodegas since v1.31 (only missing proper sitemap.xml ... coming soon)
Not so much extra info that needs to be displayed for the moment
==> closed as not planned


Can't get Config  with Android build

ParseConfig.GetAsync() work well, when I build the Unity project to iOS device. But there is problem with android
Config can't be load from our local server.

Sorry for pic, but I can't copy logs right now.

Solved:
Android parse SDK needs https only connection, while iOS accept non-secure.
Added certificate to the server and it's OK now


Unit Tests for Farm

I tried to write a unit test for Farm, but failed. No idea how to use Farm JS api to build with the plugin. 🤔
/cc @ErKeLost Could you please help me?

Okay, I'll finish this job

hi @sxzz
The recent focus is on the development of farm 2.0. The 2.0 API will have break changes, so I want to add this test when we start maintaining the nightly version of 2.0. It is expected to be released by the end of the year.

Nice, good to see it!


Input Type Label

Hello,
I'm trying to change the value of text field by clicking a button. I have the following code ->
Text Field
<label for="mytext">My Label</label><input type="text" id="mytext">
Button
<button onclick="myFunction()">
Script
<script> function myFunction() { document.getElementById("mytext").value = "New Text"; } </script>
Usually when I click on the text field, the label slides up but when I try to change the value of the text field using the button, it over writes the label.
Any possible Fix?
Thanks.
Something Like This Happens

Something Like This Should Happen This Was Done By Clicking And Typing

Setting the value with javascript doesn't trigger any of our functions. You can try adding the active class to the label when you set the value of the text field.

@acburst Thanks! That did worked for me!


Multiple Robot Simulation : Open/Close Simulation, deselects all programs

Describe the bug

In multiple robot simulation, on click of Open/Close simulation , existing selected program gets reset

To Reproduce
Steps to reproduce the behavior:

Login as User on OpenRoberta Lab. Create and save multiple programs.
Click on Edit, Select Multiple Robot Simulation
Select 2 or more programs.
Observe that multiple robots are present. Run the simulation.
Click on sim button(Open/Close simulation window) twice
Observe that only single robot is present

Expected behavior

Multiple robots should be available for simulation

Screenshots

If applicable, add screenshots to help explain your problem.

Device information

Type : Desktop
OS: Ubuntu 18.04
Browser : firefox 74.0

Additional context

Observed the error, while preparing GSOC proposal and similar bugs 555 and 557

multiple robots shown

Single robot shown

this is not bug. If you close and reopen the simulation window you are back in the single robots view like normal. If you would click on the start button, the program in the program editor  would be executed, this is the correct and common way.


fwup failes to build on aarch64-darwin

Describe the bug
fwup fails to build on aarch64-darwin because mtools fails to build on aarch64-darwin which is a dependency. However mtools is only required for testing fwup and check is disabled on darwin.
Steps To Reproduce
On a mac with aarch64 run
nix-shell -p fwup
Expected behavior
package builds
Notify maintainers
@georgewhewell
Metadata
[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"aarch64-darwin"`
 - host os: `Darwin 20.6.0, macOS 11.6`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.6.0`
 - channels(mathew.prokos): `""`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

I believe we can close this issue now

No longer fails.


SpatialDilatedConvolution is not supported

Issue shows up when importing model from here http://hi.cs.waseda.ac.jp/~iizuka/projects/completion/en/

Created pull request to fix this issue: https://github.com/clcarwin/convert_torch_to_pytorch/pull/40
Successfully tested it on the model  from here http://hi.cs.waseda.ac.jp/~iizuka/projects/completion/en/


expose CFE_SB_IsValidMsgId()

CFE apps would benefit from a publicly-available IsValidMsgId() function (or perhaps an expanded "is valid message" function, that would check all header fields?)
For example, SCH has a function to validate its message table entries and has its own logic for determining whether a message ID is valid or not.
This would particularly facilitate CCSDS_VER_2 transitions.

Imported from trac issue 232.  Created by cdknight on 2018-01-16T18:26:34, last modified: 2019-07-03T12:48:08

Trac comment by jphickey on 2018-05-14 14:35:14:
Upvote this for next cFE release.
Particularly with the recent addition of extended CCSDS header, it is not necessarily a trivial check to determine if a MsgId value is valid or not. Apps should not be making assumptions about this value, and should only treat it as an opaque value.
Note that #245, if implemented, will turn any comparison test of MsgId values into a compiler error (a good thing).  This would necessitate having a function to call in its place.

Trac comment by dcmccom3 on 2018-11-15 09:19:31:
In addition to the run-time functional change, we should create a compile-time solution.  Multiple apps use an undefined MID macro for default table values. I looked at three apps(DS, HK, and SCH) and they each define a local undefined MID macro. They're also inconsistent in their definitions. DS & HK use 0 and SCH uses 0x1897.
Some preliminary thoughts:

The EDS build tool chain may be the long term solution
We need to check whether an app's code makes assumptions about the local definition. For example, simply checking whether a MID is great than the undefined value because the undefined value is assumed to be zero.

Trac comment by jhageman on 2019-07-03 12:48:08:
Moved unfinished 6.6.1 issues to next minor release

Trac comment by jphickey on 2018-11-15 09:38:37:
Can you elaborate on "compile-time solution"?  There are two possibilities:

A value to use as a placeholder/initializer for msgids within data structures
A method to check if a given msgid is valid.

We also need to be sure apps differentiate between a "MsgId" and "TopicId".  Many places that are checking MIDs would be better served by checking a topic ID instead and I think this will solve a lot of the issue.
Per our previous CCB nomenclature discussions (around the time of the CCSDS v2 header review), a topic ID is defined to be consistent across all CPUs in a mission (so i.e. CFE_ES is always assigned topic ID=1) whereas the MsgId is unique to a given instance of the app (so MsgId of CFE_ES on CPU1 is different than MsgId of CFE_ES on CPU2).
In other words, TopicId is a "normailzed MsgId".
The problem with MsgId is that there isn't one specific value we can isolate at compile time and say its always invalid, because it depends on framing type.  TopicId is better here, as we //can// say that e.g. TopicId=0 is always reserved/invalid and this is independent of the framing type.
Historically we lacked this differentiation and apps were simply checking MsgId because its the value they got from the frame, when they probably should have been checking TopicId.

There is a related email chain requesting CFE_SB_GetPktType be exposed as an API, with responses of cmd, tlm, or invalid.  This would support proposed SCH message table update to create the right type of packets using the MsgId.

Worth a note exposing as an API also needs a requirement and stub.

I'm concerned at this point MsgId to hdr and hdr to MsgId is more appropriately defined by the project, and you may need more information to go from MsgId to hdr.  I think it will be challenging to generalize due to the extension and variety of use cases, other than saying there needs to be conversion APIs and it needs to produce a unique MsgId for each SB route., and fill in the rest of the header based on a MsgId?  Or maybe these tables shouldn't use MsgId to try to fully define the header and we would benefit from separating the SB routing concept from generating headers?

Yes, I agree that the conversion from a packet content to CFE_SB_MsgId_t value and vice versa needs to be isolated into code which the user may modify if they so choose.  This is precisely what the EDS modifications developed by the GHAPS project did.  There is a separate library for that handles the "translation" jobs of getting/setting a CFE_SB_MsgId_t from a packet payload in memory, as well as translating a CFE_SB_MsgId_t to a TopicId value.
However, all that being good - it is still separate from this issue, where we still need to expose this API regardless.  This is intended to just test if a given CFE_SB_MsgId_t value is OK and it needs to be based on how the type is defined - we need to get away from apps directly doing an integer comparison on this value, it violates the opaqueness/abstraction that it is supposed to have.

Agreed, separate issue.

@jphickey Do you have time to split the fix out from #592 and submit a pull request covering this issue this round?  @ejtimmon is pending on this to resolve some final app tickets.

Yes, I will submit something today

Clarification question -- what was the verdict on the application of API functions like:
if (CFE_SB_MsgId_Equal(MessageID, CFE_ES_SEND_HK_MID))

in place of the switch() statement?
Ideally I'd like to get that, plus the proper application of CFE_SB_MsgIdToValue/MsgIdFromValue macros into the build ASAP.  (and of course exposing the IsValidMsgId routine too).

Yup, those changes are all good to go this round.

Quibble, given that this will have long-term ripple effects, could we call it "CFE_SB_MsgId_Is()" instead of "Equal"? Also removes the expectation that the MsgId is a scalar value.

I don't think the term Equal implies a scalar.... there is precedent for this too (e.g. see pthread_equal).

or could just if (CFE_SB_MsgIdToValue(MsgId)==value).  IsEqual in my mind is for checking things of the same type, as in seeing if to MsgId's are equal.  I don't have strong feelings with any of these suggestions, just adding another suggestion.

Or just relate the handler directly with the MsgId and skip the value all together.  Somewhat related to suggestion to go to tables, and be able to register/unregister command handlers?

Or just relate the handler directly with the MsgId and skip the value all together. Somewhat related to suggestion to go to tables, and be able to register/unregister command handlers?

Yes - the intent should be to get away from application code assuming there is some single integer "value" behind the MsgId in the first place.  In C++ we could override the == operator, but in C we cannot so hence why we need a named equality test function.
But as the value is included in a number of syslog and event messages as an integer, the integer representation will probably need to exist for some time.
Message Dispatching should be done using a dispatch table that is simply registered in SB, so code doesn't need to replicate this in every app.  Right now there is a lot of code that is similar between apps but all a little different.
After start up, the run loop would just be something like:
    while (CFE_ES_RunLoop(&SAMPLE_AppData.RunStatus))
    {
        /* Pend on receipt of command packet */
        status = CFE_SB_RcvMsg(&SAMPLE_AppData.MsgPtr,
                               SAMPLE_AppData.CommandPipe,
                               SAMPLE_APP_POLL_TIMEOUT);

        if (status == CFE_SUCCESS)
        {
            CFE_SB_DispatchMessage(SAMPLE_AppData.MsgPtr, &SAMPLE_CMD_DISPATCH_TABLE);
        }
    }

The SAMPLE_CMD_DISPATCH_TABLE could be auto-populated by the build system based on the commands that are enabled/disabled in the user config.  Once we have each command handler in a separate compilation unit, this is easy.
At any rate, once this is in possible, the entire duplication of effort in e.g. SAMPLE_ProcessCommandPacket, SAMPLE_ProcessGroundCommand that one sees in every app can go away, and the MsgId equality test would probably be very rarely used by the apps at that point.


wrong message type for failed mutation "INFO" instead of "ERR"

{"L":"INFO","T":"2020-02-28T10:05:58.377Z","M":"failed to apply mutation","attempts":2,"error":"[cluster = test, query = 'DELETE FROM ks1.table1 WHERE pk0=? AND pk1=? AND pk2=? AND pk3=? AND pk4=? AND ck0>=? AND ck0<=? ']: cdc: could not find timestamp of mutation","errorVerbose":"cdc: could not find timestamp of mutation\n[cluster = test, query = 'DELETE FROM ks1.table1 WHERE pk0=? AND pk1=? AND pk2=? AND pk3=? AND pk4=? AND ck0>=? AND ck0<=? ']\ngithub.com/scylladb/gemini/store.(*cqlStore).doMutate\n\t/home/henrik/dev/gemini/store/cqlstore.go:87\ngithub.com/scylladb/gemini/store.(*cqlStore).mutate\n\t/home/henrik/dev/gemini/store/cqlstore.go:49\ngithub.com/scylladb/gemini/store.mutate\n\t/home/henrik/dev/gemini/store/store.go:162\ngithub.com/scylladb/gemini/store.delegatingStore.Mutate\n\t/home/henrik/dev/gemini/store/store.go:158\nmain.mutation\n\t/home/henrik/dev/gemini/cmd/gemini/jobs.go:205\nmain.MutationJob\n\t/home/henrik/dev/gemini/cmd/gemini/jobs.go:47\nmain.job.func1\n\t/home/henrik/dev/gemini/cmd/gemini/jobs.go:130\ngopkg.in/tomb%2ev2.(*Tomb).run\n\t/home/henrik/go/pkg/mod/gopkg.in/tomb.v2@v2.0.0-20161208151619-d5d1b5820637/tomb.go:163\nruntime.goexit\n\t/usr/lib/go/src/runtime/asm_amd64.s:1357"}

Fixed at https://github.com/scylladb/gemini/commit/f708d8654a919c7611d5cb7085028924febdc30f


Update to Chromium 89.0.4389.128

89.0.4389.128 fixes a couple security issues.  The only change needed is a version bump.
Built fine and is running well so far!
Resolves #1484

90.0.4430.72 just released.  Since there weren't any changes needed for this version we may as well jump straight to 90.0.4430.72.


provoking vertex - is it supported?

Hey there,
I think "provoking vertex' is not supported.  Because the .def file doesn't include it as an extension.
And when I try to do the following (just ignore that it's pseudo code) it doesn't work:
    vku::DeviceMaker dm;
    dm.defaultLayers();
    // the extension doesn't seem to exist
//    dm.extension(VK_EXT_PROVOKING_VERTEX_EXTENSION_NAME);

// but let's just try anyway
    vk::PhysicalDeviceProvokingVertexFeaturesEXT provoking;
    provoking.setProvokingVertexLast(true);
    dm.enableCreateInfo((vku::DeviceMaker::DeviceCreateNode *)&provoking);

I just want to check before I go through and write some special case code to rearrange index orderings.
Thanks in advance.

Nope. This is not supported yet.
I think there might be a Metal SPI[1] for this, since I'm pretty sure OpenGL on Apple Silicon does support it.
[1]: Service Provider Interface: Apple/IBM jargon for a private programming interface intended for use by other OS components.


feat: display server-side messages when form submission is successful…

… (not only on error)
@cparaiso & @ChristianMurphy
This PR isn't ready.  I've attempted to make the change I need, but I get this error (which seems unrelated) in stand-alone Node...

Heads up folks -- the Cannot assign to read only property 'fbmsFormFname' issue is occuring on master as well.
I suspect a dependency updated, and something is now being enforced that previously wasn't.

This has been released in version 1.0.0


Process map

Search/replace of content according to class map
Ruins file(s) on disk that matches glob. process.argv[2] is currently hard coded as glob param.

Example cmd to ruin given file:
node index.js input-css.css

:tada:


Able to post new message in different channel using Bolt

I have configured my python script to run on the 'App' (instead of a webclient). I was wondering if it is possible for a bot to post a private message in a different channel? I could not find any documentation on how to do this in Bolt.
Completed:
Basically, I would like to run a bot in the main channel. When the bot is called, the user can select from radio buttons they would like to 'text Sam.' The bot asks, "what message to text Sam?" The user then enters a message, which the bot can detect as the message to Sam.
Need help:
I believe I would like to use the 'chat.postMessage' method, however, I am not sure how to configure this with the 'App'. If ther is another way to do this please let me know!
The slack_bolt version - To be run in a public channel
import os
from slack_bolt import App

app = App(
    token=os.environ.get('SLACK_BOT_TOKEN'),
    signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
)

### set a 'switch' to default 'none'
switcher = 'none'

### bot listens for 'Hi!' to post radio buttons
@app.message("Hi!")
def initial_message_func(message, say):
	say(
		blocks= [
          {
            "type": "section",
            "text": {
              "type": "mrkdwn",
              "text": "*What to do?*"
            },
            "accessory": {
              "type": "radio_buttons",
              "options": [
                {
                  "text": {
                    "type": "plain_text",
                    "text": "Play a game",
                    "emoji": True
                  },
                  "value": "play_game"
                },
                {
                  "text": {
                    "type": "plain_text",
                    "text": "Eat a sandwhich",
                    "emoji": True
                  },
                  "value": "eat_sandwich"
                },
                {
                  "text": {
                    "type": "plain_text",
                    "text": "Text Sam",
                    "emoji": True
                  },
                  "value": "text_sam"
                }
              ],
              "action_id": "action_selection"
            }
          }
        ]

	)

### if the button 'text Sam is clicked'
def text_sam_func(ack, action, say):

    if action['selected_option']['value']=="text_sam":
        say("what do you want to text Sam:")

        #turn 'switch' to recieve message to sam (see below)
        globals()['switcher'] = 'message_to_sam'

### listen for message when the switch is set to 'message_to_sam'
@app.message("")
def message_to_sam_func(message, say):
    # if the switch is turned to Sam
    if switcher == 'message_to_sam':
        # send private message to specific user, probably using the 'chat.postMessage' method
        # 'message' contains message
        return

if __name__ == "__main__":
  app.start(port=int(os.environ.get("PORT", 3000)))

Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

Hi @mae5357, thanks for the code sample and detailed message!
You're thinking about this correctly and on the right track. In Slack's API, a private message is often referred to as an IM (or sometimes a DM). The chat.postMessage documentation explains the concept of sending a IM as:

If you simply want your app's bot user to start a 1:1 conversation with another user in a workspace, provide the user's user ID as the channel value and a direct message conversation will be opened, if it hasn't already. Resultant messages and associated direct message objects will have a direct message ID you can use from that point forward, if you'd rather.

You will also need the im:write scope to start a new IM/DM conversation that your bot as not previously added to.
Once you have the im:write scope, you can use the chat.postMessage with the channel as the user's ID to send a IM/DM to a user.
Would you mind trying that out and letting me know how it goes? If you have trouble, I can try to provide a complete code sample.

Hello, thank you for your response. I updated the scopes and reinstalled to the workspace. I am still getting an error, so I'm not sure if I'm implementing it correctly... do you have any example code that you could show? Thanks.
import os
from slack_bolt import App

import json

# HIDE THESE EVENTUALLY
os.environ['SLACK_BOT_TOKEN'] = 'xoxb-1702190629735-1754305364931-Np2uAeuXgGd1o25vwho4KEYn'
os.environ['SLACK_SIGNING_SECRET'] = '1be835429b0e1812af5900d27c00191f'

app = App(
    token=os.environ.get('SLACK_BOT_TOKEN'),
    signing_secret=os.environ.get("SLACK_SIGNING_SECRET")
)

#Initialize
switcher = 'none'

# # # LISTENING FUNCTIONS # # #
# This will match any message that contains "Hi!"
@app.message("Hi")
def initial_message_func(message, say):
	say(
		blocks= [
          {
            "type": "section",
            "text": {
              "type": "mrkdwn",
              "text": "*What to do?*"
            },
            "accessory": {
              "type": "radio_buttons",
              "options": [
                {
                  "text": {
                    "type": "plain_text",
                    "text": "Play a game",
                    "emoji": True
                  },
                  "value": "play_game"
                },
                {
                  "text": {
                    "type": "plain_text",
                    "text": "Eat a sandwhich",
                    "emoji": True
                  },
                  "value": "eat_sandwich"
                },
                {
                  "text": {
                    "type": "plain_text",
                    "text": "Text Sam",
                    "emoji": True
                  },
                  "value": "text_sam"
                }
              ],
              "action_id": "action_selection"
            }
          }
        ]

	)

# if you select "Text Sam", ask "what do you want to say:"
@app.action("action_selection")
def text_sam_func(ack, action, say):
    ack()
    if action['selected_option']['value']=="text_sam":
        say("what do you want to text Sam:")

        #turn 'switch' to recieve message to sam (see below)
        globals()['switcher'] = 'message_to_sam'

@app.message("")
def message_to_sam_func(client,message):
  # if the switch is turned to Sam

  if switcher == 'message_to_sam':
    # send private message to specific user, probably using the 'chat.postMessage' method
    # 'message' contains message
    user_id = message.get('user')

    client.chat.postMessage(
            channel=user_id,
            text=message
            )

@mae5357 Your code example included the token and signing secret. I've modified your comment and deleted the change history but please revoke the token and regenerate the signing secret as soon as possible.

ah. thanks.

@mae5357

I am still getting an error

What's the error? Enabling debug-level logging may help you figure the cause out. You can place the following code in the beginning of your app source code.
import logging
logging.basicConfig(level=logging.DEBUG)

Thank you, I was able to fix the error and get the correct output.


pdf.js URL Problem

In all examples *.html , there is a URL mistaken;
"../../build/pdf.js"  should be "../../src/pdf.js"

run before type

gulp generic


fix(minifier/replace_global_defines): do not replace shadowed identifiers

#5691  👈
main

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

Join @Boshen and the rest of your teammates on  Graphite


fix(cli): Use pathe instead of node:path

Fixes testing issues for the CLI for windows users.

Replaces node:path with pathe

Not sure if this is really important especially since it's an extra dependency for the CLI. But I tried it in one of my side projects and it worked without any issues.
The registry build has the exact same issue so we may be able to do the same there.
P.S.
Didn't add a changeset since there are no user facing changes lmk if I should add one anyways.

Thank you, but I would rather avoid adding another dependency if it's possible! The issue was that the aliases for hooks and ui weren't being normalized, so they were causing the tests to fail on windows. Opened #1516 as an alternate PR

package.json police 👮♂ strikes again! 😃
Gonna close this in favor of #1516 - thanks for bringing it up @ieedan


Feat midterm2022 vote

Contributes to #336
What did you do?
Add code to implement design for midterm 2022 voting page.

Update Journey in-page nav based on discussion on Wed status call. Using Carbon progress bar for nav
Removed geocoding of voters address due to uncertain $$ costs
Early vs day of voting location displayed based on date rather than having 2 buttons.

Were docs updated if needed?

[ ] N/A

Type of change

[ ] New feature (non-breaking change which adds functionality)

Checklist:

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] My changes generate no new console logs

Desktop

After user enters election/address

In general, I do not think we are using the screen space very wisely and it is especially true on this screen. Once we have polling places things become very crowded. Needs a thoughtful UX design if we get a new designer.
Mobile

scroll

scroll more to see the rest of the map


Improve Error Handling

As of now, incorrect usage of CLI functionality are not caught by OBR, but result in, e.g., TypeError's
Example:
obr query (no further arguments)
output:
  File "[...]/OBR/src/obr/cli.py", line 221, in query
    queries = input_to_queries(queries_str)
  File "[...]/OBR/src/obr/core/queries.py", line 63, in input_to_queries
    inp_lst = re.findall("{[\w:\"'0-9,. ]*}", inp)
  File "[...]/lib/python3.10/re.py", line 240, in findall
    return _compile(pattern, flags).findall(string)
TypeError: expected string or bytes-like object

I should also look into using the builtin logging module

I'll close this as it only clutters up the issue board. I would rather add corresponding documentation pages for error handling, code styles, logging etc.


feat: pin abigen version

#222  👈
main

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

Join @tremarkley and the rest of your teammates on  Graphite


styles added

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.nadavmoreno seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Feature - Running single test

Sometimes I modify single test case and for the rest I have already run the benchmark. I would like to have possibility to run single test, without waiting for all others, which didn't change.

Same here!


Simplify log configuration in servlet environment

As reported by @hdeadman in #60:

In the 1.x version of this listener I could extend the listener and override the logging methods. I am currently using SLF4J/Logback and I was going to provide an implementation of Logger that used that but I didn't see an easy way to extend the listener and pass in my instance of the Logger so it could be set on ClassLoaderLeakPreventorFactory. Should "void contextInitialized(final ServletContext servletContext)" be overloaded with a version that takes a Logger?
It's not a big deal for me because I am using the org.slf4/jul-to-slf4j bridge so the default JULLogger happens to work for me but it isn't clear to me how one is supposed to specify their own logger (or use StdLogger).
Another option would be to have more implementations of Logger and have a context parameter for choosing between them. If the context parameter specified the Logger impl class name then you wouldn't have to bundle all the impl classes.

@hdeadman would you care to confirm that the changes in #86 also simplifies setting a logger on the ClassLoaderLeakPreventorFactory?

That looks like it would allow someone to provide their own logger. Feel free to close this issue.
I haven't been using this library recently b/c at the place I work now we run all our apps in docker (typically using spring-boot). We can't really do zero downtime deployments via deploying a new version of an app to a permanently running app server so we don't run into classloader memory leaks anymore. Our deployments are mostly zero downtime b/c most state has moved to the browser and we have redundant services behind a load balancer. I say mostly b/c there is plenty of room for improvement around orchestrating container restarts and moving the authentication state of the otherwise stateless services to an api gateway.
I will continue to recommend this library to anyone I run into that is having classloader memory leaks. Thanks.


Provide Typography for all type of devices not only for desktop

Is your feature request related to a problem? Please describe.
Right now, M3 gives details of typography for desktop device only.
But designers required typography details for all type of devices as shown in below screeshot.
Describe the solution you'd like
Kindly provide detailed typography for all type of devices as shown in M3 website screenshot with newly updated categories like small, medium, large.
And with font weight, line spacing, line height, etc.
Like display medium and large font style is missing for large screen tv and similarly it required for all type of devices as shown in image.

Describe alternatives you've considered
There is no alternative.
Additional context
Add any other context or screenshots about the feature request here.

Thank you for the feedback!

@rodydavis Any ETA for diff typography support for all type of screens in M3 specs & plungin?


Classification example

Alright now with a second one 5 minutes after #6674, I'm convinced this is AI-generated (or at least, spam). I'm going to report your account to GitHub. Please do not do this!
We don't consent to being experimented on like this.

Kindly apologise, I'm new to LightGBM and its not a spam, I will create PR under issues.


Feature request: add SSL support

It's a good practice to force connections to be secure, especially when dealing with production databases, which is what this library works with.
Unfortunately, I don't see any way to set SSL options, although it's supported by PDO.
What do you think?

That's true, good idea. I will take a look at it.
I think the best would be to allow setting PDO options in general (with PHP constants in the configuration file https://symfony.com/blog/new-in-symfony-3-2-php-constants-in-yaml-files)


Use around filter. otherwise on a server error, the context will not …

…be reset

Because this uses *_action, we should update the gemspec to specify Rails version >= 4.0.

Ah, yes good catch. Added that in 4a3924c


Expose locale on navigator.language rather than NativeModule

In the same way that the geolocation API for react-native is exposed through navigator.geolocation, it would be great to have this exposed as navigator.language and possibly even upstreamed. Thoughts?

Hey @brentvatne, sounds cool!
I'll need some guidance for it (I'm trying to maintain this lib as @AlexanderZaytsev is not active anymore, but I'm not super skilled on iOS/ObjectiveC) though.

@brentvatne The react native geolocation API is based on JS standard, that's why it make sense:
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/geolocation
https://developer.mozilla.org/fr/docs/Web/API/Geolocation
Use the global scope to expose navigator.language might not be a good idea. A standard for I18n exists too: https://www.ecma-international.org/ecma-402/2.0/ and is polyfilled by formatJS. You can use it in react native with react-intl.

The react native geolocation API is based on JS standard, that's why it make sense:
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/geolocation
https://developer.mozilla.org/fr/docs/Web/API/Geolocation

I am aware of this, which is why I suggested navigator.language which is documented here: https://developer.mozilla.org/en-US/docs/Web/API/NavigatorLanguage/language

Use the global scope to expose navigator.language might not be a good idea. A standard for I18n exists too: https://www.ecma-international.org/ecma-402/2.0/ and is polyfilled by formatJS. You can use it in react native with react-intl.

It's the same thing as using navigator.geolocation. I think this should be upstreamed for that reason.

@brentvatne Didn't know about that. It's might be a good idea then.

As a sidenote, by upstreaming the change this library would become immediately compatible with create-react-native-app

@brentvatne Would you mind submit a PR?

@mmazzarolo - if you're interested in doing this still, feel free to ping me on messenger or slack!

@zoontek - no sorry, no time :( I just wanted to make sure you guys were aware that there may be a better way than including a native dependency in this lib

@brentvatne I'll try to take a look at it in the next few weeks (I still have 0 experience on the subject though), but @zoontek is much more prepared than me on this lib now
on a side node: @zoontek, thank you for being super active here 👍

@brentvatne After some tests for the new versions, I'd rather not expose language constant because they're not reloaded after a language change on Android. I could use a Proxy with a Promise, but I'd rather not.

@zoontek - what does the web do in this case? I think there is no need to reinvent the wheel with a custom api

To add to the above comment, despite this being an extreme edge case, there are solutions to it that don't add more complexity.
The navigator.language constant should be stored in JS so you can access it synchronously and we can update that value whenever we like (eg: in response to DeviceEventEmitter, automatically updating it behind the scenes). More about this pattern in this talk: https://www.youtube.com/watch?v=-Izgons3mec
An alternative to using DeviceEventEmitter, for example, is that when the app is backgrounded and then foregrounded again, you can check if the value changed and update it on the JS side if so.

@brentvatne I'm currently working on a PR to add this directly in the react-native project.
It'll support navigator.language, navigator.languages and Intl.addListener('languagesDidChange'). I think it's a better solution than force the devs to uses a specific translation lib :)

@brentvatne You can find it here: https://github.com/facebook/react-native/pull/14568


Add nbFile overload for file embedding

This also adds an example.
Note: On my machine locally it was impossible to fully run nimble docs, even after running nimble docsDeps.
Because it doesn't find the happyx custom block:
/home/philipp/dev/nimib/docsrc/interactivity.nim(281, 5) Error: undeclared identifier: 'nbHappyxCode'.
This is caused by the when moduleAvailable(happyx) check failing because
/home/philipp/.nimble/pkgs2/happyx-3.0.0-09a3bb3a93ddca05b973235465eb1f2c6414d5b8/happyx/spa/tag.nim(216, 8) Error: undeclared identifier: 're2'.
I assume that's a happyx problem.

for ref on this, see the discussion we had here, in particular the linked comment: https://github.com/pietroppeter/nimibook/issues/85#issuecomment-1784153469
will wait for preview to build and check
will also look to open an issue about the happy problem for documents
thanks for working on this!

Checks passed!
Regarding the issue, appears I read your comment too late, I already opened https://github.com/HapticX/happyx/issues/170 :sweat_smile:

/home/philipp/.nimble/pkgs2/happyx-3.0.0-09a3bb3a93ddca05b973235465eb1f2c6414d5b8/happyx/spa/tag.nim(216, 8) Error: undeclared identifier: 're2'.

@PhilippMDoerner please delete all versions of regex package and install #head version. This should help.

yep, indeed the preview works fine! (if you look at the last check you will see there is a netlify preview and clicking on details let you look at built docs):

regarding happyx, actually happy that you went and opened the issue, I thought it was an issue with nimib.
thanks and have a great day (or likely great night)!

btw, note that LICENSE is bizarrely highlighted (I guess by highlight.js) by mistake...


Xnet - Mekanism Compatibility

Any chance of adding Xnet compatibility to this great mod?
Seems that the liquids and gasses doesn't work well together with Xnet!
Version (make sure you are on the latest version before reporting):
Forge: <IP_ADDRESS>1
Mekanism: 1.12.1-<IP_ADDRESS>6
Other relevant version: ATM3 v5.1

There should be no compatibility required on our side, Xnet uses the standard interfaces as far as I know, which we do supply.
Check that your sidedness is set correctly.


make from source error use release 1.7.2 source code

$ rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
as: Cannot locate rosdep definition for [module_comm_msgs]

Please try git submodule update --init

it works, thanks for your answer.

I am having the same problem and "git submodule update --init --recursive" does not works


JSX whitespace issue

This is a repost of https://github.com/6to5/6to5/issues/419.
var Foo = React.createClass({
  render() {
    return (
      foo
    );
  }
});

var Bar = React.createClass({
  render() {
    return (

        <Foo/> bar

    );
  }
});

The whitespace between <Foo/> and bar is missing in the output.

Is there any kind of quick temporary fix for this that wouldn't necessitate the rewrite?
I'd really like this one case fixed, as this is what prevents us from using 6to5, and I already changed build process to use 6to5.
I'm happy to work on it if you can point me in the right direction.

As a quick one on your side, you can use method from early days of JSX when it didn't support whitespace output at all - just insert {' '} in your code.
I mentioned rewrite because this issue raises up again and again. We had the same with ES6 templates earlier too, and without integrating the same fix, each case requires own step-by-step debugging of simplified reproducible test case just to find where and why it happens. If you want - you can do that on your side now and I'll be happy to accept PR.

As a quick one on your side, you can use method from early days of JSX when it didn't support whitespace output at all - just insert {' '} in your code.

Yeah I was considering that but it's hard to find places in the source code where I might need this, as I have hundreds of components.

If you want - you can do that on your side now and I'll be happy to accept PR.

I think I'll give it a shot if I have time, and if I find some cheap way to do that, I'll ping you back.
thanks!

OTOH grepping for \w>[ ] in JSX files should probably be enough.

BTW this only seems to happen with self-closing tags.

Fixed with rewrite, I'm just willing to wait for some upstream changes and merge them before release. /cc @sebmck

@RReverser Awesome! What about #14? It's a pretty serious issue as it currently breaks source maps.

@sebmck Just answered there :)

@sebmck But I'd ask not to merge this to 6to5 until I finish some core changes in upstream (want to be sure that nothing will be broken).

@RReverser Sure, I'll wait for your go-ahead.

Really appreciate you tackling this! Thank you for taking time.

Always welcome!

:+1:

@sebmck I guess we are now good to go. Please note that prefixes are now changed to JSX instead of legacy XJS (see facebook/esprima#83 for context). Let me know about any issues you encounter after upgrade - I'll be happy to fix 'em.

@RReverser Great, thank you! Few merge conflicts but nothing serious, passes the 6to5 and acorn-6to5 test suite so all is good, thanks again!

@sebmck Great to hear!


generate_examples_lib updated with Round op

@achowdhery Can you please review this PR? Thanks!

Nagging Reviewer @achowdhery: You have been added as a reviewer to this pull request. Please add your review or reassign. It has been 15 days with no activity and the awaiting review label has been applied.

Can one of the admins verify this patch?

Thanks for your contribution, Siju.
The test was added via https://github.com/tensorflow/tensorflow/pull/24918


Your SSL Certificate Might have expired

Cannot access https://stackedit.io/ without insecure connection warning

Came here to create the same issue.

Indeed, same issue.

Looks like been resolved


Add support for having test files in the same directory as source files.

Check if the file does have test extension rather than being in the test directory.
Could potentially fix #433
The side effect of it is that you cannot specify just "js" as your test file extension as this would include all tests in the coverage

hey @skawian! thank you for the PR.
I think the direction that we want to move is to specify the test files pattern rather than a test directory.
this way we can just match test files against this pattern and exclude them from coverage report

Sounds like a good plan. This will allow both separate folders for tests or just based on extension. I'll have a look into that.

@skawian are you willing to make this change? That would be great. Also, I think we should leave the defaults the way they are and provide additional documentation for this.

Yeah, I'll try to push some changes this weekend.

I'm fixing this in #943. I started some larger rewrite and had to do this :)

Sorry I still haven't gotten around to work on the new matching code but we are getting closer! I'll close this PR as it won't be relevant when I send mine. Thanks for the contribution however and I'm looking forward to future contributions from you :)


Update artifact.py

Create the createArtifact() function allowing creating an
Artifact object without connecting to the database.

Move extra fields into a dictionary of extra.
Previously, the extra fields were flatten into the artifact
object and weren't taken care of properly.

Signed-off-by: Hoa Nguyen<EMAIL_ADDRESS>

You know you can run these tests locally, right? ;)

I agree that we should make the DB connection optional. What if we modified the getDBConnection to return a simple "file" DB when there is no other connection available. It could dump the json to something like .gem5art/artifacts.json

For some reason mypy cannot find the local 'gem5art.artifact' package

You have to run it in the artifact directory, or something like that.
On Wed, Jun 23, 2021 at 3:39 PM Hoa Nguyen @.***> wrote:

For some reason mypy cannot find the local 'gem5art.artifact' package
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/darchr/gem5art/pull/137#issuecomment-867205539, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AAA2YHAA5LGIY54DBOC2VC3TUJPDRANCNFSM47GVNMHA
.

--
Jason Lowe-Power (he/him/his)
Assistant Professor, Computer Science Department
University of California, Davis
3049 Kemper Hall
https://arch.cs.ucdavis.edu/

Regarding decoupling artifact and db, is the MockDB in artifact/test_artifact.py okay to be used?

Another thing is we need to differentiate between "intending not to connect to a database" and "failing to connect to a database"

No, the MockDB is just for testing and shouldn't be used in production. I suggest we make a new DB type that is a "file" or "local" database that is backed by a json file and just points to the artifacts on disk.
I think you can simply change default DB URI (https://github.com/darchr/gem5art/blob/master/artifact/gem5art/artifact/_artifactdb.py#L203) to be the file backed instead of the mongodb backed database. Then, if the user changes it to be the mongodb database, then you should error that you can't connect.
Does that make sense?

If I understand it correctly, I can make a new db_schema that takes uri like "file://some/path" and the new db type will keep track of files and artifacts and runs?

Right, you would make a schema like file://some/path and in https://github.com/darchr/gem5art/blob/master/artifact/gem5art/artifact/_artifactdb.py#L209 you would return a new FileArtifactDB
Of course, you would also have to implement FileArtifactDB ;)

Replace by #138.
FileArtifactDB will be in another PR.


Write to MCAUSE / ExceptionCode

Asking for clarification on the following.
In the Privileged spec it says for Writes to the MCAUSE[Exception Code]

The Exception Code is a WLRL field, so is only guaranteed to hold supported exception codes.

So if I have a device which does not support supervisor, and I attempt to write the value 0x80000001 (Supervisor Software Interrupt)
Does this mean the MCAUSE should remain unchanged ?
And secondly, no Reserved values can be written ?
The additional wording 'guaranteed' makes it appear possible that the unsupported exception codes are optional, so I want to be clear that what this actually means is the following
The Exception Code is a WLRL field, so must only hold supported exception codes.
(sorry to be pedantic, but it does actually matter)
Thx
Lee

The answer follows from the definition of WLRL: https://github.com/riscv/riscv-isa-manual/blob/16f50025273b68de34a4b7c7a397538bd9d508ed/src/priv-csrs.tex#L445

To add more detail: WLRL is a lot like WARL, except illegal values are not
required to be transformed into legal values;
So legal values  map to legal values; illegal values can map to anything
(as long as it is deterministically dependent on the current state of the
field and the value being written) and/or cause an illegal exception (which
is one of the few data-dependent traps that exist, I think).
There is a slight difference between that deterministic wording
compared to WARL, which states it is deterministically dependent on the
current state of the hart and the value being written; WARL was changed
because it became clear that what was illegal for some fields can be
determined by other state.
There are only 3 WLRL fields (unused MISA fields, the exception code in
xCAUSE (I'm counting it only once), and VGEIN field  in HSTATUS
On Fri, Oct 9, 2020 at 12:30 PM Andrew Waterman<EMAIL_ADDRESS>wrote:

The answer follows from the definition of WLRL:
https://github.com/riscv/riscv-isa-manual/blob/16f50025273b68de34a4b7c7a397538bd9d508ed/src/priv-csrs.tex#L445
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/riscv/riscv-isa-manual/issues/597#issuecomment-706364592,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHPXVJWDNW6RZLC4KKFZMSTSJ5QEVANCNFSM4SKDJIWQ
.

@allenjbaum

illegal values can map to anything

This does not make sense, if the field is WLRL, your statement implies that illegal can map to illegal (ie anything)
Or did you mean illegal can map to any LEGAL value ?

No, I meant exactly what I said: it can map to anything - at least, that is
my interpretation of what the definition of WLRL says:
"Implementations can return arbitrary bit patterns on the read of a
WLRL field
when the last write was of an illegal value"
If you write an illegal value, all bets are off. It can replace it with a
legal value, or any other illegal value or trap or both.
If it hurts when you do that, then don't do that.
WARL has to map to a legal value - WLRL does not.
I believe the intent is that if legal values can fit into a smaller number
of bits than the field can represent, then an attempt to write some larger
number of (non-zero) bits can simply truncate the value to fit just the
number of bits that a legal value uses. In that case, what is written is
neither the original illegal value being written, the current value of the
field, or some legal value.
The spec definition is much looser than that truncation, however.
On Sun, Oct 11, 2020 at 11:35 PM eroom<EMAIL_ADDRESS>wrote:

@allenjbaum https://github.com/allenjbaum
illegal values can map to anything
This does not make sense, if the field is WLRL, your statement implies
that illegal can map to illegal (ie anything)
Or did you mean illegal can map to any LEGAL value ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/riscv/riscv-isa-manual/issues/597#issuecomment-706902145,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHPXVJXZ5GHC2QYFOUVWMZLSKKPSZANCNFSM4SKDJIWQ
.

The spec definition is much looser

Yes, the intent was also to permit compression of a sparse set of legal values.  If the set of legal values is 0, 7, and 11, we'd like to encode those in 2 bits rather than 4.


Invalid replacement of module('', () => {})

After using this codemod my tests where not running at all anymore with a very cryptic stacktrace:
index.js:626 Uncaught TypeError: a.localeCompare is not a function
    at index.js:626
    at Array.sort (:4200/native)
    at Array.<anonymous> (index.js:625)
    at runLoggingCallbacks (browser.js:146)
    at begin (formatio.js:167)
    at formatio.js:134

Where not a single where helpful.
After trying to migrate folder by folder I finally were able to pinpoint the culprit.
One of my test file was looking like this:
module('Unit | Lib | visualisations', () => {
 // bunch of tests
});

And was translated to
module(() => {
 // bunch of tests
}, function() {});

Awesome, thank you for tracking this down!!


Rewind/Fast Forward "hangs" ; gets out of sync with video; long delays when resuming video

Describe the bug
When rewinding or fast forwarding, video eventually stops updating and just "freezes".   The time counter continues to advance. When PLAY is resumed, audio and video are out of sync (audio starts playing, video remains frozen for a while - sometimes eventually starts playing in sync).     STOP the stream and resume seems to be the only reliable way to resume playback after one of these fast forward episodes.
Does not seem to depend on the proxy I choose (mp4upload, doodstream both fail in same way).
To Reproduce
Steps to reproduce the behavior:

Fast forward (or rewind) a stream.
Wait a while - at some point, the video stops updating, but the time counter continues to advance.
Press PLAY.  Usually audio will start playing, but video will remain frozen.
Wait a while (30-60s or more) and sometimes the video will catch up - but most often it won't.

The problem seems to happen more quickly at higher FF rates (16x, 32x), but I've seen it happen at 4x too.
Expected behavior
Video should update itself while fast forwarding.  Video and audio should both play in sync when resuming PLAY after a fast forward.
Log file
This is during an attempt to rewind about 10s :
2022-07-09 13:59:47.553 T:1312    ERROR <general>: CDVDVideoCodecDRMPRIME::AddData - send packet failed: End of file (-541478725)
2022-07-09 14:00:00.780 T:1312     INFO <general>: Skipped 12 duplicate messages..
2022-07-09 14:00:00.780 T:1312    ERROR <general>: CDVDVideoCodecDRMPRIME::AddData - send packet failed: End of file (-541478725)
2022-07-09 14:00:11.190 T:1312     INFO <general>: Skipped 3 duplicate messages..
2022-07-09 14:00:11.190 T:1312    ERROR <general>: CDVDVideoCodecDRMPRIME::AddData - send packet failed: End of file (-541478725)
2022-07-09 14:00:20.175 T:798      INFO <general>: Skipped 5 duplicate messages..

Next set of logs is after pressing PLAY:
2022-07-09 14:00:20.175 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>87
2022-07-09 14:00:20.175 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>67
2022-07-09 14:00:20.176 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>94
2022-07-09 14:00:20.176 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>38
2022-07-09 14:00:20.185 T:1312    ERROR <general>: CDVDVideoCodecDRMPRIME::AddData - send packet failed: End of file (-541478725)
2022-07-09 14:00:20.237 T:798      INFO <general>: Skipped 43 duplicate messages..
2022-07-09 14:00:20.237 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>77
2022-07-09 14:00:20.287 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>98
2022-07-09 14:00:20.337 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>11
2022-07-09 14:00:20.387 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>39
2022-07-09 14:00:20.437 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>74
2022-07-09 14:00:20.487 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>72
2022-07-09 14:00:20.537 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>86
2022-07-09 14:00:20.587 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>01
2022-07-09 14:00:20.637 T:798   WARNING <general>: ActiveAE - large audio sync error:<PHONE_NUMBER>56

Additional context
I'm not sure how to best diagnose this in order to pinpoint where the problem lies.  Other video on demand plugins (e.g. Netflix and PlutoTV) seem to behave normally, so I suspect a problem with the dramacool plugin or one of its dependencies?   How can I help get to the bottom of this?
I'm running

dramacool 3.0.4 (and all dependencies up to date)
Kodi 19.4.0
LibreElec 10.0.2
raspberry pi 4

Tested on Ubuntu with Surface Pro 7 and can't reproduce it with Doodstream/Xstreamcdn.
Have you tested to reproduce it on other device?
Does changing cache size help? https://kodi.wiki/view/HOW-TO:Modify_the_video_cache

I don't have an alternate device to test with.    I'll see if cache size helps.
Anecdotally, I started noticing this rewind/ff behavior after updating from Kodi 18 to 19 - but that coincided with a change in hardware from an amlogic based setup box to the raspberry pi4 - so I can't be sure what specific change (or combination of changes) triggers the problem.   I think I originally noticed the problem with one of Majide's plugins (VIKI or OnDramaNice?)  (which I no longer use - it's been too long ago to remember exactly).

I think the cache change is helping!  I continue to test over the next few days, but the following setting seems to at least have made the simple REW or FF by 2x or 4x work reliable in my early testing.
  <cache>
    <buffermode>1</buffermode>
    <memorysize>139460608</memorysize>
    <readfactor>20</readfactor>
  </cache>

I'm still seeing the plugin crash if I try to FF 32x (after forwarding about 20min worth of video, I get the following error):
2022-07-17 20:25:00.225 T:968   WARNING <general>: OutputPicture - timeout waiting for buffer
2022-07-17 20:25:17.743 T:963      INFO <general>: Skipped 829 duplicate messages..
2022-07-17 20:25:17.743 T:963     ERROR <general>: CCurlFile::FillBuffer - Failed: Couldn't connect to server(7)
2022-07-17 20:25:17.744 T:963   WARNING <general>: CCurlFile::FillBuffer - Reconnect, (re)try 1
2022-07-17 20:25:28.467 T:960   WARNING <general>: CFileCache::Seek - <https://oll238o.dood.video/u5kju4tv6phlsdgge7pg6nyylawk23xucs2hzlwsbv2kmlfdjwnl73uj4cua/k31x2zaqi0~UqYiKbdYlm?token=5yzoqt9b23xsb656d6yinuu4&expiry=1658103729017|User-Agent=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F80.0.3987.132+Safari%2F537.36+OPR%2F67.0.3575.97&Referer=https%3A%2F%2Fdood.ws%2Fd%2Fanphqv4cnpep> failed to get remaining data
2022-07-17 20:25:28.467 T:960      INFO <general>: Process - eof reading from demuxer
2022-07-17 20:25:28.467 T:960      INFO <general>: CVideoPlayer::OnExit()
2022-07-17 20:25:28.467 T:960      INFO <general>: VideoPlayer: eof, waiting for queues to empty
2022-07-17 20:25:28.467 T:960      INFO <general>: Closing stream player 1
2022-07-17 20:25:28.467 T:960      INFO <general>: CDVDMessageQueue(audio)::WaitUntilEmpty
2022-07-17 20:25:28.475 T:960      INFO <general>: Waiting for audio thread to exit
2022-07-17 20:25:28.485 T:969      INFO <general>: thread end: CVideoPlayerAudio::OnExit()
2022-07-17 20:25:28.485 T:960      INFO <general>: Closing audio device
2022-07-17 20:25:28.486 T:960      INFO <general>: Deleting audio codec
2022-07-17 20:25:28.487 T:960      INFO <general>: Closing stream player 2
2022-07-17 20:25:28.487 T:960      INFO <general>: CDVDMessageQueue(video)::WaitUntilEmpty
2022-07-17 20:25:28.487 T:960      INFO <general>: waiting for video thread to exit
2022-07-17 20:25:28.487 T:968     ERROR <general>: Got MSGQ_ABORT or MSGO_IS_ERROR return true
2022-07-17 20:25:28.487 T:968      INFO <general>: thread end: video_thread
2022-07-17 20:25:28.488 T:960      INFO <general>: deleting video codec

I'll experiment with larger cache sizes - maybe that will solve this too!

Closing since this seems to be related to hardware.


CLI option to forbid installation from rock source

One of our recurring problems that takes a lot of time is that something gets messed up in our local repo and LR starts to download the sources for the rockspec instead of installing from the binary (or source) rock in the local repo. Usually we forget to put binary rock for one of platforms.
This leads to all kinds of nasty and hard to diagnose from the first glance problems with our deployment process.
Is it possible to add something like --no-download CLI option (or whatever name you see fit), which would disable any and all downloads for any reason except from repo specified in --only-from? Once LR decides it wants to download something and sees that this option is on, it should fail with message similar to "Want to download  for  , but --no-download forbids it. Bailing out."

It's an interesting use case, but a --no-download flag that applies only to source URLs but not to rocks and rockspecs would be confusing. I just pushed a flag called --only-sources-from, which restricts which URLs can be used. For example:
luarocks build foobar --only-sources-from=luaforge.net

This is plain string matching, so this works:
luarocks build luaposix --only-sources-from=github.com/downloads/rrthomas/

I didn't use patterns to avoid surprises (such as "." having a special meaning).
As a special case (?), this has the same effect as the --no-download flag you suggested:
luarocks build foobar --only-sources-from=""

On Tue, Oct 11, 2011 at 09:06, Hisham Muhammad
<EMAIL_ADDRESS>wrote:

It's an interesting use case, but a --no-download flag that applies only to source URLs but not to rocks and rockspecs would be confusing.

But maybe it should apply to everything? If we need anything that
is not in the --only-from= repo, fail. Or am I missing something?

I just pushed a flag called --only-sources-from, which restricts which URLs can be used. For example:
luarocks build foobar --only-sources-from=luaforge.net
This is plain string matching, so this works:
luarocks build luaposix --only-sources-from=github.com/downloads/rrthomas/
I didn't use patterns to avoid surprises (such as "." having a special meaning).
As a special case (?), this has the same effect as the --no-download flag you suggested:
luarocks build foobar --only-sources-from=""

Thank you!
Alexander.

It's an interesting use case, but a --no-download flag that applies only to source URLs but not to rocks
and rockspecs would be confusing.
But maybe it should apply to everything? If we need anything that is not in the --only-from= repo, fail.
Or am I missing something?

As far as I can tell, --only-from already does that for rocks and rockspecs (example: on an empty tree, run:
luarocks build copas --only-from=http://luarocks.org/repositories/rocks-scm

It fails because luasocket is not available in rocks-scm.

On Tue, Oct 11, 2011 at 18:23, Hisham Muhammad
<EMAIL_ADDRESS>wrote:

It's an interesting use case, but a --no-download flag that applies only to source URLs but not to rocks
and rockspecs would be confusing.
But maybe it should apply to everything? If we need anything that is not in the --only-from= repo, fail.
Or am I missing something?

As far as I can tell, --only-from already does that for rocks and rockspecs (example: on an empty tree, run:
luarocks build copas --only-from=http://luarocks.org/repositories/rocks-scm
It fails because luasocket is not available in rocks-scm.

Makes sense, thanks.
Alexander.

Closing this since the available functionality seems to be sufficient.


New version: Anki.Anki version 2.1.60

[ ] Have you signed the Contributor License Agreement?
[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?

[x] Does your manifest conform to the 1.4 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: Open in CodeFlow

@microsoft-github-policy-service terminate

Trying to re-sign the CLA if the bot allows me..


fix u128/i128 serialization

Inserting the quote at the start causes serialization to fail for larger structs that contain u128.
i.e. serializing (u128::MAX, u128::MAX) will result in
""[340282366920938463463374607431768211455",340282366920938463463374607431768211455"]
it's also not clear to me the rationale behind u128s as strings; maybe to be compatible with cosmwasm_std::Uint128?

Looks good, but the tests fail. Can you fix those please?


no scaffold assembly, the assembly stats is no change

Hi developers,
Below is my script running SALSA2，but the output shows the assembly stats is no change.
~/miniconda3/envs/py2.7/bin/python /public1/home/ligch/software/SALSA/run_pipeline.py -a /public1/home/ligch/Harm_Hass_genome/Harm/03_HiC_assembly/reference/Harm.asm.dip.hap1.p_ctg.fa -l /public1/home/ligch/Harm_Hass_genome/Harm/03_HiC_assembly/reference/Harm.asm.dip.hap1.p_ctg.fa.fai -b Harm.hap1.alignment.sorted_k4.bed -e GATC -o Harm.hap1.scaffold -m yes -p yes -g /public1/home/ligch/Harm_Hass_genome/Harm/02_assembly/Harm_test1.asm.dip.hap1.p_ctg.gfa
Best！
Guo-Cheng Li
The Log file:
bedfile loaded
Starting Iteration 1
bedfile started
bedfile loaded
Done loading GFA file
Number of Nodes = 0
Number of Edges = 0
Loading Hi-C links
Hybrid scaffold graph loaded, nodes = 122 edges = 85
Hi-C implied edges = 0
Starting Iteration 2
bedfile started
bedfile loaded
Starting Iteration 2
Loading Hi-C links
Hybrid scaffold graph loaded, nodes = 94 edges = 62
Hi-C implied edges = 0
Starting Iteration 3
bedfile started
bedfile loaded
Starting Iteration 3
Loading Hi-C links
Hybrid scaffold graph loaded, nodes = 64 edges = 38
Hi-C implied edges = 0
python2 /public1/home/ligch/software/SALSA/RE_sites.py -a Harm.hap1.scaffold/assembly.cleaned.fasta -e GATC > Harm.hap1.scaffold/re_counts_iteration_1
python2 /public1/home/ligch/software/SALSA/make_links.py -b Harm.hap1.scaffold/alignment_iteration_1.bed -d Harm.hap1.scaffold -i 1 -x abc
python2 /public1/home/ligch/software/SALSA/fast_scaled_scores.py -d Harm.hap1.scaffold -i 1
sort -k 5 -gr Harm.hap1.scaffold/contig_links_scaled_iteration_1 > Harm.hap1.scaffold/contig_links_scaled_sorted_iteration_1
python2 /public1/home/ligch/software/SALSA/layout_unitigs.py -x /public1/home/ligch/Harm_Hass_genome/Harm/02_assembly/Harm_test1.asm.dip.hap1.p_ctg.gfa -l Harm.hap1.scaffold/contig_links_scaled_sorted_iteration_1 -c 1000 -i 1 -d Harm.hap1.scaffold
/public1/home/ligch/software/SALSA/break_contigs -a Harm.hap1.scaffold/alignment_iteration_2.bed -b Harm.hap1.scaffold/breakpoints_iteration_2.txt -l Harm.hap1.scaffold/scaffold_length_iteration_2 -i 2 -s 100   > Harm.hap1.scaffold/misasm_iteration_2.report
python2 /public1/home/ligch/software/SALSA/refactor_breaks.py -d Harm.hap1.scaffold -i 2
python2 /public1/home/ligch/software/SALSA/make_links.py -b Harm.hap1.scaffold/alignment_iteration_2.bed -d Harm.hap1.scaffold -i 2
python2 /public1/home/ligch/software/SALSA/layout_unitigs.py -x abc -l Harm.hap1.scaffold/contig_links_scaled_sorted_iteration_2 -c 1000 -i 2 -d Harm.hap1.scaffold
/public1/home/ligch/software/SALSA/break_contigs -a Harm.hap1.scaffold/alignment_iteration_3.bed -b Harm.hap1.scaffold/breakpoints_iteration_3.txt -l Harm.hap1.scaffold/scaffold_length_iteration_3 -i 3 -s 100  > Harm.hap1.scaffold/misasm_iteration_3.report
python2 /public1/home/ligch/software/SALSA/refactor_breaks.py -d Harm.hap1.scaffold -i 3 > Harm.hap1.scaffold/misasm_3.log
python2 /public1/home/ligch/software/SALSA/make_links.py -b Harm.hap1.scaffold/alignment_iteration_3.bed -d Harm.hap1.scaffold -i 3
python2 /public1/home/ligch/software/SALSA/layout_unitigs.py -x abc -l Harm.hap1.scaffold/contig_links_scaled_sorted_iteration_3 -c 1000 -i 3 -d Harm.hap1.scaffold
/public1/home/ligch/software/SALSA/break_contigs -a Harm.hap1.scaffold/alignment_iteration_4.bed -b Harm.hap1.scaffold/breakpoints_iteration_4.txt -l Harm.hap1.scaffold/scaffold_length_iteration_4 -i 4 -s 100  > Harm.hap1.scaffold/misasm_iteration_4.report
python2 /public1/home/ligch/software/SALSA/refactor_breaks.py -d Harm.hap1.scaffold -i 4 > Harm.hap1.scaffold/misasm_4.log

From the logs it looks like there are almost no links found. That might be an issue with the mapping step, how many entries are in the bed file from the mapping?

Idle, no links mapped


Resolve false positives with Dangerous-Workflow check

Describe the bug
See https://github.com/ossf/scorecard/pull/1283#issuecomment-974227644
Dangerous-Workflow doesn't handle false positives where a pull_request_target is used with untrusted code checkout BUT token permissions are set and environment protection rules or gating labels are set.
https://dev.to/petrsvihlik/using-environment-protection-rules-to-secure-secrets-when-building-external-forks-with-pullrequesttarget-hci
Reproduction steps
Steps to reproduce the behavior:
1.
2.
3.
4.
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.

how about the scenario where ref is used and permissions are set to XXX:write but XXX is not contents or packages?

how about the scenario where ref is used and permissions are set to XXX:write but XXX is not contents or packages?

maybe i'm missing something but isn't even read perms dangerous? PR checkout would still allow reading secrets, e.g. with some malicious script in the untrusted checkout

you're right, absolutely. I think I was assuming there's no secrets used in the PR.

I would say another instance that will likely be a false positive is when the job is gated by an environment (like in scorecard's integration.yml). If the environment requires reviews, then it's definitely a false positive. I expect, though, that we can only see environment protection rules with an admin API token. Maybe when we're not using an admin token and the dangerous job has an environment, we give it a high but not perfect score. When using an admin token, we can check the protection rules for the environment, give it a 0 if it doesn't require reviews, and give it a perfect score if it does.

spot on, we got an alert in the scanning dashboard now https://github.com/ossf/scorecard/blob/58865e959e3a782d3f3cd5a5ae952ac308c11a46/.github/workflows/integration.yml#L35-L35
@chrismcgehee would looking for needs field be enough to reduce false positives in this case? Or would it introduce false negatives?

I would say another instance that will likely be a false positive is when the job is gated by an environment (like in scorecard's integration.yml). If the environment requires reviews, then it's definitely a false positive. I expect, though, that we can only see environment protection rules with an admin API token. Maybe when we're not using an admin token and the dangerous job has an environment, we give it a high but not perfect score. When using an admin token, we can check the protection rules for the environment, give it a 0 if it doesn't require reviews, and give it a perfect score if it does.

Yup, this is what I'm seeing with Scorecard and https://github.com/digitalocean/terraform-vault-github-oidc/blob/main/.github/workflows/pr_target.yml . Dangerous pull_request_target and checking out the pr ref, but it is gated by an Environment that requires a manual approval trigger before running.

this should not be a very one to fix. Interested in giving it a try?

Would that be around https://github.com/ossf/scorecard/blob/main/checks/raw/dangerous_workflow.go#L164 - check if environment: is present in job, and if so, check repo settings for a required reviewer protection rule on the environment?

I don't believe repo environments are exposed in the REST or graphql apis yet, which may preclude writing a check.

You should be able to use https://pkg.go.dev/github.com/rhysd/actionlint#Environment API to retrieve the environment.

That will just give you the name set on the environment. We have to take that name and query repo settings to determine if the required reviewer setting is enabled for that environment - only that configuration turns the dangerous workflow into a protected one.

you're right. We could maybe assume that the presence of an environment is enough. But if we think this is dangerous, then maybe leaving it as a risk that users should manually check is the way to go.
I'll create a feature request for GitHub for this.

:nod: Yeah definitely worth being cautious and flagging a workflow as dangerous until we can prove that it is not. Assuming I had missed setting that check on my workflow linked above, I'd definitely expect scorecard to flag it to help me set the appropriate security control.