Recursive bzz.list()

What do you think about adding an option for bzz.list() that would recursively fetch all entries for a given manifest? Resolving all the common_prefixes returned by Swarm?

I'd rather avoid adding extra logic to bzz.list() so we can keep it simple and matching Swarm's response payload, but maybe that could be an extra package similar to the timeline one with higher-level logic and more custom data structures?
I have implemented something like this already for a simple app, but I think this logic should be improved to support a maximum recursion level, maybe using Observables to track progress rather than a Promise, possibly lazy-loading, etc.
One possibility as well rather than using a nested data structures could be to use a flat one with the paths as keys, really depends on the use cases I guess.

Well, I don't really agree with having it as a separate package. I mean it is an option, but I think this approach only contributes to the "package hell" problem of the JS ecosystem. This is a very tightly coupled feature that I would have actually expected to be supported by Swarm directly, but it is not so I see improvement space here that this library can take advantage of. I admit it might involve some more logic, but it will be very "underhood" and to the user, it should only be visible as simple option recursive.
I am not sure how demanding the list() call actually is, but I think Observables may be bit overkill. I assume that most of the people would buffer up the results first anyway before proceeding to do something with it, so I think Promise will be sufficient enough for it. Or do you think that there could be
Agree with the maximum recursion level limit, would have some reasonable default and allow user to override that.

I think we're mixing a bunch of different things here so I'd like to keep these concerns separated.
First, I disagree with the "package hell" problem, at least if you mean it as "many packages doing small things".
I think it's very easy to bundle things together, while unbundling is much harder, this is why in Erebos there is a separation between the utilities (encoding, signing...), API-level interactions (BZZ, PSS) and higher-level concerns (such as Timeline).
If Erebos was provided as a single package, it would be way heavier for everyone, which in my opinion is a problem especially if you consider it included in Swarm apps that users would eventually pay to load. Even if it's very small amounts it's still waste of time/bandwidth/money.
I also disagree with the idea that because you're expecting it should be supported by Swarm but is not, it should be supported by Erebos.
If you expect it to be supported by Swarm, you should open a SWIP or discuss it in another way with the Swarm team because Erebos is not meant to "replace" behavior that is not provided by Swarm.
The @erebos/api-* packages are meant to provide a relatively low-level client for Swarm, possibly with some higher-level abstractions to cover common use cases, but that are basically there to reduce boilerplate for apps. They are not meant to abstract complex Swarm interactions.

I am not sure how demanding the list() call actually is, but I think Observables may be bit overkill. I assume that most of the people would buffer up the results first anyway before proceeding to do something with it, so I think Promise will be sufficient enough for it. Or do you think that we could hit some "reasonable" limit (eq. reasonable number of list calls) with relative common/small manifests?

Well that's exactly the kind of questions that make things way more complex than for example adding a recursive?: boolean flag to the bzz.list() options in my opinion, and why I don't think this is suitable for a low-level client API.
I'm more eager to provide building blocks so that developers can implement the behavior they need for their app, rather than a go-to solution that would hide the underlying complexity and potentially be bad for apps (for example making a recursive call on hash with lots of subfolders).
To me a more interesting opportunity is to discuss it more with the rest of the community, first asking the Swarm team why Swarm doesn't provide this functionality by itself, then getting other potential users of such API to give feedback about their use cases, and creating a spec for it as we did for the Timeline API.
Sorry for the long reply but to summarize: I think it's useful but it shouldn't be provided as a naive low-level API, and there are likely different concerns in terms of Swarm behavior, performance and UX that need to be taken into account.

Thanks for such a long explanation! Really appreciate it!

First, I disagree with the "package hell" problem, at least if you mean it as "many packages doing small things".
I think it's very easy to bundle things together, while unbundling is much harder, this is why in Erebos there is a separation between the utilities (encoding, signing...), API-level interactions (BZZ, PSS) and higher-level concerns (such as Timeline).
If Erebos was provided as a single package, it would be way heavier for everyone, which in my opinion is a problem especially if you consider it included in Swarm apps that users would eventually pay to load. Even if it's very small amounts it's still waste of time/bandwidth/money.

Well, good point about the payment part. And agree with the bundling/unbundling, yet I don't agree with the level of the modularization. But it is alright, it is somehow a philosophical question that everybody has to answer.

I also disagree with the idea that because you're expecting it should be supported by Swarm but is not, it should be supported by Erebos.
If you expect it to be supported by Swarm, you should open a SWIP or discuss it in another way with the Swarm team because Erebos is not meant to "replace" behavior that is not provided by Swarm.
The @erebos/api-* packages are meant to provide a relatively low-level client for Swarm, possibly with some higher-level abstractions to cover common use cases, but that are basically there to reduce boilerplate for apps. They are not meant to abstract complex Swarm interactions.

Good point as well. Make sense to implement this in Swarm (if possible). I guess I am closer to this library then to Swarm itself, so that is why I proposed it here instead there. 😅
Well I will open an Issue in Swarm and see what they will have to say to it :-) I

Well, good point about the payment part. And agree with the bundling/unbundling, yet I don't agree with the level of the modularization. But it is alright, it is somehow a philosophical question that everybody has to answer.

I agree it's tricky to get it right, the approach I have for Erebos is to split between individual utilities (I don't want a single "utils" package that ends-up being a dependency for everything, and hard to make breaking changes to), individual APIs (BZZ, PSS) possibly per platform (again with the idea to avoid having extra dependencies such as node-specific ones in a browser build), and "high-level" packages such as SwarmClient bundling the BZZ and PSS APIs and Timeline that adds functionality on top of the BZZ API.
If you have suggestions about how this can be improved please don't hesitate to share! At the end of the day it's about tradeoffs between flexibility and ease of use and I've opted for more flexibility, but if there are simple ways to improve the ease of use I'm all up for it.

Good point as well. Make sense to implement this in Swarm (if possible). I guess I am closer to this library then to Swarm itself, so that is why I proposed it here instead there. 😅

I totally get it, no problem!
I think it's good for the Swarm project itself to get this kind of feedback to decide what are the boundaries between what should be handled by Swarm and what is out of scope, and I hope the SWIP process can help standardize this kind of decision, and possibly client specs to implement this behavior, so that it can be generic to the Swarm ecosystem rather than specific to Erebos.


NEW report to show members who have registered an MFA method

In order to aid administrators with the up-take of MFA on their site, a
report can be used to show which users are yet to set up a method, etc.
Resolves #114

re-review ready :)

Pagination doesn't work for me, each next page or last page shows no records, even though I have 9 pages of records. Also filtering sorting by columns doesn't work.

I feared this might be the case, as a result of converting to ArrayData to store the data. I'll investigate.

You may need to calculate everything as composite DataList columns/joins in order to get the filtering and pagination working

