Attribute error

AttributeError: module 'sherpa' has no attribute 'OnlineRecognizer'

Could you tell us how you install sherpa and what command you are using when you get this error?

while running this command ./streaming_server.py --port 6006 --max-batch-size 10 --max-wait-ms 5 --max-active-connections 1 --nn-pool-size 1 --nn-model-filename /mnt/speech1/nadira/stt/icefall-asr-librispeech-pruned-stateless-emformer-rnnt2-2022-06-01/exp/cpu_jit-epoch-39-avg-6-use-averaged-model-1-torch-1.6.0.pt --bpe-model-filename /mnt/speech1/nadira/stt/icefall-asr-librispeech-pruned-stateless-emformer-rnnt2-2022-06-01/data/lang_bpe_500/bpe.model
i got error as sherpa has no attribute OnlineRecognizer

Please show the output of the following command
import sherpa
print(sherpa.__file__)

this is the output of the above command
/mnt/efs/anandh/icefall/anaconda3/envs/icefall_env/lib/python3.10/site-packages/sherpa/init.py

And please show the output of the following two commands
cat /mnt/efs/anandh/icefall/anaconda3/envs/icefall_env/lib/python3.10/site-packages/sherpa/__init__.py

import sherpa
print(sherpa.__file__)
print(sherpa.OnlineRecognizer)

for the first command __init.py file has opened

Copyright (C) 2007, 2014, 2015, 2016, 2019, 2020, 2021, 2022, 2023
Smithsonian Astrophysical Observatory

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

"""
Modeling and fitting package for scientific data analysis
Sherpa is a modeling and fitting package for scientific data analysis.
It includes general tools of interest to all users as well as
specialized components for particular disciplines (e.g. astronomy).
Note that the top level sherpa package does not import any
subpackages.  This allows the user to import a particular component
(e.g. sherpa.optmethods) without pulling in any others.  To import all
the standard subpackages, use import sherpa.all or
from sherpa.all import *.
"""
import datetime
import importlib
import logging
import os
import os.path
import subprocess
import sys
all = ('citation', 'get_config', 'get_include', 'smoke')
from . import _version
version = _version.get_versions()['version']
class Formatter(logging.Formatter):
def format(self, record):
# Get the full message, #1688 shows we can not rely
# in record.msg.
#
msg = record.getMessage()
if record.levelno > logging.INFO:
msg = f"{record.levelname}: {msg}"
return msg
log = logging.getLogger('sherpa')
handler = logging.StreamHandler(sys.stdout)
handler.setFormatter(Formatter())
log.addHandler(handler)
log.setLevel(logging.INFO)
dbg = log.debug
del Formatter, log, handler
DEFAULT_CITATION = """Please review the Zenodo Sherpa page at
https://doi.org/10.5281/zenodo.593753
to identify the latest release of Sherpa. The Zenodo page
https://help.zenodo.org/#versioning provides information on how to
cite a specific version.
If you want a general-purpose citation then please use either of the
following, kindly provided by the SAO/NASA Astrophysics Data System
service:
@INPROCEEDINGS{2001SPIE.4477...76F,
author = {{Freeman}, Peter and {Doe}, Stephen and {Siemiginowska}, Aneta},
title = "{Sherpa: a mission-independent data analysis application}",
keywords = {Astrophysics},
booktitle = {Astronomical Data Analysis},
year = 2001,
editor = {{Starck}, Jean-Luc and {Murtagh}, Fionn D.},
series = {Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series},
volume = {4477},
month = nov,
pages = {76-87},
doi = {10.1117/12.447161},
archivePrefix = {arXiv},
eprint = {astro-ph/0108426},
primaryClass = {astro-ph},
adsurl = {https://ui.adsabs.harvard.edu/abs/2001SPIE.4477...76F},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
@INPROCEEDINGS{2007ASPC..376..543D,
author = {{Doe}, S. and {Nguyen}, D. and {Stawarz}, C. and {Refsdal}, B. and
{Siemiginowska}, A. and {Burke}, D. and {Evans}, I. and {Evans}, J. and
{McDowell}, J. and {Houck}, J. and {Nowak}, M.},
title = "{Developing Sherpa with Python}",
booktitle = {Astronomical Data Analysis Software and Systems XVI},
year = 2007,
series = {Astronomical Society of the Pacific Conference Series},
volume = 376,
editor = {{Shaw}, R.~A. and {Hill}, F. and {Bell}, D.~J.},
month = oct,
pages = {543},
adsurl = {http://adsabs.harvard.edu/abs/2007ASPC..376..543D},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
"""
def _make_citation(version, title, date, authors, idval, latest=True):
year = date.year
month = date.strftime('%b').lower()
nicedate = date.strftime('%B %d, %Y')

authnames = ' and\n                  '.join(authors)

if latest:
    out = "The latest release of Sherpa is {}\n".format(title)
    out += "released on {}.".format(nicedate)
else:
    out = "Sherpa {} was released on {}.".format(version, nicedate)

out += """

@software{{sherpa_{year}_{idval},
author       = {{{authnames}}},
title        = {{{title}}},
month        = {month},
year         = {year},
publisher    = {{Zenodo}},
version      = {{{version}}},
doi          = {{10.5281/zenodo.{idval}}},
url          = {{https://doi.org/10.5281/zenodo.{idval}}}
}}
""".format(authnames=authnames, idval=idval, title=title,
version=version, year=year, month=month)
out += DEFAULT_CITATION
return out

def _get_citation_hardcoded(version):
"""Retrieve the citation information.
Parameters
----------
version : str
    The version to retrieve the citation before. It is expected
    to be '4.8.0' or higher.

Returns
-------
citation : str or None
    Citation information if known, otherwise None.

Notes
-----
The entries can be created with the script:
scripts/make_zenodo_release.py

"""

def todate(year, mnum, dnum):
    return datetime.datetime(year, mnum, dnum)

cite = {}

def add(version, **kwargs):
    assert version not in cite
    cite[version] = dict(**kwargs)
    cite[version]['version'] = version

add(version='4.13.1', title='sherpa/sherpa: Sherpa 4.13.1',
    date=todate(2021, 5, 18),
    authors=['Doug Burke', 'Omar Laurino', 'wmclaugh', 'dtnguyen2',
             'Marie-Terrell', 'Hans Moritz Günther', 'Aneta Siemiginowska',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Christoph Deil',
             'Brigitta Sipőcz', 'Johannes Buchner', 'Iva Laginja',
             'Katrin Leinweber', 'nplee', 'Todd'],
    idval='4770623')
add(version='4.13.0', title='sherpa/sherpa: Sherpa 4.13.0',
    date=todate(2021, 1, 8),
    authors=['Doug Burke', 'Omar Laurino', 'wmclaugh', 'dtnguyen2',
             'Marie-Terrell', 'Hans Moritz Günther', 'Aneta Siemiginowska',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Christoph Deil',
             'Brigitta Sipőcz', 'Johannes Buchner', 'Iva Laginja',
             'Katrin Leinweber', 'nplee', 'Todd'],
    idval='4428938')

add(version='4.12.2', title='sherpa/sherpa: Sherpa 4.12.2',
    date=todate(2020, 10, 27),
    authors=['Doug Burke', 'Omar Laurino', 'wmclaugh', 'dtnguyen2',
             'Hans Moritz Günther', 'Marie-Terrell', 'Aneta Siemiginowska',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Christoph Deil',
             'Brigitta Sipőcz', 'Johannes Buchner', 'Iva Laginja',
             'Katrin Leinweber', 'nplee', 'Todd'],
    idval='4141888')
add(version='4.12.1', title='sherpa/sherpa: Sherpa 4.12.1',
    date=todate(2020, 7, 14),
    authors=['Doug Burke', 'Omar Laurino', 'wmclaugh', 'dtnguyen2',
             'Marie-Terrell', 'Hans Moritz Günther', 'Jamie Budynkiewicz',
             'Aneta Siemiginowska', 'Tom Aldcroft', 'Christoph Deil',
             'Brigitta Sipőcz', 'Katrin Leinweber', 'Todd'],
    idval='3944985')
add(version='4.12.0', title='sherpa/sherpa: Sherpa 4.12.0',
    date=todate(2020, 1, 30),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2', 'wmclaugh',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Aneta Siemiginowska',
             'Christoph Deil', 'Marie-Terrell', 'Brigitta Sipőcz',
             'Hans Moritz Günther', 'Todd', 'Katrin Leinweber'],
    idval='3631574')

add(version='4.11.1', title='sherpa/sherpa: Sherpa 4.11.1',
    date=todate(2019, 8, 1),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Aneta Siemiginowska',
             'Christoph Deil', 'wmclaugh', 'Brigitta Sipocz',
             'Katrin Leinweber'],
    idval='3358134')
add(version='4.11.0', title='sherpa/sherpa: Sherpa 4.11.0',
    date=todate(2019, 2, 20),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Aneta Siemiginowska',
             'Christoph Deil', 'wmclaugh', 'Brigitta Sipocz',
             'Katrin Leinweber'],
    idval='2573885')

add(version='4.10.2', title='sherpa/sherpa: Sherpa 4.10.2',
    date=todate(2018, 12, 14),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Aneta Siemiginowska',
             'Christoph Deil', 'wmclaugh', 'Brigitta Sipocz',
             'Katrin Leinweber'],
    idval='2275738')
add(version='4.10.1', title='sherpa/sherpa: Sherpa 4.10.1',
    date=todate(2018, 10, 16),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Aneta Siemiginowska',
             'wmclaugh', 'Brigitta Sipocz', 'Christoph Deil',
             'Katrin Leinweber'],
    idval='1463962')
add(version='4.10.0', title='sherpa/sherpa: Sherpa 4.10.0',
    date=todate(2018, 5, 11),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Aneta Siemiginowska',
             'wmclaugh', 'Christoph Deil', 'Brigitta Sipocz'],
    idval='1245678')

add(version='4.9.1', title='sherpa/sherpa: Sherpa 4.9.1',
    date=todate(2017, 8, 3),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Aneta Siemiginowska',
             'wmclaugh', 'Christoph Deil', 'Brigitta Sipocz'],
    idval='838686')
add(version='4.9.0', title='sherpa/sherpa: Sherpa 4.9.0',
    date=todate(2017, 1, 27),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Aneta Siemiginowska',
             'wmclaugh', 'Christoph Deil', 'Brigitta Sipocz'],
    idval='260416')

add(version='4.8.2', title='sherpa/sherpa: Sherpa 4.8.2',
    date=todate(2016, 9, 23),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2',
             'Jamie Budynkiewicz', 'Tom Aldcroft', 'Aneta Siemiginowska',
             'Christoph Deil', 'wmclaugh', 'Brigitta Sipocz'],
    idval='154744')
