GDM 3.22: Cannot open virtual console 7 (Permission denied)

Issue description
I'm on nixos-unstable and wanted to try gnome 3.22:
gdm-x-session[2762]: (II) intel: Driver for Intel(R) HD Graphics: 2000-6000
gdm-x-session[2762]: (II) intel: Driver for Intel(R) Iris(TM) Graphics: 5100, 6100
gdm-x-session[2762]: (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics: 5200, 6200, P6300
gdm-x-session[2762]: (II) VESA: driver for VESA chipsets: vesa
gdm-x-session[2762]: (II) vmware: driver for VMware SVGA: vmware0405, vmware0710
gdm-x-session[2762]: (II) modesetting: Driver for Modesetting Kernel Drivers: kms
gdm-x-session[2762]: (EE)
gdm-x-session[2762]: Fatal server error:
gdm-x-session[2762]: (EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)
gdm-x-session[2762]: (EE)
gdm-x-session[2762]: (EE)
gdm-x-session[2762]: Please consult the The X.Org Foundation support
gdm-x-session[2762]:          at http://wiki.x.org
gdm-x-session[2762]:  for help.
gdm-x-session[2762]: (EE) Please also check the log file at "/dev/null" for additional information.
gdm-x-session[2762]: (EE)
gdm-x-session[2762]: (WW) xf86CloseConsole: KDSETMODE failed: Bad file descriptor
gdm-x-session[2762]: (WW) xf86CloseConsole: VT_GETMODE failed: Bad file descriptor
gdm-x-session[2762]: (EE) Server terminated with error (1). Closing log file.
gdm-x-session[2762]: Unable to run X server

same for me

I think it's still all the same problem as in the link. The default GDM mode (with wayland) needed some changes to Xserver arguments; that was implemented in a way that broke other display managers and got reverted. AFAIK noone has yet implemented a fix that would override those options for GDM only.

It's a bit unfortunate we're stuck in this in-between state.

I believe this is fixed. (Ping me if not.)


Update cask naming spec and rename fonts to match

Fixes #521.

Thank you.

Edited to use long-format option syntax...


Error during make docker_build: Missing README.md causes OSError

Bug Description
I encountered an error while running the make docker_build command. The error occurred during the execution of uv sync --frozen --no-editable, with the following details:
 => CACHED [builder 13/15] ADD ./pyproject.toml /app/pyproject.toml                                                                                0.0s
 => CACHED [builder 14/15] ADD ./uv.lock /app/uv.lock                                                                                0.0s
 => ERROR [builder 15/15] RUN --mount=type=cache,target=/root/.cache/uv     uv sync --frozen --no-editable                                                                                0.9s
------
 > [builder 15/15] RUN --mount=type=cache,target=/root/.cache/uv     uv sync --frozen --no-editable:
0.904 error: Failed to prepare distributions
0.904   Caused by: Failed to fetch wheel: langflow @ file:///app
0.904   Caused by: Build backend failed to build wheel through build_wheel (exit status: 1)
0.904
0.904 [stderr]
0.904 Traceback (most recent call last):
0.904   File "<string>", line 11, in <module>
0.904   File "/root/.cache/uv/builds-v0/.tmpuJtPpS/lib/python3.12/site-packages/hatchling/build.py", line 58, in build_wheel
0.904     return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
0.904                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0.904   File "/root/.cache/uv/builds-v0/.tmpuJtPpS/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", line 90, in build
0.904     self.metadata.validate_fields()
0.904   File "/root/.cache/uv/builds-v0/.tmpuJtPpS/lib/python3.12/site-packages/hatchling/metadata/core.py", line 266, in validate_fields
0.904     self.core.validate_fields()
0.904   File "/root/.cache/uv/builds-v0/.tmpuJtPpS/lib/python3.12/site-packages/hatchling/metadata/core.py", line 1376, in validate_fields
0.904     getattr(self, attribute)
0.904   File "/root/.cache/uv/builds-v0/.tmpuJtPpS/lib/python3.12/site-packages/hatchling/metadata/core.py", line 531, in readme
0.904     raise OSError(message)
0.904 OSError: Readme file does not exist: README.md
0.904
------
build_and_push.Dockerfile:63
--------------------
  62 |
  63 | >>> RUN --mount=type=cache,target=/root/.cache/uv \
  64 | >>>     uv sync --frozen --no-editable
  65 |
--------------------
ERROR: failed to solve: process "/bin/sh -c uv sync --frozen --no-editable" did not complete successfully: exit code: 2
make: *** [Makefile:352: dockerfile_build] Error 1

Reproduction
Run  make docker_build from root path of langflow project
Expected behavior
I expect the docker_build command to complete successfully and generate the corresponding Docker image.
Who can help?
No response
Operating System
Ubuntu 24.04
Langflow Version
main branch (commit 04fa6351a25047bebeac8a492f06ca84070c2edc)
Python Version
3.12
Screenshot
No response
Flow File
No response

The standard way to run Langflow via Docker can be done as follows:
docker run -p 7860:7860 langflowai/langflow:latest

(to run the latest version)
docker run --rm -p 7860:7860 langflowai/langflow:1.0.17

(to choose which version you want to install.)


[Testerina] No tests for testerina with services in the tests

Description:
We don't seem to have testerina tests with services in the tests folder.
Issue https://github.com/ballerina-platform/ballerina-lang/issues/21840 which fails due to having services should have failed with a simple service in the tests folder.

Fixed with #21961.


Remaining changes to website

Things are looking good. I see the following small open issues before we start to publicize:

accept 1 digit month and day (if possible)

[ ]

use a common footer.html for both index.html and 1980/12/31/index.html (just so we have one place to make changes)

(ps) need to cleanup the dataops/readme to better explain the data methodology

I like the shields, but would be cool for people to be able to get the svg to use on their own site... In the meantime I have put back the original text results, which are easier to read

placement of the 3 sharing buttons can be cleaned up

adding actual URL path to the sharing buttons (currently it shares only the main page)

Also, the view from mobile from the main index.html is not very good.

also there could be the case that the value went down (for example, june 01 2020). maybe we need to encode "higher" or "lower" somehow. it's an edge case
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Tuesday, September 15, 2020 9:21 PM, albert<EMAIL_ADDRESS>wrote:

looking now
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

thats a great point about edge case values.
i'd like to use a common header/footer across all the pages, but i wasn't sure how to define it/where to define it.
would it just be an html stub, like header.html?
sorry, just not familiar with python templating; but this is how I'd do it in PHP.
need to come back to the license year generation @ some point; sorry man, document.write is bad for performance and security. i think it may actually be a non-standard now.
would like to break the text in the input submit form control into two lines...i think thats going to require using input type="button" or just button type="submit". easy enough, but will need JS function to fire off. not sure what tradeoffs are with not using native submit, but I think we are in the clear here.

my bad aboutdocument.write. I'd just hardcode 2020

na, its not your bad. i appreciate the help! or on that level, my bad for not designing mobile-first.
i was much more paying attention to the functionality vs. style @ that point.
no worries man.

almost ready to go!

the sharing buttons don't show up in template.html, I think because I removed the html list elements. (I didn't like the bullet points before the icons.)

Any way to get the svg shields to be shareable?

got a lot of things to push today.
i do think there's a way to share the badges but probably need to circle back to that. it may take me a hot minute.

maybe here. lets come back to this after i do everything else:
https://web.archive.org/web/20200125162931/http://ramblings.mcpher.com:80/Home/excelquirks/gassnips/svgtopng

hashed out each pages url....it seems to be working. you can see the url variable its using in the page's content.
i'll remove that before we go live. just wanted it to be visible/easy to check atm.
this was done with this push: https://github.com/co2birthdate/website/commit/b9d3d855bc56ad15cc57d057ee43a61e98c42dda

cleaned up social sharing links here:
https://github.com/co2birthdate/website/commit/0132099a104122de593dffefcd42bbf4bccc2a98
of note: linkedin badge in ff in os x is different. i think its an entirely different image...haven't dove into it yet.
also, i added background colors to each social share button, to hide the jank as they load; this revealed the text they have hidden (ex, "Tweet", "Share") in white colored font. So I copied that approach, and made the text the same color as the background; this works for what we want, but this is horrible practice and not accessible. Just sharing.

svg to png functionality is implemented here:
https://github.com/co2birthdate/website/commit/71dff9499262aa9a0f9083808881efa351dfdabc
it needs touching up but i also have a few questions here:
it uses blob feature as img src attribute...is that sufficient for sharing? i think so, but i'm not 100%.
wondering if we can't just generate all of these on the server and point to that url?

the only things left are allowing one digit day/month and cleaning dataops/readme.
i've been tinkering with how to do the one digit and i can't grasp it mentally. maybe you can and you can help me.
script is relying on keydown to track what user has entered.
if user has entered more than one digit, it tries to validate it.
if we throw the validation on one digit, how do we differentiate between 1 and 12?
or rather, how will the script know that the user wants to add another digit?
forcing two digit entry made this easier, but perhaps its the wrong approach.
i did some digging around but i can't find much on how to do what you want...not saying it is not possible, just not sure from my view at this moment.

i'd like to touch up the styles across the board, thats the only thing sticking out to me at the moment.

something with the sharing buttons has gone wrong

(the twitter link does not work, as well)

small thing but we should add link to explain ppm
maybe link this site?? https://www.climate.gov/news-features/understanding-climate/climate-change-atmospheric-carbon-dioxide

i just pulled to level up with the repo and the social buttons look fine on my end. you still seeing this?

i think explaining ppm is important. i was thinking maybe we need an about page?

Was thinking just a link to a readme
On Mon, Sep 21, 2020 at 21:13, albert<EMAIL_ADDRESS>wrote:

i think explaining ppm is important. i was thinking maybe we need an about page?
—
You are receiving this because you authored the thread.

We probably want to go in and edit what the message(s) for the shares.

need to credit this noun project icon/designer.
dropping this here so we don't forget:
link
By Matthew Exton
https://thenounproject.com/term/link/1690/


DELETE THIS TEMPLATE BEFORE SUBMITTING

PR Checklist:
[ ] Clearly explain your change with a desriptive commit message
[ ] Setup pre-commit and run the validators (info in README.md)
To validate files run: pre-commit run --all-files

messed up PR.


KrakenEUR prices are incorrect (by 1500+ EUR)

When I run $ python -m arbitrage -d
I wait a few minutes, then it outputs, among other prices:

2020-10-14 19:40:23,848 [VERBOSE] ticker: KrakenEUR - {'ask': {'price': 11367.5375, 'amount': 0.098}, 'bid': {'price': 11364.9525, 'amount': 0.112}}
2020-10-14 19:40:23,849 [VERBOSE] ticker: KrakenUSD - {'ask': {'price': 11355.6, 'amount': 3.942}, 'bid': {'price': 11355.5, 'amount': 0.537}}

The ticker price of KrakenUSD is quite close to the actual value just now, which I can see on trade.kraken.com is about 11350.
The ticker price of KrakenEUR however, is FAR away from what trade.kraken.com is reporting, which is closer to 9669... which seems to me to mean that bitcoin-arbitrage is misreporting the price.

I intend to fix this myself and submit a pull request, but that may take a little while as I have to learn Python first :)

