Added Features Requested in https://github.com/Ticketmaster/poshspec/…

Added Features Requested in https://github.com/Ticketmaster/poshspec/issues/5

For the IIS functions you can present the Property function in the public function. That allows you to make them more flexible.
example
function WebSiteBinding {
    [CmdletBinding()]
    param(
        [Parameter(Mandatory, Position=1)]
        [Alias('Name')]
        [string]$Target,

        [Parameter(Mandatory, Position=2)]
        [string]$Property,

        [Parameter(Mandatory, Position=3)]
        [scriptblock]$Should
    )

    $expression = {Get-WebBinding -Name '$Target' -ErrorAction SilentlyContinue }

    $params = Get-PoshspecParam -TestName WebSiteBinding -TestExpression $expression @PSBoundParameters

    Invoke-PoshspecExpression @params
}

This way, a user could test any property of the WebSitebinding object they choose with this one function.
If the Property is going to be static like in AppPoolState then just include it in the expression. It's perfectly functional to send it to Get-PoshspecParam like you did, it just adds the value of $Property to the test name and that doesn't have a lot of value in this case since you always test the same property.
$expression = {Get-WebAppPoolState -Name '$Target' -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Value}

So I see what you mean now, but where is your black voodoo magic that knows where to use Property I get how its used and why its used but where in the hell do you pass it over to Invoke-PoshSpec and Get-Poshspec that is lost on me