add(version='4.8.1', title='sherpa: Sherpa 4.8.1',
    date=todate(2016, 4, 15),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2', 'Tom Aldcroft',
             'Jamie Budynkiewicz', 'Aneta Siemiginowska', 'Christoph Deil',
             'Brigitta Sipocz'],
    idval='49832')
add(version='4.8.0', title='sherpa: Sherpa 4.8.0',
    date=todate(2016, 1, 27),
    authors=['Doug Burke', 'Omar Laurino', 'dtnguyen2', 'Tom Aldcroft',
             'Aneta Siemiginowska'],
    idval='45243')

kwargs = cite.get(version, None)
if kwargs is None:
    return None

return _make_citation(**kwargs, latest=False)

def _download_json(url):
"""Return the JSON data or None.
Parameters
----------
url : str
    The URL to process.

Returns
-------
response : dict
    The data in JSON as 'success' or an error message as 'failed'.

"""

import json
import ssl
from urllib.request import Request, urlopen
from urllib.error import HTTPError

# Need to set the Content-Type so it looks like I need
# a request. Darn it. Even though https://developers.zenodo.org/#list36
# claims you can set the content-type, it just seems to
# return JSON.
#
# req = Request(url,
#               headers={'Content-Type': 'application/x-bibtex'})
#
req = Request(url)

# This is not ideal, but given the way that we package
# CIAO we can end up with issues evaluating SSL certificates,
# so as we are not sending secure information we drop
# the SSL checks.
#
context = ssl._create_unverified_context()

try:
    res = urlopen(req, context=context)
except HTTPError as he:
    dbg("Unable to access {}: {}".format(url, he))
    return {'failed': 'Unable to access the Zenodo site.'}

try:
    jsdata = json.load(res)
except UnicodeDecodeError as ue:
    dbg("Unable to decode JSON from Zenodo: {}".format(ue))
    return {'failed': 'Unable to understand the response from Zenodo.'}

return {'success': jsdata}

def _make_zenodo_citation(jsdata, latest=True):
"""Convert Zenodo record to a citation.
Parameters
----------
jsdata : object
    A Zenodo record.

Returns
-------
response : dict
    Success in 'success' (dict) or failure message in 'failed'.

"""

try:
    created = jsdata['created']
    mdata = jsdata['metadata']
    idval = jsdata['id']
except KeyError as ke:
    dbg("Unable to find metadata: {}".format(ke))
    return {'failed': 'Unable to parse the Zenodo response.'}

created = created.split('T')[0]
isoformat = '%Y-%m-%d'
try:
    date = datetime.datetime.strptime(created, isoformat)
except ValueError:
    dbg("Unable to convert created: '{}'".format(created))
    return {'failed': 'Unable to parse the Zenodo response.'}

try:
    version = mdata['version']
    title = mdata['title']
    creators = mdata['creators']
except KeyError as ke:
    dbg("Unable to find metadata: {}".format(ke))
    return {'failed': 'Unable to parse the Zenodo response.'}

authors = [c['name'] for c in creators]
out = _make_citation(version=version, title=title, date=date,
                     authors=authors, idval=idval,
                     latest=latest)
return {'success': out}

def _get_citation_version():
"""What version of Sherpa are we using?
Returns
-------
version : str
    The Sherpa version.
"""

out = 'You are using Sherpa {}'.format(__version__)
if '+' in __version__:
    out += " (it is not a released version)"

out += ".\n\n"
return out

def _get_citation_zenodo_failure(failed):
"""Standard response when there's a problem.
Returns
-------
text : str
    The failure message.

"""
out = 'There was a problem retrieving the data from Zenodo:\n'
out += failed
out += '\n\n'
out += DEFAULT_CITATION
return out

def _get_citation_zenodo_latest():
"""Query Zenodo for the latest release.
Returns
-------
citation : str
    Citation information. It will include information
    on any failure.
"""

# Can we retrieve the information from Zenodo?
#
# We do not access the DOI but the Zenodo API
# url = 'https://doi.org/10.5281/zenodo.593753'
url = 'https://zenodo.org/api/records/593753'
jsdata = _download_json(url)
if 'failed' in jsdata:
    return _get_citation_zenodo_failure(jsdata['failed'])

out = _make_zenodo_citation(jsdata['success'])
if 'failed' in out:
    return _get_citation_zenodo_failure(out['failed'])

return out['success']

def _zenodo_missing(version):
"""
Parameters
----------
version : str
    The version we are looking for.

Returns
-------
message : str
    The "unable to find" message.
"""

return 'Zenodo has no information for version {}.'.format(version)

def _parse_zenodo_data(jsdata, version):
"""Extract data for the given version from a Zenodo query.
Parameters
----------
jsdata : json
    The response from Zenodo.
version : str
    The version we are looking for.

Returns
-------
response : dict
    Success in 'success' (dict) or failure message in 'failed'.
"""

try:
    hits = jsdata['hits']['hits']
except KeyError:
    dbg("Unable to find hits/hits")
    return {'failed': 'Unable to parse the Zenodo response.'}

data = None
try:
    for hit in hits:
        if hit['metadata']['version'] == version:
            data = hit
            break

except KeyError:
    dbg("Record missing version")
    return {'failed': 'Unable to parse the Zenodo response.'}

except TypeError:
    dbg('hits/hits is not iterable!')
    return {'failed': 'Unable to parse the Zenodo response.'}

if data is None:
    dbg('Version {} not found'.format(version))
    return {'failed': _zenodo_missing(version)}

return {'success': data}

def _download_zenodo_data(version):
"""Query Zenodo for the specific release.
We have to deal with pagination in the Zenodo response.

Parameters
----------
version : str
    The release number (e.g. '4.12.2').

Returns
-------
response : dict
    The data in JSON as 'success' or an error message as 'failed'.

"""

# We could set the size parameter to something very large, to
# get all responses with one call, but instead we use pagination.
# Zenodo helpfully provides a links/next record with the
# next URL, but it seems to be missing the all_versions=True
# option, which makes it less-than-useful, hence the addition
# of it below. The alternative would be to manually track the
# page counter and add '&page=n' to the call.
#
url = 'https://zenodo.org/api/records/?q=conceptrecid:"593753"&all_versions=True&sort=mostrecent'
missing = _zenodo_missing(version)

while True:
    dbg("Zenodo query: {}".format(url))
    jsdata = _download_json(url)

    # If the query fails then we error out
    #
    if 'failed' in jsdata:
        return jsdata

    jsdata = jsdata['success']
    data = _parse_zenodo_data(jsdata, version)
    if 'success' in data:
        return data

    # There are two failures we care about:
    #  - we can parse the information but have not been able to
    #    find the version
    #  - any other reason
    #
    # If the former then we look for the links/next entry to
    # look at the next page of the response. If it doesn't
    # exist we assume we are on the last page and so can error
    # out.
    #
    # If the latter then we error out rather than trying anything
    # else.
    #
    if data['failed'] != missing:
        return data

    try:
        url = jsdata['links']['next']

        # Add in the necessary all_versions tag: see
        # https://github.com/zenodo/zenodo/issues/1662
        #
        if 'all_versions=True' not in url:
            url += '&all_versions=True'

    except KeyError:
        # There is no links/next field so assume we've checked all
        # pages
        return data

def _get_citation_zenodo_version(version):
"""Query Zenodo for the specific release.
As this has to return all Sherpa records it is slow.

Parameters
----------
version : str
    The release number (e.g. '4.12.2').

Returns
-------
citation : str
    Citation information.
"""

jsdata = _download_zenodo_data(version)
if 'failed' in jsdata:
    return _get_citation_zenodo_failure(jsdata['failed'])

out = _make_zenodo_citation(jsdata['success'], latest=False)
if 'failed' in out:
    return _get_citation_zenodo_failure(out['failed'])

return out['success']

def _get_citation(version='current'):
"""Retrieve the citation information.
Parameters
----------
version : str, optional
    The version to retrieve the citation for. The supported values
    are limited to 'current', to return the citation for the
    installed version of Sherpa, 'latest' which will return the
    latest release, and the current set of releases available on
    Zenodo (this goes back to '4.8.0').

Returns
-------
citation : str
    Citation information.

"""

vstr = _get_citation_version()

if version == 'latest':
    return vstr + _get_citation_zenodo_latest()

if version == 'current':
    # Replace with the version (excluding any extraneous
    # information). Note that development versions close to a
    # release will have a version which has no release, but
    # I believe it is okay to say "Hey, Zenodo has no info
    # on this", rather than to try and fall back to the
    # previous version (since there's no good Zenodo reference
    # in this case).
    #
    version = __version__.split('+')[0]

# We could include a check on the version number (e.g. a.b.c
# where all elements are an integer), but do we want to
# require this naming scheme?

# If we know this version there's no need to call Zenodo
#
out = _get_citation_hardcoded(version)
if out is not None:
    return vstr + out

# In case the hardcoded list hasn't been updated.
#
return vstr + _get_citation_zenodo_version(version)

def citation(version='current', filename=None, clobber=False):
"""Return citatation information for Sherpa.
The citation information is taken from Zenodo [1]_, using the
Sherpa "latest release" identifier [2]_, and so requires an
internet connection. The message is displayed on screen, using
pagination, or can be written to a file.

Parameters
----------
version : str, optional
    The version to retrieve the citation for. The supported values
    are limited to 'current', to return the citation for the
    installed version of Sherpa, 'latest' which will return the
    latest release, and the current set of releases available on
    Zenodo (this goes back to '4.8.0').
filename : str or StringIO or None, optional
    If not None, write the output to the given file or filelike
    object.
clobber : bool, optional
    If filename is a string, then - when clobber is set - refuse
    to overwrite the file if it already exists.

Notes
-----
If there is no internet connection, or there was a problem in
downloading the data, or the Zenodo API has started to return
different informatioon than expected, then the code will return
information on why the call failed and other citation options.

Zenodo only lets you perform a limited number of calls in
a set time span, so if you call this routine too many times
then it may start to fail.

If a specific version is given then a hard-coded list of versions
is checked, and if it matches then this information is used,
rather than requiring a call to Zenodo.

References
----------

.. [1] https://zenodo.org/

.. [2] https://doi.org/10.5281/zenodo.593753

Examples
--------

Display the citation information for the current release on
Zenodo. The information is paged to the display:

>>> import sherpa
>>> sherpa.citation()

Write out the citation information for Sherpa 4.12.1 to the file
``cite.txt``:

>>> sherpa.citation('4.12.1', outfile='cite.txt')

Display the information for the latest release:

>>> sherpa.citation('latest')

"""

from sherpa.utils import send_to_pager
cite = _get_citation(version=version)
send_to_pager(cite, filename=filename, clobber=clobber)

def get_include():
"Get the root path for installed Sherpa header files"
return os.path.join(os.path.dirname(__file__), 'include')

def get_config():
"Get the path for the installed Sherpa configuration file"
filename = "sherpa-standalone.rc"