Culprit was GridFieldActions submitting the full form data, even for fields with invalid input (that a normal HTML submit wouldn't include). That data set included empty strings for all the filter inputs, which resulted in no results.

I'm not sold on the unicode equivalent of No., but I've otherwise run out of things to moan about. Nice one!

I'm not sold on the unicode equivalent of No.

I think it more semantically correct, and would hopefully read correctly with assistive technologies rather than the word "No." which would be ambiguous as "There are no methods."

FYI it looks like this in my IDE:

Yes, but it looks like this in the CMS (which is where it counts)

I think if you're concerned about accessibility then we should be doing something like No. methods, which would be semantically correct

I'm gonna merge this as-is - feel free to make follow up PRs

I think if you're concerned about accessibility then we should be doing something like No. methods, which would be semantically correct

This would require changes to Report and GridFieldDataColumns to support e.g. HTMLValue being passed in as a title.

Well, what's there now reads "numero sign methods" with VoiceOver


Making sure that the number of pages is an int to resolve the type e…

Solve the issue I was experiencing
Traceback (most recent call last):
  File "test.py", line 72, in <module>
    users = search_location("Kharagpur", max_users = 14)
  File "test.py", line 21, in search_location
    return _search_location(soup, max_users, params)
  File "test.py", line 32, in _search_location
    for i in range(1, (number_of_pages)):
TypeError: range() integer end argument expected, got float.

Refer to #2 for the discussion on the issue.

This looks cool. It is in !
Thanks @Arafatk :+1:


More dropdown (menu) - add missing nav items

Pull Request Template

Please provide all of the details below. Pull requests missing any of the information below will be closed!
Providing the issue number/url helps us identify the problem being solved and keep the issues tab clean and tidy

What issue does this fix?.
Summarize what this PR fixes:-
Added missing nav items inside 'More' dropdown
What ISSUE NUMBER does this fix?
Fixes #955
Checklist
(Add an x between the brackets to check the items)

[x] I have summarize what this PR fixes above
[x] I have provided the issue ID/URL above
[x] I have not added Bootstrap or jQuery and used correct styling guide.
[x] This PR fixes only the issue mentioned above (create separate PRs for separate issues)
[x] I was the first one to claim the issue or I created the issue - I created the issue

Fixed issue #966

There is a conflict with the blog.html if you could take a look and fix those please.


Do not include README in cabal package

The rendering on Hackage is broken.  So I guess we better just refer users to GitHub.

https://hackage.haskell.org/package/hpack#readme

I tried to research if this has other solution than removing readme with no good results, but this seems relevant: http://stackoverflow.com/questions/41623846/which-dialect-of-markdown-does-hackage-use-to-render-readmes
Anyway, I did this in #154

Yeah, the Hackage markdown rendering is a bit of a shame. Relevant issue here – I guess I could need a bit of support there.


The react native team is so disappointing

The bug of a long time ago has not been solved yet.
https://github.com/facebook/react-native/issues/7474
react native: 0.59.5

Thanks! We'll try to be less disappointing. In the meantime, please submit Pull Requests with bug fixes for the issues you are running into.


chore: vcluster docs v0.22

Content Description

new version created
fixing broken links and anchors

Should be merged together with the v0.22 release.
Preview Link

Internal Reference
Closes DOC-369

@FabianKramm this is ready for quick sanity check. Please ignore the linter errors, we will merge as is deal with it separately. I've fixed most of the spelling errors.


Size ceil functions

closes #103 & #104
The size function is a WDL.Expr.Apply expression that accepts two arguments, the input file name and the memory unit in Binary.
The ceil function is a WDL.Expr.Apply expression that accepts only one argument, usually a float, and returns the upper bound of the literal.
The javascript Math.ceil is used in the retuned cwl_expression.

superseded by #150


Automated Package Upgrade

:tada: This PR is included in version 13.0.132 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Create with Props

Is your feature request related to a problem? Please describe.
The current syntax for applying stylex props in React is overly verbose for simple use cases:
const styles = stylex.create({
  container: {
    color: 'red'
  },
});

<div {...stylex.props(styles.container)} />

Describe a solution you'd like
While having stylex.prop seperate from stylex.create makes sense for cases with multiple and/or dynamic classes, in a lot of instances it's vestigial code. I'd love a utility to generate props for all the styles and add them to the object. Something like this:
const styles = stylex.createWithProps({
  container: {
    color: 'red'
  },
});

<div {...styles.container.props} />

This could also exist as a wrapper function. Any of these would be an improvement:
const styles = stylex.create({
  container: {
    color: 'red'
  },
});

const props = stylex.withProps(styles);

<div {...props.container} />

Describe alternatives you've considered
Of course this is not a super complex utility for developers to write themselves or it could exist as a simple utility package. However, I think there is a lot of DX value to be gained by including it in the main package. This functionality could also just be added to stylex.create but I assume there would be performance downsides at scale?

You can use named imports and short names:
import {create as c, props as p} from '@stylexjs/stylex';

const s = c({
  container: {
    color: 'red'
  },
});

<div {...p(s.container)} />

Does this solve your problem?

@nmn Thank you for responding. Aliasing doesn't really help, it shaves off some characters for sure, but it makes the code less legible. My solution removes the need to wrap ever single style in a function while still giving someone reading the line context as to what the object being spread is. This is not a question but more of a suggestion/RFC.

We explain in the docs why we don't value terse code for simple use cases, especially when it comes at the expense of over-complicating the API and not being practical for other use cases. This philosophy is similar to the one React follows, where the preference is to have one way to do things that works in all cases.
Ergonomic alternatives don't need to be built into StyleX itself. For example, in another library we'll be open sourcing you're able to pass the result of create calls directly to elements (i.e., <html.div style={styles.container" />), with either a runtime wrapper to close over stylex.props calls or a build-time transform to convert it to the more verbose form. This is even cleaner than what you're proposing, and it covers all the other uses cases not just simple ones.
Internally at Meta we use React to create components, so the majority of developers that are working with React and StyleX are already passing styles directly to a composite component via a prop (e.g., style or xstyle or whatever you want to call it) and only a minority of cases involves styling HTML elements directly. Typically the people spending the most time styling the raw HTML elements are the engineers working on design system components that everyone else then uses.

@necolas thanks for the in-depth explanation! The other library not being open yet explains a lot. Really appreciate you taking the time.


⚠ Adacta-fintech.com has degraded performance

In bd6af56, Adacta-fintech.com (https://www.adacta-fintech.com) experienced degraded performance:

HTTP code: 200
Response time: 6002 ms

Resolved: Adacta-fintech.com performance has improved in e62bff3.


Add requiements.txt installation to append builder

Currently docker and cluster builders pip install the user's requirements.txt file if provided, but not the append builder.

This might be running under OS/env that might work with the base container right?

ignore requirements.txt and package up existing virtualenv
Same as above. Actually, I remember you bringing catching this issue in one of our meetings.

@r2d4 for the solutions, did you imply to package the virtualenv in to the base image?

@r2d4 is there any plans of fixing the append builder code to install packages from requirements.txt?


state use resolve to load another js module file to complate a lazy-moudle-load,cant work

I need lazy load a module to expansion my app
code like this :
state
$stateProvider.state('plugin',{
  ....
  resolve : {
    loadModule : ['$q',function($q){
       var defer = $q.defer();
       $.getScript('js url',function(){defer.resolve();});
       return defer.promise;
    }]
  }
})

js file
!function(angular,undefined){
   var app = angular.module('a app name ');
   app.controller('app.ctrl.newXX',....);
}(angular);

but if I use $state.go(stateName,param);
this always show error : Argument 'app.ctrl.newXXX' is not aNaNunction, got undefined

Have you solved the problem?

yes

hay forfuns can I know How You hv resolved because i'm also having same problem but not able to find any solution


Add comments of ansi values to simplify debugging

https://github.com/tinted-theming/base16-putty/issues/22

I think this can be closed, no longer needed due to https://github.com/tinted-theming/base16-putty/pull/24


rect_fill issue on larger rectangle

Trying

display.rect(0, 0, 20, 20, Rd_color) = OK
display.rect(0, 0, 100, 100, Gr_color) = OK

but for larger one

display.rect(0, 0, 200, 200, Bl_color) = Truncated in height (I think about 32 pix height)
display.rect(0, 0, 240, 240, Rd_color) = the same

I think this is comming from the fill_buffer C function

That's right... I must have made a mistake... The code I was trying was
display.fill_rect(0, 0, 20, 20, Bl_color)
sleep_ms(1000)
display.fill_rect(0, 0, 100, 100, Rd_color)
sleep_ms(1000)
display.fill_rect(0, 0, 200, 200, Bl_color)
sleep_ms(1000)
display.fill_rect(0, 0, 400, 240, Rd_color)
sleep_ms(1000)

But as I rebooted all the system now, it doesn't show wht I thought to be a bug...
Maybe doing too many things at the sime time in my code...
Sorry for disturbing !

That's fine!
Thank you for testing the code out!


Refactor: let StreamExt::chunks and StreamExt::ready_chunks take NonZeroUsize instead of usize

Hey folks,
Note: after writing all of this below, I noticed std::slice::chunks also uses usize and panics when provided a value that is 0, which is really unfortunate, IMO. Of course, we won't be able to change the std lib and we should keep symmetry between Streams and the std lib, but I'm still interested what you think of this.
Issue
I've noticed that the methods chunks and ready_chunks take a usize as an arg for the capacity.
This seems to be a good arg type, because other "capacity" methods in the std lib take usize as well (e.g. Vec::with_capacity) and so there is symmetry between them.
However, there is a huge pitfall and it is actually not symmetric:
chunks and ready_chunks will panic, when passed in a usize of 0 (according to docs: This method will panic if capacity is zero.).
The other capacity methods (e.g. on Vec in std) do not panic, when provided with the value 0 (which is sensible, because one can have a Vec that has no allocations).
Proposal
Instead of using usize in the argument type, we should rather use NonZeroUsize, because it guarantees a non-zero value. Note that internally we can still use usize (to make it easier to interact with other methods, such as len() etc.) - this proposed change will only affect the API itself.
Here is an exemplary playground to show the general idea:
use std::error::Error;
use core::num::NonZeroUsize;
fn main() -> Result<(), Box<dyn Error>> {

    let cap_untrusted = 1usize; // imagine that this value comes from "somewhere" and could be 0

    let my_chunk = MyChunk::with_capacity(cap_untrusted.try_into()?);

    println!("{my_chunk:#?}");

    Ok(())
}

#[derive(Debug)]
#[allow(dead_code)]
struct MyChunk {
    cap: usize, // internally, we are free to use usize, so that we have symmetry with e.g. `Vec`...
    //...
}

impl MyChunk {
    // ...but our API is more restrictive and won't accept a value that is 0
    pub fn with_capacity(cap: NonZeroUsize) -> Self {
        Self {
            cap: cap.get()
        }
    }
}

Related
The following issues might be related and should be considered, when implementing this proposal:
#2492 especially this comment
BREAKING
This is a breaking change, because the public API changes.
- fn chunks(self, capacity: usize) -> Chunks<Self>
+ fn chunks(self, capacity: NonZeroUsize) -> Chunks<Self>

- fn ready_chunks(self, capacity: usize) -> ReadyChunks<Self>
+ fn ready_chunks(self, capacity: NonZeroUsize) -> ReadyChunks<Self>

See https://github.com/rust-lang/futures-rs/pull/1803, https://github.com/smol-rs/async-channel/issues/2, and https://github.com/tokio-rs/tokio/issues/2742.
I don't think it is reasonable to do this unless a feature like https://github.com/rust-lang/rust/issues/69329 is implemented.

Interesting, thank you for the related links. :heart: I didn't know NonZero types should not be used for APIs and is considered unidiomatic Rust.


Running into npm error message on the Pinephone with podman version

Hi there
On UT Edition with 3Gb RAM running mobian:unstable/bookworm.
sudo apt install podman
Then tried both the /var/lib/genie and ~/.config version.
The later gave me this error after getting the image installed:
{"msg":"exec container process `/usr/bin/npm`: Exec format error","level":"error","time":"2022-01-23T15:25:25.000197416Z"}
Do I need to install npm as well for some reason?
I'm pretty bad with containers though, so need a little help here :smile:

I had the same and I learned that the pulled container is not for arm64 architecture. Need to follow the steps on the read.me to compile it from source. After that with podman:
podman run --name genie -p 3000:3000     -v /dev/shm:/dev/shm     -v $XDG_RUNTIME_DIR/pulse:/run/pulse     -e PULSE_SERVER=unix:/run/pulse/native     -v $XDG_CONFIG_HOME/genie-server:/var/lib/genie-server     --security-opt label=disable   localhost/genie-server
And if podman says that the name genie already is in use, just podman rm ...

It's crazy that the Genie team advertises everywhere in docs that it's compatible with pis and don't even have a docker image compatible with ARM

doesn't seem to be active so no sense to keep open


Let font size of problem describe file equal to editor.fontSize not workbench font size.

🚀 Feature Proposal
Let font size of problem describe file equal to editor.fontSize not workbench font size.
Motivation
The font size of problem describe file is to small.

As it opening in editor section why the font size not equal editor font size?

The preview, solution and result webview will use built-in markdown engine's css file to render. So the best choice would be to use markdown.preview.fontSize.
However, I tested on my vscode and found that the setting wouldn't change the font size in the webview. It is because that I didn't ship the extra contribution logic from the original extension. I will work on this lately.

Thanks!

14.0 is now updated.

Seems the font of markdown still smaller than editor font size.

@roachsinai Did you update the setting: markdown.preview.fontSize?

@jdneo No, I didn't. Now, it workded, thanks!


Make Tabs closable by mouseclick. Closes #778

Make Tabs closable by mouseclick.
Description
If a user clicks on a tab with a mouse button other then the primary one -> Close the corresponding tab.
Contribution Checklist:

[/] The pull request only addresses one issue or adds one feature.
[/] The pull request does not introduce any breaking changes
[/] I have added screenshots or gifs to help explain the change if applicable.
[/] I have read the contribution guidelines.
[/] Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.

Welcome @frixxx !
Thanks for taking care of this. Merged !!

@helloanoop
I wouldn't merge it as I wouldn't expect that I close tab with the right click. More standard way is to open some context menu with right click and not close tab.
Also it ignores if there are any unsaved changes in request a close tab without any warning/confirmation dialog.
I think there is better PR #586 which implemented closing tabs with middle click and shows confirmation when there are unsaved changes.

Ah. Thanks for callout @martinsefcik
I thought the auxClick just handles the middle click. We clearly shouldn't close the tab on right click.

@martinsefcik Can you check again, my quick check ok the internet says that auxClick does not get triggered for right click on the mouse.
Either we way, we need to show the popup if there are unsaved changes.

@helloanoop I was trying it before I wrote this first comment and I was able to close it with right click and without confirmation when there are unsaved changes. At least on Win it is behaving like this.

Thanks @martinsefcik I have reverted the PR.

Thanks for calling out @martinsefcik .
I didn't see that this also applies for right clicks either. So you're absolutely right.
Thanks @helloanoop for doing this project. Out of the need i landed at Bruno, and like it better then every api client tool i used before. I hope i can contribute again in the  future.


Assert Processing Budget - Crash

3599870ms th_a       application.cpp:422
handle_transaction   ] Got transaction
from network
1ms th_a       db_block.cpp:97
push_block           ] new_block.block_num():
172076 new_block.id(): 0002a02c211ed6b4ab4ab
41989d9f0007ad02fef
witness_node: /home/clayop/graphene/libraries
/chain/db_maint.cpp:333: void graphene::chain
::database::process_budget(): Assertion `time
_to_maint > 0' failed.
Aborted (core dumped)

The problem is in https://github.com/cryptonomex/graphene/blob/1177cfe0ed10026b6b5d112da53bfa6f206845ce/libraries/chain/db_maint.cpp#L523-L527
The fix will be a hardfork.

Reproduced by above test and fixed.


Nginx sample config must be updated

Seems it hasn't been updated for a while. At least this rule from apache config is missing in nginx:
# Block all direct access to files and folders beginning with a dot
RewriteRule (^|/)\.(?!well-known) - [F]

Just checked,  /.phan/config.php is available directly.

For nginx it's
location ~ /\. {  deny all;   }

Also I would suggest changing  location ~ \.php$ (any .php) to just location /index.php (a single .php) because Grav has only one executable php.

Add Nginx supported.

How about provding a Pull Request?


stream not working

hi i installed FOSv69 dashboard is working i can add streams users everything is ok but the stream not working i changed port several times no success any idea

before publishing i tested it and it was working however check logs or post them here without that i can't really guess what's wrong...

i have an error.log file but access1.log file doesnt exist

there shouldn't be a access1.log only access.log
cat /home/fos-streaming/fos/logs/*.log
you can also use locate to search for php_error.log
apt-get install mlocate -y;
updatedb
locate php_error.log

if this doesn't help only other way is to describe better your stream source/link which you're trying to restream... maybe is not supported or smth else

that is my log for now :

2020/07/25 13:42:00 [error] 7976#7976: *21 FastCGI sent in stderr: "PHP message: PHP Notice:  Undefined index: user_id in /home/fos-streaming/fos/www/cache/b6d230975441b355e3e2867b461bb9b3bfec65b6.php on line 77" while reading response header from upstream, client: <IP_ADDRESS>, server: , request: "GET /dashboard.php HTTP/1.1", upstream: "fastcgi://<IP_ADDRESS>:9002", host: "<IP_ADDRESS>:7777", referrer: "http://<IP_ADDRESS>:7777/index.php"
2020/07/25 13:45:25 [error] 7976#7976: *27 upstream timed out (110: Connection timed out) while reading response header from upstream, client: <IP_ADDRESS>, server: , request: "POST /index.php HTTP/1.1", upstream: "fastcgi://<IP_ADDRESS>:9002", host: "<IP_ADDRESS>:7777", referrer: "http://<IP_ADDRESS>:7777/index.php"

sorry it was all my mistake nothing wrong it is just i configured the port in database as 8007 but the stream server is on 8000 but iti working real good very good

can you check if php is running
service php7.3-fpm status
service php7.3-fpm start

i see you right i have multiple panels installed on my machine i will try to do a fresh install for the all thing thank you man for your help i really appreciate it


Added a "pin" button on models view (scroll up/down models view with a large scope tree is really annoying)

Using the Models tab with a lot of scopes is really annoying. To view some scopes, I needed to scroll down the tree on the left, and scroll up to view the model, then scroll down again, and so on... Also, I removed that weird grayed background on scope tree. With more than 3 or 4 scope levels, the links become unreadable.

+1

We can't merge a branch with conflicts.  +1's don't help that.  If you're interested in this coming into core, update the PR.

@SomeKittens this pull request was open almost two years ago, and at the time, there were no conflicts. I tried to ping some core members on twitter to review it, to no avail.
I used my own version for a while, but I dont think it make sense anymore. The new version of batarang (v0.9.1) is working just fine, and I cant even remember what was changed at the time.
I think you can close the pull request. The files changed in the older version don`t exist anymore.

