text:
Router logs overhaul

Checklist

[x] Affected Issues have been mentioned in the Closing issues section
[ ] Documentation has been written/updated.
[x] Changelog entry has been written

This PR is part of the logging system overhaul. I don't think it's complete, just wanted to start discussion on where I'm headed with this.
Here are the important points on this PR:

logs are going: router -> fluentd -> rabbitmq -> fluentd -> elasticsearch

no more logstash, we do all the parsing in fluentd

end-to-end latency is currently max 10s (see the flush_interval option in the two fluent.conf files
it uses a topic exchange in rabbitmq which makes it easy to attach another queue and copy log messages off elsewhere.

current hierarchy is lagoon.<cluster>.logs.<log_type>
e.g. you can attach a queue to the lagoon exchange with a routing key like lagoon.*.logs.router, and get all the router logs from all clusters.

build the images using:
docker build -t lagoon/router-logs-collector services/router-logs-collector
docker build -t lagoon/logs-tee services/logs-tee
docker build -t lagoon/logs-dispatcher services/logs-dispatcher

Questions:

does the topic queue hierarchy look okay, and extensible?
how should we go about merging this work?
any other comments?

Changelog Entry
Overhaul the router logs system.
Closing issues
n/a

This is pretty outdated. I'll create a new PR.


text:
Improve Gmail Addon.

I've changed pretty much everything compared to how it was before so here are the main differences & improvements:

Instead of relying on intervals and event listeners to add/remove the Marvin button, that is now mostly done by a mutation observer. Only at the start there's an interval used to determine whether a list of emails is displayed, or if it's a single email. After the view is determined and initial buttons are added, a mutation observer is set and the interval is cleared.
Task is now sent without using the background script. This was done with the intention to replace the "tabs" permission with "activeTab" in the future.
The success message now also displays when the task creation fails, like in the other content script
Task sent to Marvin now contains a note with the information about the sender (name & email address)

Works great @rijavecb! The only change I made was to make the sender info on one line.

source: gharchive/pull-request

authors: mltucker rijavecb

license: MIT

license_type: permissive

license_source: github-api


text:
.equals() should be lenient by default

Currently, the (not yet released) .equals() method for dom.Value subclasses is strict by default. It checks for Ion equivalence between the two values being compared. JS values cannot be compared and annotations must be equal. This functionality is necessary for our test suite, but is of limited utility to end users.
I think we should make .equals() a loose definition of equality, comparing across Ion and JS values and ignoring annotations. Then we can provide a separate method (ionEquals()?) that performs the strict test.

Fixed with #683

source: gharchive/issue

authors: desaikd zslayton

repo: amazon-ion/ion-js


text:
Better interface for ConstEq

Now that I'm actually trying to use it it's a bit painful. Think this is a bit nicer. It does raise the question of broken binary instances also breaking the associated ConstEq instances, but that's the kind of thing which would be picked up by tests.
Also build data modules with -funbox-strict-fields because I forgot to add it earlier.
@markhibberd /cc @erikd-ambiata @thumphries

I think you can get a free instance for Generic a here too

I think you can get a free instance for Generic a here too

Yeah I thought so, not sure how to actually derive it though.

Yeah I thought so, not sure how to actually derive it though.

Just messed around with it for 10 minutes, seems impossible without incurring the typeclass :(
Change makes sense to me 🍯

:100:

👍 for the code, but I think I am a bit sketchy on this really needing to be a type-class in hind-sight, is there anywhere that composes these together, that isn't just on safeEq whatever?

:+1: for the code, but I think I am a bit sketchy on this really needing to be a type-class in hind-sight, is there anywhere that composes these together, that isn't just on safeEq whatever?

The benefit of having a typeclass (of some sort) is that I can implement things like ===# :: (Show a, ConstEq a) -> a -> a -> Property rather than needing to explicitly convert to bytestring and compare for each type.
My reasoning for ConstEq being its own typeclass was basically to provide a way for a type to say "I am okay to be rendered as a bytestring and compared in constant time". The alternative of implementing safeEq :: Binary a => a -> a -> IO Bool (which would let me write things like ===# :: (Show a, Binary a) -> a -> a -> Property) is fine as far as I know, I just thought that there might be cases where one would want the behaviour of the two to differ (albeit pretty far-fetched ones).
I'm not too attached to the idea of having a typeclass here, so if you think the second option is okay I'm happy to leave it at that.

/bump @markhibberd - any further thoughts on this?

Happy for you to merge.

Ack, thanks. Would be interested in hearing your opinion of the solution at some point if you have one.

authors: erikd-ambiata markhibberd olorin thumphries

repo: ambiata/tinfoil

license_source: bigquery


text:
EmotionDetectionNN

Based on RTSPFaceDetection.ino,
how do I create the following add into FDPostProcess ?
img = CV2.crop(frame)
img = CV2.rgb2gray(img)
img = CV2.resize(img, (48, 48))
emo = NNemotiondetection.predict(img)
my emotion detection model is trained by
kaggle.com/rkuo2000/fer2013
Pretrained README
file : fer2013_cnn.h5 (1.26MB)
total params = 103,143
input_shape = (48,48,1)
test accuracy = 54.89% (model size is minimized, so accuracy is reduced ! )

RTSPFaceDetection is based of mobilefacener and scrfd model not CNN. refer to common_nn_models


text:
Document missing trailing comma on function calls with unpacking on non-3.6 files

Howdy! Sorry you're having trouble. To expedite your experience,
provide some basics for me:
Operating system: Mac OS 10.13.3
Python version: 3.6.4
Black version: 18.3a2
Does also happen on master: Yes
To answer the last question, follow these steps:

create a new virtualenv (make sure it's the same Python version);
clone this repository;
run pip install -e .;
make sure it's sane by running python setup.py test; and
run black like you did last time.

Hi, and a huge thank you for this project!
I think I might have found a glitch in how function calls are formatted.
func_1(
    first_argument_with_a_very_long_name,
    second_argument_with_a_very_long_name,
    third_argument_with_a_very_long_name,
)
func_2(
    *first_argument_with_a_very_long_name,
    second_argument_with_a_very_long_name,
    third_argument_with_a_very_long_name
)

When an argument has the unpacking notation, black removes the trailing comma from the last one.
Is this intended behaviour?
Thanks again!

This is missing because this style of trailing comma is not safe pre-3.6. If you want this, just put that trailing comma yourself, Black will keep it.

This behavior was introduced in https://github.com/ambv/black/commit/f71fc7811e6c6e5412152dee785f9d3d12722c56 and is documented there in the commit message. We need to put this in the README.

Great, thanks for the clarification.

Fixed.

authors: ambv sanjioh

repo: ambv/black


text:
rdpi statistical comparison among groups

I am using the RDPI code to compare plasticity among multiple species. I have more than 2 groups to compare, but I keep getting the error message:
error in t.test.formula(RDPI$rdpi ~ RDPI$sp) :
grouping factor must have exactly 2 levels
It appears that the program is not recognizing that it needs to use the ANOVA analysis rather than a t-test.

Hi kmbecklin,
I am not sure why you are getting this error. Could you please verify that your "sp" variable is actually a factor and the number of factors? Or ideally, you could post a reproducible example so I can test the function's behavior.
Thanks!

Hi  Katie,
sorry for the delayed answer, I was on holiday for 10 days. I still can't see any attachment. You should be able to upload it here, but if this doesn't work you may want to send it to ameztegui@gmail.com, and I will have a look as soon as possible.
Thank you!

Hi again,
I think I may have found the reason for your error message, Somewhere in my code I forgot to ensure that the newly created object was a factor. Please try to install the package again and let me know if this solves your issue.
Best
Aitor

Aitor,
I have tried the Plasticity package multiple times since our last communication. I can generate a graph and I can correctly run the statistical comparison as long as the factor has only two levels. Every time I try a data set with 3+ factors, I get an error. Basically, the program is trying to run a t-test instead an ANOVA regardless of the number of levels.
I tried re-installing the package using the remotes::install_github("ameztegui/Plasticity") code listed on your github. It did not resolve the issue.
Given that the code is producing a graph, I expect that it is calculating RDPI correctly. However, I can’t seem to view, compare or summarize the calculated values. Any tips would be appreciated.
Cheers,
Katie

Katie M. Becklin
Assistant Professor
Biology Department
(pronouns: she, her, hers)
T 315.443.2155    F 315.443.2012
@.@.>
107 College Place, LSC 442, Syracuse, NY 13244
thecollege.syr.edu/biologyhttp://thecollege.syr.edu/biology
Syracuse University
From: Aitor Ameztegui @.>
Reply-To: ameztegui/Plasticity @.>
Date: Tuesday, September 1, 2020 at 5:12 AM
To: ameztegui/Plasticity @.>
Cc: Katie Becklin @.>, Author @.***>
Subject: Re: [ameztegui/Plasticity] rdpi statistical comparison among groups (#1)
Hi again,
I think I may have found the reason for your error message, Somewhere in my code I forgot to ensure that the newly created object was a factor. Please try to install the package again and let me know if this solves your issue.
Best
Aitor
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/ameztegui/Plasticity/issues/1#issuecomment-684775400, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQWBXRCBDMCCRELGVA3BGADSDTJKNANCNFSM4QGZ522Q.

Hi Katie,
sorry for my late reply. This is really weird, I have just checked and it correctly performs a t-test if my dataset has a two level factor, and an ANOVA otherwise. In your last messages you told me you were attaching an example dataset, but I was never able to see it.
As for the output of the function, if you just run the function it will give you a graph and the result of the statistical test. However, if you assign it to an object, it will create a dataframe with the pairwise differences for each level of the factor, allowing you to perform your own statistical test if you wish.
data(ecophysio) rdpi(ecophysio,sp,SB, Piso)
will produce the chart and print the result of the ANOVA, whereas
result <- rdpi(ecophysio,sp,SB, Piso)
will create the object resultwith the rdpi values.
I am sorry I cannot be of more help, but as I said, this works well for me with several different data frames, so I cannot tell where the problem comes from. You could try the example dataset I provide (run data(ecophysio)) and see if it works with the four levels (it should do an ANOVA), and if you remove two of the levels (then it should do a t-test). Let me know if this works as expected!
Cheers
Aitor

Thank you, Aitor.
There must be something off about how the program is loaded in my version of R, or how I’ve formatted the data. I will try the dataset you suggested and see if I can at least get it to reproduce the results.
Cheers,
Katie

On Jul 9, 2021, at 9:47 AM, Aitor Ameztegui @.***> wrote:

Hi Katie,
sorry for my late reply. This is really weird, I have just checked and it correctly performs a t-test if my dataset has a two level factor, and an ANOVA otherwise. In your last messages you told me you were attaching an example dataset, but I was never able to see it.
As for the output of the function, if you just run the function it will give you a graph and the result of the statistical test. However, if you assign it to an object, it will create a dataframe with the pairwise differences for each level of the factor, allowing you to perform your own statistical test if you wish.
data(ecophysio) rdpi(ecophysio,sp,SB, Piso)
will produce the chart and print the result of the ANOVA, whereas
result <- rdpi(ecophysio,sp,SB, Piso)
will create the object resultwith the rdpi values.
I am sorry I cannot be of more help, but as I said, this works well for me with several different data frames, so I cannot tell where the problem comes from. You could try the example dataset I provide (run data(ecophysio)) and see if it works with the four levels (it should do an ANOVA), and if you remove two of the levels (then it should do a t-test). Let me know if this works as expected!
Cheers
Aitor
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/ameztegui/Plasticity/issues/1#issuecomment-877281342, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQWBXRC5AQRPFPWFKKGZZXLTW4K2RANCNFSM4QGZ522Q.

authors: ameztegui kmbecklin

repo: ameztegui/Plasticity


text:
Removing Meta class from Model definition

As it was suggested in #4, I think it would be nice to remove the Meta class, at least from the documentation but it will still work if defined:
class Movie(Model, db=db, collection="movies"):
    actors: typing.List[Actor]
    director: Crew
    name: str
    genre: Genre
    year: int

We could also remove db and accept Collection instances, but I think this will be easier.

@yezz123 @MAD-py @ischaojie Any feedback would be appreciated guys.

@MAD-py yeah that's my plan to add validation too.
But the automatic name is really good. I'll add it tomorrow. Thanks.

Also need to figure out a way for Index part.
Either we should add it like the db and collection or we will do like collection.add_index().

I think it would be better to have Movie.set_index() and then use Movie.create_indexes().
What do you think?

@MAD-py yeah that's my plan to add validation too.
But the automatic name is really good. I'll add it tomorrow. Thanks.

I feel the validation should be optional. If the user is confident then they should not have to validate their query every time.

@MAD-py yeah that's my plan to add validation too.
But the automatic name is really good. I'll add it tomorrow. Thanks.

I feel the validation should be optional. If the user is confident then they should not have to validate their query every time.

It's not about query validation. It's about validating the db instance. And that the collection name is provided.

@MAD-py yeah that's my plan to add validation too.
But the automatic name is really good. I'll add it tomorrow. Thanks.

I feel the validation should be optional. If the user is confident then they should not have to validate their query every time.

It's not about query validation. It's about validating the db instance. And that the collection name is provided.

Sorry i missed the context. Sounds good.

authors: MAD-py aminalaee kuutsav

repo: aminalaee/mongox


text:
Missing dependency - jQuery and /files/ path

Both control.html and stage.html refer to

Which version of jquery.min.js is required?
How about moving all dependencies into this same directory?

This tool is a stage for the OpenLP Remote plugin. Those links to jQuery and other resources in the /pages directory will exist when OpenLP links them internally. Are you getting errors?

I get a blank page with just a small (about 1 cm^2) grey square in the middle.
I'm using this with OpenLP 2.4.6.

Yes, your browser source will display that small box when there are no lyrics to display. You can consider it a known bug. I have not gotten around to fixing it (it's due to the padding of the lyrics div). Make sure you have a live slide on OpenLP AND that you have received the text in the control. Click display next and it should appear.

I do have a set of live slides cycling. I can see them in other browser windows connected to /main and /stage, as well as on the connected projector.

Does the text pop up in the preview in the control.html?

When I create a browser source for http://ipaddress:4316/stage/stream, the only thing that show is the preview is that small square grey square. Is this what you were asking? I haven't specified control.html in the path.

Yes, you need to also add a custom browser dock to control what part of the slide is displayed. Otherwise nothing will be displayed in the browser source.

I added a new guide, btw, that may be helpful.
https://obsproject.com/forum/resources/using-openlp-interface-for-lyrics.1009/

authors: SkepticalTrueBeliever amirchev

repo: amirchev/OBS-OpenLP-Lyrics-Interface


text:
If there is a subdirectory in /data/data/myapp/databases, than it doesn't work

It just throw an exception like this :
E/SQLiteLog: (14) cannot open file at line 30058 of [9491ba7d73]
E/SQLiteLog: (14) os_unix.c:30058: (21) open(/data/data/myapp/databases/cc) -
E/SQLiteConnection: DB info: sqlite3_open_v2, path: /data/data/myapp/databases/cc, flag: 6, ret: 14
E/SQLiteConnection: DB info: errno = 21, errno message = Is a directory
E/SQLiteDatabase: Failed to open database '/data/data/myapp/databases/cc'.
Although I can open the web,  it only show databases's name, you can't see the data.
It seems the lib deals with dir as a database, and cause everything broken after.

We will add this support sooner

Now you can pass the custom path to the library.

authors: ArcherCX amitshekhariitbhu


text:
UseIndex does not allow for generics and only return unknown

Describe the bug
When using the library with typescript, useIndex seems to not allow for generics and will only return unknown as return types.
To Reproduce

use useIndex in typescript
check the type of the return

Expected behavior
first element of the return result should be typed
Platform Information:

Library Version 0.6.12

@delfu The library has been fully migrated to typescript with type generics but not released yet. You can try the master branch if you need it.

authors: ammarahm-ed delfu

repo: ammarahm-ed/react-native-mmkv-storage


text:
Write test for database

@NicoStellwag: Could you update the description of the issue here?

User story

As a team member
I want to have 70 percent code coverage for the added database service
So that I can fullfill the requirement of our stakeholder / industry partner

Acceptance Criteria

[x] Code coverage of database service above 70 percent

Further description

also see #26

authors: Meisterlu NicoStellwag


text:
Separate css and js directories lead to incorrect paths in html

{
  output: {
    path: path.resolve('build/js'),
    publicPath: '',
    filename: '[name].js'
  },

  plugins: [
    new ExtractTextPlugin('../css/[name].css'),

    new HtmlPlugin({
      template: 'example.html',
      filename: '../index.html'
    })
  ],

  ...
}

The structure ends up looking like:
build/
    index.html
    js/
        main.js
    css/
        main.css

Using o.htmlWebpackPlugin.files in the template, the link and script tags end up looking like:
<link href="../css/main.css" rel="stylesheet">
<script src="main.js"></script>
Expected:
<link href="css/main.css" rel="stylesheet">
<script src="js/main.js"></script>

Hm could you create a pull request?

This issue is resolved if the js/ segment is included in the filename / chunkFilename and kept out of the path. This way, the filename provided to HtmlPlugin does not need the ../.

@ericmatthys This is not a great workaround, in my opinion. Trying to get all the other plugins/loaders to add the additional directory path everywhere is not trivial (I tried, and ran into issues with postcss-loader and extract-text-webpacl-plugin).
It would be so nice if we could just use a ../index.html for the filename :disappointed:

@idolize Are you setting publicPath appropriately?

authors: ericmatthys idolize jantimon

repo: ampedandwired/html-webpack-plugin

license: mit


text:
Uri\Http deprecated

From version 7.5 of league/uri got deprecation warning: E_USER_DEPRECATED: Method League\Uri\Http::createFromString() is deprecated since league/uri:7.0.0, use League\Uri\Http::new() instead
This code shoud be compatible with league/uri ^6|^7

Merged a more complete fix in #372. Thank you though! :+1:

authors: aleswita trowski

repo: amphp/http-client


text:
Feature: Feature requests from Issues + Simple Client

Feature requests from issues:

return a promise from logEvent that returns the promise from when the event is sent. (Issue #12 )
create a simpler client that does not use retry or flush, goes straight to transport layer

on this client, a logEvents(...events) WIP (issue #23 )

Closing this in favor of another PR: https://github.com/amplitude/Amplitude-Node/pull/30

repo: amplitude/Amplitude-Node


text:
fix: location is polyfilled to an empty object

Summary
https://amplitude.atlassian.net/browse/AMP-97294
If window.location is set to be an empty object in polyfills,
global.window.location = global.window.location || {};

an error occurs "TypeError: Cannot read property 'split' of undefined".
This PR patches this edges cases with tests.
Checklist

[ ] Does your PR title have the correct title format?
Does your PR have a breaking change?:

The issue is on React Natvie, which doesn't has version 2.0 yet. Should there be another pr to do the same fix for v1.x?

Thanks @yuhao900914 @izaaz for reviewing and calling out. Here is the PR of cherry picked commits from this PR for v1.x.

repo: amplitude/Amplitude-TypeScript


text:
Add payment Request sample

Taking over @afitz0 PR #806 as I had to make some additional changes.
Fixes #713

@afitz0 FYI

Demo: https://amp-by-example-staging.appspot.com/advanced/payments_in_amp/

@rudygalfi @ericlindley-g FYI

Given nothing happens visually when clicking on the button but it only prints in the console "Buying product Apple: 1" it may be worth mentioning to look at the console, otherwise someone can click it and don't understand what you are trying to demonstrate

@kul3r4 which browser did you use? There should be a popup in Chrome:

Chrome with the staging URL

Ah sorry - works now. Wasn't up-to-date.
On Mon, May 15, 2017 at 6:17 AM Chiara Chiappini notifications@github.com
wrote:

Chrome with the staging URL
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/ampproject/amp-by-example/pull/807#issuecomment-301471904,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAXOOI1wpE3bM-nXh9QaLqOR6dlwpB2Oks5r6FB7gaJpZM4NZU0y
.

Just made another small change to address Ade's comment. Button shows no a different value on safari.

Hi, I tried again on staging and the button is now not clickable.

repo: ampproject/amp-by-example


text:
[test-case-reporting] Add types for Travis test reports

/cc @rcebulko
Works toward #884.
Sample of the test result report JSON generated when we run gulp unit
    "summary": {
        "success": 10879,
        "failed": 21,
        "skipped": 195,
        "error": false,
        "disconnected": false,
        "exitCode": 1
    },
    "browsers": [
        {
            "browser": {
                "id": "52060",
                "fullName": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36",
                "name": "Chrome 83.0.4103.97 (Linux x86_64)",
                "state": "DISCONNECTED",
                "lastResult": {
                    "startTime": 1592249357208,
                    "total": 11095,
                    "success": 10879,
                    "failed": 21,
                    "skipped": 195,
                    "totalTime": 813363,
                    "netTime": 275545,
                    "error": false,
                    "disconnected": false
                },
                "disconnectsCount": 0,
                "noActivityTimeout": 120000,
                "disconnectDelay": 120000
            },
            "errors": [],
            "results": [
                {
                    "id": "",
                    "description": "generates extensions metadata",
                    "suite": [],
                    "success": true,
                    "skipped": false,
                    "pending": false,
                    "time": 4,
                    "log": [],
                    "assertionErrors": [],
                    "startTime": 1592249357248,
                    "endTime": 1592249357258
                },
                {
                    "id": "",
                    "description": "generates runtime offsets",
                    "suite": [],
                    "success": true,
                    "skipped": false,
                    "pending": false,
                    "time": 2,
                    "log": [],
                    "assertionErrors": [],
                    "startTime": 1592249357264,
                    "endTime": 1592249357271
                },
                {
                    "id": "",
                    "description": "generates json offsets",
                    "suite": [],
                    "success": true,
                    "skipped": false,
                    "pending": false,
                    "time": 1,
                    "log": [],
                    "assertionErrors": [],
                    "startTime": 1592249357271,
                    "endTime": 1592249357275
                },
                ...
            ]
        }
    ]
}

@rcebulko, I think googlebot is complaining about our co-authored commits. What should I do?

repo: ampproject/amp-github-apps


text:
Ansible not compatible with its ecosystem

Describe the bug
When using ansible from asdf, ansible-lint won't work due to the following error:
❯ ansible-lint playbook.yml
Ansible CLI (2.14.6) and python module (2.15.2) versions do not match. This indicates a broken execution environment.

Steps to reproduce

Install ansible using asdf as reported in the README
configure asdf and direnv in a project for using older versions of ansible (e.g. 7.6.0)
In that project, try to run ansible-lint

Expected behavior
I expect ansible-lint to run without reporting the error of a broken execution environment.

I am an extremely light user of ansible, but the following worked for me:
✦ ❯ cat ../.tool-versions
ansible 7.7.0@3.10.12
ansible-lint 6.17.2@3.10.12

✦ ❯ which ansible-lint
/home/amrox/.asdf/installs/ansible-lint/6.17.2@3.10.12/bin/ansible-lint

✦ ❯ ansible-lint .
WARNING: PATH altered to include /home/amrox/.asdf/installs/ansible-lint/6.17.2@3.10.12/venv/bin :: This is usually a sign of broken local setup, which can cause unexpected behaviors.

Passed: 0 failure(s), 0 warning(s) on 1 files. Last profile that met the validation criteria was 'production'.

Maybe try installing ansible-lint with asdf-pyapp as well?

Thanks for your reply.
I was missing the fact that asdf-pyapp works with literally every python app, checked the README and didn't find ansible-lint.

authors: FedericoAntoniazzi amrox

repo: amrox/asdf-pyapp


text:
Convert TextDrawable to Bitmap generates no text

Hello, I am trying to generate a Bitmap from TextDrawable but the final result has no text, only appears the background.
Here is my declaration and the function I use:
Bitmap icon = Utilities.getBitmapFromUser(user);
// ...
TextDrawable userDrawable = TextDrawable.builder()
                .buildRound(firstLetter, colors[i]);
// ...
public static Bitmap drawableToBitmap (Drawable drawable) {
        if (drawable instanceof BitmapDrawable) {
            return ((BitmapDrawable)drawable).getBitmap();
        }

        int width = drawable.getIntrinsicWidth();
        width = width > 0 ? width : 1;
        int height = drawable.getIntrinsicHeight();
        height = height > 0 ? height : 1;

        Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(bitmap);
        drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
        drawable.draw(canvas);

        return bitmap;
    }

Do you know any way to do it?

I am having same issue. Did you solved it?

?. Have you run debugger. Dev console. Will show any conflicts.
If height= height > 0
Else}
Height=1
Developer's console will point out any arguments.
Android studio is rich in knowledge. Some devices do not work the same. Code is slightly different.

I could solve it by changing the default width and height:
int width = drawable.getIntrinsicWidth();
width = width > 0 ? width : 96; // Changed the 1 for a 96
int height = drawable.getIntrinsicHeight();
height = height > 0 ? height : 96; // Changed the 1 for a 96

    public static Bitmap drawableToBitmap (Drawable drawable) {
        if (drawable instanceof BitmapDrawable) {
            return ((BitmapDrawable)drawable).getBitmap();
        }

        int width = drawable.getIntrinsicWidth();
        width = width > 0 ? width : 96; // Replaced the 1 by a 96
        int height = drawable.getIntrinsicHeight();
        height = height > 0 ? height : 96; // Replaced the 1 by a 96

        Bitmap bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
        Canvas canvas = new Canvas(bitmap);
        drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
        drawable.draw(canvas);

        return bitmap;
    }``

 TextDrawable drawable = TextDrawable.builder()
                .buildRoundRect("A", Color.RED, 10); // radius in px

        Drawable d = new BitmapDrawable(drawableToBitmap(drawable));

When I try to setImageDrawable on API 16 inside ActionBar ImageView crashing The I have converted to Bitmap and setImageBitmap is working.
android.graphics.Rect.<init> (Rect.java:72)
android.graphics.drawable.ShapeDrawable.mutate (ShapeDrawable.java:377)
android.widget.ImageView.applyColorMod (ImageView.java:1150)
android.widget.ImageView.updateDrawable (ImageView.java:684)
android.widget.ImageView.setImageDrawable (ImageView.java:398)
android.support.v7.widget.AppCompatImageView.setImageDrawable (AppCompatImageView.java:99)

Thanks @MarcAragones , @goodlifechris

authors: MarcAragones caraus drayan85 goodlifechris niteshkhatri

repo: amulyakhare/TextDrawable


text:
footer

the footer UX can be made better as it looks like two footers overlapping which can be done in a single one clearly
please assign this to me under gssoc

#95 , add your comment here, @Lakshyyaa . Thanks.


text:
Use XmlnsDefinitionAttribute to map XML namespace to CRL namespace

In doing so, this will remove all of the ugly namespace prefixes found all over the XAML, i.e.
From this:
<UserControl
    x:Class="Builder.ProjectView"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:fluent="using:FluentAvalonia.UI.Controls">
    <StackPanel>
        <fluent:Frame />
        <fluent:FontIcon />
        <fluent:NavigationView>
            <fluent:NavigationView.MenuItems>
                <fluent:NavigationViewItem />
			<fluent:NavigationViewItem />
	        </fluent:NavigationView.MenuItems>
        </fluent:NavigationView>
    </StackPanel>
</UserControl>

to this
<UserControl
    x:Class="Builder.ProjectView"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <StackPanel>
        <Frame />
        <FontIcon />
        <NavigationView>
            <NavigationView.MenuItems>
                <NavigationViewItem />
			<NavigationViewItem />
		</NavigationView.MenuItems>
        </NavigationView>
    </StackPanel>
</UserControl>

This can be done by adding a few lines to the Assembly.cs file in the FluentAvalonia.UI.Controls project.
using Avalonia.Metadata;
[assembly: XmlnsDefinition("https://github.com/avaloniaui", "FluentAvalonia.UI.Controls")]

I really don't like when 3rd parties do this.
1- It causes issues with the designer and I don't wanna have to triage issues relating to "why isn't this working"
2- It makes it seem the 3rd party controls are part of the main library - which they're not. This violates Xml specs, as nodes in different namespaces need their xmlns prefix
3- It could cause type name clashes. Until recently, I had a couple controls that had the same name as upstream. I've now prefixed them with 'FA' to distinguish, but this could cause other issues
I get this makes the Xaml a little cleaner and removes the need to add the xmlns stuff (which can be annoying for every xaml file), but IMO this is a bad practice.

authors: TheXamlGuy amwx

repo: amwx/FluentAvalonia


text:
Copy-pasted file containing newlines, newlines did not appear until after refreshing

FIle attached. To reproduce, copy-paste it into a fresh chapter, look at the editor UI, then refresh.
Note I made this file in Notepad on Windows and I'm assuming it has CRLF line endings
TestNewline.txt

This definitely isn't the expected behavior. Here's a bit of brainstorming about how to address it.
When pasting raw text, it's currently inserted as a single text node in the lowest part of the document tree, climbing up the parents until it finds a node willing to handle it. But in doing so, it ignores any whitespace in the text node. This works on refresh because when that node is serialized, the whitespace is preserved, and on reload, it's parsed appropriately as separate paragraphs.
There are a few possible solutions here:

Split the raw text into multiple text nodes and insert them as a series. This would require a major revision to the insertion algorithm, since it only accepts a single node at the moment, not a list of nodes.

Insert the text node as we do now, but then reparse, accounting for the whitespace. This would account for all parsing rules, but just require some careful handling of the caret placement.

I'm leaning towards #2.

2 seems elegant!
On Sat, Jun 10, 2023, 2:14 PM Amy J. Ko @.***> wrote:

This definitely isn't the expected behavior. Here's a bit of brainstorming
about how to address it.
When pasting raw text, it's currently inserted as a single text node in
the lowest part of the document tree, climbing up the parents until it
finds a node willing to handle it. But in doing so, it ignores any
whitespace in the text node. This works on refresh because when that node
is serialized, the whitespace is preserved, and on reload, it's parsed
appropriately as separate paragraphs.
There are a few possible solutions here:

Split the raw text into multiple text nodes and insert them as a
series. This would require a major revision to the insertion algorithm,
since it only accepts a single node at the moment, not a list of nodes.
2.
Insert the text node as we do now, but then reparse, accounting for
the whitespace. This would account for all parsing rules, but just require
some careful handling of the caret placement.
I'm leaning towards #2 https://github.com/amyjko/bookish/issues/2.
—
Reply to this email directly, view it on GitHub
https://github.com/amyjko/bookish/issues/341#issuecomment-1585758875,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAO6WYLTYMVBWG4VWXCRIDLXKS2QDANCNFSM6AAAAAAYRLRIY4
.
You are receiving this because you authored the thread.Message ID:
@.***>

authors: amyjko rbohrer

repo: amyjko/bookish


text:
Excessive Drone motions with fly_direct method in Bebop 2

Hello!
I've been trying to code a controller for the drone by making extensive use of the fly_direct function, which receives the controller's output.
    bebop.fly_direct(0, 0, yaw, 0, duration=0.5)
(the yaw value varies, but it stays within the range [-50, 50])
One thing I noticed is that whenever I use fly_direct with only duration and yaw arguments, in order to make the drone change heading while remaining in the same (x, y, z) position, the Bebop 2 drone tends to move significantly over time in the x and y axis. This motion in x and y becomes even more significant when the drone changes the direction of rotation around the z axis or when it transitions from any motion involving pitch/roll to the one described by the code above. Shouldn't fly_direct prevent this from happening since the roll and pitch arguments are set to zero?
Is there any way to stabilize the drone around the same (x, y, z) position while it changes heading?
Thanks in advance

Do you have flat trim enabled?
Also move_relative will turn in place but watch the firmware bug I note in the documentation.

By having flat trim enabled you mean whether I'm using the set_flat_trim method at the beginning of each test flight? If that's the case, then no, I haven't used it, thanks for the tip.
Regarding move_relative, whenever I use it, the drone just remains still (and stable) in mid-air and the code interpreter never leaves the function (probably stays stuck in a loop inside). I just read the documentation and although I'm using the drone indoors, the scenario seems rather different from the one described there.
Do you think this problem is due to mixed coverage and can be solved with tin foil?
(I'll try using the tin foil just in case)

The mixed coverage is definitely an issue. To my knowledge, they never fixed the firmware bug that I reported about that.

Found out that the problem couldn't be fixed with tin foil. After testing more code I realized that move_relative works just fine as long as fly_direct is never used. Once fly_direct is used, the next time move_relative is called, the drone will just stay still indefinitely, regardless of the arguments used, with the interpreter never leaving the move_relative function.
Is this supposed to happen?
Here's the simplest example I tested where the bug could be seen:
   print('Using move relative to turn the drone 60 degrees')     bebop.move_relative(dx=0, dy=0, dz=0, dradians=np.pi / 3)     print('Using move relative to the left, 2 meters')     bebop.move_relative(dx=0, dy=-2, dz=0, dradians=0)     print("Using move relative to the right, 2 meters")     bebop.move_relative(dx=0, dy=2, dz=0, dradians=0)     print('Using move relative backwards, 30 cm')     bebop.move_relative(dx=-2, dy=0, dz=0, dradians=0)     print("Using fly direct")     bebop.fly_direct(0, 0, 0, 0, 0.5)     print("Going forwards")     bebop.move_relative(dx=-2, dy=0, dz=0, dradians=0)     print(f"Landing...")     print(f"Remaining Battery = {bebop.sensors.battery}")     bebop.safe_land(5)
Depending on whether the fly direct command is commented out or not the code will either reach its end (drone lands), or it will stop working from print("Going `forwards") onwards. Is there something wrong with the code? (I also tried using different arguments on fly_direct but the result was the same)

Found out that the problem couldn't be fixed with tin foil. After testing more code I realized that move_relative works just fine as long as fly_direct is never used. Once fly_direct is used, the next time move_relative is called, the drone will just stay still indefinitely, regardless of the arguments used, with the interpreter never leaving the move_relative function.
Is this supposed to happen?
Here's the simplest example I tested where the bug could be seen:
print('Using move relative to turn the drone 60 degrees')
bebop.move_relative(dx=0, dy=0, dz=0, dradians=np.pi / 3)
print('Using move relative to the left, 2 meters')
bebop.move_relative(dx=0, dy=-2, dz=0, dradians=0)
print("Using move relative to the right, 2 meters")
bebop.move_relative(dx=0, dy=2, dz=0, dradians=0)
print('Using move relative backwards, 30 cm')
bebop.move_relative(dx=-2, dy=0, dz=0, dradians=0)
print("Using fly direct")
bebop.fly_direct(0, 0, 0, 0, 0.5)
print("Going forwards")
bebop.move_relative(dx=-2, dy=0, dz=0, dradians=0)
print(f"Landing...")
print(f"Remaining Battery = {bebop.sensors.battery}")
bebop.safe_land(5)
Depending on whether the fly direct command is commented out or not the code will either reach its end (drone lands), or it will stop working from print("Going `forwards") onwards. Is there something wrong with the code? (I also tried using different arguments on fly_direct but the result was the same)

That's really odd!  I wonder if there has been a firmware upgrade recently?  My bebop no longer charges so I can't even turn it on to check :( I know we used to use fly direct and move relative but I tended towards move relative because it uses more precision internally (they use internal sensors that they don't give us access to through the API to move a precise amount)

authors: amymcgovern tomas-ascensao

repo: amymcgovern/pyparrot


text:
Refactor: text lexer ERROR constant

A constant named "ERROR" is used as a sentinel value to indicate that the lexer (ParserTextRaw) is currently not holding on to a value, but this is confusing as this is a normal state after each call to next() and thus doesn't actually indicate any error. Should most likely be renamed to NONE

This will be taken care of in a future rewrite.

repo: amzn/ion-js


text:
on start it explains what bing ai is

When i start up the bing ai it starts to explain what bing ai is. Please fix it, it's really annoying.

I confirm, it appeared today

Hi, the do you mean by clicking the "Open Bing Chat" button? It is currently set to bing.com/chat.

the issue is gone today

repo: anaclumos/bing-chat-for-all-browsers


text:
Bad URL for conda-repo-cli

This is slightly off-topic.
The v6 API uses the conda-repo-cli package instead of the anaconda client package.  The listed URL for conda-repo-cli on anaconda.org is https://anaconda.org/anaconda/conda-repo-cli.
However, this link gives a 404.  I am not sure where to add issues and look at documentation.

@jamespreed can you please provide any additional information for what you are trying to do? conda-repo-cli is our current CLI for Package Security Manager on-prem, and the repo is currently private, which is why you may see a 404.
If you are looking for documentation for conda-repo-cli, I believe that information is here: https://business-docs.anaconda.com/en/latest/user/cli.html

the repo is currently private, which is why you may see a 404

That is my answer.  I was trying to view the code.

authors: jamespreed mattkram

repo: anaconda/anaconda-client


text:
[error] ERROR Error: Uncaught (in promise): ReferenceError: document is not defined

Please provide the environment you discovered this bug in.
Darwin Generic-MacBook-Air.local 23.0.0 Darwin Kernel Version 23.0.0: Fri Sep 15 14:41:34 PDT 2023; root:xnu-10002.1.13~1/RELEASE_ARM64_T8103 arm64
Which area/package is the issue in?
vite-plugin-angular
Description
$ npx create-nx-workspace@latest --preset=@analogjs/platform
$ cd analog-workspace
$ npm install
$ nx serve analog-project
Please provide the exception or error you saw
$ nx serve projectName --port=4400

> nx run projectName:serve:development --port=4400

The server endpoints are accessible under the "/api" path.
  ➜  Local:   http://localhost:4400/
  ➜  Network: use --host to expose
Angular is running in development mode.
2:20:17 PM [vite] Error when evaluating SSR module /@fs/Users/projectName/node_modules/.pnpm/primeng@16.0.0-rc.2_@angular+common@16.2.7_@angular+core@16.2.7_@angular+forms@16.2.7_rxjs@7.8.1_zone.js@0.13.3/node_modules/primeng/fesm2022/primeng-editor.mjs: failed to import "quill"
|- ReferenceError: document is not defined
    at Object.<anonymous> (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:7661:12)
    at __webpack_require__ (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:36:30)
    at Object.<anonymous> (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:1030:1)
    at __webpack_require__ (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:36:30)
    at Object.<anonymous> (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:5655:14)
    at __webpack_require__ (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:36:30)
    at Object.<anonymous> (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:10045:13)
    at __webpack_require__ (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:36:30)
    at Object.<anonymous> (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:11557:18)
    at __webpack_require__ (/Users/projectName/node_modules/.pnpm/quill@1.3.7/node_modules/quill/dist/quill.js:36:30)

Other information
No response
I would be willing to submit a PR to fix this issue

[ ] Yes
[ ] No

This is not a bug in Analog. If a library you use doesn't support SSR environments, you need to disable it for SSR and enable it in the browser.
Vite has a flag for this: import.meta.env.SSR
Angular also has APIs for this: https://angular.io/api/common/isPlatformBrowser

authors: benruwel brandonroberts

repo: analogjs/analog