# The behavior depends on whether the NOSHERPARC
# environment variable is set.
#
if 'NOSHERPARC' not in os.environ:

    # If SHERPARC is set, try that
    #
    if 'SHERPARC' in os.environ:
        config = os.environ.get('SHERPARC')
        if os.path.isfile(config):
            return config

    # Can we use the HOME directory?
    #
    home_dir = os.environ.get('HOME')
    if home_dir is not None:
        config = os.path.join(home_dir, f'.{filename}')
        if os.path.isfile(config):
            return config

# Fall back to the system config file
return os.path.join(os.path.dirname(__file__), filename)

def smoke(verbosity=0, require_failure=False, fits=None, xspec=False, ds9=False):
"""Run Sherpa's "smoke" test.
The smoke test is a simple test that ensures the Sherpa
installation is functioning. It is not a complete test suite, but
it fails if obvious issues are found.

Parameters
----------
verbosity : int, optional
    The level of verbosity of this test
require_failure : boolean, optional
    For debugging purposes, the smoke test may be required to
    always fail. Defaults to False.
fits : str or None, optional
    Require a fits module with this name to be present before
    running the smoke test. This option makes sure that when the
    smoke test is run the required modules are present.  Note that
    tests requiring fits may still run if any fits backend is
    available, and they might still fail on their own.
xspec : boolean, optional
    Require xspec module when running tests. Tests requiring xspec
    may still run if the xspec module is present.
ds9 : boolean, optional
    Requires DS9 when running tests.

Raises
------
SystemExit
    Raised if any errors are found during the tests.

"""
from sherpa.astro.utils import smoke
smoke.run(verbosity=verbosity, require_failure=require_failure, fits=fits, xspec=xspec, ds9=ds9)

def _smoke_cli(verbosity=0, require_failure=False, fits=None, xspec=False, ds9=False):
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-v", "--verbosity", dest="verbosity",
help="verbosity level")
parser.add_option("-0", "--require-failure", dest="require_failure", action="store_true",
help="require smoke test to fail (for debugging)")
parser.add_option("-f", "--fits-module", dest="fits", action="store",
help="require a specific fits module to be present")
parser.add_option("-x", "--require-xspec", dest="xspec", action="store_true",
help="require xspec module")
parser.add_option("-d", "--require-ds9", dest="ds9", action="store_true",
help="require DS9")
options, _ = parser.parse_args()

xspec = options.xspec or xspec
verbosity = options.verbosity or verbosity
require_failure = options.require_failure or require_failure
fits = options.fits or fits
ds9 = options.ds9 or ds9

smoke(verbosity=verbosity, require_failure=require_failure, fits=fits, xspec=xspec, ds9=ds9)

def _install_test_deps():
def install(package_name):
try:
subprocess.call([sys.executable, '-m', 'pip', 'install', package_name],
stdout=sys.stdout, stderr=sys.stderr)
except:
print("""Cannot import pip or install packages with it.
You need pytest, and possibly pytest-cov, in order to run the tests.
If you downloaded the source code, please run 'pip install -r test_requirements.txt'
from the source directory first.
""")
raise
deps = ['pytest>=5.0,!=5.2.3']  # List of packages to be installed
pytest_plugins = []  # List of pytest plugins to be installed

# If the plugins are installed "now", pytest won't load them because they are not registered as python packages
# by the time this code runs. So we need to keep track of the plugins and explicitly pass them to `pytest.main()`.
# Note that explicitly passing plugins that were already registered would result in an error, hence this
# complexity seems to be required.
installed_plugins = []

for dep in deps:
    try:
        importlib.import_module(dep)
    except ImportError:
        install(dep)

for plugin_name in pytest_plugins:
    module = plugin_name.replace("-", "_")
    try:
        importlib.import_module(module)
    except ImportError:
        install(plugin_name)
        installed_plugins.append(module)

return installed_plugins

def clitest():
"""The sherpa_test endpoint."""
plugins = _install_test_deps()
import pytest
import os

# Add in command-line arguments to allow configuring the Sherpa tests
args = [os.path.dirname(__file__), '-rs'] + sys.argv[1:]

# passing the plugins that have been installed "now".
errno = pytest.main(args, plugins=plugins)
sys.exit(errno)

And for the second command I got the error like
/mnt/efs/anandh/icefall/anaconda3/envs/icefall_env/lib/python3.10/site-packages/sherpa/init.py
Traceback (most recent call last):
File "/mnt/efs/swetha/marathi/ds-icefall-scripts/sherpa/sherpa/sherp_check.py", line 3, in
print(sherpa.OnlineRecognizer)
AttributeError: module 'sherpa' has no attribute 'OnlineRecognizer'

Please don't use
pip install sherpa
which installs a run package.
Please use
pip uninstall sherpa
and follow the doc to install sherpa.

@SSwethaSel0609

Can you please share your the doc

Can you please share your the doc

Please follow
https://k2-fsa.github.io/sherpa/sherpa/install/from_wheels.html
I found that you have already followed the doc.
Please post the installation log if you re-try in case you still have issues.


⚠ Bofrost.es has degraded performance

In 554d2fc, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1822 ms

Resolved: Bofrost.es performance has improved in 70aae09 after 6 minutes.


nw_elf.cll missing in generated .exe

created Win32 app on Ubuntu16 version, it generated an 'output' folder with an .exe (and nwjs files).  Copied the exe to Win32 and ran,
-System Error
The program can't start because nw_elf.dll is missing...
Next, copied the whole output folder from U16 to Win32, ran the exe, seemed to execute but never produced an NWJS app screen

Yes, you need to copy all the files in the output folder in order for the exe to run.
As for the NWJS app screen, there might be some issues with your app starting. What's in your package.json?

OK, copying whole folder was my second try above.  But, I was under the impression it would make a single EXE, guess not.
JSON
{
"name": "awfiles",
"version": "0.1",
"main": "index.html",
"window": {
"toolbar": true
}
}

I've updated the readme to better reflect what actually happens. Unfortunately, bundling as a standalone exe (with libraries inside the exe) is not feasible for me to do.
That's interesting. Is there anything special in your index.html?

Very plain, (and BTW, thanks for your work.
Here is a command in Windows which makes a single working EXE.  copy /b nw.exe+app.nw app.exe

APP

You're welcome. If only it worked out of the box most of the time ;)
Maybe check the error log and see if there's anything that jumps out. It's located in ~/.local/share/Web2Executable/files/error.log on Ubuntu.
Web2Exe basically does the command you just wrote, but in a (supposedly) more friendly way. Sometimes there are errors that cause the build process to silently fail or partially succeed. If I had time these days, I would much improve the build system to show these errors.

no error.log

Looks like no error log might be related to #187

I've figured out what might be the issue. As a workaround, edit the whitelist section (simply put a space, and then backspace) and this should update the filters to include the package.json. I will fix this asap!

@QuinDennis I've fixed the exporting of a simple project. It was just the package.json not being copied if it didn't exist already.

Joey wrote:

@QuinDennis https://github.com/QuinDennis I've fixed the exporting
of a simple project. It was just the package.json not being copied if
it didn't exist already.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/jyapayne/Web2Executable/issues/186#issuecomment-287630432,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAx1kX8lg6PJmBeNzQNNzTOXhMEkYe0Yks5rnV7GgaJpZM4MUZD8.

Thanks, I'll check it out soon.


No pyvenv.cfg file

Hello
I, a total python noob, have foolishly decided to try and install this chatbot. I think I've got it all setup correctly, installed the websocket in the same folder and edited the settings file with the required info and oath code but when I try to run the MarkovChainBot.py file nothing happens. If I try to execute it in command prompt I get the error "No pyvenv.cfg file"
What am I missing?

Hello!
pyvenv.cfg is a Python Virtual Environment Config file. A virtual environment is a way to isolate your installed Python modules etc. from the remainder of your computer, and they're used to prevent multiple Python projects with different (perhaps conflicting) Python module requirements from causing conflicts.
Critically, these virtual environments are optional, and the virtual environment I've used for TwitchMarkoChain is not published.
With other words, I'm afraid that this is not strictly an issue with TwitchMarkovChain, and it's an issue that I cannot reproduce.
That said, perhaps I can help you still. I found some resources on google for No pyvenv.cfg file, for example one of these Stack Overflow posts:

https://stackoverflow.com/questions/66203271/python-pyvenv-cfg-not-found-error-after-installing-python-on-windows
https://stackoverflow.com/questions/61026458/no-pyvenv-cfg-file

If this doesn't help, then you can always ask for more help here, or look further on google.

Tom Aarsen

Thanks, I appreciate the help! I'll keep plugging away and see if I can resolve that issue. As it's not an issue with the code or modules I'll close this issue.


Playing slow motion video

when trying to play slow motion video the App crashed. The issue in "DKImageManager" line 164. :)

Thanks! I've added support for Slow Motion in the newly version :)


Update dotnet.yml

Pull Request Test Coverage Report for Build 858495399

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 858488886:
0.0%

Covered Lines:
1064

Relevant Lines:
1064

💛  - Coveralls


Use functional options for Set instead of Setf

Opinionated, but I think this reads better:
c.Set(key, val)
c.Set(key, val, cache.Expire(time.Hour))

Was this feature implemented?

It was! Totally forgot to update this issue, thanks.
Example usage here


fingerprint check on MSYS2

https://github.com/BobBuildTool/basement/blob/952c467bbe1d617f1c019d493c6cde9acd698dfd/recipes/devel/host-compat-toolchain.yaml#L49-L73
'x86_64\nmsys-2.0/19.3003.5\nx86_64\nlibstdc++ 20220421\n'
I guess the checks are not working 100% correctly on MSYS2. We have unexpected artifact mismatches if the first part (msys-2.0/19.3003.5) is updated by MSYS2 updates.

like i realized, the attached code isn't the problem. MSYS2 doesn't uses host-compat-toolchain, but just the bootstrap-host-toolchain.
but the problem still remains. an artifact built with e.g. msys-2.0/19.3002.0 doesn't matches to a system with msys-2.0/19.3003.5

but the problem still remains. an artifact built with e.g. msys-2.0/19.3002.0 doesn't matches to a system with msys-2.0/19.3003.5

This is working as intended. There is no magic version comparison baked into the fingerprinting stuff. If the fingerprint script produces a different output then the artifact will be stored/searched under a different build-id. Everything else would require a real database and code to compare versions numbers. It was a deliberate design decision to not do it this way.

or is it up to me, to provide the tools for every msys2 version?

Unfortunately yes. Everything else is not entirely safe. Theoretically you could let the fingerprint script output just the major versions. But then you really must be sure that all future releases with the same major version are forward and backward compatible. I wouldn't make this bet TBH.

how this works for the devel::host-compat-toolchain on linux?