that's a shame

@darlanalves Thanks for the enthusiasm, and sorry about the non-response.  I promise, we won't take two years in the future!


Rename default_controls to camera_controls

This is clearer and also matches camera_properties. (Note that
sensor_format and sensor_resolution refer specifically to the image
sensor and are therefore good as they are.)
Signed-off-by: David Plowman<EMAIL_ADDRESS>

@chrisruk Hi Chris, another one for you - even more trivial this time!


Error Running Script

Good morning.
I am encountering a type of error ( image attached) while running the script which I haven't been able to fixed so far.
When calling the footprints function at some moment of the iteration the variable inter_pt is not able to be defined and so I get the list index out of range.
May I get some advices regarding this issue?
Thank you.

My guess is that one of the camera positions or orientations might not be right. To isolate the specific camera, you could change line 179:
if (idx +1) % 1 == 0:
This will print out the camera number for each loop, that should isolate the camera that's causing the problem. Since it prints at the end of the loop.
If you want to upload your camera file I can take a look and see if there is anything that immediately jumps out at me.

Apalachicola_SfM_Bathy_30_GCP_calibrated_external_camera_parameters_ypr.txt
I am uploading here the camera file, however I believe it would help with I add some information about it.
The angles values there in this file is a result of an attempt of converting the opk angles exported by Pix4D. I tried to converted it in Agisoft Metashape, but I am not confident in this method. The angles don't look right.

Agreed, the angles do not look right in the file. If the angles are not correct the software cannot intersect the camera rays with the ground surface to find the footprints - hence the error.
At the moment, I don't have support for OPK angles in the software. It's something that I'm looking into, but the conversations can get complicated.

I appreciate your inputs, Dr. Dietrich.
This is a barrier I have met through the processing. Surprisingly Pix4D is solving more points underwater than Metashape, but the caveat is that camera orientation is always exported as opk.
I am concluding that a solution for the moment would to conduct the SfM processing in Metashape, even if gives less underwater area.
Thanks again.


Update package.json

– update package version

update contributor infos

As requested here 😄

Thanks! 1.1.1 is published.


Improve rules onboarding docs based on community feedback

Follow up item from https://github.com/falcosecurity/falco/issues/2791#issuecomment-1755606485 discussion.
CC @enote-kane

Here is another question https://github.com/falcosecurity/rules/issues/184 -> I think we could improve docs also in this regard.

Potentially also improve docs around enabling and disabling rules, e.g. see https://github.com/falcosecurity/falco/pull/2920#discussion_r1408564126. At the moment it is also unclear if we want to add enabling/disabling capabilities to falco.yaml in addition to having the cmd args as option? @leogr do you have additional thoughts?

@leogr and @LucaGuerra https://github.com/falcosecurity/libs/pull/1575#pullrequestreview-1785160993

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale

@incertum
I had lost track of this. What's missing?

I believe we improved a few things and in particular re-wrote the outputs formatting page https://falco.org/docs/outputs/formatting/.


Improvements to toTitle functionality

Function now correctly deals with apostrophes, etc. For example, the “s” in “it’s”, should not be transformed to upper.

Thanks!

Pleasure!
I had a bit of spare time this morning to add an additional property test (current one just ensures each word contains a maximum of 1 capital letter). The new test ensures that the first letter is not lowercase, the two tests together should guarantee the correct functionality.
Do you think it's worthwhile to add the additional test? If so I can make a quick PR – your call.
One final thing. I assume development happens in the Mercurial repo, as building and testing the project causes the git repo to accumulate a lot of noise. A quick amendment to the .gitignore file solved the problem.
# .gitignore template from:
# https://github.com/github/gitignore/blob/master/Haskell.gitignore