Turns out the fix is real simple - just make it clear that bitcoin-arbitrage converts all prices to USD before displaying them on the CLI.  In fact, it seems it does this before doing pretty much anything at all.
In market.py:
   def ask_update_depth(self):         try:             self.update_depth()             self.convert_to_usd()             self.depth_updated = time.time()


[Bug]: Unable to import MetadataReplacementPostProcessor

Bug Description
while trying to import:
from llama_index.core.indices.postprocessor import MetadataReplacementPostProcessor

I get the following errors:
ImportError: cannot import name 'CohereRerank' from 'llama_index.core.postprocessor'
ImportError: cannot import name 'LongLLMLinguaPostprocessor' from 'llama_index.core.postprocessor'

Version
0.10.7
Steps to Reproduce
add the following import:
from llama_index.core.indices.postprocessor import MetadataReplacementPostProcessor

Relevant Logs/Tracbacks
No response

Thanks @aGallea. Can confirm that I was able to reproduce the bug. I have submitted a PR for the fix.


Can't use example

Describe the bug
Cannot use manage.py in example app.
To Reproduce
Steps to reproduce the behavior:

Clone repo (pip install -e git+https://github.com/django-import-export/django-import-export.git#egg=django-import-export)
cd tests
python manage.py makemigrations
Error:  ModuleNotFoundError: No module named 'django_extensions'

Versions (please complete the following information):

Django Import Export: 2.7.1
Python 3.9
Django 4.0

Expected behavior
Run makemigrations in example app

In your virtual environment, try:
pip install -r requirements/test.txt

Yea that did the trick, thanks!


chore: import repository https://github.com/twotired/python-dummy-project.git

this commit will trigger a pipeline to generate the CI/CD configuration which will create a second commit on this Pull Request before it auto merges

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign
You can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

approve


A serious security bug in the ESP NOW protocol (IDFGH-687)

When receiving data sent via ESP NOW, there is no information whether it was sent to a specific recipient or via multicast on MAC FFFFFFFFFFFF. There is also no information about whether they were encrypted. This allows multicast commands to be sent by the recipient. Checking the MAC of the sender in the list of known peers is not enough, because you can easily change the MAC address.
Very useful would be information in the receive callback about the fact that the packet came with multicast and additional or was encrypted.

@MacWyznawca Yes, I think the multicast information is important. But why do you need to know whether the packet is encrypted or not?

Thanks @TimXia!
It was more about interchangeably with the information about the multicast. If the information is not encrypted and the sender is on the peer list, it means that it is a mutlicast message. But better is know multicast recieve it is.
Now I have to set up a special key during pairing, known as the encryption key only to paired devices. Whit this additional key, I can distinguish whether the sender is known or multicast.

@MacWyznawca Thanks for reporting the issue. Would you please help share if any updates for the issue? Has your issue been fixed? Thanks.

@Alvin1Zhang Now any changes in ESP-NOW API. I use my own workaround. I add „magic-secret” key to any paired transmision as addition to standard ESP encryption.

@MacWyznawca Thanks for reporting, feel free to reopen if you still have the issue. Thanks.


generate helm chart

generate chart (example: https://github.com/open-policy-agent/gatekeeper/tree/master/cmd/build/helmify)
add helm lint

it should look something like: https://github.com/Azure/azure-workload-identity/tree/main/third_party/open-policy-agent/gatekeeper/helmify

/assign @anmalkov


Продумывание кейсов по модулю поиска аномалий в данных

Для табличный данных скорее всего будет реализован простой алгоритм детекции аномалий.
Для временных рядов скорее всего придётся дорабатывать существенно алгоритм обучения ДБС, также можно рассмотреть задачу поиска аномалий на основе изменений в структуре ДБС.
Можно рассматривать БС как вспомогательный инструмент для поиска аномалий.

Intro
The foundation for solution supposed to be integrated are based on article (Sha Lu, et all. Effective Outlier Detection based on Bayesian Network and Proximity), namely ODBP .
In this algorithm bn must be linear in order to estimate mean of mutivariate random variable (MRV) as linear combination of parents' values.
Algorithm
If we want to use for oulier detection not only density estimation but also a proximity estimation we need a way to combine them. In this work authors suggested just sum up all outlier factors from detectors. Greater the factor greater the chance that given sample is outlier.
Foundation
Density estimators stores information about how dense points in space are. In this terms, outlier is a point that has too deviant values from expectation of MRV. Note that if values are on boundary of point cloud, it is hard to detect such a point. Authors solve this issue by adjusting proximity metric.
Essence
Model estimation
Theirs:
Given data D and corresponding bn. For every node that has any parents, estimate its mean as linear combination depending on parents values. It is supposed here that for sample of fixed child variable, mean must converge ;into its true value whereas variance converges into zero. Any step away is treated as anomaly either in child variable or in parents variables (or both). Final outlier factor is just Z-score for given child node. Therefore, another limitation comes into game: we must guarantee a normal distribution for out estimations. Despite no proof was provided, this statement probably holds by virtue of linearity of BN.
Ours:
Since we have mixed data, we have no guaratee of linearity at all. Moreover, we cannot apply Z-score when use mean estimation in general, because for conditional node for every combination of parents we store a different model (not only Gaussian, it can be any), but we still can estimate mean and thus can find deviation from it with some errors (such MAE or MSE).
Discrete RV are coded and categories are used as new RV.
Here what is done:
node = self.estimator.bn[node_name]
diff = []
dist = self.estimator.bn.distributions[node_name]
parents = node.cont_parents + node.disc_parents

for _, row in X.iterrows():
    pvalues = row[parents].to_dict()

    pvals_bamt_style = [pvalues[parent] for parent in parents]
    cond_dist = self.estimator.bn.get_dist(node_name, pvals=pvalues)
    # not good written, subject to change after bamt 2 release.
    if isinstance(cond_dist, tuple):
        # if returns mean and variances
        cond_mean = cond_dist[0]
    else:
        # otherwise
        dispvals = []
        for pval in pvals_bamt_style:
            if isinstance(pval, str):
                dispvals.append(pval)

        if "vals" in dist.keys():
            classes = dist["vals"]
        elif "classes" in dist.keys():
            classes = dist["classes"]
        elif "hybcprob" in dist.keys():
            if "classes" in dist["hybcprob"][str(dispvals)]:
                classes = dist["hybcprob"][str(dispvals)]["classes"]
            else:
                raise Exception()
        else:
            raise Exception()
        # get list of classes for random variable to calculate weighted sum (expectation)
        classes_coded = np.asarray([self.encoding[node_name][class_name] for class_name in classes])
        cond_mean = classes_coded @ np.asarray(cond_dist).T
    if isinstance(row[node_name], str):
        # MAE
        diff.append(abs(cond_mean - self.encoding[node_name][row[node_name]]))
    else:
        # MAE
        diff.append(abs(cond_mean - row[node_name]))

    # Subject to vary, explaination in text
    scaler = StandardScaler()
    diff_scaled = scaler.fit_transform(np.asarray(diff).reshape(-1, 1))
    return diff_scaled

Proximity estimation
Theirs:
The idea is simple, just choose randomly t columns from initial dataset, then find Local Outlier Factor (LOF) for given subsample.
LOF has values less then 1 if local density (density of neighbors) is high (so point is not anomalous), 1 if it is the same and greater than 1 if local density is low (outliners).
Again here it is assumed that obtained values will be distributed normally and Z-score is possible to apply.
Problem here arises when columns are discrete, LOF cannot be calculated here. This operation is a body of loop, single loop is called "detector" by the authors. Its number is hyperparameter.
PS: Simple explaination on LOF here.
Ours:
For now we just drop discrete columns if they apears in random subsample.
On outlier score
After obtainig both local scores we need to merge them into one. Authors' suggestion is just sum up all non zero $score_{ij}$ (i - number of sample, j - number of detector).
On shapes
All local scores has shape (n, d), where n - number of sample, d - number of detectors / number of child nodes. There are two summation: first -- over d-axis, next -- over proximity scores (n,) and model scores (n,). Final score has shape (n,).
First experiments will be posted as single posts with corresponding discussion.

Experiments with synth data
ODBP algorithm was firstly tested on synth data in order to obtain a brief picture of its actual ability to distinguish outliers. As it is stated in the article we need two two types of outliers, namely density-based and model based.
But since we have nonlinear data we need to change model scorer, so we have to use pointwise expectation estimation.
Therefore, we have used scalers here carefully.
Note that during computation we removed proximity factors less than 0, since they coresponds to inliners. Also we scaled on variance from data (i.e. condtional).
Design
Four features was created in general. 3 of them are indepndent and 1 is some random linear combination of 2 inpedndent features ($f=a * x1 + b * x2 + a * b$, where x1, x2 - features from data, a,b - some random constants). To test nonlinear ones we used $f = a * x1^2 + b * x2 + a * b$.
df = pd.DataFrame({"feature1": np.random.normal(scale=VAR_F1, size=1000, loc=MEAN_F1),
                   "feature2": np.random.normal(scale=VAR_F2, size=1000, loc=MEAN_F2),
                   "feature4": np.random.normal(scale=A, size=1000, loc=B),
                   })

df["feature3"] = f(df["feature1"], df["feature2"], A, B)

Anomaly injections
Out-of-density
We injected normal noise in 5% of data.
Out of dependence
We have learned linear regression from feature1 to feature2, took some random points from feature1, gave them a random noise, and predicted feature2, the result is points shifted across regression line.
Thresholding
To obtain labels we varied threshold from 1 up to max(ourliers_scores). Divide this range into 100 points and evaluate score on each .
Exp.1.1 (ONLY out-of-density anomalies and linear case)
MEAN_F1, VAR_F1 = 4.5, 10
MEAN_F2, VAR_F2 = 3.5, 5
A, B = 5, 10

PROX_SHIFTS = {"loc": 200, "scale": 40}
ANOMALY_PROBA = 0.05

Number of evaluations = 100

Scoring function for bn
F1 score

K2 *
0.827 ± 0.083

MI
0.461 ± 0.161

BIC
0.390 ± 0.059

* K2 with pp.KBinsDiscretizer(n_bins=5, encode='ordinal', strategy='uniform')
Exp.1.2 (ONLY out-of-density anomalies, hard case, linear data)
MEAN_F1, VAR_F1 = 4.5, 10
MEAN_F2, VAR_F2 = 3.5, 5
A, B = 5, 10

PROX_SHIFTS = {"loc": 150, "scale": 100} # <- change here to make it difficult to distinguish
ANOMALY_PROBA = 0.05

Number of evaluations = 100

Scoring function for bn
F1 score

K2 *
0.661 ± 0.081

MI
0.38 ± 0.115

BIC
0.343 ± 0.056

* K2 with pp.KBinsDiscretizer(n_bins=5, encode='ordinal', strategy='uniform')
Additional
np.random.seed(20)
Sample pairplot with anomalies (PROX_SHIFTS = {"loc": 100, "scale": 40})

Result here is 0.762 of F1 Score.

Sample pairplot with anomalies (PROX_SHIFTS = {"loc": 150, "scale": 100})

Result here is 0.651 of F1 Score.
Conclusion
On linear case this method is very sensitive to distribution of anomalies. The higher anomaliles vary, the lower f1 score model has.
Spoiler: on nonlinear it seems the result would be the same.

Exp.1.3 (Nonlinear data)
MEAN_F1, VAR_F1 = 4.5, 10
MEAN_F2, VAR_F2 = 3.5, 5
A, B = 5, 10

PROX_SHIFTS = {"loc": 4000, "scale": 100} # <- loc was increased because nonlinear function has wider range
ANOMALY_PROBA = 0.05

Scoring function for bn
F1 score

K2 *
0.264 ± 0.052

MI
0.153 ± 0.050

BIC
0.186 ± 0.042

More detailed analysis shows that with givenndata generators bn's structure has only 1 edge  in most cases ( feature1 -> feature3). Our first suggestion here was a manual setting of structure. So:
detector.estimator.bn.add_nodes(info)
detector.estimator.bn.set_structure(edges=[["feature1", 'feature3'], ["feature2", "feature3"]])
detector.estimator.bn.fit_parameters(df)

And here we obtained 0.903 ± 0.032 f1 score (in 100 evaluations)! It turns out that in nonlinear case the impact of structure learning becomes so huge and we must be sure that trained structure coresponds to data enough to detect outliers.
Additionally, we made the task harder:
MEAN_F1, VAR_F1 = 4.5, 10
MEAN_F2, VAR_F2 = 3.5, 5
A, B = 5, 10

PROX_SHIFTS = {"loc": 2000, "scale": 100}
ANOMALY_PROBA = 0.05

result: 0.598 ± 0.024
Plots
Sample with huge shifts

Sample with small shifts

Conclusion
It seems that despite of huge shifts, the ODBP method tends to predict false positives results if data points overlap.

Experiments with real dataset (Data with only continuous features)
Datasets:

Cardiotocogrpahy dataset (labeled)
Ecoli dataset (Among the 8 classes omL, imL, and imS are the minority classes and used as outliers)
Wisconsin-Breast Cancer (Diagnostics) dataset (There are two classes, benign and malignant. The malignant class of this dataset is downsampled to 21 points, which are considered as outliers, while points in the benign class are considered inliers)

Design

StratifiedShuffleSplit and StratifiedKFold were used to conduct cross-validation.
Only K2 was used.
Bn with mixutres were evaluated. During model step diff isX - cond_mean(no scaler applied).
Thresholded with brute force.
Number of proximity detectors is 45.

High scores are not stable.

Ecoli

High scores with small stds. Algorithm performs well on this data.

WBC

Stds are still wide, but less then on Cardio. Mean values are mostly around 0.7.

It seems that for most cases cv around 15-20 is correlated with high f1 score (perhaps suitable only for this datasets pull).

Experiment with constant structure
The structure was learned without mixtures.
Additionally permutation test was performed with n_permutation=1000 (so the best p-value is around 0.001).
From sklearn:

permutation_test_score generates a null distribution by calculating the accuracy of the classifier on 1000 different permutations of the dataset, where features remain the same but labels undergo different permutations. This is the distribution for the null hypothesis which states there is no dependency between the features and labels. An empirical p-value is then calculated as the percentage of permutations for which the score obtained is greater that the score obtained using the original data.

Cardio

cv  (StratifiedSuffleSplit)
f1_score

5
0.640 ± 0.089

10
0.588 ± 0.093

15
0.599 ± 0.072

20
0.592 ± 0.072

cv  (StratifiedKFold)
f1_score

5
0.471 ± 0.032

10
0.602 ± 0.091

15
0.66 ± 0.078

20
0.68 ± 0.104

cv  (StratifiedSuffleSplit)
p_value
original_score
perm_score

5
0.001
0.638
0.21 ± 0.015

10
0.001
0.595
0.206 ± 0.012

cv  (StratifiedKFold)
p_value
original_score
perm_score

5
0.001
0.470
0.189 ± 0.008

10
0.001
0.592
0.204 ± 0.011

Ecoli

cv  (StratifiedSuffleSplit)
f1_score

5
0.824 ± 0.353

10
0.912 ± 0.262

15
0.804 ± 0.347

20
0.828 ± 0.319

cv  (StratifiedKFold)
f1_score

5
0.867 ± 0.163

10
0.722 ± 0.427

15
0.418 ± 0.438

20
0.22 ± 0.316

cv  (StratifiedSuffleSplit)
p_value
original_score
perm_score

5
0.001
0.762
0.166 ± 0.103

10
0.001
0.882
0.180 ± 0.080

cv  (StratifiedKFold)
p_value
original_score
perm_score

5
0.001
0.867
0.148 ± 0.064

10
0.001
0.684
0.161 ± 0.058

Conclusion

Permutation test gives almost the best result, thus algorithm training process is not random.
Setting constant structure is able to slightly decrease stds on cardio datasets but it has low impact on ecoli dataset.

Summary of first stage
Continuous data
Setting

Prox_step = 10
Stratified Shuffle Split with cv=10.
Scoring function for structure learning is K2.
Structure learned once, parameters learned on each fold.
Brute force for threshold determination.
For ModelBasedScore a target variable included in structure.
For ODBP Score scaling for model scorer applied.
WBC truncated at 20 columns (total is 30).

Comparison

Algorithm
Dataset

Ecoli
Cardio
WBC

BN Based
 NaN (y is isolated node)
0.063 ± 0.052
0.533 ± 0.267

Local Outlier Factor
0.575 ± 0.374
0.579 ± 0.069
0.659 ± 0.207

ODBP Score + LOF (Vanilla)
0.721 ± 0.377
0.564 ± 0.049
0.635 ± 0.179

ODBP Score + IF
0.647 ± 0.322
0.558 ± 0.075
0.438 ± 0.156

Comparison
Cv=15

Algorithm
Dataset

Ecoli
Cardio
WBC

BN Based
NaN (y is isolated node)
0.084 ± 0.056
0.578 ± 0.227

Local Outlier Factor
0.801 ± 0.354
0.601 ± 0.058
0.601 ± 0.178

ODBP Score + LOF (Vanilla)
0.783 ± 0.308
0.587 ± 0.063
0.624 ± 0.219

ODBP Score + IF
0.538 ± 0.337
0.557 ± 0.062
0.574 ± 0.108

Isolation Forest
0.533 ± 0.499
0.105 ± 0.000
0.356 ± 0.333

Methods
Conditional probabilities
A simple method is pretty straightforward. Let's take (1 - probability) for that value from conditioned distribution and treat it as anomaly score.
Discrete case
Get conditional dist -> take 1 - proba.
Continuous case
Get cond dist -> get its cdf -> take cdf(row[value])
Evaluations results (conditional datasets)
# LOF no normalization
{'df_getter_args': get_wbc, 'score': ODBPScore}
(0.58185, 0.20939)
{'df_getter_args': get_cardio>, 'score': ODBPScore}
(0.48436, 0.08145)
{'df_getter_args': get_ecoli, 'score': ODBPScore'>}
(0.85556, 0.2183)
# MinMax(0, 1) LOF normalization
{'df_getter_args': get_wbc, 'score': ODBPScore'>}
(0.56329, 0.21309)
{'df_getter_args': get_cardio, 'score': ODBPScore'>}
(0.39933, 0.08796)
{'df_getter_args': get_ecoli, 'score': ODBPScore'>}
(0.75683, 0.24868)
Conclusion: it seems LOF itself has greater and better impact on final score.

IQR and Proba ratio experiments
Cont data
Use IQR, the score is computed as:
        closest_value = min([upper, lower], key=lambda x: abs(x - y))
        # if inside iqr
        if lower < y < upper:
            return -abs(closest_value - y)
        else:
            return abs(closest_value - y)

Results
{'df_getter_args': get_wbc, 'score': <class 'applybn.anomaly_detection.scores.mixed.ODBPScore'>}
(0.64456, 0.16826)
{'df_getter_args': get_cardio, 'score': <class 'applybn.anomaly_detection.scores.mixed.ODBPScore'>}
(0.57601, 0.0815)
{'df_getter_args': get_ecoli, 'score': <class 'applybn.anomaly_detection.scores.mixed.ODBPScore'>}
(0.92222, 0.15947)
Mixed data
{'df_getter_args': get_wbc, 'score': <class 'applybn.anomaly_detection.scores.mixed.ODBPScore'>}
(0.24681, 0.05529)
{'df_getter_args': get_cardio , 'score': <class 'applybn.anomaly_detection.scores.mixed.ODBPScore'>}
(0.13581, 0.02268)
{'df_getter_args': get_ecoli, 'score': <class 'applybn.anomaly_detection.scores.mixed.ODBPScore'>}
(0.34778, 0.0019)

Methodology update
Model score computations
In order to extend proposed method we suggest the following algorithm:

To process discrete columns we've implemented estimation by rows, if discrete node from row's values is taken, then its score is computed as:
$$S_{disc} = min(1, P_{marginal} / P_{cond})$$
By doing so we achieve:
a) The scores' range is between 0 and 1.
b) We can estimate not only values with lower conditional probability, but rather values that nonfitted to known model (because rare values can have lower conditional probability, this should not be treated as anomaly)
c) The greater, the more abnormal.
To process cont columns we've implemented estimation by rows as well, if any cont node from row's values is taken,
we utilize the conditional distribution, take its IQR (with range as hyperparameter meaning sensitivity) and max distance as max value (it is reference point to make score relative), then its score is computed as:

if lower < y <= upper:
    return 0

closest_value = min([upper, lower], key=lambda x: abs(x - y))

current_distance = abs(closest_value - y)

if closest_value == upper:
    ref_distance = max_distance
elif closest_value == lower:
    ref_distance = min_distance
else:
    raise Exception
result = min(1, current_distance / abs(ref_distance))
return result

And again, the greater, the more abnormal.
Scores normalization
In order to make outliers more distinguishable we applied Power Transform while it preserves outliers.
Experiments on mixed data with drop of discrete columns
Only model score
Bank dataset: F1 score: (0.34805, 0.03774) (w/o PowerTransform it was around 0.02 f1 score in mean)
For some reason we still have a lot of false positive results, which decreases performance.


ScaffoldBackgroundColor incorrectly parsed from color scheme

I created a light and dark ThemeData objects using the Material Theme Builder and exported it to dart code.  However, the backgroundColor of Scaffolds is not the same as the color listed as background in the exported code's ColorScheme.
Steps to Reproduce

Run the DartPad linked in "Code sample"

Expected results:
The background of Scaffolds is the same as the background color listed in the ColorScheme at the end of the Pad.
Actual results:
The color is much lighter. This is not preferred as a) it looks less nice, and b) it does not align with the Material 3 specifications.

Left: background color specified in ColorScheme. Right: actual background color in Scaffolds.
Code sample
This DartPad shows an App using a theme created by the Material Theme Builder. The app shows a Scaffold and a square that is the color of the ColorScheme's background property. Clearly, the color is not the same as the scaffold color.

Hello @WesselvanDam. While I can reproduce this issue in stable, it seems fixed in beta and master. You can check by switching the channel in DartPad (there's a dropdown at the bottom of the page) to beta and re-running the sample. Closing this issue as it's fixed. Thank you


Update keyboard-and-mouse-hid-client-drivers.md

Add more links.

@DJm00n thank you for this PR - definitely improves the documentation. Apologies for the delay, and thank you for your PRs and Issues - always great additions to the docs.
@tedhudek this is ready to merge.


pull request for e2e test at 01/24/2017 02:26:13

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


Server kill issue

After running server kill it also kills pegasus shell aswell

If you experience this issue rerun the shell using sudo ./pegasus


Support for environment variables substitution in scripts

Currently Rye doesn't support environment variables in scripts:
[tool.rye.scripts]
test_env = "echo $HOME"

What I expect:
$ rye run test_env
/home/username

But what I got instead is:
$ rye run test_env
$HOME

I think this would be a good addition to the current capabilities of scripting.

Duplicate of https://github.com/astral-sh/rye/issues/695


Require authentication for partial restore

This PR adds a check for the NetHSM restore command, to determine if the authentication is required based on the state. Also raises the version for nethsm-sdk-py.
Depends on Nitrokey/nethsm-sdk-py#124
Changes

Adds a check for the state of NetHSM, to decided if authentication is required (partial restore) or not (unprovisioned restore).
Bump version of nethsm-sdk-py to 1.2.1.

Checklist
Make sure to run make check and make fix before creating a PR, otherwise the CI will fail.

[x] tested with Python3.9
[x] signed commits
[ ] updated documentation (e.g. parameter description, inline doc, docs.nitrokey)
[ ] added labels

Test Environment and Execution

OS:
device's model:
device's firmware version:

Relevant Output Example

Fixes #

This includes now latest nethsm-sdk-py and can be reviewed.

Looks good. Should I still perform some tests or can we directly merge and release?

I tested it with the latest container, but feel free to test if you want.


[Request] Option for timer based antispam.

Some addons like Neurotec have entities with multiple parts welded together. Typical ghost antispam causes problems such half a ship being frozen:
http://puu.sh/ojQfK/78d8f66bea.jpg
My request is perhaps make an option available to limit spawning and tool use to a second based ratio instead of ghosting.
An example of a prop protection addonthat uses this is:
http://steamcommunity.com/sharedfiles/filedetails/?id=183047564.
So for example, with this I could set that someone could only spawn props and/or use tools every 2 seconds.

I'm hard to read, because i am russian. You mean that there should be Tool antispam thing? And "Antispam only for props" option?

That is very close, however
What I am looking for is a wait timer after spawning items and using tools. This option would be able to be changed by the user. This would prevent a player from spawning another prop or using a tool until a set amount of seconds has passed.

For items it is impossible, because wait timer for Props and other stuff is just same as when antispam removing entities


[HIPIFY][perl][MIOpen][feature] Add--miopen option for hipify-perl

Problem Description
Currently hipify-clang supports going directly to MIOpen via the argument --miopen.
hipify-perl on the other hand, seems to not support this same option.
This request is to have the same option added to hipify-perl.
Operating System
Ubuntu 20.04.6 LTS (Focal Fossa) or Ubuntu 22.04.4 LTS (Jammy Jellyfish)
CPU
Any
ROCm Version
ROCm 6.0.0
ROCm Component
HIPIFY
Steps to Reproduce
No response
(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support
No response
Additional Information
No response

Implemented by #1779


Using as WF10 extension

Hello, I am just wondering, would it be possible to setup this extension to work with WildFly 10? For example, when trying to build it with <version.org.wildfly>10.1.0.Final</version.org.wildfly>
it gives error like this:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for WildFly: MicroProfile Health 1.0.1-SNAPSHOT:
[INFO]
[INFO] WildFly: MicroProfile Health ....................... SUCCESS [  1.420 s]
[INFO] WildFly: MicroProfile Health Extension ............. SUCCESS [  5.788 s]
[INFO] WildFly: MicroProfile Health Feature pack .......... SUCCESS [  1.019 s]
[INFO] WildFly: MicroProfile Health Distribution .......... FAILURE [ 38.060 s]
[INFO] WildFly: MicroProfile Health TCK ................... SKIPPED
[INFO] WildFly: Examples for MicroProfile Health .......... SKIPPED
[INFO] WildFly: Example for MicroProfile Health (Simple) .. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  47.108 s
[INFO] Finished at: 2020-10-23T14:10:22+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.1.8.Final:build (server-provisioning) on project wildfly-microprofile-health-dist: Execution server-provisioning of goal org.wildfly.build:wildfly-server-provisioning-maven-plugin:1.1.8.Final:build failed: java.lang.RuntimeException: java.lang.IllegalStateException: Could not resolve '[subsystem=core-management.xml, supplement=null] Check the module for the extension has been defined. -> [Help 1]

@jmesnil you have no clue about this one?


youku download error

Checklist

[ ] I'm reporting a broken site support issue
[ ] I've verified that I'm running youtube-dl version 2019.08.02
[ ] I've checked that all provided URLs are alive and playable in a browser
[ ] I've checked that all URLs and arguments with special characters are properly quoted or escaped
[ ] I've searched the bugtracker for similar bug reports including closed ones
[ ] I've read bugs section in FAQ

Verbose log

PASTE VERBOSE LOG HERE

Description

d:\book>pip install -U youtube-dl
Collecting youtube-dl
Downloading https://files.pythonhosted.org/packages/81/22/003c233640929d4ced90a0ff5565e36b013844e7bfeea1eec3eba91d93e2/youtube_dl-2019.8.2-py2.py3-none-any.whl (1.8MB)
|████████████████████████████████| 1.8MB 74kB/s
Installing collected packages: youtube-dl
Found existing installation: youtube-dl 2019.7.16
Uninstalling youtube-dl-2019.7.16:
Successfully uninstalled youtube-dl-2019.7.16
Successfully installed youtube-dl-2019.8.2
d:\book>youtube-dl https://v.youku.com/v_show/id_XNDI2OTMyNTUzNg==.html
[youku] XNDI2OTMyNTUzNg: Retrieving cna info
[youku] XNDI2OTMyNTUzNg: Downloading JSON metadata
ERROR: Youku server reported error -6005: 用户账户异常、请重新登录; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
d:\book>youtube-dl https://v.youku.com/v_show/id_XNDI2OTMyNTUzNg==.html --cookies D:\文档\youku_cookie.txt
[youku] XNDI2OTMyNTUzNg: Retrieving cna info
[youku] XNDI2OTMyNTUzNg: Downloading JSON metadata
ERROR: Youku server reported error -6005: 用户账户异常、请重新登录; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

解决了吗

I'm getting this on v2020.01.01 too. If y'all don't speak Chinese, the 6005 error message translates to: "Abnormal user account. Please sign in again." Here's my log:
youtube-dl --verbose  https://v.youku.com/v_show/id_XNDQ4Njc5MTcwNA==.html?s=efbfbdefbfbd5c43125e&scm=20140719.rcmd.7182.show_efbfbdefbfbd5c43125e
[1] 4169
(venv) neil@kali:~/Desktop/untitled/app$ [debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', 'https://v.youku.com/v_show/id_XNDQ4Njc5MTcwNA==.html?s=efbfbdefbfbd5c43125e']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2020.01.01
[debug] Python version 3.7.4+ (CPython) - Linux-4.19.0-kali5-amd64-x86_64-with-Kali-kali-rolling-kali-rolling
[debug] exe versions: none
[debug] Proxy map: {}
[youku] XNDQ4Njc5MTcwNA: Retrieving cna info
[youku] XNDQ4Njc5MTcwNA: Downloading JSON metadata
ERROR: Youku server reported error -6005: 用户账户异常、请重新登录; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
  File "/neil/Desktop/untitled/venv/lib/python3.7/site-packages/youtube_dl/YoutubeDL.py", line 796, in extract_info
    ie_result = ie.extract(url)
  File "/neil/Desktop/untitled/venv/lib/python3.7/site-packages/youtube_dl/extractor/common.py", line 530, in extract
    ie_result = self._real_extract(url)
  File "/neil/Desktop/untitled/venv/lib/python3.7/site-packages/youtube_dl/extractor/youku.py", line 189, in _real_extract
    raise ExtractorError(msg)
youtube_dl.utils.ExtractorError: Youku server reported error -6005: 用户账户异常、请重新登录; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

youtube-dl --version
2020.01.01
[1]+  Exit 1                  youtube-dl --verbose https://v.youku.com/v_show/id_XNDQ4Njc5MTcwNA==.html?s=efbfbdefbfbd5c43125e

The problem still exists in version 2020.05.29. I tried you-get instead and it works.


Draft - DjangoConnector

TODO
Closes #502

Successful PR Checklist:

[ ] Tests

[ ] (not applicable?)

[ ] Documentation

[ ] (not applicable?)

I think we need to decide of an approach:

either we try to make the Django Connector as close as possible to the Psycopg2 connector, and undo all the things Django does and I think we're going to fight against django all the way through
Or we try to "embrace" the Django way: use the ORM and Model.objects.raw() (and do #320 at the same time). Cons: there might be more work, and I have no idea whether this will work. Pro: less likely to completely break with each new Django version.

What's your opinion here ?

Another option is to use django cursors to execute custom sql directly (like in this PR at the moment). Pro: no additional work to create models.
I think the best to use Django features as much as possible - so 2nd and 3rd approach

I don't see the difference between your 3rd approach and my 1st ?

Maybe I don't fully understand what you meant in 1st approach. Psycopg2 can't be used by workers. Aiopg can be used with workers, but it is not using django connection, so task deferring won't be possible inside transaction. So in 3rd approach I meant DjangoConnector would works like mix of Psycopg2 and Aiopg. Also Django connection/cursor objects would be used everywhere instead of postgres equivalents extracted from Django connection (excluding listen-notify case).

Ah ok, I understand your point. I had forgotten that the Psycopg2Connector was incompatible with workers.
But then it seems it would be easier to make the Psycopg2Connector compatible with workers, and then we'd be almost all good to have it work with Django ?

I think it still wouldn't work, because Psycopg2Connector creates separate connections and django.db.connection must be used to make transactions work correctly.

Hey all 👋 I'm curious as to the current state of Procrastinate's support for Django integration. I've found this in the documentation, https://procrastinate.readthedocs.io/en/stable/howto/django.html, and I'm wondering how much functionality there is in this Draft PR that would be beneficial.

Hey :)
I feel a bit ashamed that I let this PR rot :/ I felt that I needed to discuss it with other maintainers and it never really happenned :(
My issue is that the "connector" situation is already a bit of a mess especially regarding sync vs async, and I'm afraid that making the wrong choice in integrating a django connector might make it even harder when we'll address the whole subject for real.
I'm not saying this PR makes the wrong choice but I'm actually a bit lost regarding what the correct path would be :/

Hey @ewjoachim, I totally understand! After looking around, I really enjoy the API provided by Procrastinate, especially compared to a lot of the other task/queue frameworks out there.
It would be great to have a tighter Django integration, but I'm going to proceed with the project as-is and see how it turns out ¯_(ツ)_/¯
With that said, I certainly agree with your earlier sentiments (https://github.com/procrastinate-org/procrastinate/pull/506#issuecomment-998698519) on "embrace the Django way". I'll be honest, I don't have a lot of experience with the low-level Django ORM "magic" nor do I have any experience with Procrastinate. But I'd still love to see this deeper integration happen, and I might be able to help out in smaller ways if you need any help on getting this through 😊 Docs, tests, etc.

My issue is that the "connector" situation is already a bit of a mess especially regarding sync vs async, and I'm afraid that making the wrong choice in integrating a django connector might make it even harder when we'll address the whole subject for real.

Is this perhaps why we have a hard time using a sync app (with our django-allauth backend, synchronous Python context) along with our otherwise async ASGI FastApi application? When I try to use @sync_app.task decorator on our Django code/functions, I tend to see errors like this:
@async_app.task(**request_status_io_task_args)
async def add_subscriber(email: str) -> None:
    """Add user as a subscriber to status.io maintenance notifications"""

# Django model code
@receiver(user_signed_up)
def enroll_status_io(request, user: User, **kwargs) -> None:
    add_subscriber.defer(email=user.email)

[cloud-app]   File "/usr/local/lib/python3.10/site-packages/allauth/account/utils.py", line 183, in complete_signup
[cloud-app]     signals.user_signed_up.send(
[cloud-app]   File "/usr/local/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 180, in send
[cloud-app]     return [
[cloud-app]   File "/usr/local/lib/python3.10/site-packages/django/dispatch/dispatcher.py", line 181, in <listcomp>
[cloud-app]     (receiver, receiver(signal=self, sender=sender, **named))
[cloud-app]   File "/cloud-app/iam/models.py", line 256, in enroll_status_io
[cloud-app]     add_subscriber.defer(email=user.email)
[cloud-app]   File "/usr/local/lib/python3.10/site-packages/procrastinate/tasks.py", line 129, in defer
[cloud-app]     return self.configure().defer(**task_kwargs)
[cloud-app]   File "/cloud-app/tests/conftest.py", line 728, in defer_from_jobdeferrer
[cloud-app]     job_id = original_defer_from_jobdeferrer(self, **task_kwargs)
[cloud-app]   File "/usr/local/lib/python3.10/site-packages/procrastinate/jobs.py", line 163, in defer
[cloud-app]     job = self.job_manager.defer_job(job=job)
[cloud-app]   File "/usr/local/lib/python3.10/site-packages/procrastinate/manager.py", line 52, in defer_job
[cloud-app]     result = self.connector.execute_query_one(
[cloud-app]   File "/usr/local/lib/python3.10/site-packages/procrastinate/utils.py", line 148, in wrapper
[cloud-app]     return sync_await(awaitable=awaitable)
[cloud-app]   File "/usr/local/lib/python3.10/site-packages/procrastinate/utils.py", line 195, in sync_await
[cloud-app]     loop = asyncio.get_event_loop()
[cloud-app]   File "/usr/local/lib/python3.10/asyncio/events.py", line 656, in get_event_loop
[cloud-app]     raise RuntimeError('There is no current event loop in thread %r.'
[cloud-app] RuntimeError: There is no current event loop in thread 'WSGI_0'.

Our workaround historically has been to make an ad-hoc, one-time-use sync app as follows:
@receiver(user_signed_up)
def enroll_status_io(request, user: User, **kwargs) -> None:
    defer_with_sync_app(add_subscriber, **request_status_io_task_args)(email=user.email)

def defer_with_sync_app(task_func, **task_kwargs) -> Callable:
    def wrapper(**kwargs):
        app = make_sync_app()
        task = app.task(**task_kwargs)(task_func)
        with app.open():
            task_id = task.defer(**kwargs)
            return task_id

    return wrapper

Yes, that's probably the reason :/

I'd say a potentially good case study candidate would be asgiref's sync_to_async and async_to_sync. It's possible that we might be able to use and/or vendor those and get something that works nicely enough for both.

Be cautious. You'll start to run into weird stuff with contextvars (they don't really work well to/from threads) and semaphores on threads (for example FastAPI can only run 40 sync dependencies/endpoints concurrently because of an implicit semaphore buried deep in the stack).

Just rubber ducking here.
What would you do if you were starting all over? Only support one? Support both but in completely separate codebases?

I guess we would need to make as much as possible of the procrastinate code independant from I/Os (fortunately, this is already what happens in many parts of the codebase, but not on the workers, though) and have high level functions that only take care of I/Os, and delegate all the "business logic" to our "functional" core.
It's probably not as easy as it sounds, because it's not just a question of using dependency injection to be loosely coupled from whoever does the I/Os, as we need to avoid having to choose whether we call x() or await x() in our function.
So... Maybe implement each "logical" entrypoint as a generator that would be sending "I/O requests" and receiving "I/O responses" and... I'm re-inventing async I/O all over again, aren't I? 😅

FTR I have the same threading problem when trying to use either our async app or a sync one.

For cases where you know the async thing is not using tasks internally (maybe because you wrote it) you can do something like this: https://github.com/edgedb/edgedb-python/blob/master/edgedb/blocking_client.py#L343-L353

Worker heavily uses tasks, sadly... but we'll need a full rewrite anyway...

Superseeded by #906 .
Thank you to everyone who contributed though!


"Edit" functionality does not appear on a resource owned by the user

This is probably due to a change in the user service/ auth service. There is likley a check somewhere checking the owner of the resource against the signed in user's id rather than the signed in user's username.

fixed in #274


LUA error and can't pick up macro icon

2x [ADDON_ACTION_BLOCKED] AddOn 'GSE_GUI' tried to call the protected function 'PickupMacro()'.
!BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
[C]: in function `PickupMacro'
GSE_GUI\Viewer.lua:169: in function <GSE_GUI\Viewer.lua:168>
Locals:
InCombatSkipped
Unable to drag the macro icon to bar and i am not in combat.

Hi Spoony
I really need more information on how to replicate this as I cannot find a way to do that currently.  The only way I have found is if I’m in combat.
TimothyLuke

On 4 Mar 2018, at 9:45 pm, Spoony36<EMAIL_ADDRESS>wrote:
2x [ADDON_ACTION_BLOCKED] AddOn 'GSE_GUI' tried to call the protected function 'PickupMacro()'.
!BugGrabber\BugGrabber.lua:573: in function <!BugGrabber\BugGrabber.lua:573>
[C]: in function `PickupMacro'
GSE_GUI\Viewer.lua:169: in function <GSE_GUI\Viewer.lua:168>
Locals:
InCombatSkipped
Unable to drag the macro icon to bar and i am not in combat.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Think it was a dodgy macro as it seems to have fixed itself now because i haven't been able to replicate it again now.
On a separate note incase you haven't seen it as potentially it may be an issue, there is a post in forums aimed at you
https://wowlazymacros.com/forums/topic/priority-step-function-working-as-intended/


too old sshd version for actual Jenkins LTS usage

The used version of the Apache sshd service 1.0.0 seems to be too old to use GitBlit with the latest Jenkins LTS version 2.60.2.
The issue is reported to Jenkins too: https://issues.jenkins-ci.org/browse/JENKINS-45769
A simple "replacement" of the sshd jar files seems to not work because of resulting ClassNotFoundExceptions.
Possible a new version of gitblit can provide a actual sshd version 1.6.0 from the apache project to solve this problem.
We have seen this problem with gitblit 1.8.0 running under a recent JDK8 in a tomcat 8 container as WAR application.
A "native" git implementation still works ... only the new trilead java implementation seems to require a more recent ssh key negotiation.

Did you try to simply generate new pair of keys using e.g. rsa? You are using legacy DSA/ssh-dss algorithm which is not supported in recent SSH implementations and will not be supported in the future by much more software. This seems not to be a bug of jenkins nor gitblit but security feature of recent SSH implementations.

Is this a persisting problem? I have Jenkins 1.121.2 running, and I have a freestyle project clongin with a RSA SSH key from the current Gitblit without problems.

Please close this issue. It seems to be fixed.

I also think that this particular problem mentioned in the Jenkins issue would be fixed by creating a ssh-rsa key for the GitBlit server. I wonder why none was created by GitBlit.
The SSHD update is part of the next version, albeit only to 1.2.0.


src(buildpack): add python

This commit adds a python buildpack and simple invoker. This is awork in progress. Existing issues:

Extremely slow on first build (>10 minutes) subsequent builds are really quick
Attempt to install python 3.8 on UBI images results in 3.6?
The installed pip is very old
~No user dependencies capability yet~
~Only CloudEvents functions are supported at the moment~
~Still needs a production runtime - at the moment, it's development mode only~

* Extremely slow on first build (>10 minutes)

@lance any idea why?

@zroubalik really no idea why it's so slow. It happens when pulling in dependencies for flask, etc. If you can try a build locally and let me know if you see the same that would be great.

@zroubalik it should be running for CE now

@matejvasek @zroubalik ptal - I think this might be ready to land. The  first three issues noted in the PR description are... :shrug:

Considering creating and publishing a python package for the server so that we can support local testing and running on localhost similar to the Node.js buildpack.

Considering creating and publishing a python package for the server so that we can support local testing and running on localhost similar to the Node.js buildpack.

https://github.com/boson-project/parliament
Sample usage:
$ cat func.py
from cloudevents.http import CloudEvent, to_binary

# ---------------------------------------
# Function template
# context is a dictionary with the Flask request object and
# and a cloud_event key for incoming events
# ---------------------------------------
def main(context):
    print(f"Method: {context['request'].method}")
    attributes = {
      "type": "com.example.fn",
      "source": "https://example.com/fn"
    }
    data = { "message": "Howdy!" }
    event = CloudEvent(attributes, data)
    headers, body = to_binary(event)
    return body, 200, headers
$ pip install parliament-functions
$ parliament .

@lance
I got:
2021/03/29 17:04:36.506665 INFO:   ===> BUILDING
2021/03/29 17:04:36.506696 DEBUG:  Running the builder on OS linux with:
2021/03/29 17:04:36.506701 DEBUG:  Container Settings:
2021/03/29 17:04:36.506705 DEBUG:    Args: /cnb/lifecycle/builder
2021/03/29 17:04:36.506708 DEBUG:    System Envs: CNB_PLATFORM_API=0.4
2021/03/29 17:04:36.506712 DEBUG:    Image: pack.local/builder/696e6c706d6c71716b6e:latest
2021/03/29 17:04:36.506715 DEBUG:    User:
2021/03/29 17:04:36.506725 DEBUG:    Labels: map[author:pack]
2021/03/29 17:04:36.506727 DEBUG:  Host Settings:
2021/03/29 17:04:36.506731 DEBUG:    Binds: pack-layers-qxdrlskzuf:/layers pack-app-nvzharrrsw:/workspace
2021/03/29 17:04:36.506735 DEBUG:    Network Mode: host
[builder] ---> Python Function Buildpack
[builder] /cnb/buildpacks/dev.boson.python/0.0.1/lib/build.sh: line 13: syntax error in conditional expression: unexpected token `;'
[builder] ERROR: failed to build: exit status 2
Error: executing lifecycle. This may be the result of using an untrusted builder: failed with status code: 145

I don't know why, lib/build.sh looks good to me.

shellcheck buildpacks/python/lib/build.sh                                                                                 ST 4   lance/add-python

In buildpacks/python/lib/build.sh line 13:
  if [[ ! -f "${layer_dir}/environments/functions/bin/flask"]]; then
  ^-- SC1009: The mentioned syntax error was in this if expression.
     ^-- SC1073: Couldn't parse this test expression. Fix to allow more checks.
             ^-- SC1019: Expected this to be an argument to the unary condition.
                                                              ^-- SC1020: You need a space before the ]].
                                                              ^-- SC1072: Missing space before ]. Fix any mentioned problems and try again.

For more information:
  https://www.shellcheck.net/wiki/SC1020 -- You need a space before the ]].
  https://www.shellcheck.net/wiki/SC1019 -- Expected this to be an argument t...
  https://www.shellcheck.net/wiki/SC1072 -- Missing space before ]. Fix any m...

Hmm  maybe I checked out wrong remote for this.

Strange... I definitely ran this BP over and over again last week.

Is there an easy way to throttle the number of revisions created?

Oh, sorry. I have not updated that. You should pull from the lance/add-python branch on this repo.

@lance  It's my fault I wrongfully assumed it's from your repo, the PR is OK, I think.

Yup it works from git@github.com:boson-project/buildpacks.gi.

@lance the python Function seems to react to SIGINT but it doesn't react to SIGTERM I think it should.

Also I noticed that the python Function runs under user id 1000, whereas other functions (e.g. golang) run under uid of local user. I don't know if its good or bad or neither; or if it's deliberate.

Also I noticed that the python Function runs under user id 1000, whereas other functions (e.g. golang) run under uid of local user. I don't know if its good or bad or neither; or if it's deliberate.

Good catch, we should probably unify this.

Also I noticed that the python Function runs under user id 1000, whereas other functions (e.g. golang) run under uid of local user. I don't know if its good or bad or neither; or if it's deliberate.

Hmm this is confusing. Shouldn't they all run as user 1000?
https://github.com/boson-project/buildpacks/blob/10100d5462ac2706622c6c1a7cb0e7051810c9f3/stacks/ubi8/base/Dockerfile#L3-L12

Also I noticed that the python Function runs under user id 1000, whereas other functions (e.g. golang) run under uid of local user. I don't know if its good or bad or neither; or if it's deliberate.

Hmm this is confusing. Shouldn't they all run as user 1000?
https://github.com/boson-project/buildpacks/blob/10100d5462ac2706622c6c1a7cb0e7051810c9f3/stacks/ubi8/base/Dockerfile#L3-L12

Yes it should. Let me double check that. Maybe I used different docker daemons in different console windows. I sometimes use podman and sometimes dockerd might be caused by that.

the python Function seems to react to SIGINT but it doesn't react to SIGTERM I think it should.

I am a little stumped by this. The ENTRYPOINT command is
source $environments_layer/functions/bin/activate && cd $app_layer && parliament .

If I run the equivalent commands locally and send SIGTERM to the process, it shuts down gracefully.
❯ parliament .
fish: “parliament .” terminated by signal SIGTERM (Polite quit request)

Do you think it would be OK if we don't let this block landing the PR, and instead open an issue for it? I did confirm that, for whatever reason, SIGTERM does not terminate the process when running the container.

@lance  With regard to UID -- it was indeed caused by using podman vs. docker.

Do you think it would be OK if we don't let this block landing the PR, and instead open an issue for it? I did confirm that, for whatever reason, SIGTERM does not terminate the process when running the container.

:+1: I think that's OK. It's not any critical it will only prolong ksvc shutdown I think.
I can confirm, local run with sigterm work, but it doesn't work in container.

Added an issue for SIGTERM here https://github.com/boson-project/buildpacks/issues/66

LGTM

Just one thing. I tried local development using venv. I created env in the project directory.
Then I got:
$f run
ERROR: failed to launch: modify env: add layer env: apply env files from dir '/layers/dev.boson.python/app/env': read /layers/dev.boson.python/app/env/lib64: is a directory

I think that we somehow should let user know he is not supposed create env in the project directory.

I think that we somehow should let user know he is not supposed create env in the project directory.

@matejvasek do you know if that is standard practice for Python devs? When I was making all of this, I set up an environment in ~/src/environments and of course did not see this issue.

I think that we somehow should let user know he is not supposed create env in the project directory.

@matejvasek do you know if that is standard practice for Python devs? When I was making all of this, I set up an environment in ~/src/environments and of course did not see this issue.

Don't know, jetbrains IDE did that for me, but now I see it's creating venv (not env) by default. So I guess it's OK. Would be good to have seasoned python programmer to review this.

venv is the standard naming that I have seen used as I worked on this.

venv is the standard naming that I have seen used as I worked on this.
Then it's all right I think.


Guide: Integrate Stacks

Suggesting we have a guide for those wishing to understand the basics of Stacks transactions with the likely aim of integrating with a wallet or exchange. Could be as extensive as: https://github.com/blockstack/stacks-transactions-js/blob/master/README.md with more basic info about Stacks transactions/formats. Or, could only cover the basics of transactions and send/receive.
@yknl maybe you have some opinions on this. Someone who wanted to learn the basics + integrate – where would you send them today?

We should create a full Stacks integration guide that covers everything from Stacks blockchain basics to transactions. This could live as a separate section in the docs.

https://paper.dropbox.com/doc/wyvZRBd6DpfhVsIfRuB65
Turn this into a real doc

Needs to include websocket endpoint details which we haven't touched yet


feat: patch patient last menstrual period observation

This patches patient's LMP entries

Review Checklist

Summary*

[ ] fix: Bug fix for Add the items tackled here as checklists
[x] feat: Completed task
[ ] chore: Incomplete task

[ ] test: Sub-task 1

Structure*

[ ] The Pull Request has a proper title that conforms to our MR title standards
[ ] The Pull Request has one commit, and if there are more than one, they should be squashed
[ ] The commit should have a proper title and a short description
[ ] The commit must be signed off
[ ] Unused imports are not present
[ ] Dead code is not present
[ ] Ensure dry running library to confirm changes

Tests

[ ] Proper and high quality unit, integration and acceptance(if applicable) tests have been written
[ ] The coverage threshold should not be lowered

Sign off*

[ ] All comments have been resolved by the reviewers
[ ] Approved by Czar {replace_with_czar_name}
[ ] Signed off by second reviewer {replace_with_name}
[ ] Ensure all checks are done before merging :warning:
[ ] All PRs needs to be signed before merging :warning:

N/B:

Add a checklist if more than one item is done.
Add screenshots and/or images where necessary
Indicate any breakages caused in the UI :exclamation:
Where necessary, indicate which issue the Pull Request solves (Closes #)
Any new files are updated in the folder structure in the README

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 3 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.007%) to 82.759%

Totals

Change from base Build<PHONE_NUMBER>:
0.007%

Covered Lines:
6245

Relevant Lines:
7546

💛  - Coveralls


Add select_related to public_q query

Prevents n+1 query problem when getting a list of pages with view restrictions via PageQuerySet.public() or PageQuerySet.not_public(). Sites that contain a large number of pages with view restrictions will benefit from this.

Do the tests still pass? Yes
Does the code comply with the style guide? Yes
For Python changes: Have you added tests to cover the new/fixed behaviour? Yes (only modified existing ones to include query counts)

Merged in via ee99f91aa5ad526b8c15e626d5d210de5ccf5723


System freeze when converting huge xml files

First of all, thank you for this utility.
I try to use jtm to convert a 1.3GB .xml file to json and each time my system runs out of RAM, freezes, and a force reboot is necessary. It works fine for ordinary xml files.

If I let the system freeze it kills the process after a while. If you want to reproduce this:
$ curl -Lfv -o database.zip -u USERNAME:PASSWORD https://www.drugbank.ca/releases/5-1-6/downloads/all-full-database

This is the file that I try to convert. you will need a free Drugbank account to download that file. If you are willing to fix this I can send you my email and password privately.
Kernel: 5.4.44-1-MANJARO


Modal component

This is related to #104. There are two different types of modal, one for general modals as well as one for for the specific case of the About modal. In this issue, we will define the visual styling for the general modal as well as introduce the component implementation.

Existing design here for reference: http://www.patternfly.org/pattern-library/forms-and-controls/modal-overlay/#design

@srambach @andresgalante
Here is the modal design with the reconsidered spacing structure. Let me know how it looks!
Basic Modal.zip

@srambach @andresgalante
Here is the latest design of the general modal which shows a couple different variations of body content. Also defined a regular size and a large size. Luckily the spec I gave you before was the perfect width so nothing has really changed there :) I also show an example of how copy/pasting something like forms would look.
Max Width - Regular: 560px
Max Width - Large: 1120px
Regular size max width was determined by finding an optimal line length sized for readability of paragraph text, then adding our already defined spacing system to form the rest of the modal. Large size is just 2x regular, and in my example I show a split view where the body section has 2 columns.
General Modal.zip

Reviewed during PatternFly Design Sync on 5/24.

Want to allow for the possibility to scroll body of the modal; this may also affect the Box component.
Also consider whether there should be a provision/example of a standard confirmation dialog with an icon. Reference https://github.com/patternfly/patternfly-design/issues/632 for current direction on confirmation or error dialogs.

I'd like to discuss the scroll requirement at the next pf-design meeting scheduled for tomorrow. Let's proceed without the scroll within the modal for now.

@mceledonia, Is the modal full width on narrow screens? If so, what is the breakpoint at which the switch happens? The breakpoints available are 576, 768, 992, and 1200px.

Yes @srambach it would go full width on narrow screens, similar to the about modal. I'd think we should use the same breakpoint for that which I would say would be 768. Want to CC @kybaker on this to check that he agrees.

@mceledonia @kybaker Also, for the large split modal window, which says max width 1120px, what would you expect the behavior to be?

Closed via #301


[Changes made] Update free-courses-en.md

What does this PR do?
Add resource(s) | Remove resource(s) | Add info | Improve repo
For resources
Description
Why is this valuable (or not)?
How do we know it's really free?
For book lists, is it a book? For course lists, is it a course? etc.
Checklist:

[ ] Read our contributing guidelines.
[ ] Search for duplicates.
[ ] Include author(s) and platform where appropriate.
[ ] Put lists in alphabetical order, correct spacing.
[ ] Add needed indications (PDF, access notes, under construction).
[ ] Used an informative name for this pull request.

Follow-up

Check the status of GitHub Actions and resolve any reported warnings!

Title: Added Scala tutorials
Description:
Added a collection of scala tutorials to the relevant section in free-courses-en.md.
Purpose:
This addition provides learners with valuable resources to explore scala, enhancing the educational content available in this repository.

Thanks, and welcome to free-programming-books!


Add help about getting an authentication token

Type of change

Documentation

Description

Checklist

[ ] Update/write design documentation in ./documentation/design
[ ] Write tests and make sure they pass
[ ] Update documentation
[ ] Check RBAC rights for Kubernetes / OpenShift roles
[ ] Try your changes from Pod inside your Kubernetes and OpenShift cluster, not just locally
[ ] Reference relevant issue(s) and close them after merging
[ ] Update CHANGELOG.md

Ok, I removed both additional ids.


Fix incorrect usage of Redshift/PostgresQuery 'query' property.

'query' was defined as a property within rdbms.py, but referenced and used (within postgres.py and postgres_test.py) as if it were a method.
I believe it is more appropriate for query to be a property than a method.
Using PostgresQuery or RedshiftQuery is as easy as ...
from luigi import configuration
from luigi.contrib import redshift

config = configuration.get_config()

class QueryExample(redshift.RedshiftQuery):
    query = luigi.Parameter()
    table = luigi.Parameter()

    host = config.get('redshift', 'host')
    database = config.get('redshift', 'database')
    user = config.get('redshift', 'user')
    password = config.get('redshift', 'password')
    aws_access_key_id = config.get('s3', 'aws_access_key_id')
    aws_secret_access_key = config.get('s3', 'aws_secret_access_key')

just a minor note: you get syntax highlighting for free if you put "python" after the three backticks in Github's markdown (i edited your comment and added that)

@erikbern Thanks for the tip!

I may be mistaken, but the two tests that fail don't appear to be anything on my end of things. Please correct me if i'm wrong.

Yes this looks sane and the failures surely looked spurious.


go-swagger generates invalid swagger.json when returning response is model

Problem statement
There is route responding with swagger:model. In case when you do not have swagger:response using this model, swagger generates invalid spec without definitions block  referenced to non-existing field
Swagger specification

swagger:model
swagger:response

Steps to reproduce
I made an example based on that code
package rest

import (
	"net/http"

	"github.com/go-openapi/runtime/middleware/denco"
	"github.com/go-openapi/strfmt"
)

// An Order for one or more pets by a user.
// swagger:model order
type Order struct {
	// the ID of the order
	//
	// required: true
	ID int64 `json:"id"`

	// the id of the user who placed the order.
	//
	// required: true
	UserID int64 `json:"userId"`

	// the time at which this order was made.
	//
	// required: true
	OrderedAt strfmt.DateTime `json:"orderedAt"`

	// the items for this order
	// mininum items: 1
	Items []struct {

		// the id of the pet to order
		//
		// required: true
		PetID int64 `json:"petId"`

		// the quantity of this pet to order
		//
		// required: true
		// minimum: 1
		Quantity int32 `json:"qty"`
	} `json:"items"`
}

// UpdateOrder swagger:route PUT /orders/{id} orders updateOrder
//
// Updates an order.
//
// Responses:
//    default: genericError
//        200: order
//        422: validationError
func UpdateOrder(rw http.ResponseWriter, req *http.Request, params denco.Params) {
	// some actual stuff should happen in here
}

// ServeAPI serves this api
func ServeAPI() error {
	mux := denco.NewMux()

	routes := []denco.Handler{
		mux.PUT("/orders/:id", UpdateOrder),
	}
	handler, err := mux.Build(routes)
	if err != nil {
		return err
	}
	return http.ListenAndServe(":8000", handler)
}

For such app it generates swagger.json without any definitions block and references to non-existing #/responses/order. But after declaring such struct
// An OrderResponse response model
//
// This is used for returning a response with a single order as body
//
// swagger:response orderResponse
type OrderResponse struct {
	// in: body
	Payload *models.Order `json:"order"`
}

and using it in different route, swagger generates definitions block and references response correct
Environment
swagger version: dev
go version: go1.8 darwin/amd64
OS:   OS/X 10.11.6

this is the expected behavior.
If you want to skip the response struct you should use
// UpdateOrder swagger:route PUT /orders/{id} orders updateOrder
//
// Updates an order.
//
// Responses:
//    default: genericError
//        200: body:order
//        422: validationError
func UpdateOrder(rw http.ResponseWriter, req *http.Request, params denco.Params) {
	// some actual stuff should happen in here
}

With this the struct will be detected as not used so so make it find the Order struct you have to run swagger generate spec -m ....
the -m will make it scan for swagger:model and include those structs

Thanks a lot for your response!
For me it wasn't obvious behavior and I didn't find any info in documentation about it. Maybe it would be better to describe such case, for example in this chapter ?


example spec for bug with criteria cloning

I just ran into this bug in a project. Basically, if you change the sort
option on a criteria, it updates the sort on the original criteria and
the cloned copy, rather than just updating the sort on the cloned copy
that is, if you do:
names = Person.all.asc(:name)
names_reverse = names.desc(:name)
then both names and names_reverse will subsequently be sorted
descending
I wasn't quite sure where the right place to put this test was, so I'm
just starting it here, and will move it around as I get guidance

Thanks for the patch, mate. It should probably go in spec/unit/mongoid/criteria_spec.rb .
To fix this, I'd start in lib/mongoid/criterion/optional.rb , which is where the code for asc and desc lives.

Thanks for the hints. I already made the fix, but it's not the most beautiful. Do you think that dup should be done in merge_options in criteria/optional.rb instead of in initialize_copy in criteria.rb? It'd be prettier in criteria/optional.rb but I could see an argument for it being more magical there (and easier to break).

ok, the most recent commit contains a cleaner (but arguably less clear) fix, take a look and let me know if you have any tweaks

Looks good to me - thanks!


Multiple Sonos Players: This callback function has already been called by someone else; it can only be called one time.

I have the following config file:
{
...
    "platforms": [
        {
            "platform": "Sonos",
            "name": "Sonos",
            "play_volume": 15
        }
    ],

    "accessories": [

    ]
}

When I run homebridge, I get the following error:
$ cd homebridge
$ npm run start
><EMAIL_ADDRESS>start /Users/iphoting/Development/Node.js/homebridge
> DEBUG=* node app.js || true

Starting HomeBridge server...
_____________________________________________________________________
IMPORTANT: Homebridge is in the middle of some big changes.
           Read more about it here:
           https://github.com/nfarina/homebridge/wiki/Migration-Guide
_____________________________________________________________________

Loading 1 platforms...
[Sonos] Initializing Sonos platform...
[Sonos] Fetching Sonos devices.
Loading 0 accessories...
[Sonos] Found device at <IP_ADDRESS>
[Sonos] Found playable device - Dining Room
[Sonos] Initializing platform accessory 'Dining Room Sonos'...
  Accessory [Homebridge] Creating new AccessoryInfo for our HAP server +0ms
  Accessory [Homebridge] Creating new IdentifierCache +7ms
  EventedHTTPServer Server listening on port 51826 +18ms
[Sonos] Found device at <IP_ADDRESS>
[Sonos] Found playable device - Ronald's Bedroom
/Users/iphoting/Development/Node.js/homebridge/node_modules/HAP-NodeJS/lib/util/once.js:11
      throw new Error("This callback function has already been called by someo
            ^
Error: This callback function has already been called by someone else; it can only be called one time.

Is there anyway to support multiple Sonos players?

Hi, I am sorry I to say the platform shim has a flaw there. It does not wait for all sonos devices to be discovered, but calls the callback immediately after discovering the first player.

Bring me up to speed here? This used to work when I first wrote it. Has something changed in the way accessories are handled?

I don't know how it was before I joined here, today each platform must call the callback with the accessories array exactly once, because homebridge is counting the answers to know when to start the server and start advertising (all) the devices.
If Sonos calls it twice and another platform did not yet answer, the server would be already starting and the Sonoses would be in, the other platform out...
@nfarina : Probably there is a way to push accessories into the running bridge some day?

Correction, everything seems to be in as long as not all accessories (not platforms) from the accessories section of the config.json are loaded. They are synchronous and might take a moment, so during that time multiple callbacks might have worked.
Today there is a protection on the callback with once(), so each platform can only call it once.

Aha. Ok so I imagine that, if you have any slow-returning accessories, the old code would work. I do (a call to the Tesla API). If you don't it will fail.
I think your timeout approach looks like a good solution to the problem. I can't think how else you could do it given the asynchronous nature of the Sonos library.
I suppose the only other approach would be to retrieve the network topology of the Sonos network and figure it out from there. But that seems like overkill!
Sent from my iPhone
On Sep 8, 2015, at 8:09 AM, Raoul <notifications<EMAIL_ADDRESS>wrote:
Correction, everything seems to be in as long as not all accessories (not platforms) from the accessories section of the config.json are loaded. They are synchronous and might take a moment, so during that time multiple callbacks might have worked.
Today there is a protection on the callback with once(), so each platform can only call it once.
—
Reply to this email directly or view it on GitHubhttps://github.com/nfarina/homebridge/issues/153#issuecomment-138533987.

This e-mail and any attachments may be confidential or legally privileged. If you received this message in error or are not the intended recipient, you should destroy the e-mail message and any attachments or copies, and you are prohibited from retaining, distributing, disclosing or using any information contained herein. Please inform us of the erroneous delivery by return e-mail. Thank you for your cooperation.

A quick google survey I did to figure that out returned to patterns: Count the callbacks (if you know how many to expect) and timeout (if you don't). As I am not into Sonos, simply when for the latter.
The same might apply to other platforms as well, so if it proves working I will add it to the wiki page as "proven practice" (as opposed to best prectice...)

This is a problem with the platform approach that I think will become more common. For home devices that are "network discovered", we don't know how many there are until they show up. And we don't want to return early from our discovery since Homebridge will move on without us and serve a partial list of devices.
I am still pondering ways to improve this - ideas are welcome. I'll post my current best idea in a separate issue for discussion.

@nfarina there could be some sort of way to call directly into the registration process. IE, let platforms register their own devices. So then you can spin up a platform lib, and tell it to discover, and as discovery happens, the platform lib registers each device.
note: this suggestions comes 100% without knowing ANYTHING about the new internals, heh.

Hitting this in YamahaAVR too, I just noticed.


Mouse interaction broken after system wakeup from energy saving

Environment
Windows build number: 10.0.18362.239
Windows Terminal version (if applicable): 1.5.3242.0 AND 1.4.3243.0

Debian 9.13 in WLS; RHEL7.8 on remote server

Steps to reproduce
ssh connect to the remote server do some actual work there vim, gcc, gdb, the whole daily work sh**
After you're done with work, do not disconnect the remote connections, just put your windows Laptop to "Energy saving", remove it from the dock, put it into your bag and have a nice evening with the kids.
Next day resume the Laptop, click into the one of the still open terminal panes trying to reconnect the remote machine.
Try to scroll in the terminal
Expected behavior
After Wakeup from standby, I'd expect to have all the normal mouse interaction. recall the ssh login command using [Cursor up] and resume work. Vim and terminal scrolling should work.
Actual behavior
Any Mouse interaction with the terminal will spam the prompt with more or less random text (same button press creates different input in different panes)
Wheel scrolling is impossible as just spams the promt.
Only solution: kill all the panes, have new ones.
I could live with issues like these if they would be solvable with the bash reset command.
The behavior is not always reproducible. some panes work just fine. Others show even more strange behavior like flashing on mouse interaction.

So, are you using mosh or just using plain ssh? I'd recommend mosh if you need to resume work smoothly.

I'd love to use mosh but its not compatible with our setup. I'm new on this job maybe I'll make them to implement some improvements. That would be definitely one. Another one would be: get rid of Windows Workstations at all. But for now, I'm glad I have Windows Terminal at least.

I'm not a pane user so I don't have much say about this issue. I believe someone in the team will have more insights.

Yeah, maybe I should return to tmux.

What random text are you seeing exactly? We might be able to better diagnose if we knew what the text was exactly.
Are you using mouse mode in vim? Does pressing ↟ not recall the previous command? Because that should work even if the ssh session didn't exit cleanly.
It sounds to me like something on the remote machine is requesting mouse mode input, then the connection is being broken, leaving the Terminal in mouse mode without bash expecting it.
This might also be related to #381, maybe a little bit of #8020,

Yes, I'm using mouse mode in vim
↟ does work. but I don't use it as the terminal stays useless even after ssh reconnects
some example "random output":
 9+#9+ (on left click)
 2'#2' (left click a couple of seconds later without even moving the mouse)
 0.#0. (left click after moving the mouse a little)
<backtick>0. (small scroll upwards)
It sounds you have a  great theory  as it's reproducible in Gnome Terminal 3.38.1 on my native debian that way as well. I had to kill -9 the ssh client though.
Anything I could do from user perspective to reset the "mouse mode"? Maybe something for a bashrc?

In Gnome Terminal reset fixes the issue. this is probably the reason why I wasn't annoyed by that issue that much before

@amie42 If you're on windows 10 and you have WSL installed, you can either run reset from there, or if you're running powershell / cmd or another windows shell, wsl reset will work.
@zadjii-msft It would nice to build terminal reset a la tset(1) directly into windows terminal on the GUI.

I'm mildly concerned that reset doesn't fix this. I don't know how to check whatever reset is emitting off the top of my head, but if that works in gnome-terminal it should work in WT. I'd bet that there's some component of it that's being lost in the conpty layer, so the Terminal is still in mouse mode, but the client and conpty aren't.

@zadjii-msft
reset - reinitialization
       When invoked as reset, tset sets the terminal modes to "sane" values:

       o   sets cooked and echo modes,

       o   turns off cbreak and raw modes,

       o   turns on newline translation and

       o   resets any unset special characters to their default values

       before doing the terminal initialization described above.  Also, rather
       than  using  the  terminal initialization strings, it uses the terminal
       reset strings.

       The reset command is useful after a program dies leaving a terminal  in
       an abnormal state:

       o   you may have to type

               <LF>reset<LF>

           (the line-feed character is normally control-J) to get the terminal
           to work, as carriage-return may no  longer  work  in  the  abnormal
           state.

       o   Also, the terminal will often not echo the command.

https://invisible-island.net/ncurses/man/tset.1.html

if WT is xterm-color, it seems the reset string is:
oisin@BEASTIEBOOK3:/mnt/c/Users/OisinGrehan$ infocmp xterm-color | grep rs[123].*
        rs2=\E[m\E[?7h\E[4l\E>\E7\E[r\E[?1;3;4;6l\E8, sc=\E7,

I guess I'm more concerned with whatever @amie42's client actually is emitting, rather than what it should be emitting. I believe that WSL sets the TERM to xterm256-color, but who knows if it's getting changed before it's being used.
@amie42 could you share the output of  infocmp | grep rs[123].* from your Debian instance, without running ssh?

IIRC, reset on native Debian Gnome Terminal fixes the issue. In Windows Terminal it does not. I'm going to check back on Monday. But I won't even remotely touch a windows box in my spare time. Have a great weekend everyone!

From my native Debian Laptop: New Terminal Window. I never ran ssh from this process :
infocmp | grep rs[123].* 	rs1=\Ec\E]104\007, rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,

Confirmed: reset in the windows terminal does not fix the issue: neither in version 1.5, nor in 1.4.
I'll post the output of  infocmp | grep rs[123].* of the Windows Terminal in a new comment

WT1.4:
xterm-256color|xterm with 256 colors, 	colors#256, cols#80, it#8, lines#24, pairs#32767, 	acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, 	rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]104\007, 	rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,
WT 1.5:
	rmso=\E[27m, rmul=\E[24m, rs1=\Ec\E]104\007, 	rs2=\E[!p\E[?3;4l\E[4l\E>, sc=\E7,

Any update here?  would you need any other input from my side?

Any update here?  would you need any other input from my side?

The problem still persists in v1.5.10271.0

The Problem still persists in v1.5.10411.0

The Problem still persists in v1.7.1033.0

Alright, it's been a few months since I've looked at this thread, so lemme make sure I've got this right. The issue at hand is that when you enter energy saving mode, the ssh connection gets terminated. When that happens, the terminal is left in mouse input mode, despite the local shell not expecting it. reset usually would fix this scenario, but doesn't seem to in Windows Terminal.
Am I missing anything?

It looks like neither DECSTR nor RIS reset the mouse mode state. Thanks!

Renamed appropriately, triaged to Terminal 2.0 and marked Help Wanted.
It also looks like for xterm, only RIS resets the mouse mode. DECSTR does not, and so we will not.

@PankajBhojwani you may be interested in this. I'm gonna take triage off and move it up to 1.10 as we discussed for mouse mode changes!

I commented on the fix you might want to revisit that.

The fix works like a charm, thank you everybody!


Refactor controller to use Automation API

Proposed changes
Refactor controller to use Automation API
Related issues (optional)
Closes #85

I believe the secrets provider work is the last big TODO for automation API and we should have feature parity after that. I'm not opposed to holding off until that lands.

do we want to hold off on this, or is it better to move ahead with the refactor?

Thanks for the review! Holding off SGTM 👍

Opened https://github.com/pulumi/pulumi-kubernetes-operator/issues/87 to track the use of ProgressStreams for logs.


I would like a mentor

Hey everyone!
I'm trying to start contributing to the argo workflows codebase and I think i might need a bit of help.
I've been trying to resolve #7372 but I cannot reproduce it locally.
I have followed the instructions on https://argoproj.github.io/argo-workflows/running-locally/ and gotten workflows to run successfully on my local machine (Macbook pro with MacOS Monterey). However it seems like artefact storage is configured automatically when running make start. I've tried deleting the artifact-repositories configmap but this hasn't helped either.
Any clues on what I should try here? I already implemented a fix and I am eager to test it to see if it works :D

@thatGreekGuy96 I can mentor you.  you  should remove the below configuration from workflow-controller-configmap
  artifactRepository: |
    s3:
      bucket: my-bucket
      endpoint: minio:9000
      insecure: true
      accessKeySecret:
        name: my-minio-cred
        key: accesskey
      secretKeySecret:
        name: my-minio-cred
        key: secretkey

That worked! Thanks a lot!

Trying to open the pull request now, I get the following error when running make pre-commit -B
GIT_COMMIT=f12c8171cab269b348b5ca79fdce6a4396257546 GIT_BRANCH=master GIT_TAG=untagged GIT_TREE_STATE=dirty RELEASE_TAG=false DEV_BRANCH=false VERSION=latest
KUBECTX=k3d-k3s-default DOCKER_DESKTOP=false K3D=true DOCKER_PUSH=false
RUN_MODE=local PROFILE=minimal AUTH_MODE=hybrid SECURE=false STATIC_FILES=true ALWAYS_OFFLOAD_NODE_STATUS=false UPPERIO_DB_DEBUG=0 LOG_LEVEL=debug NAMESPACED=true
cp -v hack/git/hooks/commit-msg .git/hooks/commit-msg
'hack/git/hooks/commit-msg' -> '.git/hooks/commit-msg'
go install<EMAIL_ADDRESS>make: *** No rule to make target `/bin/protoc-gen-gogo', needed by `pkg/apis/workflow/v1alpha1/generated.proto'.  Stop.

Anything obvious I'm doing wrong here?
I'm fairly new to Go so apologies if there's something obvious I've missed :)

@thatGreekGuy96 can you go mod vendor and try this?

@sarabala1979  did it but unfortunately I get the same error :/

@thatGreekGuy96 Looks like your env does have protoc-gen-gogo. can you install and try?
https://github.com/gogo/protobuf
Most Speed and most customization
Customizing the fields of the messages to be the fields that you actually want to use removes the need to copy between the structs you use and structs you use to serialize. gogoprotobuf also offers more serialization formats and generation of tests and even more methods.
Please visit the extensions page for more documentation.

Thanks a lot!

I've opened a PR now (#7498 ). Seems like I need an active contributor to have a look in order to approve the CI workflows?

@thatGreekGuy96 I kicked off the CI tests for you.

many thanks, i made some minor changes and re-pushed, do you mind re-approving the CI tests?

How's the mentoring going?


Added init.py to test directory

pytest can't find the cycpd module unless testing/__init__.py is present.

Can you explain why? This repo already has pytest running and working. I think this is evident by the "All checked have passed" for the travis integration. Please expand on how this changes that (or improves it).

Ah ok. pytest didn't work on my machine. I thought Travis CI is not running on your repo any more either. Feel free to ignore/close this pull request if it still works for you.

Thanks for sharing that. And I'm definitely happy to make the change if it's the right one I tried to reproduce your problem and couldn't. I tried with python 3.8 (what you're using - the tests only include 3.6 and 3.7). I also tried with conda and with venv new installs and none of them produced the error.
One thing I'm wondering (sorry, this might be simple - but have to check) did you install the package using python setup.py install in your current virtual environment? I say that because one of the things that adding __init__.py to the testing folder does is make cycpd modules/files in the folder (and not the installed version) be importable. This behaviour is described here: https://docs.pytest.org/en/6.2.x/goodpractices.html. They also describe potential negatives to adding __init__.py which to me is primarily that pytest won't use the installed version of the package but instead will use the one in the local folder.
Let me know if this solves your problem or if you have another thought. If it still persists I can merge.

I can confirm that after running python setup.py install one can run pytest without errors.
However this then tests the installed version (not the local version). I.e. you have to run python setup.py install after each change to the local version to be able to test it.
Anyway, it's just a detail. Thanks for implementing CPD by the way.

In removing pip install . I think you've found why I required an install. cycpd requires cython_functions to be built locally.
I'm guessing the replacement you created just builds the cython function only and then tests the pack in place?

Yes, that's the way I understand it as well.

Thanks for merging it.


Crash on Minecraft startup

Modloader
Forge
Minecraft Version
1.20.1
Modloader Version
Forge 47.1.0
No Chat Reports Version
1.20.1-v2.2.2
Modpack Info
No response
The latest.log File
No response
Bug Description
Crash on startup:
https://paste.ee/p/YeQgi
Steps to Reproduce
No response
Other Information
No response

Just so you know most if not all modders right now recommend this forge version Forge 47.1.3 and you are on Forge 47.1.0 some are also explicitly requiring it which means the game will crash on startup if you use any other version. Does it still crash when you use the required version?


[DO NOT MERGE] Use whenever's built-in cap integration

this can be deployed once we merge https://github.com/pulibrary/princeton_ansible/pull/358 and reprovision bibdata servers

Coverage remained the same at 80.46% when pulling 17c8b8ee719643eba951cd19ebf5453bee94ce06 on whenever into 8e94c719050fde74a6796b3ccf92264eec6e17c6 on master.

deployed to prod, double-checked resulting jobs, disabled other crons, watched one run successfully.


experiment 9

can you post the  output after deploying using ansible

@mihirksingh21 I don't have those outputs right now with me, I am sorry. If you were able to successfully deploy and get the outputs please make a PR, we will really appreciate your efforts. You can also discuss here you face any difficulties in working with sensible.


Auto labeling github action is not working on you'r repo!!

I have noticed that the labeler.yml is not functioning well!!
I can fix that!!
Add gssoc-ext with level and hacktoberfeast-accepted labels @c0sm0void

@smog-root assigned.
Note that this issue is failing for only on PR, not on issues

@c0sm0void okay!!

i'm currently not work on workflows!