The compat toolchain is using an ancient libc/libstdc++ and the fingerprint script will just make sure that the host is compatible. If you set BASEMENT_HOST_COMPAT_TOOLCHAIN to 0 then all host tools will also depend on the exact libc/libstdc++ version of your host just like on MSYS...

Thanks for the explanations! I understand this - makes also sense to me 😉
I know what's to do now to handle this!


Init JNI version 22.12.0-SNAPSHOT

Signed-off-by: Peixin Li<EMAIL_ADDRESS>Update JNI project version to 22.12
NOTE:
As https://github.com/rapidsai/cudf/pull/11764 cudf 22.12 CI is not ready yet, we keep the submodule to 22.10

build

I will start building new jni artifacts after IT fixed the internal artifactory store


fixed bug in image cropper that occured when original src image was l…

…arger than 'full' size.  fixed by requesting 'original' size attachment for cropper, and by reimplementing scaleUp/scaleDown serialize methods

@colpanik @boutell could you check this PR?  especially Kerry if you could test in your projects that the cropper still works 👌.
I was seeing a bug with images larger than the "full" size.  The cropper coordinates wouldn't be relative to the original file.

Makes sense. It could be a big download, but cropping a tiny piece of a gigantic image is a legitimate use of our cropper, so it needs be there.

cool! thanks tom

Actually Matt, it looks like you added in some missing scaleUp/scaleDown
calls, which ought to make it work even if the image is not the original...
However, I think we should keep it this way because of the use case I
pointed out. (We have zooming enabled in the cropper right?)
On Fri, Jun 10, 2016 at 1:22 PM, Matthew Coppola<EMAIL_ADDRESS>wrote:

cool! thanks tom
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/punkave/apostrophe/pull/590#issuecomment-225243301,
or mute the thread
https://github.com/notifications/unsubscribe/AAB9fQocwcYIU1Q2QatSoZrLawtlSYdRks5qKZ1MgaJpZM4IzJwD
.

--
*THOMAS BOUTELL, *DEV & OPS
P'UNK AVENUE |<PHONE_NUMBER>  |  punkave.com


Graceful degradation question

Great plugin!
I'm wondering if there's a way to use this that degrades gracefully when javascript isn't available. With the default configuration, it appears that the content stays hidden forever if JS isn't able to reveal it... unless I'm doing something wrong.

I might have answered my own question...
var link = document.createElement( "link" );
link.href = "/path/to/aos.css";
link.type = "text/css";
link.rel = "stylesheet";
link.media = "screen,print";
document.getElementsByTagName( "head" )[0].appendChild( link );

This appears to work normally, but with the added benefit that all the content renders normally if javascript is turned off.
If there's any interest in adding default support this kind of approach, let me know and I'd be happy to submit a PR.


org.apache.http.client.HttpResponseException: Not Found

Execute about HttpReponseValidator both "mavenJob.getBuilds().get(index).getTestReport()" and "mavenJob.getBuilds().get(index).getMavenModule()"
"mavenJob" is JenkinsServer.getMavenJob(jobName)
Why did same to error?
Please ReSolution

Please check the new released version 0.3.4 if this error is fixed or not...

Try to new released version 0.3.5. but to occur about same to error....

It seems that job.getUrl() always return the url starts with http://<IP_ADDRESS>:8080/.... which is clearly not the url when i create JenkinsServer object. So for sure the response is 404. Not sure what's happening. Is it fixed?

I have same problem.
My project's code is
JenkinsServer jenkins = new JenkinsServer(new URI("http://localhost:2900/server/"), "user", "password");
Map<String, Job> jobs = jenkins.getJobs();
Job job = jobs.get("jobName");

I think there seems to be 'http://localhost:2900/server/job/jobName/'. But result of job.getUrl() code is http://localhost:2900/job/jobName/.

@smallmiro I have tested with the following manual test:
public class ManualTest {

    private JenkinsServer server;

    @Before
    public void SetUp() throws URISyntaxException {
        server = new JenkinsServer(new URI("http://<IP_ADDRESS>:10090/buildserver/"), "admin", "admin");
    }

    @Test
    public void testFolderPluginAPIs() throws Exception {
	Map<String, Job> jobs = server.getJobs();

	for (Entry<String, Job> item : jobs.entrySet()) {
	    System.out.println("Item: " + item.getKey());

	    System.out.println(" -> v:" + item.getValue());
	    Job value = item.getValue();
	    System.out.println(" -> Name:" + value.getName());
	    System.out.println(" -> URL: " + value.getUrl());
	}

    }
}

which results in this:
Item: test
 -> v:com.offbytwo.jenkins.model.Job@94202a9f
 -> Name:test
 -> URL: http://<IP_ADDRESS>:10090/buildserver/job/test/

Did you get the org.apache.http.client.HttpResponseException ? Or was your problem related to the URL ?


comnotes.kak not working.

In *debug*
/home/wheatdog/.config/kak/autoload/comnotes.kak:1:1: 'add-highlighter' no such id: 'c'
Autoload: could not load /home/wheatdog/.config/kak/autoload/comnotes.kak

I think I'm going to drop the static list of languages, and just highlight the text anywhere in the buffer as long as a filetype is defined. Stay tuned.


Register watchable build directories before checking the configuration cache fingerprint

To avoid Found existing snapshot at ... for unwatched hierarchy ... exceptions when registering included builds after checking build script file fingerprints.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

@bot-gradle test RFN

OK, I've already triggered ReadyForNightly build for you.

@bot-gradle test QF

OK, I've already triggered QuickFeedback build for you.

@bot-gradle test this

OK, I've already triggered ReadyForMerge build for you.

I don't understand the change, yet.
Can you give me a little more context? It seems that when loading from the configuration we use FileSystemAccess before adding the project root directory as a watchable directory. Though I don't know where. And now we load the watched directories from the configuration cache before using FileSystemAccess?

Can you give me a little more context? It seems that when loading from the configuration we use FileSystemAccess before adding the project root directory as a watchable directory. Though I don't know where. And now we load the watched directories from the configuration cache before using FileSystemAccess?

Exactly.
Gradle checks the fingerprint of the configuration cache before creating any builds and projects. Checking the fingerprint might require FileSystemAccess in order to compute the hash for a build script included in the fingerprint or FileCollectionFingerprinter to get the fingerprint for some build logic task inputs.
The full fingerprint checking process is implemented in
https://github.com/gradle/gradle/blob/83761d0b835e5977ab66cb8c1dba34f91a8dd3f1/subprojects/configuration-cache/src/main/kotlin/org/gradle/configurationcache/fingerprint/ConfigurationCacheFingerprintChecker.kt#L47-L93
Before this change, the fingerprint check could access a build script file from an included build before the root directory of that build being registered as a watchable hierarchy.
This PR records the set of included build directories in the fingerprint header so they can all be registered as watchable hierarchies before the checking process begins.

@wolfs, I'm merging it now so I don't have to rebase it for release Tomorrow but please do provide feedback.

Thanks for the review, @wolfs!


Could not query selector id with hypen