dist
dist-*
cabal-dev
*.o
*.hi
*.chi
*.chs.h
*.dyn_o
*.dyn_hi
.hpc
.hsenv
.cabal-sandbox/
cabal.sandbox.config
*.prof
*.aux
*.hp
*.eventlog
.stack-work/
cabal.project.local
.HTF/

# generated project data

tests/text-test-data/
tests/coverage/

Yeah, I like that test. Thanks!

Done.


Fail to broadcast a transaction: minimum relay fee not met

During the last phase of tests, there was an occurrence of not being able to relay a transaction because the minimum fee was not met.

Since it is not clear where the rounding/estimation issue comes from (not clear if #1132 or else), we agreed that if after a quick further investigation the origin is still unknown, we will go with a temporary patch for v7, i.e. either using 1.1 sats/vb as a multiplier when 1 sats/vb is selected or adding 10 sats to the total fee amount if 1 sats/vb was selected. This should give some margin (at a small cost) to avoid that the user is not able to relay the transaction. In such case, a more detailed fix would then be released in a followup.

Marking as done for v7 since a temporary hack has been applied for this release in #1323. But leaving open as we should pin down the root cause of this issue.

Thanks. I moved it to v8 so that we don't loose track of it and it still counts as "done" for v7.


fix do not transpose semi join agg when mark join

Proposed changes
Issue Number: close #31308

Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

@jackwener pls help check if TransposeSemiJoinAgg and TransposeSemiJoinAggProject in exploration phase need to be modified, too

why close this pr?


problem with date format in events creation "time data '20250203' does not match format '%Y%m%dT%H%M%S'"

I tried to create an event via the UI for an all day event recuring every other week with a end date of 2/3/2025 and got the following error:
time data '20250203' does not match format '%Y%m%dT%H%M%S'

system set to metric, country canada and language french
HA OS 14.1
Supervisor 2024.12.0
Micosoft 365 - Calendar 1.0.1

I have no problem if i create an event without repeat ending dates

Should be fixed with v1.0.2 - https://github.com/RogerSelwyn/MS365-Calendar/releases/tag/v1.0.2

Definitly is fixed in 1.0.2, thanks


Give a source line and caret for errors when possible

This includes new command-line option --source-root which allows the user of Chisel to point to the root directory for source files. The default value is "." which should work for typical SBT and Mill projects.
Contributor Checklist

[x] Did you add Scaladoc to every public function/method?
[x] Did you add at least one test demonstrating the PR?
[x] Did you delete any extraneous printlns/debugging code?
[x] Did you specify the type of improvement?
[x] Did you add appropriate documentation in docs/src?
[x] Did you state the API impact?
[x] Did you specify the code generation impact?
[x] Did you request a desired merge strategy?
[x] Did you add text to be included in the Release Notes for this change?

Type of Improvement

new feature/API

API Impact
New command-line, annotation API into Chisel, but no other API impact.
Backend Code Generation Impact
No impact
Desired Merge Strategy

Squash

Release Notes
Improve error reporting with source line and caret pointing to column. This requires knowing the root directory of source files which can be provided with --source-root <dir>. It will default to . which is the directory in which the Chisel elaboration process is invoked which should be correct for typical projects.
Reviewer Checklist (only modified by reviewer)

[ ] Did you add the appropriate labels?
[ ] Did you mark the proper milestone (Bug fix: 3.4.x, [small] API extension: 3.5.x, API modification or big change: 3.6.0)?
[ ] Did you review?
[ ] Did you check whether all relevant Contributor checkboxes have been checked?
[ ] Did you do one of the following when ready to merge:

[ ] Squash: You/ the contributor Enable auto-merge (squash), clean up the commit message, and label with Please Merge.
[ ] Merge: Ensure that contributor has cleaned up their commit history, then merge with Create a merge commit.

Can you bridge that to the firtool option https://github.com/llvm/circt/pull/4576 and consider keeping the option consistently named? I care less about the latter point. I can understand that include-dir may be confusingly named so only offering the alternative name for consideration. (Not blocking.)

Can you bridge that to the firtool option https://github.com/llvm/circt/pull/4576

Absolutely, will do

and consider keeping the option consistently named? I care less about the latter point. I can understand that include-dir may be confusingly named so only offering the alternative name for consideration.

It is an important configuration. I will admit I don't love --include-dir since it implies to me something like #include or gcc -I which would affect compilation when it's really just helping with error reporting. I am willing to be convinced but my preference is to do something else. I'm not sure --source-root is the greatest either. Perhaps we should go with something like --project-root or --chisel-project-root (to be consistent with the Scala compile-time system property used for SourceInfos). That being said, I expect this Chisel runtime argument to be used infinitely more than the Scala compile-time one.

and consider keeping the option consistently named?

I'm not sure I love the --include-dir name, so I'd be fine with these names diverging

@seldridge now accepting multiple --source-root arguments and propagating them as --include-dir to firtool


Tentative new file structure for module_api

Description
New directory/file structure of opta repo for module-api changes.
Safety checklist

[x] This change is backwards compatible and safe to apply by existing users
[x] This change will NOT lead to data loss
[x] This change will NOT lead to downtime who already has an env/service setup

How has this change been tested, beside unit tests?
YOUR_ANSWER

Lot of changes, for now registry yaml is still picked up from config/


Make document a Resource

Also expose the database the document belongs to in a property database.

Obsolete because of new API (#79).


config: add indexer to celery beat

requires https://github.com/inveniosoftware/invenio-records-resources/pull/331
closes https://github.com/inveniosoftware/invenio-communities/issues/584

https://user-images.githubusercontent.com/6756943/166913355-0745d4a3-b835-4d8f-9bbd-b8f9cae6ac54.mov
Working with redis and rabbitmq, can be seen the queue/key is there and then dissapears after it's consumed.

Thanks a lot for the video 👍


build(depsWIP): remove legacy jest-native dependency

This PR resolves []
Description
Removes legacy @testing-library/jest-native matchers and replacing them with the @testing-library/react-native matchers.
Followed the migration guide from @testing-library/react-native.

PR Checklist

[x] I have tested my changes on iOS and Android.
[x] I hid my changes behind a feature flag, or they don't need one.
[x] I have included screenshots or videos, or I have not changed the UI.
[x] I have added tests, or my changes don't require any.
[x] I added an app state migration, or my changes do not require one.
[x] I have documented any follow-up work that this PR will require, or it does not require any.
[x] I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

[ ] I would like at least one of the reviewers to run this PR on the simulator or device.

Changelog updates
Changelog updates

Cross-platform user-facing changes

iOS user-facing changes

Android user-facing changes

Dev changes

remove legacy jest-native dependency - gkartalis

Need help with something? Have a look at our docs, or get in touch with us.

lol, many tests fail ~ thought it was easier will timebox fixing them

Most of the failing tests are due to using UNSAFE_ getBy or queryBy that are not supposed to work as selectors to assert on them for their props etc.
Next steps are to fix the remaining ones (and quick win out of that would be that we won't have anymore the not recommended UNSAFE_ methods anymore on our codebase

closing and will revisit when I have more time


Add NDP announcer for layer2-speaker

Description
What type of PR is this ?:
Add NDP announcer to the layer2-speaker so that OpenELB can support IPv6 announcements in layer2 mode
Related links:

/lgtm
/approve


Error in scale/downscale.yml

The olcnectl module update command has static names for environment and cluster, this need to be changed in:
From:
--environment-name myenvironment
--name mycluster
To:
--environment-name {{ ocne_environment }}
--name {{ ocne_k8s }} \

Fixed in commit 05560c8a5fa01a1449673e326aae6a530c85e13d


Use conda run in execObservable and execObservableOutput when it is possible to stream the output

As of #7696  conda run buffers its output, so it's not possible to use it via getExecutionInfo for PythonExecutionService.execObservable and execModuleObservable. Update these methods when the upstream conda issue gets fixed.

Closing as outdated, we're now using conda run everywhere.


[Feature] support visualising meshes in just one hemisphere.

Is your feature request related to a problem? Please describe.
Showing the mesh in just one hemisphere is a common use case.
Describe the solution you'd like
Being able to do the above through the GUI
Describe alternatives you've considered
Pre-compute hemi-meshes and provide them through the atlas API. Would make download slower though.
Additional context
Discussed on a forum post

napari-vedo-bridge could be useful? Especially because the example in the readme is cutting a mouse brain mesh to get a single hemisphere :laughing:


1.18 Update

WIP. Help appreciated
TODO:

[x] Fix compile issues
[ ] Fix features overwriting generated chunks

Are you on discord?

@polarbub yeah, FrostByte#4166

Is<PHONE_NUMBER>61113109 your discord ID?

Hey, only you need 1 thing, change "method_20613" for "method_20614" in your ChunkStatusMixin class

Does that fix the structure errors?

Okay, That works great, Thanks!

Okay, the entities issue is fixed, I'll push and release the new version tomorrow.

I borked GitHub with some CLI stuff, Going to merge a different way

Awesome! I've been away but this is great progress!

@polarbub My discord id is<PHONE_NUMBER>95795714 I think. What's it for?

I have a different FrostByte in one of my discord and I wanted the id to compare to see if it was you.


Ensure new_version() actually creates a new version with a correct "modified" property value.

Fixes #329 .
Now, if the current timestamp is not later than the old modified property value, the new modified value is set to the old value plus one millisecond.

I pushed an update to hopefully handle the case when the current timestamp is too close to the old modified timestamp, but they are not equal.  It may look funny, but you can have negative timedeltas, and the comparisons work such that the code works, as far as I can tell.  You can't really write a unit test for this, the way the function is currently designed, because the test would have to guarantee that a new version is made within a particular short time period.  So I tried testing it in other ways (pasting code into a separate script where I could play with it more).  We could probably make it more unit-testable if we redesigned it some.

@chisholm -
Did you see the resolution of https://github.com/oasis-tcs/cti-stix2/issues/219.  It is no longer the case that it must be exactly 3 digits.

As long as this library truncates to 3 decimal digits, we will need to ensure that timestamps are produced which will not accidentally become equal when extra precision is lost.  We may need a separate issue to relax the millisecond precision requirement throughout the codebase.  Part of that will probably be a revision to the design of the new_version() function.  But I think this fix should probably be merged so we can ensure correct behavior in the meantime.

Superseded by #374.


Fix the failed test case in ReduceDatasetOpTest

This PR fixes the failed test case in ReduceDatasetOpTest.
@jsimsa

@jsimsa For the reduce function with the same number of inputs and outputs, it will do the aggregation on initial_state but the input dataset will not be used by the function. Does that mean this kind of reduce function will be invalid?  If yes, do we need to add a check for this case?


Failed to load movies

If I choose samples I get results but if I choose duplicates I get the above

Been having the same problem for quite a while - I'm guessing that under the hood "Please check your settings" is an error message in a condition somewhere, that happens when all other errors have been "fallen through", and so one could end up with "Please check your settings" even if there are no duplicates or samples to be found.
That's just my guess though.

Hi @shiftylilbastrd can you please share the Cleanarr log output from when you attempt to load Movies? Unfortunately without the logs it's very hard to know where the issue may be


[v0.5] bump rke to v1.6.3 and update pkg/apis to latest

bump rke module to v1.6.3 and rancher/rancher/pkg/apis to the latest of the release/2.9 branch

Closing this PR as it's not needed at the moment. The plan is to bump the RKE version only when it's necessary to introduce type changes.


Need to have Custom implementation for Close Method in Dialog , to clear form values when closed.

🙋 Feature Request
Need to have custom closing method for Dialog as you can see when we set ShowDismiss property to true ,It displays an X for closing the dialog , The thing needed is , when u have form in that dialog , if you are closing the dialog for some reasons , the values should be cleared when we re-open the dialog, Thus needed custom implementation for Closing the Dialog like an event are something is needed to handle clearing process.

🤔 Expected Behavior

😯 Current Behavior

💁 Possible Solution

🔦 Context

💻 Examples

Need We prefer if you use "I would like"
Anyways, we added OnDialogClosing to DialogParameters recently. See https://www.fluentui-blazor.net/Dialog#dialogservicewithcus for example.


Add multiplatform kotysa-sqlite with common and android

kotysa-core will become a kotlin multiplatform mobile (KMM) project (common for common API + SqLite, jvm for other DBs)
kotysa-sqlite (that depends on kotysa-core) will be a KMM project with

kotysa-sqlite-common : multiplatform common API for kotysa-sqlite
kotysa-sqlite-android (probably pretty much the same code as current kotysa-android) : provides a SqLite client using Android AOSP included, based on legacy SqLite Java client
kotysa-sqlite-ios not included in this issue (see #120) : ios SqLite client using SQLiter [1].
kotysa-sqlite-jvm not included in this issue (see #120)
kotysa-sqlite-js (maybe?) not included in this issue
kotysa-sqlite-native (maybe?) not included in this issue : could be other non ios native platforms SqLite client using SQLiter [1]

Guide : official KMM sample project and Multiplatform tutorial with Ktor and SqlDelight
[1] : SQLiter is a SQLite driver for Kotlin Multiplatform, currently supporting IOS and Windows, and may later target JVM/Android and all flavors of Native that support the sqlite3 c libraries.

Hi @pull-vert, it would be great to see an implementation of Reactive SQLite for JVM. Do you have any estimated time when we could see this issue moving forward? :)

Hi @pull-vert, it would be great to see an implementation of Reactive SQLite for JVM. Do you have any estimated time when we could see this issue moving forward? :)

Hi @dzikoysk, for now JVM SqLite is not expected at first. I intend to start with Android and IOS as primary multiplatform targets. Do you now any SqLite reactive Driver for JVM I can use ? I only now blocking drivers.

As SQLite is a database that we use as a bundled local storage, do we really need a truly reactive implementation of this driver? I guess it's something that could be handled through standard IO dispatcher under the hood, at least for now 🤔

As SQLite is a database that we use as a bundled local storage, do we really need a truly reactive implementation of this driver? I guess it's something that could be handled through standard IO dispatcher under the hood, at least for now

Having to develop a full SqLite reactive Driver from scratch does not seem that easy to me ;) I will instead use an an existing blocking SqLite driver for JVM.

I mean that what's I was thinking about - just wrapping standard blocking driver as I think you just cannot do much with the fact there is no available solution to this topic yet :(

Here is a Gradle kts convention file content for all JVM only modules, with JPMS support.
import org.gradle.api.tasks.testing.logging.TestLogEvent
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    kotlin("jvm")
    id("org.jetbrains.dokka")
}

java {
    toolchain {
        languageVersion.set(JavaLanguageVersion.of(19))
    }
}

repositories {
    mavenCentral()
}

dependencies {
    // import BOM
    testImplementation(platform("org.junit:junit-bom:${findProperty("junitVersion")}"))

    testImplementation("org.assertj:assertj-core:${findProperty("assertjVersion")}")

    testRuntimeOnly("org.slf4j:slf4j-simple:${findProperty("slf4jVersion")}")
}

tasks {
    compileKotlin {
        kotlinOptions {
            jvmTarget = "19"
            languageVersion = "1.8"
            apiVersion = "1.8"
            freeCompilerArgs = listOf("-Xexplicit-api=strict")
//            useK2 = true fixme uncomment when it does not throw warning anymore
            allWarningsAsErrors = true
        }
    }

    compileJava {
        // replace '-' with '.' to match JPMS jigsaw module name
        val jpmsName = project.name.replace('-', '.')
        // this is needed because we have a separate compile step in this example with th
        //  'module-info.java' is in 'main/java' and the Kotlin code is in 'main/kotlin'
        options.compilerArgs = listOf(
//            "--module-path",
//            compileJava.classpath.asPath,
            "--patch-module",
            "$jpmsName=${sourceSets.main.get().output.asPath}")
    }

    compileTestKotlin {
        kotlinOptions {
            allWarningsAsErrors = true
        }
    }

    test {
        useJUnitPlatform()
        testLogging {
            events = setOf(TestLogEvent.PASSED, TestLogEvent.FAILED, TestLogEvent.SKIPPED)
            showStandardStreams = true
        }
    }
}

I will also have to add this to the jvm block of dev convention
    tasks.withType<Jar> {
            // replace '-' with '.' to match JPMS jigsaw module name
            val jpmsName = project.name.replace('-', '.')
            manifest {
                attributes["Automatic-Module-Name"] = jpmsName
            }
        }


ImportError: cannot import name 'OpenAI' from 'openai'

Describe the bug
Please help me solve the problem...
suggested, char JPT, query connection option in Django - doesn't work:
//------------------------------------------------ ------------------------------------
from openai import OpenAI
import requests
Get the API key
api_key=""
Initialize OpenAI
openai = OpenAI(api_key)
Function to get response from ChatGPT
def get_response(query):
# Form a request to the API
response = openai.completion.create(
engine="davinci",
prompt=query
max_tokens=100
)
 # Get response
 response_json = response.json()
 reply = response_json["choices"][0]["text"]

 return reply

Function for processing the dialog form
def process_form(query):
# Get response from ChatGPT
response = get_response(query)
 # Send response to user
 return response

//------------------------------------------------ ------------------------------------
I get an error - it is not possible to load OpenAI!
the package is installed, for example, this version of the error does not cause an error at startup:
//------------------------------------------------ ------------------------------------
api_key = "here is my key"
openai.api_key = api_key
Function to get response from ChatGPT
def get_response(query):
# Form a request to the API
response = openai.completion.create(
engine="davinci",
prompt=query
max_tokens=200
)
 # Get response
 response_json = response.json()
 reply = response_json["choices"][0]["text"]
 return reply

//------------------------------------------------ ------------------------------------
but a runtime error occurs when calling: response.json()
some argument error
To Reproduce
//------------------------------------------------ ------------------------------------
from openai import OpenAI
import requests
Get the API key
api_key=""
Initialize OpenAI
openai = OpenAI(api_key)
Function to get response from ChatGPT
def get_response(query):
# Form a request to the API
response = openai.completion.create(
engine="davinci",
prompt=query
max_tokens=100
)
 # Get response
 response_json = response.json()
 reply = response_json["choices"][0]["text"]

 return reply

Function for processing the dialog form
def process_form(query):
# Get response from ChatGPT
response = get_response(query)
 # Send response to user
 return response

//------------------------------------------------ ------------------------------------
I get an error - it is not possible to load OpenAI!
ImportError: cannot import name 'OpenAI' from 'openai'
the package is installed, for example, this version of code the error does not cause an error at startup:
//------------------------------------------------ ------------------------------------
api_key = "here is my key"
openai.api_key = api_key
Function to get response from ChatGPT
def get_response(query):
# Form a request to the API
response = openai.completion.create(
engine="davinci",
prompt=query
max_tokens=200
)
 # Get response
 response_json = response.json()
 reply = response_json["choices"][0]["text"]
 return reply

//------------------------------------------------ ------------------------------------
but a runtime error occurs when calling: response.json()
some argument error
Exception Type: | AttributeError
json
/home/murd/buf/ai_chat/.ai_env/lib/python3.8/site-packages/openai/openai_object.py, line 61, in getattr
response_json = response.json()
raise AttributeError(*err.args)
k    | 'json'
self | {'choices': [{'finish_reason': 'length',               'index': 0,               'logprobs': None,               'text': '\n'                       '\n'
Code snippets
No response
OS
Ubuntu
Python version
Python 3.8.10
Library version
Name: openai Version: 0.27.3 Summary: Python client library for the OpenAI API Home-page: https://github.com/openai/openai-python Author: OpenAI Author-email<EMAIL_ADDRESS>License: None Location: /home/murd/buf/ai_chat/.ai_env/lib/python3.8/site-packages Requires: aiohttp, requests, tqdm

Hi @Murd1976,
I'm not entirely sure whats going on here. There seem to be multiple rounds of interactions with chatGPT and various attempts to use our API. Can you provide a single set of commands you're trying to execute and the error you're getting? Please keep in mind that chatGPT has a tendency to hallucinate our API and the only official documentation is that found at https://platform.openai.com/docs/api-reference

I tried from my function in django, sent an openai request, received a response and returned its properties, tried it in two versions - the first one was not even used, because loadable class not found
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/home/murd/buf/ai_chat/chat/views.py", line 22, in  from openai import OpenAI ImportError: cannot import name 'OpenAI' from 'openai' (/home/murd/buf/ai_chat /.ai_env/lib/python3.8/site-packages/openai/init.py)
//------------------------------------------------ --------
from openai import OpenAI
import requests
api_key = "sk-ukPm41XUzZqeiXXhKqrx...."
openai = OpenAI(api_key)
protect get_response(request):
# Form a request to the API
   response = openai.completion.create(
       engine="davinci",
       invitation = request,
       max_tokens=200
   )

   response_json = response.json()
   response = response_json["choice"][0]["text"]
   #print('Response: ', response)

   reciprocal response

def gpt_response(request):
# Get response from ChatGPT
query = "Where do crayfish hibernate?"
response = get_response(request)
   context = {"gpt_response": response, "username":request.user}
   return render(request, "chat/chat_gpt_response.html", context)

//------------------------------------------------ ------------------------------
in the second case, error while executing response_json = response.json() (attributes error)...
//------------------------------------------------ ---------------
Request URL: http://<IP_ADDRESS>:8000/chat/gpt/
Django Version: 4.1.7
Exception Type: AttributeError
Exception value: json
Exception location: /home/murd/buf/ai_chat/.ai_env/lib/python3.8/site-packages/openai/openai_object.py, line 61, in getattr
Occurred during: chat.views.gpt_response
Python executable: /home/murd/buf/ai_chat/.ai_env/bin/python
Python version: 3.8.10
Traceback (last last call):
File "/home/murd/buf/ai_chat/.ai_env/lib/python3.8/site-packages/openai/openai_object.py", line 59, in getattr
bring yourself back[k]
While processing the above exception ('json') another exception occurred:
File "/home/murd/buf/ai_chat/.ai_env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 56, in inner
response = get_response (request)
File "/home/murd/buf/ai_chat/.ai_env/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapper_callback(request, *callback_args, **callback_kwargs)
File "/home/murd/buf/ai_chat/chat/views.py", line 135, in gpt_response
response = get_response (request)
File "/home/murd/buf/ai_chat/chat/views.py", line 125, in get_response
response_json = response.json()
File "/home/murd/buf/ai_chat/.ai_env/lib/python3.8/site-packages/openai/openai_object.py", line 61, in getattr
raise AttributeError(*err.args)
//------------------------------------------------ -----------------------
import openai
import requests
api_key = "sk-ukPm41XUzZqeiXXhKqrx...."
openai.api_key = API_key
protect get_response(request):
# Form a request to the API
   response = openai.completion.create(
       engine="davinci",
       invitation = request,
       max_tokens=200
   )

   response_json = response.json()
   response = response_json["choice"][0]["text"]
   #print('Response: ', response)

   reciprocal response

def gpt_response(request):
# Get response from ChatGPT
query = "Where do crayfish hibernate?"
response = get_response(request)
   context = {"gpt_response": response, "username":request.user}
   return render(request, "chat/chat_gpt_response.html", context)

The first option was offered to me by chatGPT ...))

It seems I figured out the problem
response = openai.completion.create(
engine="davinci",
prompt=query
max_tokens=200
)
instead of response_json = response.json()
need to use reply = response["choices"][0]["text"]
because response already has data in .json format
But now the question is why for the same request (Name all the presidents of the USA), I get some nonsense like ( (with images)? Try to GUESS this LISTS of REAL things (random answers)… Guess The Brand logos en.answers.yahoo.com https://russian.answers.yahoo.com/ Answers.com is the place to go to get the answers you need and to ask the questions you want How did the presidents of the Find me the 7 years of presidencies of the United States babynames.net/first-names/successors-to- presidents.html Each problems Fill in the missing words Pietra dura In which president year (the numerical year) has taken the presidency Abe Lincoln What is )?

Glad you figured out your issue!
Our models, especially earlier ones like davinci are susceptible to either hallucinations or going off-script.  I would recommend you look into guides like https://platform.openai.com/docs/guides/completion/introduction or use a newer model which are much better at handling these types of issues.
That said, it sounds like the part of this issue that relates to this python package is solved, so I'm going to close this issue.

yes, thanks for the help!
another question - I need openAI to use my database to form answers and complete my training ... advise the documentation on this topic, according to

In the first case: There is no OpenAI class in openai. I'm not sure where you're getting this code from, but that not a class that exists.

Hello!
This is an official code on the OpenAI website.
Check - https://platform.openai.com/docs/guides/text-to-speech for the speech endpoint.

same error in my programming, and I try to update version of "openai" package, then solved it!
pip install openai --upgrade

reinstall jupyter then resolve


Does not work if referenceSizeForHeaderInSection returns CGSizeZero

Hello Andrey,
Thank you for ASFloatingHeadersFlowLayout. It works great!
I want to use editing mode in my collection view so I toggle editing and change number of sections to 1 and try to hide/disable header (i want to implement it in common table view way). However if referenceSizeForHeaderInSection returns CGSizeZero then super.layoutAttributesForSupplementaryViewOfKind in ASFloatingHeadersFlowLayout.prepareLayout return nil and errors happens.
How should I hide/disable header in ASFloatingHeadersFlowLayout in a proper way?
Thank you in advance!

Proper way to use native UICollectionViewFlowLayout from iOS9, it already has floatingHeaders embedded.

I have to support iOS8 compatibility.

I think you can try to improve ASFloatingHeadersFlowLayout as you need and
make push request to repo:)))
I have no time to deep into code right now, sorry and good luck!)
Ср, 10 авг. 2016 г. в 13:53, Maxim Boyarskiy<EMAIL_ADDRESS>
I have to support iOS8 compatibility.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/allright/ASFloatingHeadersFlowLayout/issues/4#issuecomment-238832799,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAW3LOZ4henWRAy9rrFPEVVCwO3-jVPUks5qea2MgaJpZM4JgftD
.