@beaudryj The Property parameter passed to the public function is used to build the Expression property of the output object of the Get-PoshspecParam function. It is splatted (i think that's how you say that) to the Get-PoshspecParam function and then the output object is passed to Invoke-PoshspecExpression for parsing. Ultimately, the Property parameter of the public function makes it to the Invoke-PoshspecExpression as part of the string in the Expression property of the object coming from Get-PoshspecParam. @cdhunt Did I explain that correctly?

Yes, it's through spatting the PSBoundParams. Basically, we just pass the public function parameters through to the private function. The public functions really only serve as a way to tweak parameter enforcement and expose help. That's why every public function has to use the same parameter names.
about_Splatting
    if ($PSBoundParameters.ContainsKey("Property"))
    {
        $expressionString += " | Select-Object -ExpandProperty '$Property'"

You could let Get-PoshspecParams add the `select-object

Ahhhhh! I was over thinking that

So I attempted to add the qualifier as we had talked about
webbinding sitename http bindinginfo | {should be *:80:} however it did not seem to work well when I had the mixed types that weren't using the qualifier.

Is it necessary we specify http/https?
Should we seperate Get-WebBinding or Get-WebSite

My guess is you need to reorder you parameters so Qualifier is Position=2 and Property is Position=3. I think you would want to specify http/https so that you could specifically test either.
I don't have a strong opinion either way for creating two separate functions or just one. I guess it depends on how much complexity it adds to have one function that tries to cover all website configuration options.
You can also add more parameters to your function if that helps you determine which scriptblock to pass to Get-PoshspecParam.
Just remember that the goal of Poshspec was to make writing tests easier.

@beaudryj If you can add tests, this PR looks good to merge.

sounds good, I got distracted last night


Prisma Plugin - How to expose "decimal" or other DB types?

Hello,
I have this type of prisma schema that features a Decimal? (PostgreSQL decimal type):

I can't seem to get the decimal type to pass type checking:

I'd like to map it either to a float or ideally a string (since the JSON number type has precision issues sometimes), but is that possible to do with the prismaObject API or do I need to define the mapping elsewhere?
I also tried defining a custom Decimal type here:
export const builder = new SchemaBuilder<{
  PrismaTypes: PrismaTypes;
  Context: SchemaContext;
  Scalars: {
    ID: {
      Output: number | string;
      Input: string;
    };
    DateTime: {
      Output: Date;
      Input: Date;
    };
    /** here **/
    Decimal: {
      Output: number;
      Input: number;
    }
  };
}>({
  plugins: [PrismaPlugin],
  prisma: {
    client: db,
  },
});

but still had the same issue:

Any tips are appreciated, thanks!

Not sure if this helps, but I just use t.exposeFloat() and deal with formatting on the front end.
I have an hourly wage 'rate' which I want only two decimal places on.
I then deal with it solely on the frontend app to get my formatting, like this:
rateOrNull() {
      var result = Number(parseFloat(this.rate).toFixed(2))
      return !isNaN(result) ? +result : null
    },

The issue here is that the types you are defining for decimal (number) is not actually what prisma is returning.  You need to implement a scalar that actually expects a decimal type.
I just added a very simple test case here you can look at that may help: https://github.com/hayes/pothos/commit/5abbd9fc5df4d34a1a019296fb0a636d63d6e4bb

Not sure if this helps, but I just use t.exposeFloat() which ends up as double in the db, and I deal with formatting on the front end. I have an hourly wage 'rate' which I want only two decimal places on. I then deal with it solely on the frontend app to get my formatting, like this:
rateOrNull() {
      var result = Number(parseFloat(this.rate).toFixed(2))
      return !isNaN(result) ? +result : null
    },

Thanks for the reply. I declared the type as Decimal(5,4) in the model so I can ensure that percentages are somewhat structured, e.g. 55.66% would be 0.5566 in the database with this column type. I could change it to a float/double by changing my model but I guess I was just wondering if the Prisma Decimal data type was mappable w/o migrating

The issue here is that the types you are defining for decimal (number) is not actually what prisma is returning. You need to implement a scalar that actually expects a decimal type.
I just added a very simple test case here you can look at that may help: 5abbd9f

Ah this works great, thank you! Didn't realize the prisma client exposed a Decimal class / type 💯

@hayes I believe your test case is incomplete. It works well for exposing Decimal values, but Prisma seems to type the Decimal value as number. The input is then a number, but that will fail inside of your scalarType code for the Input type.
I think it would be best to expose as a string, since that is what the scalarType expects.
const builder = new SchemaBuilder<{
  Scalars: {
    Decimal: {
      Input: string; // This is the change
      Output: string; // This is the change
    };
  };
  ...
});

builder.scalarType('Decimal', {
  serialize: (value) => value.toString(),
  parseValue: (value) => {
    if (typeof value !== 'string') {
      throw new TypeError('Decimal must be a string');
    }
    return new Decimal(value);
  },
});

Yeah, I think that seems like a reasonable way to implement the Decimal scalar


Module not found: Error: Can't resolve 'webpack-hot-client/client?main'

Operating System: Linux
Node Version: v8.9.3
NPM Version: 5.5.1
webpack Version: ^3.10.0
webpack-dev-server Version: N/A

[x] This is a bug
[ ] This is a feature request
[ ] This is a modification request

Code

I'll try to provide a simpler example, meanwhile, here is the full code:
Entry point where the dev middleware is loaded
https://github.com/larriereguichet/universal-react-app/blob/webpack-hot-client/src/server/index.js
Webpack client configuration used by the middleware
https://github.com/larriereguichet/universal-react-app/blob/webpack-hot-client/packages/webpack-config/src/client.js
webpack-hot-client configuration
https://github.com/larriereguichet/universal-react-app/blob/webpack-hot-client/packages/react-dev-middleware/src/index.js
Expected Behavior
N/A
Actual Behavior
ERROR in multi webpack-hot-client/client?main ./src/client/index.js
Module not found: Error: Can't resolve 'webpack-hot-client/client?main' in '...'

For Bugs; How can we reproduce the behavior?
git clone git@github.com:larriereguichet/universal-react-app.git
cd universal-react-app
git checkout webpack-hot-client
lerna bootstrap
lerna run build
npm start

For Features; What is the motivation and/or use-case for the feature?
N/A

I was having this problem as well.
Installing the webpack-hot-client package from my own project seems to have fixed it.

Solution is here: https://github.com/webpack-contrib/webpack-hot-client/pull/62


Accept self signed certs

With the recent addition of alexa camera streaming needing https, when I set my Hikvision up to use ssl, my binary_sensors go to unknown. I have been told that the integration needs the ability to accept self signed certs. I have no knowledge other than what I have been told. Just respectfully asking if this is an option.

There are two options for this, first is to not verify certs at all, which is not something i'd like to add for the obvious security implications.  Second is to allow the specification of the path to your local certificate file to allow it to be verified.
The 2nd is feasible, but requires changes not only in the library, but to the home assistant component to add the additional configuration parameter.  If you're only doing this for alexa compatibility i'd recommend you leave the cameras alone and proxy them through something else to give you your https layer as it's generally not a great idea to give them direct access to the internet.

Thank you for your quick response. When you say proxy, do you mean something like nqinx?  I just setup a nginx proxy but was under the impression that was giving things direct access to the internet.

Sure, nginx would work with something like the rtmp module added (https://github.com/arut/nginx-rtmp-module).  You can let it proxy internally without opening anything up your firewall.

Hi, I'm trying to use the native hikvision binary_sensor component in homeassistant and use a self-signed certificate. Surely by having a verify_ssl option it could default be true but changed to false for someone like me who can't install the certificate in homeassistant to verify it?

The problem is adding that option to flow into homeassistant requires a significant number of changes at this point.  The edits to pyhik are not extensive, but config changes to homeassistant will require this component to adopt the new config flow and that is not something I have time to complete at the moment.
I'll always accept PR's if it's something you'd like to tackle on your own.


multiple spans per error

integration tests are not adapted yet. Waits until typecheck is finished.

Actual output


conda environment.yml / pip requirements.txt

Details
First I tried to build the docs via requirements.txt by pip freeze > requirements.txt. This was not working as I use many packages from conda.
But the conda env export > environemnt.yml does also not work although the build starts but several packages are not installed:

'icc_rt>=2017.0.4',
'mkl_fft>=1.0.1'
etc.

Last build was done by using the https://docs.readthedocs.io/en/latest/yaml-config.html manual. Following report was given:
There was a problem with Read the Docs while building your documentation. Please report this to us with your build id (7410983).

Read the Docs project URL: https://memphis.readthedocs.io/en/latest/
Build URL (if applicable): https://readthedocs.org/projects/memphis/builds/7410983/
Read the Docs username (if applicable): JPelda

Expected Result
I liked to upload my documentation to readthedocs.org
Actual Result
Build failed

You have a typo in your readthedocs.yml file.
https://github.com/JPelda/memphis/blob/52deda94a7c0ad2f457f5ff1f4331d0569c28b92/docs/readthedocs.yml#L2
it should be
build:
  image: latest

Thank you for the hint and the fast reply!
But nevertheless, it is still not running.
Installing the package pyproj via conda install -c conda-forge pyproj runs smoothly but if I try to run setup.py via python setup.py install at my anaconda prompt their is the following failure (also for some other packages):
Searching for pyproj
Reading https://pypi.org/simple/pyproj/
Downloading https://files.pythonhosted.org/packages/29/72/5c1888c4948a0c7b736d10e0f0f69966e7c0874a660222ed0a2c2c6daa9f/pyproj-<IP_ADDRESS>.tar.gz#sha256=53fa54c8fa8a1dfcd6af4bf09ce1aae5d4d949da63b90570ac5ec849efaf3ea8
Best match: pyproj <IP_ADDRESS>
Processing pyproj-<IP_ADDRESS>.tar.gz
Writing \pyproj-<IP_ADDRESS>\setup.cfg
Running pyproj-<IP_ADDRESS>\setup.py -q bdist_egg --dist-dir ..\Local\Temp\easy_install-on6deq0i\pyproj-<IP_ADDRESS>\egg-dist-tmp-51lnyd0f
using bundled proj4..
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
and in readthedocs.org the following:
File "/tmp/pip-build-7xtf3s93/GDAL/setup.py", line 138, in fetch_config
raise gdal_config_error(e)
main.gdal_config_error: [Errno 2] No such file or directory: 'gdal-config'
also it complains I did not install the recent pip.
conda list --> pip 10.0.1
readthedocs:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7xtf3s93/GDAL/
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

Thanks for the update!


[YUNIKORN-1128] absUsedCapacity is not exposed in the queue

What is this PR for?
Expose absUsedCapacity in the new REST API response.
What type of PR is it?

[x] - Bug Fix
[ ] - Improvement
[ ] - Feature
[ ] - Documentation
[ ] - Hot Fix
[ ] - Refactoring

Todos

[ ] - Task

What is the Jira issue?
https://issues.apache.org/jira/browse/YUNIKORN-1128
How should this be tested?
Screenshots (if appropriate)
Questions:

[ ] - The licenses files need update.
[ ] - There is breaking changes for older versions.
[ ] - It needs documentation.

Closed via #aa3fefb5.


Uninstall failed with exit code: 93

Trying to uninstall just Edge, getting issue "Uninstall failed with exit code: 93"

Any way to fix?

What Windows version are you on? e.g 11?


Pin astroid to fix linter issue on travis

I think this is a bug on pylint-django https://github.com/PyCQA/pylint-django/issues/117#issuecomment-371689024
I tried with pylint==1.8.2 but didn't solve the problem.

Related PR where this is exposed https://github.com/rtfd/readthedocs.org/pull/3813

https://github.com/PyCQA/pylint-django/issues/117 was closed today (https://github.com/PyCQA/pylint-django/commit/abd1164b7879ef1e8952eef2e619e32703ba4489). So in some days/weeks? we can try to unpin/update astroid.


bugfix: forbid AXI burst from crossing a 4KB boundary

Thanks, Jake! Out of curiosity, I wonder if crossing 4kB boundary actually causes problems, or it's just for compliance with the AXI specification? I think we visited this topic when we implemented async_mmap and the eventual decision was to not bother because Xilinx's IP seems to work fine with cross-4k bursts.

I had to fix this because Vivado simulation actually threw a fatal error and hung. Thank you for the suggestions!


Add Soccer IPM Module

This PR includes mainly some hacky code used to get the IPM up and running for the German Open tournament.
I will convert this PR into a proper module which implements a standard IPM for converting the soccer_vision_2d_msgs into soccer_vision_3d_msgs by assuming a field plane and a base_footprint.
TODOs:

[x] use base_footprint not available while testing
[x] use the soccer_vision_3d_msgs for publishing Cartesian coordinates
[ ] improve documentation
[ ] improve formatting
[ ] add unit tests
[ ] add proper documentation
[ ] support rotated bounding boxes

I don't know what your intention is with this PR after RoboCup, but I'd definitely want the soccer-related stuff to be in a separate repo (and not in IPM). Perhaps I can set up a new repo called soccer_ipm?

I don't know what your intention is with this PR after RoboCup, but I'd definitely want the soccer-related stuff to be in a separate repo (and not in IPM). Perhaps I can set up a new repo called soccer_ipm?

Yes, the idea is to merge this into a upstream repo. soccer_ipm is a good name, I belive. We just used this branch during the robocup

Great, I've set up the repo and added you both as a maintainer: https://github.com/ros-sports/soccer_ipm

The soccer ipm is now on https://github.com/ros-sports/soccer_ipm this pr is still used to request changes on the ipm library for the soccer ipm.


[FEATURE REQUEST] Switch to an updated fork of pyrogram

As of https://github.com/pyrogram/pyrogram lack of updates, I think it's better to switch to an up-to-date version.
https://github.com/hydrogram/hydrogram seems to be the perfect candidate

    GitHub - pyrogram/pyrogram: Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots   Elegant, modern and asynchronous Telegram MTProto API framework in Python for users and bots - pyrogram/pyrogram     GitHub - hydrogram/hydrogram: Sleek, advanced, and asynchronous Telegram MTProto API framework in Python, designed for fluid user and bot interactions.   Sleek, advanced, and asynchronous Telegram MTProto API framework in Python, designed for fluid user and bot interactions.  - GitHub - hydrogram/hydrogram: Sleek, advanced, and asynchronous Telegram...

Hi
Can I work on this?

Current candidates for a drop-in replacement of Pyrogram :

Pyrofork by Mayuri-Chan
Pyrogram by KurimuzonAkuma
PyroTGFork by TelegramPlayGround (SpEcHiDe)
Hydrogram by alissonlauffer, HitaloM & usernein
pyroblack by eyMarv (BlackStone)

Current candidates for a drop-in replacement of Pyrogram :

pyroblack by eyMarv (BlackStone)

🥰🥰🥰

@eyMarv yes I do consider it seriously 🥰
I still have to check all the documentations of all 5 to see what fits my needs


Remove Opengraph integration.

This should be integrated via an addon.

Codecov Report

Merging #646 into master will increase coverage by 0.07%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master     #646      +/-   ##
============================================
+ Coverage     46.81%   46.88%   +0.07%
+ Complexity     1563     1558       -5
============================================
  Files           115      115
  Lines          4548     4541       -7
============================================
  Hits           2129     2129
+ Misses         2419     2412       -7

Impacted Files
Coverage Δ
Complexity Δ

src/Page/Product.php
38.35% <ø> (+1.75%)
44 <0> (-5)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d24bf3...528875e. Read the comment docs.


ResNet50 get 0% (not ~2% as reported in the paper)

Hey,
Thanks for your such great work. I am trying to run the eval.py to and use ResNet50 pretrained to get your result in Figure 2. However, I am getting 0% accuracy for ResNet50.
Can you give me your advice?
Giang

Other models' results are reproducible but not ResNet50. @hendrycks Can you check it?

torchvision's ResNet-50 gets 0%. A different ResNet-50 trained from scratch gets ~2%.

@hendrycks Hello. Thanks for your kind reply. Could you point me to the ResNet-50 trained from scratches? In your code, you still use torchvision's ResNet50.

We did not upload a ResNet-50 trained from scratch. https://github.com/clovaai/CutMix-PyTorch has a ResNet-50 (though I think it was trained for 300 epochs).

Thank you @hendrycks

Did anyone try if it works with the pretrained ResNet-50 from https://github.com/clovaai/CutMix-PyTorch?

torchvision's ResNet-50 gets 0%. A different ResNet-50 trained from scratch gets ~2%.

Can this be explained by the fact that ResNet-50 was used for selected images?

Thereafter we delete the images that fixed ResNet-50 [24] classifiers correctly predict.

If it is the exact same model and all correctly classified examples have been removed, it is no surprise that it has 0% accuracy.


fix: success message positioning

trying to fix this view

I guess something like that also needs to be updated on the other views. maybe @im-adithya you can have a look a this?

Resolved via #1365


Set a max-width on the examples container as to more accurately reflect what it will look like

From @davehaigh on June 29, 2018 14:20
the examples wrapper is filling the entire width of the screen so components are rendered a lot wider than they are normally seen e.g open https://design-system.service.gov.uk/components/panel/ on a desktop pc. The 'confirmation panel' is very wide when normally its only 960px max.
I think the container should have a max width of 960px as to more accurately reflect the prototype kit.

Copied from original issue: alphagov/govuk-design-system-backlog#142

If we want to achieve this we should set the width of the column not the example container. At the moment the paragraphs, images, tables are all constrained to a maximum width to allow for the code blocks to be 100% and break out of the visible layout.
If we no longer want the code blocks to be 100% we can remove all of the individual constraints and set a max width on the column itself.

they're only constrained in the page content, not the example (as that's using a different template
we should be able to add max width to the app-example-page in the example layout

@dashouse do you think there's a clear change that we need to make here, or does this need more thinking?

@36degrees More thinking definitely, it's really about whether or not we're trying to represent the components as they actually behave (in this case 100% wide) or how we want them to be used (simulate 2/3 column width).
I prefer as is because it it's more of a representation of what you're going to get and makes the examples that DO have limited widths more obvious.
This caused a big debate so would prefer to look into it...


Ansible provisioning infrastructure

This adds a Vagrantfile and associated Ansible provisioning materials.
@alex-r-bigelow, could you try this out? Just check out this branch, go to app/resonant-laboratory, and do vagrant up. Once that process finishes, you should be able to go to http://localhost:8080 and see the deployment instance of Resonant Laboratory.

Closes #144
Closes #201

It seems to get to the Create Girder admin user task, and then crashes. I'll probe further and report ASAP.

Can you post the error message that step emanates? It's a big nasty
dict/json looking thing, usually in red on the console.
On Tue, Aug 16, 2016 at 3:58 PM Alex Bigelow<EMAIL_ADDRESS>wrote:

It seems to get to the Create Girder admin user task, and then crashes.
I'll probe further and report ASAP.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Kitware/candela/pull/354#issuecomment-240219225, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACxNJOyo8J20Q1uIQqcq59h-ojoWJckXks5qghZrgaJpZM4JlxHc
.

Yup. Here it is (slightly cleaned up):
{
  "changed": false,
  "failed": true,
  "invocation": {
    "module_args": {
      "apiRoot": null,
      "assetstore": null,
      "blacklist": null,
      "delete": null,
      "dryrun": null,
      "get": null,
      "host": null,
      "password": null,
      "plugins": null,
      "port": "8080",
      "post": null,
      "put": null,
      "scheme": null,
      "state": "present",
      "token": null,
      "user": "{'firstName': 'Admin', 'admin': True, 'lastName': 'User', 'login': 'admin', 'password': 'adminadmin', 'email'<EMAIL_ADDRESS>      "username": null
    },
    "module_name": "girder"
  },
  "msg": "<type 'exceptions.TypeError'>: user() takes at least 3 arguments (2 given)\n\nTraceback (most recent call last):\n  File \"/tmp/ansible_SLt5hD/ansible_module_girder.py\", line 842, in main\n    gcm(module)\n  File \"/tmp/ansible_SLt5hD/ansible_module_girder.py\", line 520, in __call__\n    self.__process(method)\n  File \"/tmp/ansible_SLt5hD/ansible_module_girder.py\", line 548, in __process\n    ret = getattr(self, method)(*args, **kwargs)\nTypeError: user() takes at least 3 arguments (2 given)\n"
}

And the stack trace:
<type 'exceptions.TypeError'>: user() takes at least 3 arguments (2 given)

Traceback (most recent call last):
  File "/tmp/ansible_SLt5hD/ansible_module_girder.py", line 842, in main
    gcm(module)
  File "/tmp/ansible_SLt5hD/ansible_module_girder.py", line 520, in __call__
    self.__process(method)
  File "/tmp/ansible_SLt5hD/ansible_module_girder.py", line 548, in __process
    ret = getattr(self, method)(*args, **kwargs)
TypeError: user() takes at least 3 arguments (2 given)

Well, people generally seem to have been complaining that Ansible 2.1 breaks their workflows. So for now @alex-r-bigelow could you try downgrading to Ansible 2.0 and see if this works? In the meantime I'll work with Chris K. and see if we can figure out the fix for 2.1 and beyond.

LGTM. :+1:

Works for me too. This is very nice! @ronichoudhury could you add the instructions to RL's readme, including the version of Ansible that is known to work (it worked for me with pip install -I ansible=<IP_ADDRESS>)?

@jeffbaumes, will do. I didn't realize that Ansible is installable via pip! (My OS has it via the package manager.)

Yeah, I used
virtualenv env
source env/bin/activate
pip install ansible==2.0

to avoid conflicting with the (newer) system installation.

Thanks Alex. I'll mention this in the docs I'm adding now.

Docs updated! PTAL.

LGTM

Current coverage is 57.51% (diff: 100%)

Merging #354 into master will not change coverage

@@             master       #354   diff @@
==========================================
  Files            26         26
  Lines           699        699
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits            402        402
  Misses          297        297
  Partials          0          0

Powered by Codecov. Last update 4f50686...7d344e5


Chore/refactor RuleUtil Class

Refactor

RuleUtil class -> PatternEscaper
use constructor method

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Read only property

How can I expose a proxy property as ready only and say allow only updates to happen through an action?

Good question. As a proxy object is a mutable variable. You can mutate anyways.
I'd say it's out of the scope of the library implementation, but it's nice to have such recipes: https://github.com/pmndrs/valtio#recipes
One naive idea is something like this:
// countState.ts

// do not export the proxy object
const state = proxy({ count })

// getter (non reactive)
export const getCount = () => state.count

// hook (reactive)
export const useCount = () => useSnapshot(state).count

// action
export const increment = () => ++state.count

@dai-shi  thank you for this recommendation. It makes sense since we are not using the flux pattern.
I have another question:
if I have a store that has something like:
{
  animals:[],
  setAnimals (animals) {
   // assume it's a class
  this.animals = animals;
 }
}

// and in my react component I use it like so
import store from 'mystore';

function Component() {
    useEffect(() => {
      store.setAnimals(['zebra','horse','cats','dogs']);
  },[]);

return <>
   // I want to display the animals. Why should I ready from Snapshot vs just directly accessing 'store.animals'?
 </>;
}

// I want to display the animals. Why should I ready from Snapshot vs just directly accessing 'store.animals'?
// What is the difference between using the 'snapshot' and just accessing the prop directly?

If you directly access store.animals, it won't trigger re-render.
It will be just like this.
const store = {
  animals: [],
}

const Component = () => {
  useEffect(() => {
    store.animals = ['zebra','horse','cats','dogs']
  }, [])
  return <>{JSON.stringify(store.animals)}</>
)

@dai-shi  Thanks for the feedback.  So you are saying that in the above scenario, the store.animals acts like a useRef?
I guess I am confused a bit because your examples have this:
setInterval(() => {
  ++state.count
}, 1000)

which mutates things directly
but also this:
// This will re-render on `state.count` change but not on `state.text` change
function Counter() {
  const snap = useSnapshot(state)
  return (
    <div>
      {snap.count}
      <button onClick={() => ++state.count}>+1</button>
    </div>
  )
}

which mutates from snapshot. Which one is the one to use?

which mutates from snapshot

It doesn't mutate snapshot. It reads from snapshot. Inside onClick, it mutates state.
Could you elaborate your confusion? Thanks. It's important for us to know how people read the docs.

@dai-shi  I think I got it. I had to read the entire example again. When you referred to state.text and where you mention it will re-render on state.count but I assume {snap.count} is being watch and if a change happens it will re-render?
Meaning, can I rewrite the above as
`function Counter() {
return (

{state.count}  // 👈🏼
<button onClick={() => ++state.count}>+1

)
}`
and get the same as above?
Maybe it's just me, but an example of how useSnapshot and state translate "similarish" to React's ( I know it's not how it works but for those moving from this pattern to Proxy it would help)
const [state, setState] = useState() ...The docs don't have enough working examples of the usage combinations. 🤷🏼♂

@dai-shi I think I got it. I had to read the entire example again. When you referred to state.text and where you mention it will re-render on state.count but I assume {snap.count} is being watch and if a change happens it will re-render?

"{snap.count} is being watch" is correct,

Meaning, can I rewrite the above as
`function Counter() {
return (
{state.count} // 👈🏼
<button onClick={() => ++state.count}>+1
)
}`
and get the same as above?

and thus this is different, because {state.count} isn't watch.

Maybe it's just me, but an example of how useSnapshot and state translate "similarish" to React's ( I know it's not how it works but for those moving from this pattern to Proxy it would help)
const [state, setState] = useState() ...The docs don't have enough working examples of the usage combinations. 🤷🏼♂

valtio proxy is self-aware object, and you don't need a function like setState update state.
If you prefer setState style, I recommend use-immer instead.
Would you elaborate explaining you use case please? Then, I think I can try creating code snippet, and hopefully we can improve docs.

There's no magic behind functions/methods (unless we use this, which is not recommended for beginners.)

// this method is wrapped in a proxy

It doesn't matter if a method is in a proxy or not.
const loadItineraries = async () => {
  const uri = anotherImportedProxyStore.uri; 👈🏼 // this works, but it gets a string at evaluation once (meaning, not reactive)
  await somethingAsync();
  return Promise.resolve([]);
};

is it automatically watched or updated

So, no, it's not. What you are looking for is derive().

Closing as answered. Please open new issue or new discussion for further discussion.


maybe it mistakes mistake if input come incorrect.

[Enter feedback here]
it's better to change the position of this :
DirectoryInfo dir = new DirectoryInfo(sourceDirName);
and this :
 if (!dir.Exists)
           {
               throw new DirectoryNotFoundException(
                   "Source directory does not exist or could not be found: "
                   + sourceDirName);
           }

something like this :
if (!Directory.Exists(sourceDirName))
            {
                throw new DirectoryNotFoundException(
                    "Source directory does not exist or could not be found: "
                    + sourceDirName);
            }

            DirectoryInfo dir = new DirectoryInfo(sourceDirName);

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

ID: d050f686-38eb-bb76-5747-9e138f4da679
Version Independent ID: 93b69d5a-5df1-c0e1-930d-2f5ee1c1fe6e
Content: How to: Copy directories
Content Source: docs/standard/io/how-to-copy-directories.md
Product: dotnet
Technology: dotnet-standard
GitHub Login: @mairaw
Microsoft Alias: mairaw

Thank you for your feedback, @Arashz22. Given that the DirectoryInfo class doesn't actually validate the file path passed to it in the constructor either until the value of the Exists property is retrieved or a method is called that attempts to perform an operation on the file system, this code should not throw a DirectoryNotFound exception before the Exists property is retrieved. Whether you prefer the coding style in the example or the one that you've proposed is really a matter of preference.
Given that, I'm going to close this issue as By Design.

Hello @rpetrusha  I was looking into the code and was wondering how do you make I am looking at your code and though I do understand it I do not know how to copy the sub folders and any document within my folder, please could you show me where I am going wrong
static void Main(string[] args)
{
cDirectory(".", @"C:\Users\Alucard\Desktop\CopyDirectory", true);
/the copied directory, please note the pathway may have to change on the computer it
is compiled on. thank you./
}
    private static void cDirectory(string sDir, string dDir, bool copied)
    {
        DirectoryInfo tDirectory = new DirectoryInfo(@"C:\Users\Alucard\Desktop\CopyDirectory\sfold");
        //Getting it from this certain directory

        if (!tDirectory.Exists) //if the direcory does not exist then write onthe console and create the directory
        {
            Console.WriteLine("The source directory is not found");
            Directory.CreateDirectory(@"C:\Users\Alucard\Desktop\CopyDirectory\sFold");
                    } //if the file does not work then it should write on the console that the source folder does not exist.

        DirectoryInfo[] tDirectorys = tDirectory.GetDirectories(); //checks the directory and gets all of the directories of the folder

                     if (!Directory.Exists(@"C:\Users\Alucard\Desktop\CopyDirectory\dFold"))
                     {
                         Directory.CreateDirectory(@"C:\Users\Alucard\Desktop\CopyDirectory\dFold"); }
                    //if the directory is not in the location provided then create the direcory  in the path.
                     FileInfo[] tFiles = tDirectory.GetFiles(); //retrivie all of the files within the directory

                        foreach (FileInfo tFile in tFiles)//for every file inside the direcory and put them in this destination direcoty
                        {
                             string tLocation = Path.Combine(@"C:\Users\Alucard\Desktop\CopyDirectory\", tFile.Name); //by combine the location of the destination directory
                    tFile.CopyTo(tLocation, false);
                            }

        /*if (copied)
        {
            foreach (DirectoryInfo othdir in tDirectorys)
            {
                string tLocation = Path.Combine(@"C:\Users\Alucard\Desktop\CopyDirectory\", othdir.Name);
                cDirectory(othdir.FullName, tLocation, copied);
            }
        }

        The above code represents if there are any other sub-direcories then copy them and their contents to this directory*/

    }

@rpetrusha , sorry I didnt make sense, What I am trying to do is make sure that as we copy the folders, I would like to copy any subfolders, and text documents to any documents which these folders have to be copied with them in the same folder. I am just slightly confused on this


Unable to overwrite a submodel-element with new value

The AAS with its elements is displayed correctly in the GUI but I can't overwrite the value of a single submodel element. When I want to upload the new value an internal server error occurs. The same error occurs when I add new entries for example in a multilanguage property.
I tried to change the value in the aas environment via postman and this works.
Thanks for your help.
My Code for reproducing:
aas-env-setup - Kopie.zip

There is a new version of the AAS Environment and the repositories. I added a feature there for CORS allowed headers. you have to delete and redownload the Docker image of the AAS Environment in order to have this new feature. The version you are currently working with does not support this. Therefore your browser throws CORS related errors (PATCH requests are not allowed out of the box).
Here you can find an example on how to allow all http methods for the AAS Environment.
Regarding MultilanguageProperties, I think the requiered entpoints to add new languages are not yet implemented in BaSyx V2 (BaSyx Java Server SDK). As far as I now this is planned for the near future but I don't now when this will be implemented by Fraunhofer IESE. You could probably ask @FrankSchnicke ragarding those enpoints. Here is the open issue for that feature request: https://github.com/eclipse-basyx/basyx-java-server-sdk/issues/98


Not able to clone LB service.

Server - Build from master
Steps to reproduce the problem:
Create a LB service with 2 other services as targets.
Start LB service.
Clone this LB service. Change the name and port of the LB service and "save".
User gets error message - "Validation failed in API: name"
API returns Status Code:422  - {"id":"5e5ed1dc-5cad-4488-bc24-3304ae44d2a4","type":"error","links":{},"actions":{},"status":422,"code":"NotNullable","message":null,"detail":null,"fieldName":"name"}

Debugged, and seeing the "name" field being sent twice during clone. One has not null value, another has null value - and that causes the problems. I also see that "description" field being sent twice as well.
@vincent99 do you have any hints why it could be happening?

Verified in v0.57.0-rc5 that this is no longer an issue.


make it easy to supply environment variables to be passed to docker:run or docker:run-build from a properties file

when running things inside kubernetes there's a bunch of environment variables that get generated to describe the IP / ports where all the services are.
I raised this issue in fabric8 to make it easier to run docker images as if they were really inside a kubernetes environment: https://github.com/fabric8io/fabric8/issues/3619#issuecomment-82911251
to be able to do that it'd be nice if the docker-maven-plugin could have a canonical file somewhere in target (e.g. target/docker/environment.properties or something) thats either manually configured or defined by default - that it looks for to set/override environment variables when running a docker container.
Then folks can generate the env vars using other maven plugin (e.g. we can have a "mvn fabric8:env goal to generate the kubernetes environment variables into that file) and can then easily pass them into the docker image.

you could probably accomplish this through the maven properties plugin and a build profile. the only drawback is you'd need to explicitly invoke the initialization goal along side any goal you call that is outside the normal life cycle.
this is similar to #52.

@jgangemi aha - great idea! :) I'll have an experiment with the maven properties plugin

though it would be cleaner to allow this to just be configured on the docker:run configuration though; then it won't affect the generation of images etc

configuring it to run as part of docker:run cannot be done w/o dev work. there was a discussion about this in #121.
it's possible it could be treated like the assembly plugin and invoked directly though, i need to do more investigation. it's unfortunate maven doesn't provide a way to at least run the initialization goal by default as part of other standalone goals.

I think calling the initialization phase should be possible to introduce a custom lifecycle and call the initialisation phase because that's unique and independent from the packaging type (in contrast to the package phase which calls different plugins dependent on whether we are building a war, ear, jar, ...).
However, allowing to specify an external properties file with environments variables to set when running a container has its charm, too.

So, I played a little bit around this. I managed to populate maven project properties (using an other plugin) and then have the docker-maven-plugin use the "props" configuration handler. The only problem I see is that when using the external configuration handler the approach is all or nothing, meaning that it generates a new build and run configs using the project properties, without taking into consideration any configuration provided directly on the plugin.
Would it make sense to use the existing configuration as a base and then use the external resolver for enriching / overriding the existing one?

Yup, sounds good, but that's probably another story. I opened issue #136 for that.
Here I think it's ok to add a <envProperties> configuration, which allows to specify a properties file in the format:
CATALINA_OPTS=-Xmx32m
JOLOKIA_OFF=true

(hopefully the syntax restrictions for properties and env files are the same :). This should be possible to add quite easily.

Added a configuration property envPropertyFile to the <run> section. This property file can now contain environment variables which take precedence over environment variables defined directly int the pom. It can be also given as a property if a property based configuration is used (e.g. with docker.envPropertyFile=....
I just pushed a fresh snapshot 0.11.3-SNAPSHOT so you could give it a try. I want to release 0.11.3 this weekend probably.

Build the integration branch locally and tried it out. Works great !!!


json locked error on 1.5.0

I have 2 cameras running on Frigate using go2rtc 1.5.0 and will occasionally lose connection to one of the cameras and never come back up.
2023-05-07 12:11:54.866291976  12:11:54.866 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp <IP_ADDRESS>:50414-><IP_ADDRESS>:8554: i/o timeout" url=rtsp://<IP_ADDRESS>:8554/driveway
2023-05-07 12:11:54.978466921  12:11:54.978 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error=EOF url=ffmpeg:driveway#audio=opus#audio=aac#async
2023-05-07 12:12:01.224655304  12:12:01.224 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp <IP_ADDRESS>:50416-><IP_ADDRESS>:8554: i/o timeout" url=rtsp://<IP_ADDRESS>:8554/driveway
2023-05-07 12:12:11.215189966  12:12:11.214 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp <IP_ADDRESS>:50420-><IP_ADDRESS>:8554: i/o timeout" url=rtsp://<IP_ADDRESS>:8554/driveway
2023-05-07 12:12:17.539085596  12:12:17.539 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error=EOF url=rtsp://<IP_ADDRESS>:8554/driveway
2023-05-07 12:13:00.437864752  12:13:00.435 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:55782: i/o timeout" url=ffmpeg:front_porch#audio=opus#audio=aac#async
2023-05-07 12:13:08.083364480  12:13:08.082 WRN [streams] json locked
2023-05-07 12:13:25.584679004  12:13:25.583 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:55978: i/o timeout" url=ffmpeg:front_porch#audio=opus#audio=aac#async
2023-05-07 12:13:39.917048268  12:13:39.916 WRN [streams] json locked
2023-05-07 12:14:06.658229930  12:14:06.625 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:55988: i/o timeout" url=ffmpeg:front_porch#audio=opus#audio=aac#async
2023-05-07 12:14:55.129514666  12:14:55.050 ERR [exec] timeout url="exec:ffmpeg -hide_banner -v error -use_wallclock_as_timestamps 1 -async 1 -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://<IP_ADDRESS>:8554/driveway?audio -vn -map 0:a:0? -c:a:0 libopus -ar:a:0 48000 -ac:a:0 2 -application:a:0 voip -compression_level:a:0 0 -map 0:a:0? -c:a:1 aac -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
2023-05-07 12:15:06.715650492  12:15:06.711 ERR [exec] timeout url="exec:ffmpeg -hide_banner -v error -use_wallclock_as_timestamps 1 -async 1 -fflags nobuffer -flags low_delay -timeout 5000000 -user_agent go2rtc/ffmpeg -rtsp_transport tcp -i rtsp://<IP_ADDRESS>:8554/front_porch?audio -vn -map 0:a:0? -c:a:0 libopus -ar:a:0 48000 -ac:a:0 2 -application:a:0 voip -compression_level:a:0 0 -map 0:a:0? -c:a:1 aac -user_agent ffmpeg/go2rtc -rtsp_transport tcp -f rtsp {output}"
2023-05-07 12:15:44.800244596  12:15:44.799 WRN [streams] json locked
2023-05-07 12:16:14.837153949  12:16:14.837 WRN [streams] json locked
2023-05-07 12:16:15.518564734  12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:52018: write: broken pipe"
2023-05-07 12:16:15.518745434  12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:38522: write: broken pipe"
2023-05-07 12:16:15.518817530  12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:52032: write: broken pipe"
2023-05-07 12:16:15.518892106  12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:48716: write: broken pipe"
2023-05-07 12:16:15.518948987  12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:55986: write: broken pipe"
2023-05-07 12:16:15.519032766  12:16:15.518 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:49170: write: broken pipe"
2023-05-07 12:16:15.519515390  12:16:15.519 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:55992: write: broken pipe"
2023-05-07 12:16:15.519814432  12:16:15.519 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:55982: write: broken pipe"
2023-05-07 12:16:15.519816609  12:16:15.519 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:57852: write: broken pipe"
2023-05-07 12:16:15.520168421  12:16:15.519 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:55974: write: broken pipe"
2023-05-07 12:16:15.520170432  12:16:15.520 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:55990: write: broken pipe"
2023-05-07 12:16:15.520171967  12:16:15.520 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:55994: write: broken pipe"
2023-05-07 12:16:15.520173427  12:16:15.520 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="write tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:35398: write: broken pipe"
2023-05-07 12:16:44.846532806  12:16:44.846 WRN [streams] json locked
2023-05-07 12:17:14.856141290  12:17:14.856 WRN [streams] json locked
2023-05-07 12:17:44.863439544  12:17:44.863 WRN [streams] json locked
2023-05-07 12:18:14.871506174  12:18:14.871 WRN [streams] json locked
2023-05-07 12:18:44.878748101  12:18:44.878 WRN [streams] json locked
2023-05-07 12:19:14.890400972  12:19:14.890 WRN [streams] json locked
2023-05-07 12:19:44.898432971  12:19:44.898 WRN [streams] json locked
2023-05-07 12:20:14.907736076  12:20:14.907 WRN [streams] json locked
2023-05-07 12:20:44.917835279  12:20:44.917 WRN [streams] json locked
2023-05-07 12:21:14.929905647  12:21:14.929 WRN [streams] json locked
2023-05-07 12:21:44.946032420  12:21:44.945 WRN [streams] json locked
2023-05-07 12:22:14.966079916  12:22:14.966 WRN [streams] json locked
2023-05-07 12:22:44.975544359  12:22:44.974 WRN [streams] json locked
2023-05-07 12:23:14.983273538  12:23:14.983 WRN [streams] json locked
```
If I restart Frigate the cameras reconnect and all is good until json locked occurs again

Show you go2rtc config section

go2rtc:
  streams:
    front_porch:
      - rtsp://<IP_ADDRESS>:8554/front-porch
      - "ffmpeg:front_porch#audio=opus#audio=aac#async"
    driveway:
      - rtsp://<IP_ADDRESS>:8554/driveway
      - "ffmpeg:driveway#audio=opus#audio=aac#async"

Why you using opus and aac? Usually you need to use only one. Also you don't need async option

At one point in the beta docs for 0.12 it showed using both opus and aac. I now see that it shows to only have one. I changed that and removed async. I had added it to try and solve some audio sync issues but honestly I never checked after adding it to see if it helped or not. I will report back if I continue to get the json locked issue.

Happened again after removing async and aac
go2rtc:
  streams:
    front_porch:
      - rtsp://<IP_ADDRESS>:8554/front-porch
      - "ffmpeg:front_porch#audio=opus"
    driveway:
      - rtsp://<IP_ADDRESS>:8554/driveway
      - "ffmpeg:driveway#audio=opus"

2023-05-31 14:30:37.624821176  14:30:37.624 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error=EOF url=rtsp://<IP_ADDRESS>:8554/front-porch
2023-05-31 14:30:56.698107043  14:30:56.698 WRN [streams] json locked
2023-05-31 14:31:26.712076173  14:31:26.712 WRN [streams] json locked
2023-05-31 14:31:56.745090726  14:31:56.745 WRN [streams] json locked
2023-05-31 14:32:26.780019004  14:32:26.779 WRN [streams] json locked
2023-05-31 14:32:56.802907361  14:32:56.802 WRN [streams] json locked
2023-05-31 14:33:26.838813041  14:33:26.838 WRN [streams] json locked
2023-05-31 14:33:51.015699004  14:33:51.015 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error=EOF url=rtsp://<IP_ADDRESS>:8554/driveway
2023-05-31 14:33:53.795143537  14:33:53.795 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:159 > error="read tcp <IP_ADDRESS>:51954-><IP_ADDRESS>:8554: read: connection reset by peer" url=rtsp://<IP_ADDRESS>:8554/front-porch
2023-05-31 14:33:56.854843284  14:33:56.854 WRN [streams] json locked
2023-05-31 14:34:17.030951914  14:34:17.030 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="read tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:56894: i/o timeout"
2023-05-31 14:34:26.248838960  14:34:26.248 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="read tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:53948: i/o timeout"
2023-05-31 14:34:26.249368420  14:34:26.249 WRN github.com/AlexxIT/go2rtc/internal/rtsp/rtsp.go:224 > error="read tcp <IP_ADDRESS>:8554-><IP_ADDRESS>:33634: i/o timeout"
2023-05-31 14:34:26.877997380  14:34:26.877 WRN [streams] json locked
2023-05-31 14:34:56.898851303  14:34:56.898 WRN [streams] json locked
2023-05-31 14:35:26.947063154  14:35:26.947 WRN [streams] json locked
2023-05-31 14:35:56.977913342  14:35:56.977 WRN [streams] json locked
2023-05-31 14:36:27.023756324  14:36:27.023 WRN [streams] json locked
2023-05-31 14:36:57.054512000  14:36:57.054 WRN [streams] json locked
2023-05-31 14:37:27.091190701  14:37:27.091 WRN [streams] json locked
2023-05-31 14:37:57.123886397  14:37:57.123 WRN [streams] json locked
2023-05-31 14:38:27.153898353  14:38:27.153 WRN [streams] json locked
2023-05-31 14:38:57.176188146  14:38:57.176 WRN [streams] json locked
2023-05-31 14:39:27.193813736  14:39:27.193 WRN [streams] json locked
2023-05-31 14:39:57.233943421  14:39:57.233 WRN [streams] json locked
2023-05-31 14:40:27.258805705  14:40:27.258 WRN [streams] json locked
2023-05-31 14:40:57.286437465  14:40:57.286 WRN [streams] json locked
2023-05-31 14:41:27.331272240  14:41:27.331 WRN [streams] json locked

12:50:59.328 INF go2rtc version 1.5.0 linux/amd64

It doesn't happen as much since removing async and aac but it will happen on occasion.

With witch config does this happen often and with witch don't?

Just started having this issue after upgrading to 0.12.1 and also updating Wyze-Bridge to latest version.
I'll get a bunch of broken pipe errors then that json locked one.
Not sure if it's absolutely related to Frigate or wyze-bridge since I updated them both at the same time like a dumbass. Haven't tried restarting Frigate when it happens, I'll try next time it occurs.
But just going in the wyze-bridge GUI and letting the feeds auto refresh fixes the issue in Frigate.
I'll try going back to the old versions to see if I can pinpoint the root cause

Hi! I have the simullar issue on go2rtc 1.9.3, one or two streams stop working. In go2rtc logs I see many messanges like:
WRN [streams] json locked
After restart frigate container all streams work for some time, and then  1 or 2 of them (camera_hd_webrtc and\or camera_sd_webrtc) stop working.
My config: https://pastebin.com/bc9LfwGq
Logs: https://pastebin.com/KisK4j3N


Support for Arrow PyCapsule interface

Description
Looking at the code below, the write_deltalake function is hard-coded to support only specific pyarrow and pandas objects.
https://github.com/delta-io/delta-rs/blob/6f81b8034dbef7a0120e354e178f0c859564465e/python/deltalake/writer.py#L283-L306
With the Arrow PyCapsule interface, you can support any Arrow-based Python input, regardless of the library implementation.
Use Case
I'm working on a Python library for Arrow-backed geospatial operations, and support for the PyCapsule interface would allow interfacing with my or any other Python Arrow library without needing hard-coded support.
Related Issue(s)

@kylebarron hey Kyle, are you willing to make this contribution here?

I put up a short initial PR for the write side to get things moving. I think we may be able to wrap some additional classes to export through the pycapsule interface as well (deferring to to_pyarrow under the hood)


Recovery phrase is impossible to verify if you get duplicate words

Was helping my dad setup a Yoroi wallet and he had "oval" twice in his recovery phrase.
When he went to verify the recovery phrase, clicking "oval" removed both instances from the word list making it impossible to complete the verification step.

Fixed and will be release in version 4.5.0


set SurfaceHandler without ShellSurfaceHandler

I'm confused what the use case is here.
If you don't supply a shell handler then we drop the client. So this just leaks the SurfaceHandler because we never clean up the data field.
For those use cases where you want a shell but don't want to deal with shell events (and only deal with the surface events) it's better to impl *Handler for () for handlers (so that the library user can just supply Box::new(()) when they don't care)

Yeah I think this is one of the parts I don't really understand yet.

Hmm, maybe I'm misunderstanding.
If you never set up handlers for the shell (so you don't respond to any of its events) how will you interact with it? The object is immediantly dropped because we aren't tracking the lifetime anymore. The client is still alive (when I said otherwise I was incorrect) but we can't respond to it at all. It's essentially a resource leak.
You need to specify some handler in order to track the object, even if it does nothing.
I think right now you brought up a good point that this API is confusing. What if we instead make it so you have to return a ShellSurfaceHandler but we implement () to just be the default (so if you don't care you just return Box::new(())?. That seems like an unnecessary allocation (and it is) but with how the shell managers are set up currently it assumes that for the lifetime of an object there's a valid handler trait object to call into.
Alternatively we can change the internal definition to be, e.g. Option<Box<XdgShellHandler>>. This has the added benifit of having null-pointer optimization (so that doesn't take up any more space with the Option) and that we don't have unnecessary allocations (and probably does closer to what you expect).
If you can change it so that you unconditionally set up the Xdg{V6}Shell objects in the managers (and just pass None if it's None or Some if it's Some) then I'll accept this PR.


Newlines in --suffix argument to spaceship::section are treated unusually

The problem
If, e.g. SPACESHIP_EXEC_TIME_SUFFIX="\n" or, indeed, SPACESHIP_EXEC_TIME_SUFFIX="\n\n" etc, they are treated as empty strings. The only way to recognise a newline is to have something written on that line, e.g. SPACESHIP_EXEC_TIME_SUFFIX="\n \n"
Relevant Zsh configuration
No response
What is version of Spaceship are you using?
v4.6.1
What is version of Zsh are you using?
5.8
What operation system are you running?
Debian GNU/Linux 11 (bullseye)
Do you use any Zsh framework or plugin manager?
Oh My Zsh
Which terminal emulator do you use?
xterm-256color
Additional information
No response

Line breaks and other controls aren't meant to be used within prefixes or suffixes.
If you're trying to make a line break in your prompt, try adding a line_sep section when it's appropriate:
spaceship add --after node line_sep
# or
spaceship add --before user line_sep

That's a sad regression as my prompt config is no longer supported. Would a feature request or PR that enabled this behaviour be welcome or should I just close this issue?

Sure, you're welcome to send a PR.

I've switched to using starship as it's supported out of the box. Would you like me to close this issue or is it useful as a placeholder for other people who have the same issue?

Let’s keep it open. I will try to fix this issue.

hey @insysion, just to let you know, I have fixed this issue. This will be release in an upcoming patch.

:tada: This issue has been resolved in version 4.10.1 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Database is locked error

user_proxy (to assistant):
Who should read this paper: https://arxiv.org/abs/2308.08155

OperationalError                          Traceback (most recent call last)
Cell In[14], line 2
1 # the assistant receives a message from the user, which contains the task description
----> 2 user_proxy.initiate_chat(
3     assistant,
4     message="""
5 Who should read this paper: https://arxiv.org/abs/2308.08155
6 """,
7 )
File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:531, in ConversableAgent.initiate_chat(self, recipient, clear_history, silent, **context)
517 """Initiate a chat with the recipient agent.
518
519 Reset the consecutive auto reply counter.
(...)
528         "message" needs to be provided if the generate_init_message method is not overridden.
529 """
530 self._prepare_chat(recipient, clear_history)
--> 531 self.send(self.generate_init_message(**context), recipient, silent=silent)
File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:334, in ConversableAgent.send(self, message, recipient, request_reply, silent)
332 valid = self._append_oai_message(message, "assistant", recipient)
333 if valid:
--> 334     recipient.receive(message, self, request_reply, silent)
335 else:
336     raise ValueError(
337         "Message can't be converted into a valid ChatCompletion message. Either content or function_call must be provided."
338     )
File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:462, in ConversableAgent.receive(self, message, sender, request_reply, silent)
460 if request_reply is False or request_reply is None and self.reply_at_receive[sender] is False:
461     return
--> 462 reply = self.generate_reply(messages=self.chat_messages[sender], sender=sender)
463 if reply is not None:
464     self.send(reply, sender, silent=silent)
File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:781, in ConversableAgent.generate_reply(self, messages, sender, exclude)
779     continue
780 if self._match_trigger(reply_func_tuple["trigger"], sender):
--> 781     final, reply = reply_func(self, messages=messages, sender=sender, config=reply_func_tuple["config"])
782     if final:
783         return reply
File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/agentchat/conversable_agent.py:606, in ConversableAgent.generate_oai_reply(self, messages, sender, config)
603     messages = self._oai_messages[sender]
605 # TODO: #1143 handle token limit exceeded error
--> 606 response = oai.ChatCompletion.create(
607     context=messages[-1].pop("context", None), messages=self._oai_system_message + messages, **llm_config
608 )
609 return True, oai.ChatCompletion.extract_text_or_function_call(response)[0]
File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/oai/completion.py:803, in Completion.create(cls, context, use_cache, config_list, filter_func, raise_on_ratelimit_or_timeout, allow_format_str_template, **config)
801     base_config["max_retry_period"] = 0
802 try:
--> 803     response = cls.create(
804         context,
805         use_cache,
806         raise_on_ratelimit_or_timeout=i < last or raise_on_ratelimit_or_timeout,
807         **base_config,
808     )
809     if response == -1:
810         return response
File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/autogen/oai/completion.py:832, in Completion.create(cls, context, use_cache, config_list, filter_func, raise_on_ratelimit_or_timeout, allow_format_str_template, **config)
830 if "seed" in params:
831     cls.set_cache(params.pop("seed"))
--> 832 with diskcache.Cache(cls.cache_path) as cls._cache:
833     cls.set_cache(seed)
834     return cls._get_response(params, raise_on_ratelimit_or_timeout=raise_on_ratelimit_or_timeout)
File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/diskcache/core.py:478, in Cache.init(self, directory, timeout, disk, **settings)
476 for key, value in sorted(sets.items()):
477     if key.startswith('sqlite_'):
--> 478         self.reset(key, value, update=False)
480 sql(
481     'CREATE TABLE IF NOT EXISTS Settings ('
482     ' key TEXT NOT NULL UNIQUE,'
483     ' value)'
484 )
486 # Setup Disk object (must happen after settings initialized).
File /anaconda/envs/azureml_py310_sdkv2/lib/python3.10/site-packages/diskcache/core.py:2438, in Cache.reset(self, key, value, update)
2436         update = True
2437     if update:
-> 2438         sql('PRAGMA %s = %s' % (pragma, value)).fetchall()
2439     break
2440 except sqlite3.OperationalError as exc:
OperationalError: database is locked

@balakreshnan  Can you provide more details about which sample code you are running, and how you prepared the virtual environment?

autogen/notebook/agentchat_web_info.ipynb at main · microsoft/autogen (github.com)https://github.com/microsoft/autogen/blob/main/notebook/agentchat_web_info.ipynb
i am using Azure Machine learning compute instance with their default environment python 3 and python 3.10 with sdk v2
both has issues
thanks
Bala

From: Ricky Loynd @.>
Sent: Tuesday, November 14, 2023 12:54 PM
To: microsoft/autogen @.>
Cc: Mention @.>; Author @.>
Subject: Re: [microsoft/autogen] Database is locked error (Issue #675)
@balakreshnanhttps://github.com/balakreshnan Can you provide more details about which sample code you are running, and how you prepared the virtual environment?
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/autogen/issues/675#issuecomment-1810960379 or unsubscribehttps://github.com/notifications/unsubscribe-auth/AF7FZBXWCUSH2G5XDCBYYQ3YEO475BFKMF2HI4TJMJ2XIZLTSOBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLLDTOVRGUZLDORPXI6LQMWWES43TOVSUG33NNVSW45FGORXXA2LDOOJIFJDUPFYGLKTSMVYG643JORXXE6NFOZQWY5LFVE3DQMBRGIYDANZRQKSHI6LQMWSWS43TOVS2K5TBNR2WLKRRHE4TENZQGE3DSN5HORZGSZ3HMVZKMY3SMVQXIZI.
You are receiving this email because you were mentioned.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

@sonichi fyi

@balakreshnan
For execution on AzureML Compute Instance I was able to run autogen using the local vm disk: https://github.com/microsoft/autogen/issues/79#issuecomment-1744086814

I am having the same issues in AML compute Instance. For python scripts, I can execute in localfiles in AML compute instance, but notebooks are only executable in cloudifies folder ...
Is there a way to resolve this ?

@chengyuliu-msft instead of using file system based diskcache, use redis cache, or turn the cache off.
See: https://microsoft.github.io/autogen/docs/topics/llm-caching

Thanks @ekzhu. I moved the repo to localfiles and opened with VS code.
I will try cache_root_path parameter a bit later.

Hi @chengyuliu-msft , did it work for you? Could you close the issue if it's resolved? Thanks.

I am having the same error with aml compute instance

has a workaround and unlikely to be fixed further for 0.2. please reopen if you object and consider contributing either doc or a fix.


fix make check

Fixes the gofmt, goimports, and staticcheck errors in make check
Removes http.CloseNotifier. We can just use Request.Context() instead

Closed in favor of #2707


Swift 4

Updated to Swift 4

I share the same opinion as @Spark3000  This pull request should be merged


Mapping doesn't include LT and RT axis

The getMapping() is pretty useful, but it only includes any buttons that might be mapped to L2/R2, but for those gamepads that have triggers the mapping should also include the axis for both the left and right trigger (LT/RT).
At least on desktop the trigger seem to be properly mapped to their axis. So instead of using the mapping I've currently just hardcoded LT to axis 4 and RT to axis 5.
If it's difficult to determine what's the axis on other platforms, maybe those would just have -1 in there until someone implements it.

IIRC the buttons are mapped to buttons on all other platforms, but I might remember wrong. I am open for all good suggestions but someone has to take a look on all the platforms for this. :)

I was testing with a bluetooth controller on android and to my surprise the trigger was mapped to both an axis and a button. So could be the case that on the other platforms the trigger is always mapped to a button. Which would make desktop the odd one out.
IDK, I handle desktop as an edge case at the moment, which would be cool to not be necessary, but it's not such a big deal to be worth much effort.
I guess at least this issue can act as a documentation of this quirk for now.


Message #17 - Defining Function

The conflict comes from b50f33a. Your interpretation edit would still help.

Resolved


Add IndexingQueue to handle indexing tasks sequentially

Description

Introduce IndexingQueue class
Update core.ts to use IndexingQueue

Checklist

[ ] The base branch of this PR is dev, rather than main
[ ] The relevant docs, if any, have been updated or created

I think we're going to want to do something slightly different here. The biggest concern for me is that the docs indexing won't happen until main indexing has completed, which might force the user to wait some time.
The alternative that I think would be ideal is to keep a "stack" of currently running jobs. They would all run in parallel, but all updates would be attached to a certain "job id" and the last created job id would always be the one displayed in the loading bar, until it was done, at which point the job beneath it, if still progressing, would take over. On hover, it could display the full stack of current jobs.
I think this would require a) updating the IndexingProgressUpdate type to include a "jobId", b) setting that "jobId" to a random UUID at the beginning of any job and making sure that the same ID is used throughout the job, c) writing the basic "stack" logic in the IndexingProgressBar component
I'm going to close this, but the thought process here was really valuable, so thank you for making the draft


Implement a cache to not compile the Wasm module everytime

The idea is basically to add a cache, so that we don't have to validate & compile etc. the whole module everytime. It will improve grately the execution speed.
There is no API in wasmer-runtime-c-api yet. I need to work on that. Maybe we will implement that outside the wasmer-runtime-c-api crate.

I was about to open a issue to ask you a question; could you please clarify the lifetime of a WebAssembly Instance/Module?
I would like to avoid to instantiate the WebAssembly module for each request. You are mentioning a cache for the module, I'm assuming that's to avoid running possible side-effects at instantiation, right?
However, I think it would be useful to explicitly ask to keep the instance in cache too (forgive my ignorance about PHP extensions). Would that be possible?

So far, the lifetime of a module is constrainted by the lifetime of a PHP execution. It starts when your run wasm_new_instance, and it is destroyed when the instance is destroyed (so either with unset or by waiting the end of the execution).

I would like to avoid to instantiate the WebAssembly module for each request

This issue is here to only avoid the compilation step. The cache will contain a module then. I'm likely to use https://github.com/wasmerio/wasmer/blob/master/lib/runtime-core/src/cache.rs.

You are mentioning a cache for the module, I'm assuming that's to avoid running possible side-effects at instantiation, right?

Do you mean caching the module instead of an instance? Yes. I don't want to cache the instance. That would be a terrible from my point of view, since it comes with the memory pages, tables etc.

However, I think it would be useful to explicitly ask to keep the instance in cache too (forgive my ignorance about PHP extensions). Would that be possible?

It is, but I don't want to address that yet. I want to first cache the module, and see how it impacts the performance in general.
It's trickier to cache an instance. And it depends of the usecases. Let's see! … or do you have a specific usecase in mind?

It's trickier to cache an instance. And it depends of the usecases. Let's see! … or do you have a specific usecase in mind?

Well I like PHP but here I have an occassion to avoid it. I don't have a specific use case in mind, but everything that would retain state. For intance, that could replace memcached with an app specific cache!
I agree that this shouldn't be the default caching strategy, but an explicit API would be great. I believe it's out-of-scope for now, just saying it would be nice to have.

I'm starting drafting it. More to come tomorow :-). I will probably ping you in the PR, if you're agree?

Sure, I'm happy to help.

Waiting on https://github.com/wasmerio/wasmer/pull/271.


Allow torrent deletion even if it's not ready

Yeah, have same problem, any way I can force to remove them from the list(inactive ones).


Error  with cordova-ios version 5+

When I build using ios, got error as like firebase.h  . I went ahead and made lot of changes like installing firebase using pod,  Even if we install pod firebase/core, firebase/messaging it leads to some other subsequent error with and  $(inherited) for linker flags as well didn't helped.  After trying 2 days moved on to another plugin (Looks like issue is only with cordova-oios 5.X versions.
CompileC /var/root/Library/Developer/Xcode/DerivedData/PROJNAME-fflckxrcmiqwasgblfazxcjgkvkp/Build/Intermediates.noindex/PROJNAME.build/Debug-iphonesimulator/PROJNAME.build/Objects-normal/x86_64/FCMPlugin.o /Users/vsonline/REM/rem/remApp/platforms/ios/REM/Plugins/cordova-plugin-fcm-with-dependecy-updated/FCMPlugin.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
(node:8070) UnhandledPromiseRejectionWarning: Error: xcodebuild: Command failed with exit code 65
at ChildProcess.whenDone (/Users/vsonline/REM/rem/remApp/node_modules/cordova-common/src/superspawn.js:135:23)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
(node:8070) UnhandledPromiseRejectionWarning: Unhandled promise reje

Would you share your package.json? Or even better, provide a github repo that I can use to debug?

Hi, I had the same issue. Solved it by editing plugin.xml like this (old is commented):
`

	<framework src="Firebase/Core" type="podspec" spec=">= 6.21.0"/>
    <framework src="Firebase/Analytics" type="podspec" spec=">= 6.21.0"/>
   	<framework src="Firebase/Messaging" type="podspec" spec=">= 6.21.0"/>`

@andrehtissot Why is Firebase/Core not listed in plugin.xml ?
ps. This is iOS only.

Thanks, Will try the same. For now I switched to another plugin and will get back to this at later point. Looks like above should fix the issue.

@DaedalusAB
It was a dependency of Firebase/Messaging, and, thus, implicitly required.
The  seems too dependent on cordova version. Thank you @DaedalusAB for pointing it out.

Unfortunately, the "" configuration is not accepted by cordova (main globally-installed package) versions older than 9. But, if we bring this older "", then it conflicts with the cordova-ios@5 validations.
As there is no clear way to make an adjustment for this specific case without bringing warnings for everybody. The solution would be to request users to, at least, have cordova@8, and ideally the current one:
npm install -g cordova@latest

Hi @andrehtissot Could you elaborate please (sorry I don't get it)? What is not accepted exactly?

@andrehtissot I am using Cordova 10.0 but still facing the exact same error.


Link in pkexec email URL searches for title=log4j, no matches

Great service. Best of luck with it.
I just read the notice email for the pkexec bug. The link for "Discussion can be found on Github" links to
https://github.com/sullivanmatt/bugalert/pulls?q=is%3Apr+in%3Atitle+log4j
which appears to be referencing log4j. The q= query string is "is:pr in:title log4j". The result is "no results matched your search." Perhaps the search term should be "is:pr in:title pkexec" for this bug?

Link hardcoded: https://github.com/BugAlertDotOrg/bugalert/blob/main/notice_communication/email_content.py#L614
Needs to be replaced with the {slug} variable during str format.

Still the case with the Spring notice we just received.
Regards,

Resolved by https://github.com/BugAlertDotOrg/bugalert/pull/44


Works on GPU

[Changed scripts to work on our GPU]
[Added class to data loader to process our sold_units time series : class only for one column]
[Plot.ipynb]: Plot the true labels and predictions
[2 notebooks one for creating the data the other to explore it]

This now works on our gpu and for our dataset


Add yaml_decode function to stdlib

River/Grafana Agent has the ability to parse json via the json_decode function.
This PR adds the same functionality for yaml files.

Thanks for adding this, it looks good to me :) Could you just add some tests under vm/vm_stdlb_test.go please?

With the move of River under the Alloy repo, do I need to resubmit this PR? Will this also be moved over and merged?

Do you want to move this to the Alloy repo? If not we can do it for you since its a pretty good feature to have in Alloy.

@mattdurham More than happy for you to move it to alloy for me.
I've been inundated with personal distractions recently and haven't had a chance to play with alloy yet.

Closing this issue because yaml_decode was added to Alloy instead.


Issue-594: Holistic review of non-quarkus executing, testing and trou…

…bleshooting chapter

Closes/Fixes/Resolves #594

Holistic review of non-quarkus executing, testing and troubleshooting chapter
The PR updates some issues found during the chapter review.
I also identified the following issues that are out of the scope of this PR:

https://github.com/apache/incubator-kie-kogito-docs/issues/652
https://github.com/apache/incubator-kie-kogito-docs/issues/653
https://github.com/apache/incubator-kie-kogito-docs/issues/654

Hello @domhanak ,
the fixing the "out of scope" issues may take more time to finish.
The goal of the https://github.com/apache/incubator-kie-kogito-docs/issues/594 was to identify the issues and report them for the documentation team.
This PR fixes some parts that were easily fixable without a big impact on the whole documentation structure, so they are ready for the following release.

fyi @kaldesai


Add support for Swift 2

and Carthage

Can you please make another pull request just for swift 2.0? I already merged Carthage support and now there is a conflict with your changes and the current code. Thanks!

rebased :smile:

Thanks! I'll update cocoa pods tomorrow.

@fahlout When will you release swift 2.0 support on Cocoapods?

+1

Dnjc


Add gpt-4o support

Motivation
A clear and concise description of why this feature would be useful and the value it would bring.
Explain any alternatives considered and why they are not sufficient.
gpt-4o is wonderful. Could we implement that soon, thanks?
How would you feel if this feature request was implemented?
_
Requirements
A list of requirements to consider this feature delivered

Requirement 1
Requirement 2
...

Tasks
To be filled in by the engineer picking up the issue

[ ] Task 1
[ ] Task 2
[ ] ...

I think there is no big changes needed to implement this features. You need only change your deployment model on Azure OpenAI Services and change his name on Enviroment Variables of the Web apps.

That may not be the case beyond the texts.


fix: adding trace i/o in langfuse openai integration

Description
The LangFuse OpenAI integration previously failed to include the input and output data in the trace body, limiting it only to the generation.
Key Changes:

Implemented sending input/output in the trace body.
Trace input/output is not updated when a trace_id or observation_id is provided in the inputs. This prevents inadvertent updates to nested traces.

Implementation looks good to me. Could you add a test to the openai test function ensuring we only add io in the case discussed?

@maxdeichmann I have added a test for checking the scenario we discussed where the user provides a trace_id in the openai integration as well as updated other tests to verify the trace i/o to be validated again input and out to and from model.


Sorting

I am trying to find or write a command line program for Windows that will sort
FAT32 drives
http://softwarerecs.stackexchange.com/q/19575
Is this possible using go-fs as a starting point? I could use a push in the
right direction.

It is probably possible to use it as a starting point but you'll probably run into limitations at some point. go-fs was really created primarily for Packer and so it isn't a complete implementation.


Bayesian

If I just care about the posterior at the individual level, does the hierarchical model matter?

Hyparam Search with Multi-Level Model

[ ] Justify the pdf

MLE
$$\underset{\theta \in \Theta}{\textrm{argmax}} \ \mathbb{P}_{\theta}(A)$$


Fix Typos in Common Errors Page

What type of PR is this? (check all applicable)

[ ] ♻ Refactor
[ ] ✨ New Feature
[ ] 🐛 Bug Fix
[x] 📝 Documentation Update
[ ] 👷 Example Application
[ ] 🧑💻 Code Snippet
[ ] 🎨 Design
[ ] 📖 Content
[ ] 🧪 Tests
[ ] 🔖 Release
[ ] 🚩 Other

Description
Fix Typos in Common Errors Page
This PR fixes this #1589 1589
Related Tickets & Documents
Resolves #1589
Added code snippets?

[ ] 👍 yes
[x] 🙅 no, because they aren't needed

Added tests?

[ ] 👍 yes
[x] 🙅 no, because they aren't needed
[ ] 🙋 no, because I need help

Added to documentation?

[ ] 📜 readme
[ ] 📜 contributing.md
[ ] 📓 general documentation
[x] 🙅 no documentation needed

@EbonyLouis Can you please add hacktoberfest-accepted label?


Update stock-market-container.component.ts #315

I updated this file to occupied an error that occurred when refresh or navigate to stock-market link. I am not sure this is the best solutions or not, please take a review.
Thanks

Fixed in a5c3785ed8d6a35868bc169f07e40e889087fd2e


use node's webcrypto when available

This change makes it so that if the node process has a webcrypto API implementation that this implementation be used instead of @peculiar/webcrypto so that Ed25519 and X25519 algorithms become available.
~It also patches out the use of Ed448 and X448 Algorithms which are not present in Edge Functions at Vercel. Ed25519 and X25519 already is (or should be?) since it's already present in workerd and CF Workers. This prototype update can easily be omitted but then EdgeRuntime would support more than the Edge Functions at Vercel runtime... This way they're aligned, but it's ugly and messes with the prototype when using edge runtime programatically... I'm happy to remove it from the PR~
The @peculiar/webcrypto dependency can be safely dropped when node 14 support is removed.

Hey! Thanks for this. I’m going to merge this into main or into #327 on Sunday. We’re changing how stuff works and the fact we can use crypto from node now is amazing. I’m running every version against the Next.js test suite so it’ll take some time to land but hopefully soon! 🙏
(btw @balazsorban44  will open a PR to drop Node14 support afaik)


start-vswitch: assign dpdk-lcore-mask so it does not overlap PMD or vcpu threads

fixed with https://github.com/atheurer/dpdk-rhel-perf-tools/commit/f567e5b7985679b89d0995cdf0b881d8b8318de3


24 function text cleaning function and testing

implemented text cleaning function
implemented testing case for text cleaning function
updated package dependancies

@wenyunie That is a good point. I have added the example usage for text cleaning. Thanks for reviewing the code


feat: bitmasking first pass

Description
Using bitmasking to read the interaction state of the operator. For this first pass I assigninteractionStatus to hover and drag states when appropriate. I turn on the .focus class when the node is being dragged.

The way you had written utils/bitmask.ts is a mixture of domain logic (e.g. found, not found) and generic logic (e.g. bitwise-or, bitwise-and). So I am tempted to say just throw it into services folder as you can't really just take it and dump into a different project.


Improve color name editorUnnecessary.foreground

editorUnnecessary.foreground got added as a new color.
My first thought was that this is the color of an unnecessary editor.
TypeScript calls the ranges unused spans, so I suggest we use unused, not unnecessary

editorUnusedCode.foreground
editor.unusedCodeForeground (similar to editor.lineHighlightBackground)
editor.unusedCodeForeground

We had some discussions in the ZRH standup that it should go along with future semantic highlights, but no proposal was made on what that would mean for the name.
@dbaeumer @jrieken @egamma

I would like to take this one if you guys think this is a good first issue. Seems like I just need to rename editorUnnecessary by editorUnused on these files:

/src/vs/editor/browser/widget/codeEditorWidget.ts
/src/vs/editor/common/model/intervalTree.ts
/src/vs/editor/common/services/modelServiceImpl.ts
/src/vs/editor/common/view/editorColorRegistry.ts

Thanks @wistcc but this is not a good choice. Easy code change but we need to discuss the design of this feature more. For example,  should we fade out code instead of changing it all to grey?

Falls under #51104

@mjbvz I'm just getting up-to-speed on the change. Thanks for adding the key editorUnnecessaryCode.opacity to control the alpha variable for the fadeout.
Is there still an option to change the color or has that been removed?

No, this option was been removed when we finalized the unused variable api

@mjbvz
This is pretty bad... we used to have unused code highlighted in yellow so it is crystal clear (fading is not enough as some themes use light grey for comments etc.)
Now with 1.25.0, this feature seem to be broken (no editorUnnecessaryCode.opacity/editor.showUnused combination seems to have an effect).
Related: https://github.com/Microsoft/vscode/issues/51420


Data property read in prop watch treated as a rendering dependency

Version
3.0.4
Reproduction link
https://jsfiddle.net/skirtle/yuq96a0c/
Steps to reproduce

Click 'Button 1'.
Click 'Button 2'.
Note the logging.

What is expected?
Clicking 'Button 2' should not cause anything to be logged.
What is actually happening?
Clicking 'Button 2' is logging a message, indicating that the component has re-rendered.

Clicking the first button causes a prop to change, triggering the watcher. The watcher accesses a property, which is then incorrectly tracked as a rendering dependency.
I reported this previously as part of #2521 but it was only partially fixed.

IMO, this is normal.
this template
 <div>
      {{ myProp }} - {{ track() }}
      <button @click="add">Button 2</button>
 </div>

will convert to
import { toDisplayString as _toDisplayString, createVNode as _createVNode, createTextVNode as _createTextVNode, openBlock as _openBlock, createBlock as _createBlock } from "vue"

export function render(_ctx, _cache, $props, $setup, $data, $options) {
  return (_openBlock(), _createBlock("div", null, [
    _createTextVNode(_toDisplayString(_ctx.myProp) + " - " + _toDisplayString(_ctx.track()) + " ", 1 /* TEXT */),
    _createVNode("button", { onClick: _ctx.add }, "Button 2", 8 /* PROPS */, ["onClick"])
  ]))
}

if track method return something,it should be display in DOM.right?
if we pauseTracking in this code:
 _toDisplayString(_ctx.track())

We will not get the correct value to display when something changed in track method.
This is my understanding, may be incorrect.


Circleci setup document

Fixes #15095
@timabbott

Can you add a link to the CircleCI documentation on how to do secrets in environment variables for setting that up with this webhook?


Update manage-custom-dns-buy-domain.md

Corrected title to be buy and not by

@SweetpopcornSimon - thank you for this edit!


add new (paid) synthesizer book

Hi, I've added a link to my new book. Feel free to tweak the description! :smiley:

Interesting. Although I don't normally add resources to this repository unless someone has vouched that it has actually helped them.
I'll keep this PR open until I get 3rd-party validation for this book.
From what I glean it's a book about JUCE, voice handling logic, oscillators, envelopes, and LFOs? I see one chapter on filters, although that doesn't exactly make a "fully-featured synth" IMO, and I imagine it doesn't go into much detail into how filter and other FX DSP actually works considering it's a math-light book (although I could be wrong, this is just what I could glean from the sample book). I would tweak the description to better represent what this book is.
Still, this does seem to have potential to help beginners. I just want some validation first, especially since it's a paid resource.

Fair enough, I think that is very reasonable.
If you want to check out the synth that is being built in the book, the full source code is available here: https://github.com/hollance/synth-plugin-book

Ah sorry, I forgot about this. I see that this book is now officially endorsed by The Audio Programmer, so it seems legit.
Since there were merge conflicts, I went ahead and added the entry myself, and I updated it to use the correct link.
Anyway, thanks for writing this book!

83eeb4d

Thanks for merging! 😄


partialLoop/partial View Helper can not be nested when using setObjectKey

Since always the same partial(Loop) instance is used, setting a new object key inside a partial(Loop) overwrites also the current object key (because same instance). Maybe it is a better way to provide the objectKey as optional parameter for the __invoke methods of partial and partialLoop.

Since I just encountered this problem I thought I'd chip in.
As a user it's easy to get around this problem by saving the current objectKey to a temporary variable and restoring when you're done:
<?php
	$prevKey = $this->partialLoop()->getObjectKey();
	$this->partialLoop()->setObjectKey('newkey');
	echo $this->partialLoop('partial.phtml', $object);
	$this->partialLoop()->setObjectKey($prevKey);
?>

This could be implemented by the framework using a stack of objectKeys in the PartialLoop helper, letting setObjectKey() push a key to the stack and __invoke() pop a key from the stack when the loop is completed.
That would of course cause a BC break for those relying on the objectKey staying set during multiple invocations of PartialLoop.
A somewhat more complex idea is to use a nesting-level bound objectKey, meaning if partialLoop() is called from within another partialLoop() the inner objectKey would be different from the outer object key, but default to the outer objectKey. I have created a pull request which implements this.

This is handled in #7093


How did I end up downloading the GNOME version?

Describe the bug
I swear I downloaded the KDE version. Might I have been confused or is the website not delivering the desired version?
What did you expect to happen?
I expected to have the KDE version, but I already went through the installation and found out it's GNOME after the fact.
Output of rpm-ostree status
No response
Hardware
No response
Extra information or context
No response

Double checked website, could not reproduce issue. If you could screenshot what you downloaded that might help.


Chore: Re-update to serialization based navigation

Problem Description
Tim opened https://github.com/ls1intum/artemis-android/pull/49 that introduced type safe navigation. After prematurely merging the PR, I found that the changes cased a crash. See https://github.com/ls1intum/artemis-android/pull/49#issuecomment-2433172761.
This closes issue #104.
Changes

Readded the changes that Tim already did, and fix two crash causing bugs.
Steps for testing
Navigate through the app and ensure that everything works as expected. Especially cover the case that the user is not logged in when opening the app.
Cover navigation to the following screens:

Login
Registration (eg TS2)
Dashboard
ExerciseView

Quiz

LectureScreen
CommunicationOverview
Settings

PushNotificationsSettings

Due to a bug in the RobolectricTestRunner I had to ignore the tests using a ModalBottomSheet.
This closed dependency update can also be reopened with the ignored tests: https://github.com/ls1intum/artemis-android/pull/46


Added new features

Changed PartnerBookingResponse and corresponding classes to Partner…
Separated updatedBookings call as this is not using a relay
Added company result in partner
Added company call
Added activity call
Added ticket call
Added relay function for tickets from partner
Added call for bulk operation for ticket timeslots
Added complete pending booking call
Updated docs to include new calls

Choosing to go with the localisation option


Add searchEnabled condition for showing dropdown on typing

Hmmm, is this actually necessary?

I think so, because when the searchEnabled is set to false and user has focus on Choices element, it's not expected behavior to show the dropdown on any keypress, at least in my opinion. It should probably open on hitting enter, space or down arrow, but not on other random keys. What do you think?

Closing as I don't think is necessary 👍 thanks


Include crate/package name in cargo test -- --format=json output

Problem
Currently, it is very hard (impossible?) to distinguish between events of tests with similar name in different crates in a cargo workspace cargo test -- --format=json output.
Proposed Solution
Include crate or package name inside the event. That is, current state:
{ "type": "suite", "event": "started", "test_count": 760 }
{ "type": "test", "event": "started", "name": "some_test" }
{ "type": "suite", "event": "ok", "passed": 1, "failed": 0, "ignored": 0, "measured": 0, "filtered_out": 0, "exec_time": 0.002828253 }
{ "type": "suite", "event": "started", "test_count": 760 }
{ "type": "test", "event": "started", "name": "some_test" }
{ "type": "suite", "event": "ok", "passed": 1, "failed": 0, "ignored": 0, "measured": 0, "filtered_out": 0, "exec_time": 0.002828253 }

becomes:
{ "crate": "crate1", "type": "suite", "event": "started", "test_count": 760 }
{ "crate": "crate1", "type": "test", "event": "started", "name": "some_test" }
{ "crate": "crate1", "type": "suite", "event": "ok", "passed": 1, "failed": 0, "ignored": 0, "measured": 0, "filtered_out": 0, "exec_time": 0.002828253 }
{ "crate": "crate2", "type": "suite", "event": "started", "test_count": 760 }
{ "crate": "crate2", "type": "test", "event": "started", "name": "some_test" }
{ "crate": "crate2", "type": "suite", "event": "ok", "passed": 1, "failed": 0, "ignored": 0, "measured": 0, "filtered_out": 0, "exec_time": 0.002828253 }

Notes
No response

Thanks for the report. This unstable JSON output is currently under re-design and experimental process. This will be implemented outside Cargo. (and it's never Cargo controling that. It's libtest inside rustc)
You can read the RFC 3558, and follow the tracking issue https://github.com/rust-lang/testing-devex-team/issues/1.
Close in favor of https://github.com/rust-lang/testing-devex-team/issues/1.


Transform.cs should have guards and noexcept

We do not want to have any NaNs or Infinity nor any exceptions.

Should Fusee.Math include Fusee.Core for error messages?

See https://github.com/FUSEEProjectTeam/Fusee/pull/631#pullrequestreview-1107158889

https://github.com/FUSEEProjectTeam/Fusee/issues/594


why Sia still not support GetBlockTemplate yet?

Right now, most device mining Sia are ASIC miners, and almost all asic miners using stratum protocol, https://github.com/SiaMining/Stratum, I am wondering when will Sia support GetBlockTemplate?
https://siamining.com/stratum
https://github.com/SiaMining/Stratum
https://github.com/NebulousLabs/Sia/issues/2400

8 bytes is more than enough nonce space, you need 2^64 operations to grind through it, and world class theoretical ASICs would still take days to grind through the full nonce space.

8 Bytes is not enough at all, for mining pool, extra nonce1 is 4 bytes. Only left 4 bytes for asic miner, that's far from enough.
Innosilicon S11 SiaMaster Specifications:
– Hashrate: 3.83 TH/s

Getblocktemplate is something that would need to be implemented by the mining pool, not by the sia daemon.

The Sia team does not run or maintain any mining pool.  Do you believe there is some functionality required in the Sia daemon that is missing?
FYI: @nitronick600, @siamining

@DavidVorick
There are potential problems:

If there is stratum-proxy/agent between pool and miners, how many bytes left for the proxy? I think it's zero.
If get work from specific Siad server, than have to submit the new block to the specific Siad server. For mining pool, usually submit the new block hex to many Siad servers.

So the best way for mining pool is Siad return the candidate block with fully data by json-RPC, let the pool handle the arb tx and merkle root hash. Just like bitcoin.


TokenCleanupService blocked the execution of whole host

Call Task.Yield() in TokenCleanupService so they don't block the app execution dotnet/runtime#36063
WaitHandle.WaitOne replaced with Task.Delay to prevent block calling thread

When this one will be merge?

Any updates?