Expected behavior
Appication attached into div with id with hypen (#app-content)
Actual behavior
Error on console:
choo.mount: could not query selector: #app-content
But without hypen (#appcontent), it works.
Steps to reproduce behavior
index.html

index.js
app.route('/', require('./views/main'))
module.exports = app.mount('#app-content')

I think we need more information to solve this. I've tried doing the same in this glitch project and it seem to be working for me: https://glitch.com/edit/#!/accessible-chinchilla see any differences that could cause your problem?

Sorry for incomplete information.
I tried yours at glitch and no problem.
But I still encounter that error on localhost which was created with create-choo-app ( version 1.12.3), running on Arch Linux.
If you don't mind checking, please.
Thanks

I think I've found the cause. It's bankai that complained couldn't find the node requested by the query selector because it wasn't ready yet.
Tried using document-ready package and did app.mount inside it. Result: bankai complained.
Tried using DOMContentLoaded and did app.mount inside it. Result: OK.
So,
(1) the hypen was not the issue.
(2) perhaps I should addres this to bankai repo.
Thanks

Choo itself uses documentReady which in turn listens for DOMContentLoaded event so it should work without you having to do any of that. If you can debug enough to locate where bankai is doing something wrong, please close this issue and open another one in the bankai repo.


[carbonmark-api] /users/[id] - Support deleted param and set to false by default

Describe the bug
I.e. do not show deleted listings in the default API response

alternatively, active: true by default. I believe these are redundant properties


The used password file should not be shown for each BIOS setting that is changed

This adds a lot of clutter to the output.

Changed in 2.39.4 for normal output, verbose will still show it.


Misleading description of CSS flex-wrap

Describe your problem and how to reproduce it:
The descriptions of the wrap and wrap-reverse options for "CSS Flexbox: Use the flex-wrap Property to Wrap a Row or Column" are misleading. wrap-reverse doesn’t wrap items from right-to-left (that would be the row-reverse value for the flex-direction property). I propose the following:

wrap: In a row, wraps overflowing items below the previous row. In a column, wraps overflowing items to the right of the previous column.
wrap-reverse: In a row, wraps overflowing items above the previous row. In a column, wraps overflowing items to the left of the previous column.

Add a Link to the page with the problem:
https://www.freecodecamp.org/learn/responsive-web-design/css-flexbox/use-the-flex-wrap-property-to-wrap-a-row-or-column
Tell us about your browser and operating system:

Browser Name: Chrome
Browser Version: Version 84.0.4147.105 (Official Build) (64-bit)
Operating System: Windows 10 Pro version 1903

If possible, add a screenshot here (you can drag and drop, png, jpg, gif, etc. in this box):

It looks like someone started to address this in a previous issue (#17736), but it wasn't deployed?
https://github.com/freeCodeCamp/freeCodeCamp/issues/17736

This PR was merged to address the issue reported in #17736.   So, it was deployed, but made the wrong changes?

If it was deployed, the change that was made did not correct the issue. The erroneous text reported in #17736 is the same as when the issue was reported.

Hi @RandellDawson,
I would like to fix this issue if it's open for first-time contributors.
Can I?

@ChoukseyKhushbu We are still discussing here.  Once we put a help wanted label on it, some one is free to take up the task.

I dunno - I feel like I like what we currently have better because it says bottom-to-top, right-to-left, etc.
The suggestion wrap-reverse: In a row, wraps overflowing items above the previous row. is true, but it makes it sound like it pushed the row down and adds another one on top. When actually, it starts at the bottom, and adds a row above when needed - this is why I like bottom-to-top better.
I feel like this could be left as-is, but if someone wants to try and come up with a better suggestion or make their case for why it should be changed, feel free.

Hi,
We are closing old issues/pull-requests that we think are stale. If you need still need help with this or are fixing this, please open a fresh issue/pull-request.
Thanks for your understanding.
Happy contributing.


How to make all the compute notes to use the compute1-image. #GCP slurm

I came here because etrulls/slurm-gcp does not have a issue part.
I've found out that in compute(1-12) does not install well the colmap.
so I :

install the colmap manually in compute1.
follow the instruction create an image.

gcloud compute images create benchmark-compute-image-$(date '+%Y-%m-%d-%H-%M-%S') --source-disk benchmark-compute1 --source-disk-zone us-central1-b --force --family benchmark-image-family

Next I try to make all the compute notes to use this image follow the guide

Then deprecate the previous image using the web console, reboot the VMs, instantiate compute2 as in the example above, log in to this node, and check that the new binaries you installed on the permanent compute node (compute1) are visible.

but do not know how to exactly, Please help, thanks.
PS, I' ve the follow VMs:

benchmark-login1, which install all the image-matching-benchmark follow the link https://github.com/etrulls/slurm-gcp
benchmark-compute1, manually install colmap.
benchmark-controller.

I came here because etrulls/slurm-gcp does not have a issue part.

Neither does the parent repository, it's a bit annoying (I guess it was configured that way).

Next I try to make all the compute notes to use this image follow the guide

Then deprecate the previous image using the web console, reboot the VMs, instantiate compute2 as in the example above, log in to this node, and check that the new binaries you installed on the permanent compute node (compute1) are visible.

but do not know how to exactly, Please help, thanks.

I've had several issues in the past doing this exact same thing: sometimes it works and sometimes it doesn't and I'm not sure why. I would try repeating these operations with all the VMs off. If that doesn't work, the easiest solution is to update the installation script (scripts/custom_compute_install) with whatever the changes required to get Colmap to work and re-create it from scratch.
Wish I had a better solution.

Thanks @etrulls again.
I found out I've always use root user to run the command. I used to think root is most powerful user but now I'm wrong.
Now I change the user to sa_XXXX, the default user of slurm, and reinstall follow the guide, look like everything works fine.
Thanks @etrulls !


Do not crash worker nodes on shutdown+pipe close

The ShutdownNodesAfterParallelBuild test reliably reported node crashes
when everything seemed to be going fine. This turned out to be because  NodeProviderOutOfProcBase.ShutdownAllNodes()` sent a shutdown-request
packet and then immediately closed the communications pipe, so
(depending on process scheduling) the pipe might not exist for the worker
node to send back its "I am shutting down" packet.
Fixes #2057 by swallowing exceptions when sending the NodeShutdown
packet.

@AndyGerlicher Want me to cherry-pick the fancier test enablements you had to back out because of this bug?

Wouldn't the right fix be to change ShutDownAllNodes to wait for the node ACK with a timeout, instead of fixing the node to deal with the broken pipe?

We need to fix this issue but as is the issue is still not resolved. Closing the PR for now to be revisited later.


flutter build: --build-name and --build-number not overriding version from pubspec.yaml for Android

When doing a build, the --build-name and --build-number command line settings should always override
the 'version' tag in pubspec.yaml.
This is happening correctly for IOS, but not Android.
Suspect this is related to:
"Add version to pubspec.yaml"
https://github.com/flutter/flutter/pull/16857
and
"package_info broken on ios"
https://github.com/flutter/flutter/issues/20761
STEPS TO RECREATE:
# create a new project with "flutter create foo"
# then verify that the "version" field is present in pubspec.yaml

Richards-MacBook-Pro:foo richard$ grep "version:" pubspec.yaml
version: 1.0.0+1

# run an IOS build, specifying --build-name and --build-number

Richards-MacBook-Pro:foo richard$ flutter build ios --build-name=0.99 --build-number=97
Richards-MacBook-Pro:foo richard$ cat ./ios/Flutter/Generated.xcconfig
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/richard/dev/flutter
FLUTTER_APPLICATION_PATH=/Users/richard/dev/foo
FLUTTER_TARGET=lib/main.dart
FLUTTER_BUILD_MODE=release
FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build/ios
FLUTTER_FRAMEWORK_DIR=/Users/richard/dev/flutter/bin/cache/artifacts/engine/ios-release
FLUTTER_BUILD_NAME=0.99   <----- correct, as expected
FLUTTER_BUILD_NUMBER=97   <----- correct, as expected
Richards-MacBook-Pro:foo richard$

# the results are as expected on IOS
# the command-line parameters (--build-name and --build-number) correctly override the pubspec.yaml "version"

####

# the results on android, however, are incorrect.
# the command line parameters are ignored and the value from pubspec.yaml is used.

Richards-MacBook-Pro:foo richard$ rm android/local.properties
Richards-MacBook-Pro:foo richard$ grep "version:" pubspec.yaml
version: 1.0.0+1
Richards-MacBook-Pro:foo richard$ flutter build apk --build-name=0.99 --build-number=97
Richards-MacBook-Pro:foo richard$ cat android/local.properties
sdk.dir=/Users/richard/Library/Android/sdk
flutter.sdk=/Users/richard/dev/flutter
flutter.versionName=1.0.0   <--- incorrect
flutter.versionCode=1       <--- incorrect
flutter.buildMode=releaseRichards-MacBook-Pro:foo richard$
Richards-MacBook-Pro:foo richard$

# if we comment out the "version" tag in pubspec.yaml, then the build correctly
# pulls from the --build-name and --build-number settings

Richards-MacBook-Pro:foo richard$ vi pubspec.yaml
Richards-MacBook-Pro:foo richard$ grep "version:" pubspec.yaml
#version: 1.0.0+1
Richards-MacBook-Pro:foo richard$ flutter build apk --build-name=0.99 --build-number=97
Richards-MacBook-Pro:foo richard$ cat android/local.properties
sdk.dir=/Users/richard/Library/Android/sdk
flutter.sdk=/Users/richard/dev/flutter
flutter.versionName=0.99   <--- now correct
flutter.versionCode=97     <--- now correct
flutter.buildMode=releaseRichards-MacBook-Pro:foo richard$

flutter doctor -v
[✓] Flutter (Channel dev, v0.10.1, on Mac OS X 10.14 18A391, locale en-US)
    • Flutter version 0.10.1 at /Users/richardtolar/dev/flutter
    • Framework revision 6a3ff018b1 (13 days ago), 2018-10-18 18:38:26 -0400
    • Engine revision 3860a43379
    • Dart version 2.1.0-dev.7.1.flutter-b99bcfd309

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at /Users/richardtolar/Library/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.0, Build version 10A255
    • ios-deploy 2.0.0
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 29.0.2
    • Dart plugin version 181.5616
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

• No issues found!

https://github.com/flutter/flutter/pull/23826

For someone having problems with versioning overrides, pay attention to command syntax:

if in build command you specify the target before --build-number and/or --build-name params, flutter will ignore arguments and pubspec version will be used. (e.g.: flutter build appbundle lib/main.dart --build-number=123 --build-name=1.2.3, doesnt overrides version)
To avoid problems use --target param (e.g.: flutter build appbundle --target=lib/main.dart --build-number=123 --build-name=1.2.3 or place target at end (e.g.: flutter build appbundle --build-number=123 --build-name=1.2.3 lib/main.dart).


Expand dropdown palette

make a collapsable pallete, so you can close all component drawers

Can one of the admins verify this patch?


prometheus-keylight-exporter: init at 0.1.1

Motivation for this change

New Prometheus exporter for Elgato Key Light devices
Pushing my package upstream so I don't have to maintain an overlay locally.

Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

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

[matt@servnerr-3:~/src/nixpkgs]$ nix-build -A prometheus-keylight-exporter
these derivations will be built:
  /nix/store/p7yr2jywg2jv3dyxqsb4wd5dyppi226s-keylight-exporter-0.1.1.drv
building '/nix/store/p7yr2jywg2jv3dyxqsb4wd5dyppi226s-keylight-exporter-0.1.1.drv'...
...
/nix/store/7i3ydp9rysjbscwp2czzp8qkgypxifqd-keylight-exporter-0.1.1

[matt@servnerr-3:~/src/nixpkgs]$ ./result/bin/keylight_exporter -h
Usage of ./result/bin/keylight_exporter:
  -metrics.addr string
        address for Elgato Key Light exporter (default ":9288")
  -metrics.path string
        URL path for surfacing collected metrics (default "/metrics")

[matt@servnerr-3:~/src/nixpkgs]$ ./result/bin/keylight_exporter
2020/06/08 10:19:51 starting Elgato Key Light exporter on ":9288"

@GrahamcOfBorg build prometheus-keylight-exporter

@zowoq Thanks!


How do I use the attribute ngf-capture=" 'camera' " ?

I have attempt upload data from mobile phone (Android) but it isn't working.
I'd like to know how I can use this attribute because I was using navigator.camera.getPicture() to take the photo. Thanks (sorry for my english)

There are already similar issues please comment on those.


[NEW CONTENT TYPE REQUEST] MineCraft Anvil region

What type of file would you like magika to detect?
MineCraft Anvil region (.mca)
What software can create/open these files?
NBTExplorer
Where can these files be found?
AppData\Roaming.minecraft\saves<world name>\region
Must be Minecraft Java Edition 1.2.1 or later.
If possible, please provide a specification for this file type.
Additional context
https://minecraft.wiki/w/Region_file_format

Thanks! Quite a sparse Minecraft-related data dump - definitely hard to identify.


Recursive Hover Docs

Is your feature request related to a problem? Please describe.
As I'm currently learning Rust, I found myself jumping alot between docs online and hover_docs windows (because of examples provided in the LSP that I'm using)..
It would be extremely useful to have recursive calls to hover_docs to "dig deeper" when hovering docs.
So, for example if I'm inside a hover_doc window (pressing H twice in my case), I'd move inside that window searching for another keyword to "hover". Another H would open another window hovering last hovered keyword (this time inside hover window)
Describe the solution you'd like
I't would be really nice to have a kind of a stack to open a reference to the last hover_doc call (with stacking windows), that keeps focus on last call and when user closes that window (in my  case mapped on q), the focus would be back on the first available window untill all of those are closed. It'd be considerable (adopting the stack solution) to map a "Q" command to close all opened windows at once.

behavior a little same as lspsaga peekd_definition .  just use a double linkedlist.


Chat app on flutter

Contributing
If you want to add a project to this list, please make sure that:

[ ] You read the contributing guide
[ ] The repository has hacktoberfest as topic and counts for hacktoberfest event
[ ] The project can't be just an "add your name" or simply + 1 contribution to hacktoberfest
[ ] Place them in alphabetical order
[ ] One repository per PR/contribution - avoid conflicts and simplify review
[ ] Your pull request is not spammy just adding an empty line, otherwise it will be marked as invalid and not count to hacktoberfest.

If they meet the requirements above, feel free to create a PR. Happy Hacking! :sparkles:

ChatApp Flutter

Contributing to Open Source is quite exciting and completing the Hacktoberfest challenge is very rewarding, however, you should not take "shortcuts", this repository is beginners friendly and presents a number of ways in which you can contribute significantly without needing specific pre-knowledge, however, we will not tolerate spam. So following the quality standards of the hacktoberfest I am marking this pull request as invalid and adding a label so that it does not count in your contributions to the event. Read our contribution guide and feel free to make a contribution that is truly meaningful.
Remember to read our contributing guide.


Show what application is listening on a local port

From the description "what service is listening on a given port" I would have expected whatport is to print the application which is running on that port on the current machine.
However it prints what the standardized or expected application on that port should be. For example, if I make a python application on my local machine which happens to listen on port 6379, whatportis will show 'redis'.
Can you make whatportis actually check the local machine port usage, fuser user -n tcp PORT or netstat -alnp | grep PORT, etc?
Or maybe the README could be amended to be clearer on this point.

Yep, I undestand the confusion. The first option (whatportis showing the actual port) is not the purpose of the tool, others do it much better (netstat, nmap...).
However you can update the README to be clearer and send me a PR if you want.
Ex : what service is listening on a given port
==> what service is normally listening on a given port

Added in https://github.com/ncrocfer/whatportis/commit/50bfeab3acb154507d0942eb1204010fee8e1a7c :)


feat: support proxy options for http client

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Docs
[ ] New Binding issue #___
[ ] Code style update
[ ] Refactor
[ ] Build-related changes
[ ] Other, please describe:

Does this PR introduce a breaking change?

[ ] Yes, and the changes were approved in issue #___
[x] No

Checklist

[ ] When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
[x] A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
[ ] I have added a convincing reason for adding this feature, if necessary

Other information
This PR enhances the http api to support setting http proxy when building a client.
Usage:
import { getClient } from '@tauri-apps/api/http';

// simple form
let client = await getClient({
  proxyUrl: 'http://localhost:1234',
});

// basic authentication form
let client = await getClient({
  proxyUrl: 'http://localhost:1234',
  proxyUser: 'foo',
  proxyPassword: 'bar'
});

// no proxy form
let client = await getClient({
  proxyUrl: 'http://localhost:1234',
  noProxy: 'www.example.com',
});

These proxy options are supported for both reqwest-client and attohttpc features.

Sorry for the very late replay, somehow our radars missed this PR. http APIs have been moved to its own plugin in plugins-workspace repo for tauri v2 and it already supports specifying proxy. If you want to add this for v1, you need to open a PR against 1.x branch, closing this one for now.


Function to get the state that matches a path

Hi guys,
I'm in a situation where I want to retreive a state (and its parameters) using an URL. I didn't find anything about that in you documentation. I tried to combine $urlMatcherFactory and $state without result.
I'm thinking about something like:
// Where 'state' would contain the name of the states, its parameters, etc
var state = reverse("file/54984e5a3c9e2da72bcdddad");

Best !

var match = privatePortion.url.exec(url);

A question herefore @christopherthielen , your docs URLMatcher states a second argument called searchParams , which you do not mention in the quoted line. We would need to match an absolute URL against our states, with your explanation all matches fail since match is (obviously) null. We see that the parameter is optional, but how can he match it without the parameters?
Any advice?
Thanks in advance.

Can you decorate state in main config and have the $$state available trought application
_.each($state.get(), function(state) {
      var privatePortion = state.$$state();
      var match = privatePortion.url.exec(url);
      if (match) console.log("Matched state: " + state.name + " and parameters: " + match);
});

I get  state.$$state is not a function

This how we did it and it works, tell me if it works for you:
  angular.module('app')
        .config(['$stateProvider', function($stateProvider) {
            // Reveal internal state representation
            $stateProvider.decorator('parent', function(internalStateObj, parentFn) {
                internalStateObj.self.$$state = function() {
                    return internalStateObj;
                };
                return parentFn(internalStateObj);
            });
            }
        }])
        .run(...);

Access it later with:
var privatePortion = state(*).$$state(); //Where state is a ui-router-initialized state (e.g. in a $stateChangeSuccess function

Note that in ui-router 1.0,  the $$state() accessor is created by default.

This is probbably the gotcha
//Where state is a ui-router-initialized state (e.g. in a $stateChangeSuccess function)
I want to access it in my controller or directive

@vodich you can access the using $state.get('stateName') from wherever you want

You can get them from the injector('$state') or $state itself.
I am mobile right now, but try $state.get('whateverstate') and you should be fine :)

What I wanted  was $state.get('whateeverurl')  not $state.get('whateverstate')
I solved the problem by going trough all states in loop and finding which one matches the url but thought it would be nice if I can paste whole url and just get the state from it but that didn't work. maybe because my router version is not 1.0

You can, there is a URLMatcher for that. If noone answers until tomorrow (when i get back to my desk) i will help more. But since you already solved it on your own you have it. I (not disrespecting your effort, just remarking) honestly would still give a look at the matcher, coz its tested and well woven into the ui router :)


Make more useful

It would be very useful to add examples for each option of how it changes the scripting output. For example, for the "Include descriptive headers", True adds a comment like: /****** Object:  Table [dbo].[Customers]    Script Date: 7/16/2019 8:10:59 AM ******/

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 0b12f56f-4709-cab6-33a2-52acb1581ff8
Version Independent ID: c6790f69-453e-ffce-6f79-5aa3a656e80b
Content: Options (SQL Server Object Explorer - Scripting Page) - SQL Server Management Studio (SSMS)
Content Source: docs/ssms/object/options-sql-server-object-explorer-scripting-page.md
Product: sql
Technology: ssms
GitHub Login: @markingmyname
Microsoft Alias: maghan

@michaelruss777 -- Michael, thank you for your suggestion.
@markingmyname -- Mark, please look into this issue.

@michaelruss777
Thank you for your feedback! We will investigate and review if we need to change/add the information suggested.

Hi, @michaelruss777,
If there are examples you have interest in, can you please mention them in this Issue?
I can review them and add them if they fit the scope of the article.
Thank you.

@michaelruss777
Since I have n ot heard back i will close this issue.

We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion, and we will reopen the issue. To see what the community is wanting, please visit the SQL Server User Feedback site.


(some) certificates lack a description yielding an empty select box in the 2FA demo

In the 2FA demo you may end up with unnamed options in the certificate drop-down, rendering them invisible. This is due to the fact, that the description property of the returned certificates may be an empty string.
Unfortunately, this is not documented by TRUST2GO, but can be circumvented by naming the options with a combination of the certificateSerialNumber property and, if present, the description, like so.
let opt = '<option value="' + certificate.certificateSerialNumber + '">{{NAME}}</option>';
let name = certificate.certificateSerialNumber;
if (certificate.description) {
    name += ' (' + certificate.description + ')';
}
certificatesHtml += opt.replace('{{NAME}}', name);

From our experience, it's the user level certificates (the relevant ones) that do not have a description, whereas root and sub level certificates have one.

We just updated the 2FA demo. We now use an external library to parse the certificate and fetch the common name from the subject.

Sounds good, @MaximilianKresse! It worked for me.


add env var for building istio-proxy with custom bootstrap file

This PR adds ISTIO_ENVOY_BOOTSTRAP_CONFIG_PATH for users to specify a custom boostrap file when building istio proxy.
Since Dockerfile.proxyv2 hard-codes the file name, we need to make sure the name matches. To do this, I'm ceating a new file in user's directory. This also requires that the directory is not read-only. Not sure if this is ok, but the rule above also does this so I'm just following.
@howardjohn

Hi @yingzhuivy. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

cc @jhahn21 @brianwolfe


Add option to keep scrolling when outside container

This PR adds an option to allow the container to be scrolled even when the cursor (pointer) is outside its boundaries.
I opted to have it default to false. However, I can definitely change it if you think it would make sense.

I considered adding that option when I first made it, but couldn't think of a reason. There's minimal change to code so it should be fine.  The default of false is fine. I'm going to see how it goes for now. :)

Thanks for the merge!

You're welcome. Can you tell me what this might be used for? Or is it just a missing function you thought had to be filled?

Oh ok I see now. It's just another constraint. And it still works the same otherwise. Perfect addition. :)

Oh ok I see now. It's just another constraint. And it still works the same otherwise. Perfect addition. :)

Glad to hear you like it! It was just something I thought would make sense to have as an option after using dom-autoscroller for a few minutes.
Nice work on the project, by the way. I like how it is completely library agnostic.

Thanks. It was actually part of a larger project that I was working on, but after some deliberation I realized I wouldn't use the extra functionality beyond auto-scroll in every app. Automatic scrolling deserves it's own lib, and it needs to work in any situation. The module landscape enables that. I plan on supporting it for a long time.


[Feature]:dark mode

i want to add dark mode to the website.

The page is already dark!

@Utkarsh-Pandey-GitHub please assign this issue to me under gssoc24

the website already responds to system dark mode, still I can add a manual dark mode toggle button, if assigned to me @abhijeetnishal

Hey @Utkarsh-Pandey-GitHub and @SanaAzeem512, the UI is adaptable for dark mode.

Hey @SatyajitPatra06, I am assigning this issue to you.
Things to remember:

Don't use any external package or library for this
Code should be written in such a way that it should work for every screen in later stages if we add pages later.
Use Tailwind CSS

Hey @SatyajitPatra06, what's the progress?
Are you still working on this issue

Hi,
Myself Prashant, I would like to work on this under GSSOC'24.
Please assign it to me.

Hey @Prashant-2024, assigning this issue to you.

Update:
Almost Done with the Feature

Hey @Prashant-2024, any update?
If you need any help let me know

Just having some render issue, I will be solving it ASAP.
I have End sem exam tomorrow, leading to delay for PR.
But I will try to raise PR by today itself.

Just having some render issue, I will be solving it ASAP. I have End sem exam tomorrow, leading to delay for PR. But I will try to raise PR by today itself.

Ok no issues, focus on your exam today leave it

PLEASE ASSIGN IT TO ME

Hey @Madhuril-Bhaskar,  i guess @Prashant-2024 is working on this issue.
Contribute to other issues or projects good luck

Hey @Prashant-2024, are you working on this issue there is limit of 4-5 days for issue under gssoc also this feature is needed for this project, we can't delay. Let me know if you on it else i will assign to @Madhuril-Bhaskar

yes, I am working on it.
I will raise the PR within 1 hour

Hey @abhijeetnishal I would like to work on this issue.

Closing this issue as done


Separate wallet key for each connection

This will allow better privacy between connections, which currently can see metadata from events of other connections since it uses the same wallet key.

Some considerations:

Currently the single wallet key is kept in DB encrypted and when hub starts and is unlocked with password it is decrypted and that private key is kept in memory, so that when needed for signing events with wallet priv key it is accessible.
If we would want to have a separate wallet key for each connection, we would need to keep each wallet private key in App model in DB, ideally encrypted so that if db leaks it will not be a problem.
In order to be able to encrypt a new wallet private key each time a new connection is created we would need the unlock password so that we can encrypt the new wallet private key and write it to the DB encrypted.
AFAIK unlock password is not (and should not be) kept in memory, so this presents a problem.
Should we write wallet private keys for each connection in App DB model unencrypted???
Any other ideas how to implement this in a secure manner?
@rolznz @bumi @reneaaron @im-adithya


[argparse] Update to v2.8

Describe the pull request

What does your PR fix?

Updates argparse to v2.8

Which triplets are supported/not supported? Have you updated the CI baseline?

No

Does your PR follow the maintainer guide?

Yes
If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/

/azp run

@p-ranav, CI for x64-linux is broken.


feat: create a swap offer details

Feature Request
Describe the Feature Request
Create an atom with details from a swap offer.

Should be able to accept and reject the offer.

Describe Preferred Solution
Check the implementations of acceptSwap and cancelSwap in the swaplace-contracts
Related Code
OfferSection.tsx
Additional Context
That atom will be part of this organism to check the swap offers:

May I work on this feature? Is any design link needed?

hey @Stasn13 , yes! No design links.
BTW, in the next few days, I will update the issues to provide more information and also update the issues into smaller ones to make coding easier! ;)
So watch this!

can you provide some info about running project for development? I've opened dev branch and got this error on wallet connect

Hey @Stasn13 !!  the steps to run the project are in the README.md
Can you please create a Bug Report at issues  ?

Issue  > New Issue > Bug Report

Thanks ! with more information we will be able to reproduce the error and find a better solution! 🙏
But a suggestion try opening the dApp in another browser / clean the cookies / opening another wallet
Anyway, let us know so we can improve ! 🫡


Caption outline is currently drawn inside the letter

As pointed out by 3 users, it would be better to draw the outline of the caption outside of the letter.

Done, the app will now render the outline outside the letters. (v2.10)
Optional, can be reverted to the old style.


Support for pandoc-gls / pandoc-ac style commands

I am using Pandoc to write my documents in Markdown, which converts them to LaTeX and then PDF and is actually a widely used tool.
To reference my glossary entries and acronyms I am using pandoc-gls, which introduces an easyier syntax than \acrshort{} or similar. The glossary entries themselves are written in a normal LaTeX file though.
You currently have the option to make your plugin work with custom LaTeX commands, but you still require the \somethingsomething{acr} syntax (the backslash and curly brackets). I would love to use your plugin with the pandoc-gls syntax (i.e. (+acr)). It would be awesome if you could add this functionality.
Cheers.

Thanks for the suggestion!
Sadly, I don't think this fits the scope of this extension. My intention was to create small, modular and LaTeX-related extensions.
Though feel free to fork this repository and change the code to meet your needs!


Number of question-answer pairs

the number of question-answer pairs is not clear even in the Azure Search Tier link (https://docs.microsoft.com/en-us/azure/search/search-limits-quotas-capacity#document-limits)
please tell me how to know the exact number of question-answer pair ?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 8b62d38a-cace-8b96-a56d-e5dfadc8192b
Version Independent ID: 21c3de87-8adb-aa2b-2fc7-f7db10315bee
Content: Limits and boundaries - QnA Maker - Azure Cognitive Services
Content Source: articles/cognitive-services/QnAMaker/limits.md
Service: cognitive-services
GitHub Login: @tulasim88
Microsoft Alias: tulasim

@ahalha
Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.
@tulasim88
Hi, the customer is asking about the limit of question-answer pairs. Could you please check this issue and make this clear? Thanks a lot!

@ahalha thanks for the feedback. the Azure search tier limits are no longer limiting the number of Question and Answer pairs (depending on your region). The limits you should think about are size based limits.
A Q&A pair maps to a document on Azure Search index. to see more you can refer to "number of documents" section:  https://docs.microsoft.com/en-us/azure/search/search-limits-quotas-capacity#document-limits
hope this helps. And we will update our documentation to make this more clear  (@diberry  )

This documented has been updated and published. #please-close

@diberry Thanks for the update.
@ahalha We will now proceed to close this thread. If there are further questions regarding this matter, please tag @RohitMungi-MSFT in your reply. We will gladly continue the discussion and we will reopen the issue.


"or" operator using the --scope flag when task running

Discussed in https://github.com/vercel/turborepo/discussions/483

Originally posted by seanblonien January  3, 2022
In Lerna, I used this syntax to build two non-dependent packages in parallel:
lerna run build --sort --scope=@orgname/appname-{package1,package2}
and simply changing to turbo didn't work
turbo run build --scope=@orgname/appname-{package1,package2} --no-deps
How do I do an or operation without just repeating the flag again and again?
Note, assume I have a package3 with same org name, and same appname prefix which I don't want to run, thereby preventing me from just doing --scope=@orgname/appname-*
Repeating the flag does work, however, it is a pretty bad syntax when you consider all packages in a monorepo are commonly prepended with an org name, let alone other package prefixes
turbo run build --scope=@orgname/appname-package1 --scope=@orgname/appname-package2 --no-deps

it looks like turbo is not respecting the @org/repo syntax. I mean it works fine with --scope=app1 but ignores --scope=@org/app1. 🤷

See https://turborepo.org/docs/features/filtering and the new --filter flag in<EMAIL_ADDRESS>


fix issues with close logic

use a buffered channel for the internal initialization system to prevent blocking on writes
only wait on initialization channel if initialized is false
change definition of isInitialized to always be true when initialization has finished, even if it was unsuccessful
change methods like Variable to directly check for whether a config exists rather than checking isInitialized

Current dependencies on/for this PR:

main

PR #58

PR #62   👈

This comment was auto-generated by Graphite.


Update 0015-extended-command-info.md to reflect what we shipped.

Update the device capability section for ExtendedCommandInfo

yeah, describing what we shipped, was missing in this spec.


Get software versions working in the context of DSL2

nf-core/chipseq pull request
Many thanks for contributing to nf-core/chipseq!
Please fill in the appropriate checklist below (delete whatever is not relevant).
These are the most common things requested on pull requests (PRs).
PR checklist

[ ] This comment contains a description of changes (with reason)
[ ] If you've fixed a bug or added code that should be tested, add tests!
[ ] If necessary, also make a PR on the nf-core/chipseq branch on the nf-core/test-datasets repo
[ ] Ensure the test suite passes (nextflow run . -profile test,docker).
[ ] Make sure your code lints (nf-core lint .).
[ ] Documentation in docs is updated
[ ] CHANGELOG.md is updated
[ ] README.md is updated

Learn more about contributing: CONTRIBUTING.md

Getting software versions is now working directly from the files staged in work/. If we consistently name them as <SOFTWARE>.version.txt in the module files and dump just the version number in the file via the module then it makes things so much easier!
Only thing I am not happy about is the sorting by file name in scrape_software_versions.py means that the pipeline version isn't reported at the top of the output. I can live with that though at the expense of adding a bunch of custom code to sort the output accordingly.

Also, we need to figure out how to add MultiQC to that list because it is normally run after GET_SOFTWARE_VERSIONS 😅. Maybe we output the version file in the multiqc folder instead since it is quite explicit at the top of the MultiQC report as to which version you are using anyway? Or run GET_SOFTWARE_VERSIONS within the MultiQC process?

Also, we need to figure out how to add MultiQC to that list because it is normally run after GET_SOFTWARE_VERSIONS 😅. Maybe we output the version file in the multiqc folder instead since it is quite explicit at the top of the MultiQC report as to which version you are using anyway? Or run GET_SOFTWARE_VERSIONS within the MultiQC process?


discord-canary: 0.0.103 -> 0.0.104

Motivation for this change
This update updates the necessary dependencies, and enables patchelf on
the binary in order to make it launch again.

Things done

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

[x] NixOS
[ ] macOS
[ ] other Linux distributions

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

LGTM, thank you for the PR


Add Triton SD docs

This commit adds documentation for the recently added Triton SD as requested by @fabxc in prometheus/prometheus#2307.
@brian-brazil I closed https://github.com/prometheus/docs/pull/652 and applied your review comments to this.

Thanks!


Empowered by Marty Cagan

https://www.amazon.com/EMPOWERED-Ordinary-Extraordinary-Products-Silicon/dp/111969129X

Migrated on another repository to handle global projects

Migrated on another repository to handle global projects


PWM monitor in c

Hi,
I'm using version 56 of the library on an rpi model b and I'm trying to replicate the example for python pwm monitor in c.
Using arduino I am generating a frequency of about 5.618hz (controlled using an oscilloscope) on pin 20.
The output of the python example is this, I have only changed the pin and the number of decimal digits for the frequency, from 1 to 4:
f = 5.6172 pw = 1010 dc = 0.57
f = 5.6172 pw = 1010 dc = 0.57
f = 5.6170 pw = 1010 dc = 0.57
f = 5.6172 pw = 1015 dc = 0.57
f = 5.6170 pw = 1010 dc = 0.57
f = 5.6172 pw = 1015 dc = 0.57
...
the program converted to c mi gives this output:
5.6172
5.5787
5.6208
5.6172
5.6149
5.6295
5.6175
5.6156
...
As you can see the reading is much less stable.
I tried to be as faithful as possible to the python code and I am sure that the frequency reading should be done in a much more complex way, which in python is simplified by pigpiod.
I think the solution is in the freq_count_2 example but I got lost ...
The program in c is this:
//
// compile with gcc -o my_test my_test.c -lpigpio -lpthread
//
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <stdbool.h>
#include <pigpio.h>

#define WS_PIN 20

static uint32_t high_tick;
static volatile uint32_t period;

void wsCallback (int gpio, int level, uint32_t tick)
{
    static int init;

    if (init)
        period = tick - high_tick;

    if (! init)
        init = 1;
    high_tick = tick;
}

int main (int argc, char * argv [])
{
    int ret;

    ret = 1; // defaults to err

    gpioCfgBufferSize (PI_DEFAULT_BUFFER_MILLIS);
    gpioCfgClock (PI_DEFAULT_CLK_MICROS, PI_DEFAULT_CLK_PERIPHERAL, 0);
    gpioCfgInterfaces (PI_DEFAULT_IF_FLAGS);
    gpioCfgDMAchannels (PI_DEFAULT_DMA_PRIMARY_CHANNEL, PI_DEFAULT_DMA_SECONDARY_CHANNEL);
    gpioCfgSocketPort (PI_DEFAULT_SOCKET_PORT);
    gpioCfgMemAlloc (PI_DEFAULT_MEM_ALLOC_MODE);

    gpioCfgSetInternals (PI_DEFAULT_CFG_INTERNALS);

    if (gpioInitialise () <0)
        goto quit;

    gpioSetMode (WS_PIN, PI_INPUT);
    gpioSetISRFunc (WS_PIN, RISING_EDGE, -1, wsCallback);

    while (1)
    {
        gpioSleep (PI_TIME_RELATIVE, 2, 0);
        printf ("%. 4f n", 1000000.0 / period);
    }

    gpioTerminate ();
    ret = 0;

quit:
    return ret;
}

Any help ?
Thank you.

Some amount of jitter is introduced by the dma sampling so some variability in your readings are expected.  Have you verified that the python/pigpiod results were obtained with the same sample rate?
Frequency_counter_2 is doing some averaging which will remove the jitter.

The gpioCfg* function calls in c version code are taken from pigpiod.c, so the sample rate should be the same.
Frequency_counter_2  give as output a fixed value of 6.
I am doing a test to take the values from an anemometer in order to have the minimum, average and maximum speed.
I don't know if there is another more accurate way.

The Python is doing quite a bit more than the C code.  I'd be tempted to add in the weighting code and just set the weighting to zero as in the Python example.  There might be some non-weighting related code you missed.
class reader:
   """
   A class to read PWM pulses and calculate their frequency
   and duty cycle.  The frequency is how often the pulse
   happens per second.  The duty cycle is the percentage of
   pulse high time per cycle.
   """
   def __init__(self, pi, gpio, weighting=0.0):
      """
      Instantiate with the Pi and gpio of the PWM signal
      to monitor.

      Optionally a weighting may be specified.  This is a number
      between 0 and 1 and indicates how much the old reading
      affects the new reading.  It defaults to 0 which means
      the old reading has no effect.  This may be used to
      smooth the data.
      """
      self.pi = pi
      self.gpio = gpio

      if weighting < 0.0:
         weighting = 0.0
      elif weighting > 0.99:
         weighting = 0.99

      self._new = 1.0 - weighting # Weighting for new reading.
      self._old = weighting       # Weighting for old reading.

      self._high_tick = None
      self._period = None
      self._high = None

      pi.set_mode(gpio, pigpio.INPUT)

      self._cb = pi.callback(gpio, pigpio.EITHER_EDGE, self._cbf)

   def _cbf(self, gpio, level, tick):

      if level == 1:

         if self._high_tick is not None:
            t = pigpio.tickDiff(self._high_tick, tick)

            if self._period is not None:
               self._period = (self._old * self._period) + (self._new * t)
            else:
               self._period = t

         self._high_tick = tick

      elif level == 0:

         if self._high_tick is not None:
            t = pigpio.tickDiff(self._high_tick, tick)

            if self._high is not None:
               self._high = (self._old * self._high) + (self._new * t)
            else:
               self._high = t

   def frequency(self):
      """
      Returns the PWM frequency.
      """
      if self._period is not None:
         return 1000000.0 / self._period
      else:
         return 0.0

   def pulse_width(self):
      """
      Returns the PWM pulse width in microseconds.
      """
      if self._high is not None:
         return self._high
      else:
         return 0.0

   def duty_cycle(self):
      """
      Returns the PWM duty cycle percentage.
      """
      if self._high is not None:
         return 100.0 * self._high / self._period
      else:
         return 0.0

   def cancel(self):
      """
      Cancels the reader and releases resources.
      """
      self._cb.cancel()

I'm sorry but I completely miss the point.
I've refactored python code to (or what I think it should) reflect the c code I've written:
#!/usr/bin/env python

import time
import pigpio

high_tick = None
period = None

def callback(gpio, level, tick):
   global high_tick
   global period

   if high_tick is not None:
      period = pigpio.tickDiff(high_tick, tick)
   high_tick = tick

if __name__ == "__main__":

   import pigpio

   PWM_GPIO = 20
   SAMPLE_TIME = 1.0

   pi = pigpio.pi()
   pi.set_mode(PWM_GPIO, pigpio.INPUT)
   cb = pi.callback(PWM_GPIO, pigpio.RISING_EDGE, callback)

   while True:
      time.sleep(SAMPLE_TIME)
      print("{:.4f}".format(1000000.0 / period))

   cb.cancel()

   pi.stop()

The output seems to be stable as your example.
Thank you for your time, I need another hint!

Your c code is using gpioSetISRfunc()

Yes, I was aware of it. Thank you for pointing me out to right direction.
It was an honest mistake:
The python interface uses EITHER_EDGE as type for GPIO edge.
In c this value is used by gpioSetISRfunc \ gpioSetISRfuncEx.
I thought these interfaces were interchangeable...but
I've not found gpioSetISRfunc (nor gpioSetAlertFunc) calls inside pigpiod or any other python code.
For completeness this is the fixed code:

// compile with
//
// gcc -o my_test my_test.c -lpigpio -lpthread
//
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#include <stdbool.h>
#include <pigpio.h>

#define WS_PIN      20

static uint32_t high_tick;
static volatile uint32_t period;

void wsCallback(int gpio, int level, uint32_t tick)
{
    if ( 1 == level )
    {
        static int init;

        if ( init )
            period = tick - high_tick;

        if ( ! init )
            init = 1;
        high_tick = tick;
    }
}

int main(int argc, char* argv[])
{
    int ret;

    ret = 1; // defaults to err

    if ( gpioInitialise() < 0 )
        goto quit;

    gpioSetMode(WS_PIN, PI_INPUT);
    gpioSetAlertFunc(WS_PIN, wsCallback);

    while ( 1 )
    {
        gpioSleep(PI_TIME_RELATIVE, 2, 0);
        printf("%.4f\n", 1000000.0 / period);
    }

    gpioTerminate();
    ret = 0;

quit:
    return ret;
}

@guymcswain Well spotted!
For information.
gpioSetAlertFunc reports the samples captured and time-stamped by the DMA engine.
gpioSetISRFunc reports an interrupt captured by the Linux kernel.
The alert reports will have more latency (half a millisecond say) but will be more accurately timed (+/- 5 µs say).  They will be far more accurate for timing between GPIO events.
The ISR reports will have less latency (50 µs say) but will be less accurately timed (+/- 50 µs say).  They will be far less accurate for timing between GPIO events and can not handle multiple events in close succession.
I would only use the ISR reports when you absolutely need the minimum latency.  I have not found a use for them myself.

Thank you for explanation!
I'm not very into electronics/low-hardware stuff! Just a hobbyist!
I would like to remove arduino from my setup and do more flexible test. i.e. change frequency.
It is possible to generate a frequency on a pin and read from another pin on the same rpi ?
Should I use gpioWaveCreate func ?

You can generate a frequency on an output pin and read the timing on the very same pin.  Use the pwm APIs to vary frequency and dutycycle.  The APIs are well documented.

Thank you, I close the issue.

Hi,
sorry to reopen this issue but I'm not sure that my c conversion reflect the python version.
I've running for a while (2 night, 1 night per test) under same condition (no hdmi and no lan) the python script first and the c code then and I noticed that sometimes the c code give wrong results (I feed the pin with a fixed freq of ~5Hz and it reads 2.8...)
I can guess that it happens 'cause there's many stuff involved like daemons etc, but why python version is stable ?
I believe the answer lies in the implementation of pigpiod but I would like an opinion about this.
Thanks.

Assuming you are using gpioSetAlertFunc() then you will receive a callback on either edge of the signal you are measuring.  The c callback function needs to ignore the falling edge to match your Python code.

The python script has edge setted to RISING_EDGE.
The c callback is
void wsCallback(int gpio, int level, uint32_t tick)
{
    if ( 1 == level )
    {
		// do stuff
	}
}

It is the right way to get only rising edge ?

Seems correct to me.

I notice you are using version 56.  Latest version is 70 ish?

Please retest with the latest version and report back if you still believe there to be an issue.


chore: release main

:robot: I have created a release beep boop
create-toolchain: 0.1.0
0.1.0 (2023-12-13)
Features

add a create-toolchain script (217b345)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/rowanmanning/toolchain/releases/tag/create-toolchain-v0.1.0 :sunflower:


Add a SIMD Path for string VectorHasher

Assuming this PR is no longer needed. Feel free to re-open if needed.

This is needed, just not top of list.
From: Maria Basmanova @.>
Sent: Monday, March 7, 2022 2:49 PM
To: facebookincubator/velox @.>
Cc: oerling @.>; Mention @.>
Subject: Re: [facebookincubator/velox] Add a SIMD Path for string VectorHasher (#160)
Assuming this PR is no longer needed. Feel free to re-open if needed.
—
Reply to this email directly, view it on GitHub https://github.com/facebookincubator/velox/pull/160#issuecomment-1061219779 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AKPPPT5KKQY7T7BTMTTJORLU62BU3ANCNFSM5DJVJT3A .
Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675  or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub .
You are receiving this because you were mentioned.Message ID: @.***>


Added link for short Maven tutorial

Added link for short Maven tutorial how to create, run, etc. your Maven project(s).

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Closed and Reopened this PR to attempt to resolve a specific Travis build failure.


Remove deprecated support for --home

--home is currently deprecated, see:
https://github.com/thelounge/lounge/blob/d87e174644b11ba6190268d45db5a8b92edc2073/src/command-line/index.js#L11
and:
https://github.com/thelounge/lounge/blob/d87e174644b11ba6190268d45db5a8b92edc2073/src/command-line/index.js#L15-L18
As we are starting to plan for a v3, we should take advantage of it to get rid of this support and deprecation notices.

I'll wait for #1717 to make it in master before preparing this, or I'll just have to rebase/fix conflicts over everything.


Netty IllegalStateException - SSLEngine already closed

We have server/client product where client connects to server over ssl. For this we are using netty framework 3.9.4.
There is no issue with few client connections. But observing below exception when trying to connect the client in thousands.
java.lang.IllegalStateException: SSLEngine already closed
    at org.jboss.netty.handler.ssl.SslHandler.wrap(SslHandler.java:1074)
    at org.jboss.netty.handler.ssl.SslHandler.handleDownstream(SslHandler.java:623)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
    at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(DefaultChannelPipeline.java:784)
    at org.jboss.netty.channel.SimpleChannelHandler.writeRequested(SimpleChannelHandler.java:292)
    at org.jboss.netty.channel.SimpleChannelHandler.handleDownstream(SimpleChannelHandler.java:254)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:591)
    at org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:582)
    at org.jboss.netty.channel.Channels.write(Channels.java:704)
    at org.jboss.netty.channel.Channels.write(Channels.java:671)
    at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248)
    at com.symantec.dlp.communications.transportlayer.impl.NettyTransportConnection$WriteOutboundDataTask.run(NettyTransportConnection.java:2126)
    at com.symantec.dlp.communications.transportlayer.impl.PrioritizedTaskQueue.run(PrioritizedTaskQueue.java:79)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)

I searched for this error and it looks like observed by many. But I could not find if it is solved in any of the future releases. Can someone help me to resolve this issue?
Netty Version - 3.9.4

Netty 3.9 is EOL.

Yes. I just want to know if it is fixed in any of the 3.x releases.

You should upgrade to the latest 3.x and begin the work to upgrade to Netty 4.1.x in any case.