--
С Уважением,
Сыврачев Андрей.
+79265637695
skype: andrey.syvrachev


modify DEV_ZERO config on Nuttx's built-in board

Note: Please adhere to Contributing Guidelines.
Summary
*/dev/zero is a very commonly used config, for example use
/dev/zero to test the filesystem, mtd or block devices performance.
So let's default enable it when not enable DEFAULT_SMALL
Impact
Nuttx's built-in boards' defconfig
Testing
CI

[Experimental Bot, please feedback here]
No, this PR summary does not adequately meet the NuttX requirements. Here's why and how to fix it:
Missing Information in Summary:

Why is the change necessary?  The summary mentions a common use case, but doesn't explain why it should be default enabled. Is it frequently requested? Does it solve a specific problem?  Justify the change beyond just its utility.  For example: "Enabling /dev/zero by default simplifies performance testing and reduces configuration overhead for users, as it's a commonly used device."
What functional part of the code is being changed?  Vague reference to "Nuttx's built-in boards' defconfig".  Be specific. Which files are modified?  Is this a Kconfig change? Which subsystem is affected (Device drivers, core OS, etc.)?  For example: "This change modifies the default configuration in the Kconfig files for various boards to enable the /dev/zero device driver when DEFAULT_SMALL is not enabled."
How does the change exactly work? While it states what will change (default enable), it doesn't describe how. Does it involve a Kconfig option modification?  Is any code added or removed? For example:  "The CONFIG_DEV_ZERO option is set to 'y' in the relevant defconfig files when CONFIG_DEFAULT_SMALL is not selected."

Missing Information in Impact:

All impact sections are answered too briefly or with placeholders.  Be explicit.

Is new feature added? Is existing feature changed?  "Yes, existing feature changed. The /dev/zero device driver, which was previously disabled by default (unless DEFAULT_SMALL was used), is now enabled by default."
Impact on user:  Even if the answer is NO, explain why.  "No, users will not need to adapt. The /dev/zero device will be available without any explicit configuration, simplifying common use cases."  If a user might have to adapt (e.g., size changes), document that!
Impact on build: "Potentially YES. The resulting kernel image might be slightly larger due to the inclusion of the /dev/zero driver. This impact is expected to be minimal."
Impact on hardware: "NO.  This change affects only the kernel configuration and does not introduce any new hardware dependencies."
Impact on documentation:  If NO, confirm: "NO, documentation updates are not required as this is a default configuration change."  If YES, describe what documentation is changed.
Impact on security: "NO, this change has no security implications. The /dev/zero device has a well-defined and limited functionality."
Impact on compatibility: "NO, this change does not affect backward or forward compatibility."

Missing Information in Testing:

Build Host(s): Provide details:  "Linux (Ubuntu 20.04), x86_64, GCC 9.4.0"
Target(s):  Be specific! "qemu-x86_64:nsh_net", "sim:nsh", "stm32f4discovery:nsh"  List all tested targets.
Testing logs:  Absolutely essential.  Show commands used and relevant output before and after the change to demonstrate that the /dev/zero device is now available and functions correctly.  Example:

Before:
$ ls /dev | grep zero
# No output

After:
$ ls /dev | grep zero
zero

$ dd if=/dev/zero of=/tmp/test bs=1k count=10
10+0 records in
10+0 records out
10240 bytes (10 kB) copied, 0.000180119 s, 56.8 MB/s

By providing this level of detail, reviewers can properly assess the PR and ensure it meets the project's standards.  Conciseness is good, but not at the expense of clarity and completeness.

@luckyyaojin /dev/null also should be enabled by default, it is very useful as /dev/zero

@luckyyaojin /dev/null also should be enabled by default, it is very useful as /dev/zero

let's create a new patch for this, @luckyyaojin

@luckyyaojin /dev/null also should be enabled by default, it is very useful as /dev/zero
@acassis /dev/null is already enabled by default

@luckyyaojin /dev/null also should be enabled by default, it is very useful as /dev/zero

let's create a new patch for this, @luckyyaojin

@xiaoxiang781216 @acassis  /dev/null is already enabled by default

The CI error is in esp32c3-devkit/knsh config:
Configuration/Tool: esp32c3-devkit/knsh
2024-12-22 09:31:23
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Building NuttX...
Error: ./chip/esp32c3_region.c:44:4: error: #error "ESP32C3_REGION_PROTECTION shall not be enabled with Protected Mode"
   44 | #  error "ESP32C3_REGION_PROTECTION shall not be enabled with Protected Mode"
      |    ^~~~~
ERROR: riscv-none-elf-gcc failed: 1

Any ideas?

git rebase apache
./tools/configure.sh -l esp32c3-devkit:knsh
make menuconfig
look the diff between the new defconfig with the old one
git commit

@luckyyaojin could you check your change locally before updating patch by tools/refresh.sh --silent?

@luckyyaojin could you check your change locally before updating patch by tools/refresh.sh --silent?

I already did locally check by the cmd '/tools/refresh.sh --silent all ' , let me check again

The CI error is in esp32c3-devkit/knsh config:
Configuration/Tool: esp32c3-devkit/knsh
2024-12-22 09:31:23
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Building NuttX...
Error: ./chip/esp32c3_region.c:44:4: error: #error "ESP32C3_REGION_PROTECTION shall not be enabled with Protected Mode"
   44 | #  error "ESP32C3_REGION_PROTECTION shall not be enabled with Protected Mode"
      |    ^~~~~
ERROR: riscv-none-elf-gcc failed: 1

Any ideas?

@hartmannathan
Due to incorrect modifications, I have now restored the file,
After another CI check, there should be no problem


add httparty to gem dependency because it is require to use the gem

require 'stubhub'
LoadError: cannot load such file -- httparty

Why hasn't this been merged?

@biznickman good question. I'll merge it now.
Stubhub has recently change/limited/restricted their API's, so no guarantees that this library works.

@rloomba Ah yeah it's not working. Do you know when they did that? Is it now only manually accepted partners or something?

@biznickman 😞 yeah, I think it happened ~ a year or so ago. Yep, you have to contact them for details.


(maint) Ensure testing deferred in apply has compatible agent version

For the second time in two weeks a puppet 5 agent was installed for "latest". The test failure message for using an apply with the deferred feature does not make it obvious that an incompatible agent is used. This commit updates the test to use the generalized BoltSpec::PuppetAgent install method and ensure a deferred compatible agent is installed. It also modifies the install method such that it will default to install the latest collection and optionally install from a specified collection.

https://tickets.puppetlabs.com/browse/RE-12397

CLA signed by all contributors.


Make copybutton image (or other aspects of it) configurable

In #133 we discussed that some people might want the copybutton image to be configurable. For example, provide a local SVG and use that for the copybutton image on the website. @pradyunsg suggested that we wait to see if we get a signal from users that this is something they'd want to have.
Actions

[ ] Wait a few months to see if anybody asks to change the copybutton image back, or more generally for configurability.
[ ] Decide if we want to support this after a few months
[ ] ...figure out next steps to take

Hi. Uh... I'd like to change the copy button back. 🙈
I've been playing around with various documentation themes, and the style we had earlier is more common and more neutral, contributing to nicer aesthetics than the GH-inspired style.


Race Condition with CO2 Sensor

After about 6 clean readings using the code below, I am getting an error that Atlas suggests may be due to a race condition:

Thoughts?

When you say, "Atlas suggests" are you talking about Atlas Scientific?
How frequently does this happen? After the six readings, does it work for another X readings, then error again? What happens if you increase the processing_delay? Does it result in the same behavior?  I vaguely recall seeing a similar issue with a different sensor, and I had to find the right processing_delay value by trial-and-error, unfortunately. That said, 1200 seems reasonable given the sensor docs suggest 300.
Is there a reason you're decoding the bytes? What happens if you do this:
carbon = round(float(carbon.data), 1)

I'm using this library in a project to read from temp, pH and dissolved oxygen sensors, and this is how I'm handling the data being returned from the query() call. But, maybe the CO2 sensor behaves differently from these sensors (I haven't used a CO2 sensor). :thinking:

I have been decoding the bytes so that I can pass the string to our Adafruit IO dashboard without the leading 'b'.  If there is a better way to do that I'd be happy to apply it.
The CO2 sensor is being used in conjunction with just about every sensor they have.  They are initiated to take a reading with an ignition switch when needed.  All of the root zone sensors appear to work fine, but the CO2 sensor returns only a handful of clean readings before the program stops when the error appears.  This seems to be exacerbated by combining it with their HUM and O2 atmospheric sensors.
Would replacing the query() call with the write() call followed by time.sleep() and read() change this?
Here are the two replies from Jordan @ Atlas Scientific:

You have a timing issue.
UTF-8 can not handle the number 255.
255 is an error message.
Page 42 of the data sheet:
https://atlas-scientific.com/files/EZO_CO2_Datasheet.pdf
"no data to send"
2.
Yes, your delay is long enough.
This means you have some type of race condition going on.
The definition of race condtion can get quite complex.
Besicaly whats going on is (and this is my guess, I do not know for sure).
You are asking for a reading, waiting X time, consuming the reading.
When you are waiting X time.
The reading comes in and all is good.
But, something, IDK what, is causing that processing delay to start counting down early then it should.
(the code is still moving forward with other things)
Its a small difference.
But compounds each time.
After ~12 readings its now going to fast.
What I would do it use the pi as its own diagnostic tool.
When you send the R command, start a timer.
Have it print the amount of time that has passed from when you sent the R command to when you get a reading.
Is is going down by a little bit each time?

If not, keep digging.
Somthing is messing up your delay clock.
New York State Master Science and Engineering Teacher
Half Hollow Hills CSD
Website: https://www.reginiusscience.com
Linktree: https://linktr.ee/Reginius214

From: Tim Boring @.***>
Sent: Tuesday, May 4, 2021 10:20 PM
To: timboring/atlas_i2c
Cc: Christopher Regini; Author
Subject: Re: [timboring/atlas_i2c] Race Condition with CO2 Sensor (#6)
CAUTION: This email originated outside of Half Hollow Hills CSD. Please do not click links or attachments unless you recognize the sender and know the content is safe.
When you say, "Atlas suggests" are you talking about Atlas Scientific?
How frequently does this happen? After the six readings, does it work for another X readings, then error again? What happens if you increase the processing_delay? Does it result in the same behavior? I vaguely recall seeing a similar issue with a different sensor, and I had to find the right processing_delay value by trial-and-error, unfortunately. That said, 1200 seems reasonable given the sensor docs suggest 300.
Is there a reason you're decoding the bytes? What happens if you do this:
carbon = round(float(carbon.data), 1)
I'm using this library in a project to read from temp, pH and dissolved oxygen sensors, and this is how I'm handling the data being returned from the query() call. But, maybe the CO2 sensor behaves differently from these sensors (I haven't used a CO2 sensor). 🤔
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/timboring/atlas_i2c/issues/6#issuecomment-832370280, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHUE7SBR6M7OWNGHJNYFWDLTMCTO7ANCNFSM44DK2CHA.
CAUTION: Do not click links or open attachments unless you recognize the sender and know the content/link is safe.
CAUTION: Do not click links or open attachments unless you recognize the sender and know the content/link is safe.

I have been decoding the bytes so that I can pass the string to our Adafruit IO dashboard without the leading 'b'. If there is a better way to do that I'd be happy to apply it.

Hmmm, this is interesting. So are you saying that the value returned from the call to the Query() method contains the leading b? That shouldn't be happening, so if it is then there is a bug in the library.
To verify, can you modify your program to print the value of carbon.data and paste it here? In particular, it'd be good to see what that value is when you're hitting the decode error.
I ordered a CO2 sensor from Atlas Scientific last night. Should be here by the weekend, at which point I'll wire it up and do some more debugging/testing on my end.
Also, thanks for posting the response from Atlas Scientific.

Hey Tim,
Here is what I have from the output from  carbon.data:
Thoughts?
Chris[cid:a4e27d50-3646-44c0-aebf-938386e19d41]
[cid:c66906c0-f199-4056-871b-f2d350651d2d]
New York State Master Science and Engineering Teacher
Half Hollow Hills CSD
Website: https://www.reginiusscience.com
Linktree: https://linktr.ee/Reginius214

From: Tim Boring @.***>
Sent: Wednesday, May 5, 2021 8:37 PM
To: timboring/atlas_i2c
Cc: Christopher Regini; Author
Subject: Re: [timboring/atlas_i2c] Race Condition with CO2 Sensor (#6)
CAUTION: This email originated outside of Half Hollow Hills CSD. Please do not click links or attachments unless you recognize the sender and know the content is safe.
I have been decoding the bytes so that I can pass the string to our Adafruit IO dashboard without the leading 'b'. If there is a better way to do that I'd be happy to apply it.
Hmmm, this is interesting. So are you saying that the value returned from the call to the Query() method contains the leading b? That shouldn't be happening, so if it is then there is a bug in the library.
To verify, can you modify your program to print the value of carbon.data and paste it here? In particular, it'd be good to see what that value is when you're hitting the decode error.
I ordered a CO2 sensor from Atlas Scientific last night. Should be here by the weekend, at which point I'll wire it up and do some more debugging/testing on my end.
Also, thanks for posting the response from Atlas Scientific.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/timboring/atlas_i2c/issues/6#issuecomment-833142000, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHUE7SDJ5DTQOIDMYTDD5DDTMHQDRANCNFSM44DK2CHA.
CAUTION: Do not click links or open attachments unless you recognize the sender and know the content/link is safe.
CAUTION: Do not click links or open attachments unless you recognize the sender and know the content/link is safe.

Ok, the CO2 sensor arrived and I've wired it up. One thing I noticed is that it operated in UART mode by default. The library only supports I2C. Can you confirm which mode your sensor is using?

Def using i2c
New York State Master Teacher
Science and Engineering
Half Hollow Hills CSD
Social sites: https://linktr.ee/Reginius214
Web: www.reginiusscience.com

From: Tim Boring @.>
Sent: Sunday, May 23, 2021 12:23:46 PM
To: timboring/atlas_i2c @.>
Cc: reginius214 @.>; Author @.>
Subject: Re: [timboring/atlas_i2c] Race Condition with CO2 Sensor (#6)
CAUTION: This email originated outside of Half Hollow Hills CSD. Please do not click links or attachments unless you recognize the sender and know the content is safe.
Ok, the CO2 sensor arrived and I've wired it up. One thing I noticed is that it operated in UART mode by default. The library only supports I2C. Can you confirm which mode your sensor is using?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/timboring/atlas_i2c/issues/6#issuecomment-846588953, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHUE7SB7GAV4KOYOLJLOEDLTPETZFANCNFSM44DK2CHA.
CAUTION: Do not click links or open attachments unless you recognize the sender and know the content/link is safe.
CAUTION: Do not click links or open attachments unless you recognize the sender and know the content/link is safe.

Def using i2c

Cool.
So I'm seeing some readings coming back from the sensor that I'm not sure how to interpret. I've sent an inquiry to Atlas Scientific to see if can explain what's happening.
Here's what a "good" raw reading from the sensor looks like:
b'\x01903\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

The first byte of that reading, is 1, which means success, and 903 is CO2 reading. The 00 represents the null terminator.
Then, there are "bad" raw readings that look like:
b'\x01\x1c\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff

The first byte of this reading is also 1, which is supposed to indicate success. Then it's followed 1c, which is decimal 28. Finally, instead of being null-terminated, it's terminated by ff, which is decimal 255. According to the data sheet, 255 is the status code for no data to send, but I'm not sure if that's really what it means in this case given that it's not in the expected position for the status code.
Even in the cases where the sensor seems to be returning bad data, it's intermittent, as you can see here:
>>> for i in range(10):
...   result = a.query("R", processing_delay=1200)
...   print(f"Result status: {result.status_code}")
...   try:
...     print(f"Result data: {int(result.data)}")
...   except ValueError:
...     print(f"Bad data: {result.data}")
...
Result status: 1
Bad data: b'8\x1c\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Bad data: b'\x1c\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'

For the time being, I'd recommend two things:

Read the data in a try/except block, where the except is limited to a ValueError (for example, how it's done in the last code block above). Inside the except block, handle the situation however makes sense for your application (maybe just log it?).

Don't use decode on the data. For "good" data, the query() method will convert the data to a string. So you just call float() on it.

Once I hear back from Atlas Scientific I'll update this thread with next steps.

Tim,
All makes sense to me. Your try/except recommendation is the same Jordan from Atlas gave to me. While it now keeps my program from crashing there is still a part of my brain that wants/needs to know how to avoid the error. Haven’t encountered it with any other sensor from their suite...and I have them all.
For the application I’m using with my students, the sensor reading must be sent as a string to an Adafruit IoT dashboard. From the digging around I’ve done, the decode was the most direct way to ditch the leading ‘b’ and send the reading for visualization in a widget. Is this incorrect?
I really appreciate how thoroughly you’ve dug through this. I’m developing a research lab for high school students and you’re library is at the heart of our work.
Thanks a ton.
Chris
New York State Master Teacher
Science and Engineering
Half Hollow Hills CSD
Social sites: https://linktr.ee/Reginius214
Web: www.reginiusscience.com

From: Tim Boring @.>
Sent: Sunday, May 23, 2021 4:39:05 PM
To: timboring/atlas_i2c @.>
Cc: reginius214 @.>; Author @.>
Subject: Re: [timboring/atlas_i2c] Race Condition with CO2 Sensor (#6)
CAUTION: This email originated outside of Half Hollow Hills CSD. Please do not click links or attachments unless you recognize the sender and know the content is safe.
Def using i2c
Cool.
So I'm seeing some readings coming back from the sensor that I'm not sure how to interpret. I've sent an inquiry to Atlas Scientific to see if can explain what's happening.
Here's what a "good" raw reading from the sensor looks like:
b'\x01903\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
The first byte of that reading, is 1, which means success, and 903 is CO2 reading. The 00 represents the null terminator.
Then, there are "bad" raw readings that look like:
b'\x01\x1c\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff
The first byte of this reading is also 1, which is supposed to indicate success. Then it's followed 1c, which is decimal 28. Finally, instead of being null-terminated, it's terminated by ff, which is decimal 255. According to the data sheet, 255 is the status code for no data to send, but I'm not sure if that's really what it means in this case given that it's not in the expected position for the status code.
Even in the cases where the sensor seems to be returning bad data, it's intermittent, as you can see here:

for i in range(10):
...   result = a.query("R", processing_delay=1200)
...   print(f"Result status: {result.status_code}")
...   try:
...     print(f"Result data: {int(result.data)}")
...   except ValueError:
...     print(f"Bad data: {result.data}")
...
Result status: 1
Bad data: b'8\x1c\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Result data: 894
Result status: 1
Bad data: b'\x1c\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'

For the time being, I'd recommend two things:

Read the data in a try/except block, where the except is limited to a ValueError (for example, how it's done in the last code block above). Inside the except block, handle the situation however makes sense for your application (maybe just log it?).

Don't use decode on the data. For "good" data, the query() method will convert the data to a string. So you just call float() on it.

Once I hear back from Atlas Scientific I'll update this thread with next steps.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/timboring/atlas_i2c/issues/6#issuecomment-846621394, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHUE7SDMHOVJT4CXJEFWMITTPFRWTANCNFSM44DK2CHA.
CAUTION: Do not click links or open attachments unless you recognize the sender and know the content/link is safe.
CAUTION: Do not click links or open attachments unless you recognize the sender and know the content/link is safe.

Tim, All makes sense to me. Your try/except recommendation is the same Jordan from Atlas gave to me. While it now keeps my program from crashing there is still a part of my brain that wants/needs to know how to avoid the error. Haven’t encountered it with any other sensor from their suite...and I have them all.

In the current situation, there isn't anything you can do to totally avoid the error--i.e., keep it from happening. You are not doing anything "wrong" to cause the problem. The issue is the data coming back from the CO2 sensor is "weird", so once Atlas Scientific responds to my email we should have a clearer path forward. The most likely path forward is that if Atlas Scientific is able to provide more clarity about this "bad" data, then I'll refactor the relevant bit(s) of the library to handle these situations.
That said, errors happen. All the time. The challenge for the programmer is how to deal with them. Just let the program crash? Catch the error and just log it? Catch the error and retry the failed operation? There's not a one-size-fits-all answer, and how to handle errors is largely dependent on the needs of the programmer and users.
For the time being, your best course of action for working around the situation is to use a try/except block. Not knowing your system, if it were me, I'd just log a message then wait for the next reading.

For the application I’m using with my students, the sensor reading must be sent as a string to an Adafruit IoT dashboard. From the digging around I’ve done, the decode was the most direct way to ditch the leading ‘b’ and send the reading for visualization in a widget. Is this incorrect?

Ah, ok, From the initial screenshot you provided, you were decoding bytes into a string, then converting it to a float, then rounding it. If all you need is a string, then just call decode() on it. In the case of the CO2 sensor, the data returned from the sensor is an integer, so calling float() and round() on it isn't going to have any effect. If, however, you've got a function that is handling these values for all of the sensors, some of which do indeed return floats, then what you're currently doing is fine. That is, as long as you're not trying to call decode() on bad data.

really appreciate how thoroughly you’ve dug through this. I’m developing a research lab for high school students and you’re library is at the heart of our work.

Wow, that's awesome! It makes me happy knowing that you find the library useful. :smile:


Remove cloud providers page and links for zh

Signed-off-by: Dominic Yin<EMAIL_ADDRESS>Ref #23517

/kind cleanup

/lgtm
/approve


i18n(ko-KR): update configuration-reference.mdx

Description (required)

update configuration-reference.mdx
#8494

Related issues & labels (optional)

Closes #
Suggested label:

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale
File
Note

ko
reference/configuration-reference.mdx
Localization changed, will be marked as complete.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.


Will writing large number of objects hang up my UI ?

Question
Hive is fast but I want to know if writing objects will hang up my UI ever and also will this code segment cause any problem :
Code sample
void function1(int i) async{
  await box.add(i);
}
void function2()
{
  for(int i=0;i<10;i++)
    {
      function1(i);
    }
}

Should I use await inside function2 as well or it will fine.
Edit :- Turns out it was my generator function which was hogging the UI.

@radha1990kumari
You shouldn't store into database inside widgets. You can create a simple repository and do there
or you can use another thread