WinRT Component / .Net Standard Library - if/when?

Hi,
I don't know if this is something that is yet to be provided  by ProjectReunion or .Net 5  or even if it's a non-issue...
I currently have a C# UWP application that calls into my scene & rendering engine which is a .Net Standard library. I'm looking at moving the graphics code out of my engine library into a Windows Runtime Component (still C# with SharpDX) so that I can...

Make the graphics code to be self contained with a clearly defined API surface that is interchangeable between a C# and C++ Component. Then I can replace it with a C++ WinRT Component in the future - since there seems to be no movement from Microsoft to take over the SharpDX project or any similar library to replace it (I say similar because I'm aware of some libs out there, but they seem to be quite complicated in that they don't really adopt natural C# patterns like SharpDX does). And my thinking is that if I have to adopt weird native-style thinking I might as well try to write the graphics code in C++ and create my own WinRT rendering framework.

Working that graphics code into a WinRT Component now will let me start understanding how a graphics API can work across the WinRT boundary.

So I go to make a Windows Runtime Component, but I can only make (and this is even true for the VS Preview)..

Windows Runtime Component (UWP) C#
Windows Runtime Component (WinUI UWP) C#
Windows Runtime Component (UWP) C++
Windows Runtime Component (C++/WinRT) C++
Windows Runtime Component (WinUI UWP) C++

Nothing here can replace my current engine library...

Class Library (.Net Standard) C# // callable from any C# project (UWP or edit : Not .Net 5) but dead end because it uses SharpDX.

I don't see any option for making a Windows Runtime Component using .Net Standard or .Net 5 so therefore I cannot make a library that is consumable from a UWP app but also future proof in that it can also be consumed from a .Net 5 application. The missing project type here is either...

Windows Runtime Component (.Net Standard) C#

I would include the following...

Windows Runtime Component (.Net 5) C# // but SharpDX won't be compat with .Net 5 so this is no good.

It's the WinRT Component that uses .Net Standard that would let me proceed to work with SharpDX now and build the API surface for the component and then replace the internals with C++ later.
Is this project template coming, I presume it has been considered and is in the works, because WinRT Components are supported in .Net 5 AFAIK and the only way you can support stale libraries is by providing WinRT Components written against .Net Standard.
But we are upto preview 5 of .Net 5 now and I don't see even a rough of a solution here. Could you explain how this is going to work and when we might see it? Or are we going to be left in a position where we are forced to just wait and then rewrite for .Net 5.
I can see that what I'm saying here is a little confused, because I can write a C# wrt component today using SharpDX and then replace it with a C++ wrt component next year. I guess I'm hoping for some flexibility with when I have to transition. The wrt component targeting .net standard would allow me to simply switch to .Net 5 - actually, no I couldn't because WinUI and .Net 5 CoreWindow (if it exists) won't be compatible with SharpDX.
I guess I'm just trying to see the way forward as someone who is completely dependent upon the SharpDX project.

My thinking after reading over that is that the only way to proceed is to first move all my graphics code to a WinRT component (C# UWP), work out the API surface and then just wait till next year when we have .Net 5 and rewrite the component to be a WinRT Component (C++/WinRT). Is that the reasonable approach? Is that how you see people proceeding that are using libraries that won't work with .Net 5?

I'll close this. There are are few factual issues in my post and also considering that we are still a few months out from .Net 5 release, there are questions up in the air. It's a bit hard to unravel this to work out what exactly I want to know. I have a couple of other questions that are clearer to put down into words that I think are more worthwhile to ask right now.


Insert a new row and get the auto generated id in the same call

Hi,
Can someone post an example how to do this?

I can work on this.

I switched to minus5/gofreetds driver, installed freetds and LastInsertId() was returning the correct last generated id... Then I switched back to denisenkom/go-mssqldb and magically LastInsertId() started to work... Now I'm totally confused ... :) Before I haven't had a freetds installed.. Ok uninstalled freetds and LastInsertId() is still working :) No idea what's going on :)

I have no idea what your issue was, but I'm glad to hear it's working. I'll still work on creating an example for this scenario.

Please be aware that there is no 100% correct way with SQL server to return a LastInsertID without modifying the SQL and returning it in the select statement.
If you are using SQL Server DO NOT USE OR RELY on LastInsertID.
You should use something like:
insert into mytable (mytextcol)
ouput inserted.ID
values (N'myval');

Alright I'll explain what i'm doing and figured out where the problem is

First I used sql.DB.Exec() to insert the row and tried to extract the generated id with a result. LastInsertId(). That doesn't work as stated at https://github.com/denisenkom/go-mssqldb#important-notes
Then I tried what is suggested there by adding SELECT ID = convert(bigint, SCOPE_IDENTITY()); along with the INSERT in Exec(). It can't be done like that...
Then I switched to DB.QueryRow() and passed both INSERT and SELECT ID =... to it and then Scan()... It works but if there is an error while Insertion that error will be hidden ...
Then I switched to sql.Tx.Exec() and magically LastInsertId() started to return an id

Not magical, each connection is a unique session. calling db.Conn(), then calling exec then scope_identity on the same connection is what you want to do. Making a Tx is another way to do that.

Please be aware that there is no 100% correct way with SQL server to return a LastInsertID without modifying the SQL and returning it in the select statement.
If you are using SQL Server DO NOT USE OR RELY on LastInsertID.
You should use something like:
insert into mytable (mytextcol)
ouput inserted.ID
values (N'myval');

I see but how to execute this? With a db.Exec or with something else? db.Exec doesn't work.

There is no such thing as "exec" in SQL Server. Exec for the DB interface just means disregard all rows.
Don't use Exec. Use Query. Scan the first row to get output.

The error will also be hidden if I replace the SCOPE_IDENTITY()  solution with OUTPUT clause. However, when I try to insert some duplicate rows to a table:

SCOPE_IDENITY()  will return the driver type conversion error between null and int64
OUTPUT clause do not return any errors

They both do not actually insert the duplicate rows into the table .
Any suggestion about how to capture the raw database error when insert duplicated rows ?
@kardianos

@scbizu What is your table schema? What is the query you're running? Why can't duplicate rows be insert into the table (I'm guessing there is a unique column in your table)?
I tried both using SCOPE_IDENTITY() and OUTPUT I was able to get the correct error (mssql: Violation of UNIQUE KEY constraint 'UQ__foo__DE90ECF660F04C30'. Cannot insert duplicate key in object 'dbo.foo'. The duplicate key value is (1).).
The following is the queries I tried to run:
rows, err := db.Query("insert into foo (baz) values (1); select ID = convert(bigint, SCOPE_IDENTITY())")

and
err = db.QueryRow("insert into foo (baz) output inserted.bar values (1)").Scan(&lastInsertId2)

where baz is a unique column.

@v-kaywon  Are you sure the first case error is  the duplicated error ? I got the conversion error even if I use the db.Query() (or db.QueryRow()), it says sql: Scan error on column index 0, name \"ID\": converting driver.Value type <nil> (\"<nil>\") to a int64: invalid syntax. The code looks likes below:
rows, err := db.Query("MY INSERT QUERY; select ID = convert(bigint, SCOPE_IDENTITY())")
if err != nil {
  return err
}
defer rows.Close()

if !rows.Next() {
  if err:= rows.Err();err!=nil{
    return err
  }
  return INSERTID_NOT_FOUND_ERROR
}

var id int64

err := rows.Scan(&id); err!=nil {
   return err
}

As for output clause, I fixed up my scan bug , And now it works as expected.
Anyway, Thanks for your help.

I doubled checked and tried again with the query "insert into foo (baz) values (1); select ID = convert(bigint, SCOPE_IDENTITY())" and I do get the violation of unique key constraint error. I'm not sure why it's not working for you.. Anyway I'm glad the output query works for you.

Hi, I'm also having this problem, and able to reproduce using this code:

code modified from: https://github.com/denisenkom/go-mssqldb/issues/23#issuecomment-42204645

func TestDriver(t *testing.T) {
	db, err := sql.Open("mssql", dsn())
	fmt.Println(db, err)
	fmt.Println(db.Ping())
	defer db.Close()
	schema := "CREATE TABLE [dbo].[Foo3]([ID] [int] IDENTITY(1,1) NOT NULL,[Name] [varchar](100) NOT NULL,CONSTRAINT [PK_Foo3] PRIMARY KEY CLUSTERED ([ID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY],CONSTRAINT [IX__Name] UNIQUE NONCLUSTERED ([Name] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]"
	_, err = db.Exec(schema)
	fmt.Println(err)

	// first record, return nil is expected
	_, err = db.Query("INSERT INTO Foo3([Name]) "+
		"VALUES (?)", "foo")
	fmt.Println("first record: ", err) //nil

	// duplicate record, error returned
	_, err = db.Query("INSERT INTO Foo3([Name]) "+
		"VALUES (?)", "foo")
	fmt.Println("duplicate record no id returned: ", err) // mssql: Violation of UNIQUE KEY constraint

	// duplicate record with output inserted, no error returned???
	_, err = db.Query("INSERT INTO Foo3([Name]) OUTPUT INSERTED.ID "+
		"VALUES (?)", "foo")
	fmt.Println("duplicate with inserted: ", err) // nil??

	// duplicate record with output inserted, no error returned???
	_, err = db.Query("INSERT INTO Foo3([Name]) "+
		"VALUES (?); select ID = convert(bigint, SCOPE_IDENTITY())", "foo")
	fmt.Println("duplicate with select id: ", err) // nil??

	// works: error returned
	_, err = db.Query("INSERT INTO Foo3([Name]) OUTPUT INSERTED.ID " +
		"VALUES ('foo')")
	fmt.Println("duplicate with inserted, literal only: ", err) //Real error!

	// duplicate record with output inserted, no error returned???
	_, err = db.Exec("INSERT INTO Foo3([Name]) OUTPUT INSERTED.ID "+
		"VALUES (?)", "foo")
	fmt.Println("duplicate with inserted using exec: ", err) // nil??

	// duplicate record with output inserted, no error returned???
	_, err = db.Exec("INSERT INTO Foo3([Name]) "+
		"VALUES (?); select ID = convert(bigint, SCOPE_IDENTITY())", "foo")
	fmt.Println("duplicate with select id using exec: ", err) // nil??

}

output:
=== RUN   TestDriver
&{0 {sqlserver://sa:REL2021-mssql@localhost:1433?database=master&log=32 0x17ff040} 0 {0 0} [] map[] 0 0 0xc00008e480 0xc00015cf00 false map[] map[] 0 0 0 <nil> 0 0 0 0x10dcfa0} <nil>
<nil>
<nil>
first record:  <nil>
duplicate record no id returned:  mssql: Violation of UNIQUE KEY constraint 'IX__Name'. Cannot insert duplicate key in object 'dbo.Foo3'. The duplicate key value is (foo).
duplicate with inserted:  <nil>
duplicate with select id:  <nil>
duplicate with inserted, literal only:  <nil>
duplicate with inserted using exec:  mssql: Violation of UNIQUE KEY constraint 'IX__Name'. Cannot insert duplicate key in object 'dbo.Foo3'. The duplicate key value is (foo).
duplicate with select id using exec:  mssql: Violation of UNIQUE KEY constraint 'IX__Name'. Cannot insert duplicate key in object 'dbo.Foo3'. The duplicate key value is (foo).
--- PASS: TestDriver (0.19s)

it seems db.Query can't detect if constraint error is thrown?


Add DDoS change log entries for 2023-06-14

I think you will remove the planned changes too as we had to release it before the planned date. You will need to edit  content/ddos-protection/change-log/http/scheduled-changes.md  to:
...

      N/A
      N/A
      N/A
      N/A
      N/A
      N/A
      N/A

...

And content/ddos-protection/change-log/http/scheduled.json to:
[]


Move build-script argument parser to separate module

Purpose
This PR simply moves the argument parsing logic from the build-script main function into a separate module. There are no functional changes here apart from wrapping up the parser instantiation into a new create_argument_parser function. Having the parser in a separate module will allow for testing and stage future changes on the path to merging #11872.
rdar://problem/34336890

LGTM. Thank you for splitting this out!

@swift-ci smoke-test

@swift-ci smoke test

I'm going to merge this change and then move on to rebase and test #11882.


python3Packages.opentelemetry-instrumentation-requests: init at 0.47b0

Adding Requests instrumentation for the Opentelemetry https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/instrumentation/opentelemetry-instrumentation-requests

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@ofborg build python312Packages.opentelemetry-instrumentation-requests

https://github.com/ofborg build python312Packages.opentelemetry-instrumentation-requests


Is possible to run the Ztest class and multiple_difference() method for multiple experiments and events at the same time?

We are considering using Spotify confidence to report on all the experiments running on our experimentation platform. So, I did some tests by running a sample of our data (see image below) against Ztest class to see if it could be used to meet our needs of running it simultaneously for various experiments and conversion events. And my findings were as follows:

For a Single Experiment (Variation_Type, Conversion_Event_Name)

For a single experiment with multiple metrics, the following methods, summary(), difference(), and multiple_difference(), worked correctly.
ztest_filtered = confidence.ZTest(pandasDF_filtered,
                                   numerator_column='NUMERATOR',
                                   numerator_sum_squares_column=None,
                                   denominator_column='DENOMINATOR',
                                   categorical_group_columns= ['VARIATION_TYPE','CONVERSION_EVENT_NAME'],
                                   interval_size=0.95,
                                   correction_method='bonferroni',
                                   #metric_column = 'CONVERSION_EVENT_NAME',
                                 )

ztest_filtered.summary()
ztest_filtered.difference(level_1="control", level_2="variation_1", groupby="CONVERSION_EVENT_NAME", absolute=False)
ztest_filtered.multiple_difference(level='control', groupby='CONVERSION_EVENT_NAME', level_as_reference=True)

For a Multiple Experiments and conversion_Eevnts by making use of concatenation  (Variation_Type, "Experiment_Key~Conversion_Event_Name")

Similar results to the previous one, but satisfying to see that it works perfectly for all experiments and events if we do a concatenation between the fields "Experiment_Key~Conversion_Event_Name".
ztest_concat = confidence.ZTest(pandasDF_updated,
                   numerator_column='NUMERATOR',
                   numerator_sum_squares_column='NUMERATOR',
                   denominator_column='DENOMINATOR',
                   categorical_group_columns=['VARIATION_TYPE','EXP_n_EVENT'],
                   #ordinal_group_column = ,
                   interval_size=0.95,
                   correction_method='bonferroni',
                   #metric_column = 'CONVERSION_EVENT_NAME',
                   #treatment_column ,
                   # power - 0.8 (default)
                  )

ztest_concat.summary()
ztest_concat.difference(level_1="control", level_2="variation_1", groupby="EXP_n_EVENT", absolute=False)
ztest_concat.multiple_difference(level='control', groupby='EXP_n_EVENT', level_as_reference=True)

**For all experiments using the above table as it is.  (Experiment_Key, Variation_Type, Country, Conversion_Event_Name)

The summary class works even if I change the conversion_event from the categorical group to metric_column.
While the methods difference () and multiple_difference() return errors regardless of the combinations, I can try in both the class and the method.
Trial 1: metric_column  equals conversion_event_name

ztest = confidence.ZTest(pandasDF_updated,
                   numerator_column='NUMERATOR',
                   numerator_sum_squares_column='NUMERATOR',
                   denominator_column='DENOMINATOR',
                   categorical_group_columns=['VARIATION_TYPE','EXPERIMENT_KEY'],
                   #ordinal_group_column = ,
                   interval_size=0.95,
                   correction_method='bonferroni',
                   metric_column = 'CONVERSION_EVENT_NAME',
                   #treatment_column ,
                   # power - 0.8 (default)
                  )

######################################################################

Trial 2 : metric_column  hidden and conversion_event_name moved to categorical_group_columns

ztest = confidence.ZTest(pandasDF_updated,
                   numerator_column='NUMERATOR',
                   numerator_sum_squares_column='NUMERATOR',
                   denominator_column='DENOMINATOR',
                   categorical_group_columns=['VARIATION_TYPE','EXPERIMENT_KEY','CONVERSION_EVENT_NAME'],
                   #ordinal_group_column = ,
                   interval_size=0.95,
                   correction_method='bonferroni',
                   #metric_column = 'CONVERSION_EVENT_NAME',
                   #treatment_column ,
                   # power - 0.8 (default)
                  )

ztest.multiple_difference(level='control', groupby=['EXPERIMENT_KEY','CONVERSION_EVENT_NAME'], level_as_reference=True)
ValueError: cannot handle a non-unique multi-index!  (for both trials)
I've been searching inside the repository notebooks, but I couldn't find the place that explains or execute this error message.
So after this test, I wondered:

Is there any configuration between the class and the method that meets our needs?
what is the use case for the variable "metric_column "?
at which level the  "correction_method='bonferroni' " is applied?

Thanks, and looking forward to leveraging this package.

Hi!
Sorry for the slow response.

If you're using the dataframe above, you would need to add "Country" to categorical_group_columns and to the groupby argument of multiple difference. If you don't want to split by country you would need to sum up you df first, something like df.groupby(['VARIATION_TYPE','EXPERIMENT_KEY','CONVERSION_EVENT_NAME']).sum().reset_index() might do.
We use it for some multiple correction variants e.g. "spot-1-bonferroni", where we only Bonferroni correct for "success metrics", not for "guardrail metrics". For normal Bonferroni correction it doens't matter if you put 'CONVERSION_EVENT_NAME' as metric_column or in categorical_group_columns.
It's applied to the total number of comparisons, so if you have 3 experiments, 5 metrics and control + 2 treatment groups in each you would get 352=30 comparisons in total.
Hope that helps!


Add xformers on requirements.txt

If someone wants to use the run_xl.py, we need to install xformers, which is not on the requirements.txt, also the code does not work with python 3.8, so I had to upgrade to python 3.11.
If someone finds the same problem: pip install xformers

Thank you!
I've added former's to requirements.txt.


fix: change edit allowance text to edit preferences

Describe the changes you have made in this PR
Changed Edit Allowance to Edit Preferences as stated in #2093
Link this PR to an issue [optional]
Fixes #2093
Type of change
(Remove other not matching type)

fix: Bug fix (non-breaking change which fixes an issue)

Screenshots of the changes [optional]

How has this been tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist

[x] My code follows the style guidelines of this project and performed a self-review of my own code
[x] New and existing tests pass locally with my changes
[x] I checked if I need to make corresponding changes to the documentation (and made those changes if needed)

@escapedcat Kindly review this PR. Thanks much!


Wrong Querying the Hyper-V hypervisor scheduler type launch event using PowerShell

 Get-WinEvent -FilterHashTable @{ProviderName="Microsoft-Windows-Hyper-V-Hypervisor"; ID=2} | Sor
t-object -property TimeCreated | select -Last 1

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

ID: b739fc5c-de44-7299-28a5-21e95bccf400
Version Independent ID: 3a607530-01e6-e73a-0168-4e03a262a59c
Content: Understanding and using Hyper-V hypervisor scheduler types
Content Source: WindowsServerDocs/virtualization/hyper-v/manage/manage-hyper-v-scheduler-types.md
Product: windows-server-hyper-v
GitHub Login: @allenma
Microsoft Alias: allenma

@AlexeyRipenko I've submitted a PR  to update the PowerShell command used -- please let me know if there are additional questions/concerns.


allow show of incomplete classifications

closes #1874
Allow the api client to save incomplete classifications, todo this the etag (via get by id route) is called before running the PUT update method.
Review checklist

[ ] First, the most important one: is this PR small enough that you can actually review it? Feel free to just reject a branch if the changes are hard to review due to the length of the diff.
[ ] If there are any migrations, will they the previous version of the app work correctly after they've been run (e.g. the don't remove columns still known about by ActiveRecord).
[ ] If anything changed with regards to the public API, are those changes also documented in the apiary.apib file?
[ ] Are all the changes covered by tests? Think about any possible edge cases that might be left untested.

LGTM. Closes #1874, I think.

Thanks @camallen and @zwolf  :)

@saschaishikawa if you have time to check out the partial stuff on OW this should have been the last obstacle to that running through.

:+1: :)

@itsravenous I'll have a look at that today. Thanks all!

@itsravenous: Saving partial classifications works! Looks like we're done here.


[SPARK-12611][SQL][PYSPARK][TESTS] Fix test_infer_schema_to_local

Previously (when the PR was first created) not specifying b= explicitly was fine (and treated as default null) - instead be explicit about b being None in the test.

Test build #48617 has started for PR 10564 at commit 72009b7.

Test build #48617 has finished for PR 10564 at commit 72009b7.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/48617/
Test PASSed.

Merged build finished. Test PASSed.

cc @davies
I'm going to merge this first so pull requests don't just fail. We should look into whether the behavior change is desired.

@holdenk @rxin thanks!

FYI I filed https://issues.apache.org/jira/browse/SPARK-12624

Also merging to branch 1.6.


Cast button not showing up

There is the code to add the cast button to the view controllers as UIBarButtonItem, but when i run the app it doesn't show up.Could I be missing something?

If you run the sample app as-is with your app id, does the Cast icon display?

I was actually running it on a simulator, that was why.
The issue i have now is getting it to show on an existing project (it does show for the sample project). I added the context in app delegate and then the cast button in a view controller but doesn't appear. I'm I missing something?

It is very import that you initialize the Cast context as early as possible in the app lifecycle.

I did that but still not showing up.
I added this code inside my didFinishLaunchingWithOptions
let options = GCKCastOptions(receiverApplicationID: applicationID)         GCKCastContext.setSharedInstanceWith(options)         GCKLogger.sharedInstance().delegate = self
and this in my View Controller
         let frame = CGRect(x: 0, y: 0, width: 24, height: 24)         let castButton = GCKUICastButton(frame: frame)         let item = UIBarButtonItem(customView: castButton)         self.navigationItem.rightBarButtonItem = item
It was showing up in the sample project before but it's not showing anymore. I'm running the app on an iPad Mini.
This below is printed out to the console
Logging 5, currently detected {(     1,     5 )}

Its very difficult to understand why it isn't working without seeing all of your code. The best advice I can give is to study the sample app line-by-line since that works for your app id.

Okay, I've solved it. It was because the cast device wasn't setup to connect on the same network with my phone. Thanks for the support.

Hello, i was following the tutorial on the code lab, when i got to the point of casting the media, it was said that one should "Create a GC Media Information object from the Cast SDK that models a media item"... Could you please explain how am suppose to do this with an existing Media object model?

Have you looked at the sample app on how to do that?

self.castButton = GCKUICastButton(frame: CGRect(x: CGFloat(0), y: CGFloat(0), width: CGFloat(24), height: CGFloat(24)))
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
How to solve this error ? in cast button

Please add a breakpoint and confirm which object is nil. Your snippet should create a valid cast button.

I am already have break point in this snippet but crash this line.
On Wed 14 Nov, 2018, 10:23 PM James Romo<EMAIL_ADDRESS>wrote:

Please add a breakpoint and confirm which object is nil. Your snippet
should create a valid cast button.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/googlecast/CastVideos-ios/issues/18#issuecomment-438735003,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Ae-dN58y4hNdapy05a1Ua2w1wuM_Yd_Nks5uvEqYgaJpZM4OfZMZ
.

Make sure your app is being initialized properly, make sure your breakpoint in didFinishLaunchingWithOptions is being hit.

Might sound trivial, but if you have followed the tutorial correctly try restarting WiFi on your phone.
After wifi restart cast button showed up for me. I know the issue is closed but this might help someone.

Hello sir i have issue when i tap on gckuicastbutton then it's ask for permission then i will tap on ok button that  gckuicastbutton is hide automatically


Branch of main project with theano commented out

I tried to do this mostly agnostically, but added a few pieces of pytorch code...
This commit should keep pointing to a project where import pymc3 works without theano.  The import statements are commented out, but interior code that was changed was marked with
# THEANO  whatever = tt.original_code()
whatever = None

so that it is greppable.
Let me know if it would be helpful for me to drop that version of the project into one of the subfolders!

Definitely put it into a folder here.


Replace console logger by ILogger when a background service had a critical error and is shutting down the application.

There was a log of coding style errors in the repo and it would not build. My modification was pretty small so I did not modify those. I suppose there is a refactoring in progress in a different branch.

After having time to look at the PR - the actual changes you're making does break some stuff regarding the PeriodicTasks (as they use the CriticalBackgroundService internally. We'll need to get that fixed first, luckily it's not too much work.
I don't seem to have edit access to the PR, but I've made some changes and here's two patch files you can apply to your PR that should get it into a working state.
patches.zip

Hello there
I applied your patch and merged your latest commits.
Last time I did this modification without any compilation because it failed for a lot of styling rules that were not my job to fix. I thought you had those errors instead of warnings configured in your project. I was wrong ... it appears that my local .editorconfig was interfering and that's why it did not compile.
I've moved the project in a different folder and I could see that I produced a broken commit with compilation error :( sry for that !
I've added you to my git repo (not sure if I did right, github is not my preferred platform) in case you need to do other modifications like this before merging. If we could have cleared the confusion about why there was some coding errors, I would have probably also fixed it. Hope you like it.


Dynamic plugin reloading not working

Repost: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010163299-How-to-Trigger-Dynamic-Plugin-Reload?page=1
How is the dynamic plugin reloading suppose to work in a development workflow?
My code at the moment gets HotSwapped when I change method bodies. But when I change the plugin.xml file or something else, I would expect the plugin to be reloaded without having to re-run the entire IDE.
I have tried running buildPlugin and runIDE but nothing works.
  id("org.jetbrains.intellij") version "0.6.5"

answered in forum and clarified docs


[SPARK-16514] [SQL] Fix various regex codegen bugs

What changes were proposed in this pull request?
RegexExtract and RegexReplace currently crash on non-nullable input due use of a hard-coded local variable name (e.g. compiles fail with java.lang.Exception: failed to compile: org.codehaus.commons.compiler.CompileException: File 'generated.java', Line 85, Column 26: Redefinition of local variable "m" ).
This changes those variables to use fresh names, and also in a few other places.
How was this patch tested?
Unit tests. @rxin

Test build #62202 has started for PR 14168 at commit 4524d97.

@ericl please open a JIRA ticket for this. Thanks.

Sure

Test build #62202 has finished for PR 14168 at commit 4524d97.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62202/
Test PASSed.

Thanks - merging in master/2.0.

@ericl as an alternative, did you consider simply defining boolean ${ev.isNull} = false; for even the non-nullable branches in nullSafeCodegen (e.g., here: https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Expression.scala#L619-L624) to get around this problem? My fear is that this pattern occurs at several other places as well.

@sameeragarwal that's a good defensive measure.


Migration error on Snowflake procedure and Clean error on Snowflake function and procedure

Which version and edition of Flyway are you using?
6.1.0 and  "Flyway PR #2274"
If this is not the latest version, can you reproduce the issue with the latest one as well?
(Many bugs are fixed in newer releases and upgrading will often resolve the issue)
The issues exist in both 6.1.0 and  "Flyway PR #2274"
Which client are you using? (Command-line, Java API, Maven plugin, Gradle plugin)
Command-line
Which database are you using (type & version)?
Snowflake
Which operating system are you using?
Windows
What did you do?
(Please include the content causing the issue, any relevant configuration settings, the SQL statement that failed (if relevant) and the command you ran.)
procedure migration "R__Procedure_MDM.SP_ARRAY_GET_INF_SCHEMA_TABLES.sql":
CREATE OR REPLACE PROCEDURE MDM.SP_ARRAY_GET_INF_SCHEMA_TABLES () RETURNS VARIANT LANGUAGE JAVASCRIPT
AS $$
var results_array = [];
var rs = snowflake.createStatement(
            { sqlText: 'SELECT TABLE_SCHEMA, TABLE_NAME FROM INFORMATION_SCHEMA.TABLES' }).execute();
    while (rs.next())
    {    var schema_name = rs.getColumnValue(1);
        var table_name = rs.getColumnValue(2);
        results_array.push([schema_name, table_name]);
    }
return results_array;
$$;

What did you expect to see?
Migrate command should apply procedure script successfully
and  Clean command should drop the function and procedure successfully
What did you see instead?
Error message
> ERROR: Migration of schema "PUBLIC" with repeatable migration Procedure MDM.SP ARRAY GET INF SCHEMA TABLES failed! Please restore backups and roll back database and code!
ERROR:
Migration R__Procedure_MDM.SP_ARRAY_GET_INF_SCHEMA_TABLES.sql failed
--------------------------------------------------------------------
SQL State  : 42000
Error Code : 1003
Message    : SQL compilation error:
parse error line 3 at position 22 near '<EOF>'.
syntax error line 2 at position 4 unexpected '$'.
Location   : C:\flyway-6.1.0\sql\Procedures\R__Procedure_MDM.SP_ARRAY_GET_INF_SCHEMA_TABLES.sql (C:\flyway-6.1.0\sql\Procedures\R__Procedure_MDM.SP_ARRAY_GET_INF_SCHEMA_TABLES.sql)
Line       : 1
Statement  : CREATE OR REPLACE PROCEDURE MDM.SP_ARRAY_GET_INF_SCHEMA_TABLES () RETURNS VARIANT LANGUAGE JAVASCRIPT
AS $$
var results_array = []

Here's what I did to fix tissue
A) To fix the snowflake procedure script migration issue, I added the function extractAlternateOpenQuote(String token) in the flyway PR2274 source file flyway-core\src\main\java\org\flywaydb\core\internal\database\snowflake\SnowflakeSqlStatementBuilder.java:
    @Override     protected String extractAlternateOpenQuote(String token) {         if (token.startsWith("$$")) {             return "$$";         }         return null;     }
B) To fix the Clean command issue which failed in dropping the snowflake function,  I modified the function generateDropFunctionStatements() in the flyway PR2274 source file snowflake\SnowflakeSchema.java.  The fix is to put the quote around the function name only instead of function name and parameters.
old code:
private List<String> generateDropFunctionStatements() throws SQLException {
       List<Map<String, String>> objects = getObjects(FUNCTIONS, "%","arguments");
       List<String> result = new ArrayList<String>();
       for (Map<String, String> object : objects) {
           String value = object.get("arguments");
           // remove the RETURN clause from the fuction signature
           value = value.replaceAll("\\sRETURN\\s.*", "");
           result.add("DROP " + FUNCTIONS.getCreateDropType() + " " + database.quote(name, value));
       }
       return result;
   }

new code:
private List<String> generateDropFunctionStatements() throws SQLException {
        List<Map<String, String>> objects = getObjects(FUNCTIONS, "%","name", "arguments");
        List<String> result = new ArrayList<String>();
        for (Map<String, String> object : objects) {
            String funcName = object.get("name");
            String value;
            value = object.get("arguments");

            // remove the RETURN clause from the fuction signature
            value = value.replaceAll("\\sRETURN\\s.*", "");
            value = value.replaceFirst(funcName, "");
            result.add("DROP " + FUNCTIONS.getCreateDropType() + " " + database.quote(name, funcName) + value);        }
        return result;
    }

C) To fix the Clean command issue which failed in dropping the snowflake procedure, I updated the following source code files:

file ..\database\snowflake\SnowflakeObjectType.java
added  PROCEDURES("PROCEDURES", "PROCEDURE") in public enum SnowflakeObjectType { }:

public enum SnowflakeObjectType {

    SCHEMAS("SCHEMAS", "SCHEMA"),
    OBJECTS("OBJECTS", "OBJECT"),
    TABLES("TABLES", "TABLE"),
    VIEWS("VIEWS", "VIEW"),
    FILE_FORMATS("FILE FORMATS", "FILE FORMAT"),
    SEQUENCES("SEQUENCES", "SEQUENCE"),
    STAGES("STAGES", "STAGE"),
    PIPES("PIPES", "PIPE"),
    FUNCTIONS("USER FUNCTIONS", "FUNCTION"),
// *** new code ***
    PROCEDURES("PROCEDURES", "PROCEDURE");

in snowflake\SnowflakeSchema.java, added  function  generateDropProcedureStatements() :

private List<String> generateDropProcedureStatements() throws SQLException {
        List<Map<String, String>> objects = getObjects(PROCEDURES, "%","name", "arguments");
        List<String> result = new ArrayList<String>();
        for (Map<String, String> object : objects) {
            String procName = object.get("name");
            String value;
            value = object.get("arguments");

            // remove the RETURN clause from the fuction signature
            value = value.replaceAll("\\sRETURN\\s.*", "");
            value = value.replaceFirst(procName, "");
            result.add("DROP " + PROCEDURES.getCreateDropType() + " " + database.quote(name, procName) + value);
        }
        return result;
    }

added procedure "for loop" in doClean() in snowflake\SnowflakeSchema.java:

@Override
    protected void doClean() throws SQLException {
        for (String statement : generateDropStatements(VIEWS)) {
            jdbcTemplate.execute(statement);
        }
        for (Table table : allTables()) {
            table.drop();
        }
        for (String statement : generateDropStatements(STAGES)) {
            jdbcTemplate.execute(statement);
        }
        for (String statement : generateDropStatements(FILE_FORMATS)) {
            jdbcTemplate.execute(statement);
        }
        for (String statement : generateDropStatements(SEQUENCES)) {
            jdbcTemplate.execute(statement);
        }
        for (String statement : generateDropStatements(PIPES)) {
            jdbcTemplate.execute(statement);
        }
        for (String statement : generateDropFunctionStatements()) {
            jdbcTemplate.execute(statement);
        }
// *** new code  ***
       for (String statement : generateDropProcedureStatements()) {
            jdbcTemplate.execute(statement);
        }
    }

Thanks for the detailed repro steps. The fix will be shipped in Flyway 6.1.1

@MikielAgutu, Thanks for fixing the snowflake bug so quickly.
I have downloaded the latest code from the master branch and tested out the "Migrate" online command and "Clean" online command on the stored procedure scripts.  The good news is the reported stored procedure is migrated successfully!
Meanwhile, I find two issues:
Issue 1:
if the stored procedure migration has the semicolon ";"  put in a separate line at the end of the script file, the "Migrate" command reports  "Unable to parse statement" error
Here is the sample migration code:
CREATE OR REPLACE PROCEDURE MDM.SP_ARRAY_GET_INF_SCHEMA_TABLES () RETURNS VARIANT LANGUAGE JAVASCRIPT
AS $$
var results_array = [];
var rs = snowflake.createStatement(
            { sqlText: 'SELECT TABLE_SCHEMA,TABLE_NAME FROM INFORMATION_SCHEMA.TABLES;' }).execute();
    while (rs.next())
    {    var schema_name = rs.getColumnValue(1);
        var table_name = rs.getColumnValue(2);
        results_array.push([schema_name, table_name]);
    }
return results_array;
$$
;

Here is the error message:
ERROR: Unable to parse statement in C:\flyway-6.1.1\sql\Procedures\R__Procedure_mdm_nossn_MatchRecursion.sql at line 17 col 1: Index 256 out of bounds for length 256
Issue 2:
The "Clean" command failed in dropping snowflake stored procedure from the database.
For example, I successfully migrated two functions and two stored procedures into the Snowflake database, then I run "Flyway clean" command to clean the database. The "clean" command completed without error, when I check the database, the two functions were dropped, but the two stored procedures are still in the database.
Here are the sample statements I use to check the functions and procedures in Snowflake database:
SHOW USER FUNCTIONS IN SCHEMA MDM;
SHOW PROCEDURES IN SCHEMA MDM;


Hitting Errors Running Example App

Problem Description
When building example.sln, VS produces an error that the UseJsi() API does not exist.
"class "winrt::Microsoft::ReactNative::ReactInstanceSettings" has no member "UseJsi"".
After commenting out this line the build succeeds, but when the app loads I get the following error:
Error: While trying to resolve module react-native-xaml from file C:\Users\chiaramooney\react-native-xaml\example\App.tsx, the package C:\Users\chiaramooney\react-native-xaml\package\package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (C:\Users\chiaramooney\react-native-xaml\package\lib\index.js. Indeed, none of these files exist:

C:\Users\chiaramooney\react-native-xaml\package\lib\index.js(.native|.windows.js|.native.js|.js|.windows.json|.native.json|.json|.windows.ts|.native.ts|.ts|.windows.tsx|.native.tsx|.tsx)
C:\Users\chiaramooney\react-native-xaml\package\lib\index.js\index(.native|.windows.js|.native.js|.js|.windows.json|.native.json|.json|.windows.ts|.native.ts|.ts|.windows.tsx|.native.tsx|.tsx)

Steps To Reproduce

Clone repo.
Open example.sln and build.
Comment out App.cpp line 23.
Launch app.

Expected Results
Successful build and launch of app.
Environment
info Fetching system and libraries information...
System:
    OS: Windows 10 10.0.22000
    CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
    Memory: 39.25 GB / 63.84 GB
  Binaries:
    Node: 16.13.2 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 8.1.2 - C:\Program Files\nodejs\npm.CMD
    Watchman: Not Found
  SDKs:
    Android SDK:
      API Levels: 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3, 30.0.2, 30.0.3
      System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
      Android NDK: Not Found
    Windows SDK:
      AllowDevelopmentWithoutDevLicense: Enabled
      AllowAllTrustedApps: Enabled
      Versions: 10.0.18362.0, 10.0.19041.0
  IDEs:
    Android Studio: Version  <IP_ADDRESS> AI-201.87<IP_ADDRESS>99119
    Visual Studio: 16.9.32002.222 (Visual Studio Enterprise 2019)
  Languages:
    Java: 1.8.0_282 - C:\Program Files\OpenJDK\openjdk-8u282-b08\bin\javac.EXE
  npmPackages:
    @react-native-community/cli: Not Found
    react: Not Found
    react-native: Not Found
    react-native-windows: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Forgot yarn build.

I just ran into this myself. The defect is legit - you can't simply run the app as is without commenting out useJsi, which is not too friendly to people who are just getting familiar with RNfW and/or react-native-xaml.
// @asklar

UseJsi was the old property that was deprecated in 0.65 or so; I think we can just delete that line and it will work fine (UseWebDebugger(false) will do the right thing)

Working for me with that line deleted. I'll make a PR!


Resizing columns with minWidth option set is not possible

Version : 7.0.0-rc.15
Describe the bug
When adding the minWidth option to table columns, it is not possible to resize the respective columns anymore.
To Reproduce
Steps to reproduce the behavior:

Create a table with resizable columns
Add minWidth and some value to one of the columns in the core columns array.
Now all columns except for the one with minWidth are resizable.

Expected behavior
Columns with minWidth enabled should be allowed to be resized to the set minimum.
Codesandbox!
https://codesandbox.io/s/jolly-shannon-mytzg
First column has a minWidth of 500, the rest has either maxWidth, width or none of them set.

You are probably forgetting to take this little block of code into account:
const defaultColumn = React.useMemo(
    () => ({
      minWidth: 30,
      width: 150,
      maxWidth: 400
    }),
    []
  );

Thus, if your minWidth is set to 500 and your maxWidth is set to 400, you will not be able to resize the column.


bug: App craches if github contributors fetching fails

Description
If the contributors fetching fails somehow, the whole app craches

fixed with commit id: 1926928


Dummy PR - do not merge

Testing only.
Dummy change to Program.cs

/azp run Samples-CI-PR-Pipelines-Runner

/azp run Samples-CI-PR-Pipelines-Runner

Test PR no longer needed.


change id of review event

Needed by https://github.com/src-d/lookout/issues/259
this change doesn't break api because ID methods exists only in go and currently only lookout server uses it.

CI failing because it can't download sdk binary. Unrelated to this PR.

CI failure logs look VERY strange - they to not have GITHUB_TOKEN set 😕 - without it GH rate limits Travis too often.


Quick Sort and Sieve of Eratosthenes in Java

This issue is about [Algo/DS Name/Question Name](link to resource for the Algo/DS/Question)

[ ] I searched or browsed the repo’s other issues to ensure this is not a duplicate

[ ] Issue Title is in form [Algo/DS Name] in [Language] (ex:- BubbleSort in Java)

[ ] I will send my PR only after I'm assigned to this issue by any maintainer

[ ] Assign this issue to me (I want to work on this)

[ ] I ensure that I am not already assigned to 2 or more issues

Sir, Kindly assign this to me.


Portainer not working in microk8s  1.24 cluster on ubuntu 22.04

Summary
I have enabled portainer on a three-node cluster. I can connect to portainer on the nodeport but when clicking on the cluster Portainer gives the error “unable to retrieve namespaces” . Clicking on menu-items like “Applications” does nothing.
What Should Happen Instead?
Portainer shoould show me the items in the cluster and let me manage them.
Reproduction Steps
I hav re-installed microk8s several times.
1: install microk8s on Ubuntu server 22.04 on three Rapberry Pi 4b with 8Gb
2: add nodes to form the cluster
3. enable dns, storage, etc.
I am

inspection-report-20220902_080607.tar.gz
Are you interested in contributing with a fix?

i replied on the Kubernetes forum..
Im unable to reproduce this.. please note that Portainer requires RBAC extension to be running in MicroK8s.
See the steps i went through here: https://discuss.kubernetes.io/t/portainer-namespace-issue/21153/5 if you can try to follow my steps and advise.


MIOTA

Please consider adding MIOTA which is the correct supply symbol for IOTA.

This list is auto-generated from the cryptocompare API. So to see changes on this list, you would need to request the change from https://www.cryptocompare.com/(use the Contact us link at the bottom), then when they have made the update, this list will pick on the change by running npm run build and opening a PR, or updating this thread with a note that the change has been made upstream.

With that said, the list has been updated to include the correct symbol name


Upgrade to kafka <IP_ADDRESS>

Hello.
I have modified your code to get it run with kafka <IP_ADDRESS> and scala 2.12.2. Now kafka yaml points to my dockerhub (dawidch/kubernetes-kafka:<IP_ADDRESS>) because I had to use different basic image wurstmeister/kafka:<IP_ADDRESS>. If you want to use your own dockerhub image you have to build the image first and modify the file:
https://github.com/DawidCh/kubernetes-kafka/blob/master/kafka-rc.yaml to point it to your docker image. But you probably already know all of this;)
Regads, Dawid.

@DawidCh Do you plan on upgrading it to 1.0.0?

@sgarap sorry dude, but I do not need it anymore, so upgrade is not in my todo list:)


CI: test PR

To debg issues with podman v4, something is weird with the latest image.

Ohh sorry, this shouldn't be merged at all, It was a test PR to track it down the thing :-(


Cpfed 3743 main nav styles

name: CPFED-3743 Main Nav Styles
labels: ready for review
pfe-navigation
Updated focus styles for main menu and dropdowns, cleaned up main nav styles and double checked colors and focus/hover states with design and redhat.com example.
Testing instructions

Using a keyboard, tab through the menu to see the new focus states.

Merging
Please squash when merging and ensure your commit message uses conventional commit formatting.
Be sure to share your updates with the<EMAIL_ADDRESS>mailing list!

Looking at the code, looks great! I'll test it after I get all these conflicts handled :sweat:

@wesruv sounds good, let me know if there is anything I can help with!


some strange problem with file not found error

File "/home/pytorchVersion/tsn-pytorch/dataset.py", line 108, in get
seg_imgs = self._load_image(record.path, p)
File "/home/pytorchVersion/tsn-pytorch/dataset.py", line 50, in _load_image
return [Image.open(os.path.join(directory, self.image_tmpl.format(idx))).convert('RGB')]
File "/home/anaconda3/envs/py36/lib/python3.6/site-packages/PIL/Image.py", line 2477, in open
fp = builtins.open(filename, "rb")
FileNotFoundError: [Errno 2] No such file or directory: '/data1/Optical-Flows/v_PlayingFlute_g23_c03.mp4/img_00001.jpg'
a few  images loaded and then this question  arise
can you help me ?

i met the same issue as you ,have you solved it .ths

It is probably the number of flow frames is minus one of the rgb frames. You can check the split files and actual number of frames in the directories.


use with webpack

how to use with webpack

@huge689 At first you need use postcss via https://github.com/postcss/postcss-loader
postcss-px-to-viewport only plugin for postcss.
Scheme:
postcss-px-to-viewport => postcss => postcss-loader => webpack


undefined variables errors

undefined variables in data_EC.ipynb, evaluation_EC.ipynb, methods_EC.ipynb, and training_EC.ipynb,
key error in data_EC.ipynb

@tianhg28 @ For each error, could you let me know which part of the notebook had the error, and copy and paste the error messages here. Thanks!

###evaluation_EC.ipynb
Line: shap_df = data[bestfeatures]
Error: NameError: name 'data' is not defined
The data variable needs to be loaded from a csv file, which I don't think exists in the repo.
Line: br.fit(shap_df, target)
Error: br needs to be defined from linear_model.BaysianRidge() and target needs to be extracted from data
Line: gp.fit(shap_df, target)
Error:  the Gausian Process model gp needs to be defined
###methods_EC.ipynb
Lines:
Testing whether the scikit learn ridge and bayesian ridge learn the same paramters
olsr = linear_model.Ridge()
br = linear_model.BayesianRidge()
We need to hyperparamter tune the OLS Ridge because there is no way to solve for the regularization parameter analytically
searcher = GridSearchCV(olsr, {'alpha': np.arange(1, 300, 2)}, scoring="neg_root_mean_squared_error")
searcher.fit(data[['Tidal Amplitude (cm)', 'Avg. Flood Depth (cm)']], target)
Error: linear_model, GridSearchCV, data, target need to be defined
Line: bestfeatures = backward_elimination(data=data, target=target, num_feats=10, significance_threshold=0.05)
Error: NameError: name 'data' is not defined
same problem as before, data needs to be loaded
Line: scores = cross_validate(gp, shap_df, target, cv=rcv,
scoring=('r2', 'neg_mean_absolute_error'), return_train_score=True)
Error: Need to create shape_db from panda DataFrame


Github background info keeps on loading

Issue persists even if I change browser. I have tried restarting machine and done multiple logins . Still the issue persists.]
Also my profile drop-down is giving this error "Sorry, something went wrong."

I am using Ubuntu 14.04


[Python | ZH DateTimeV2] holiday words cannot be recognized

Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
t = '清明节'
print(''.join([str(i.dict) for i in Recognizers.recognize_datetime(t, Culture.Chinese)]))
Expected behavior
A clear and concise description of what you expected to happen.
Sample input/output
As applicable, add examples of text input and json output to help explain the problem.
Platform (please complete the following information):

Platform: [e.g.  Python]
Environment: [e.g. console app]
Version of package [e.g. v1.0.2a2]

Additional context
Add any other context about the problem here.

update the code in recognizers_date_time/date_time/chinese/date_parser.py line 382:
origin:
duration_res = self.duration_extractor.extract(source, reference).pop()
update:
duration_res = self.duration_extractor.extract(source, reference).pop() if self.duration_extractor.extract(source, reference) else []

Related test cases & expect behavior:
'圣诞节我想出去玩'
expect behavior:
[{'start': 0, 'end': 2, 'resolution': {'values': [{'timex': 'XXXX-12-25', 'type': 'date', 'value': '2019-12-25'}, {'timex': 'XXXX-12-25', 'type': 'date', 'value': '2020-12-25'}]}, 'text': '圣诞节', 'type_name': 'datetimeV2.date'}]


[SR-4535] Fix information_schema.CHARACTER_MAXIMUM_LENGTH & CHARACTER_OCTET_LENGTH

As mysql dev doc
https://dev.mysql.com/doc/refman/5.7/en/information-schema-columns-table.html
CHARACTER_MAXIMUM_LENGTH should set current length.
CHARACTER_OCTET_LENGTH because of UTF-8 should * 3.

run starrocks_be_unittest

run starrocks_tscancode


Add static analysis with clang-tidy on at least one pipeline

I started working on this issue and created #34 . However I would like to consult:

should we fail the pipeline if clang-tidy finds any warnings?
I think that some check rules are a bit redundant (for example modernize-use-trailing-return-type) - should we enable all check rules?

You are the best!

should we fail the pipeline if clang-tidy finds any warnings?
No, we don't have to. Warnigs are for us to investigate
I think that some check rules are a bit redundant (for example modernize-use-trailing-return-type) - should we enable all check rules?
Let's don't be nazis, we should use only things that are helpfull for us!


feat: Implement labels

fixes #13
I did add the optional(label) to the statement sequence, also added expression statements since these were missing?
I am not really sure what happened with the for tests. From a glimpse, these were wrong before? A single increment_op was what I was expecting, not sure where the assignment came from beforehand, maybe someone can enlighten me what happened here?
I did not add labels to the break right now since I wanted to keep the changes minimal to be better to review. I will add these and quoted identifiers once I am more familiar with tree-sitter and have gathered feedback from this PR.

The way I designed the grammar I didn't want a plain _expression to count as a _statement. Not sure off the top of my head if this breaks anything... but if the tests aren't broken, I think it should be fine?
Adding _expression as a _statement explains why the for tests changed--an assignment node is inserted to promote i++ from an expression (increment_op) to a statement

Feel free to try implementing the rest of the label feature, as long as the tests stay passing and highlighting looks fine on typical code files I'm happy to merge it

Im going to come back to this PR on the weekend, I have much to do this week. But thank you very much for your time and explanation!

I managed to fix the indentation with the python script I wrote to help with the tests (python treesexpy/ts_test_helper.py corpus/label.test which diffs the output from treesitter with the test and shows you a line by line diff, optionally updating the test)

Thanks for the PR!


Updated main.py

Hey man love this program it has been a good inspiration towards my Rubik's cube solver college project however running the code multiple times does not work as the heuristic file is not deleted which causes some issues running the program the second time over.

why are you wanting to delete the heuristics file every time? In the code, I have it so it will re-use the same heuristics file to speed up solving times.

Sorry I understand it more thank you I mistook the speed as the program itself not doing the search. This is the first time dealing with a heuristic thank you.

Oh no problem, it's a little confusing since I've seen other heuristics as equations where this is more of a look up in a map.


Create NiggaScript.ng

"Hello world" on NiggaScript
Adding a language

[x] The code displays "Hello World" (tio.run may help for testing)
[ ] I have updated the readme to include the new language
[ ] I have incremented the language count in the readme
[ ] I have no association with the language
[ ] There are no copyright issues with this code
[ ] The language has not been added prior to this pull request

Link to programming language:

Hello World

Hello World


Sass watch option to force compile at startup

Hi, I am trying to find out the conclusion of:
https://github.com/sass/node-sass/issues/1742 or
https://github.com/sass/node-sass/issues/1660
Both issues are closed without any explanation?

The explanation is in the threads, that it isn't supported, and a new option to support it won't be added

@nschonni Actually the last post is asking if there is any update on this issue. It seems to me as if the SASS developers do not empathise nor give time to external peoples suggestions. The impression I get from read issues is that actually don't care.


net: tcp: Implement receive window handling

This PR implements receive window handling at TCP layer, along with accompanying changes required to make it work.
Resolves #39132

@rlubos If I understand correctly, this improvement also lays path for addressing https://github.com/zephyrproject-rtos/zephyr/issues/7876?
Ideally, if we haven't yet processed received data, we should advertise Zero Window size, but Zephyr doesn't yet support this, right?

@rlubos If I understand correctly, this improvement also lays path for addressing #7876? Ideally, if we haven't yet processed received data (our rx queue is full), we should advertise Zero Window size, but Zephyr doesn't yet support this, right?

That's some ancient issue you've dug up, could probably be closed already.
Actually, with this PR we should have a proper RX window handling - Zephyr TCP will advertise zero window if the data is not processed at the app layer. And we do process ZWP sent by peer (and acknowledge them with current RX window size).


Update appmarkable to 0.0.0-9 and rmservewacominput to 0.3.0-1

This changes the pattern to quite appmarkable and improves rmservewacominput to pick the correct event file up.
A test case could be:

Install both packages (rmservewacominput depends on and used appmarkable)
Run this script on your PC (probably set ONLY_DEBUG=True to only get output)

I somehow get an error now when triggering the build. Seems to be a problem of the build utils though and I'll let the ci do the build.
Also great catch with the commit. I was really perplexed as my test didn't quite work with the package. There was no error and I assumed it to be some weird error on my machine, so I ignored it which I shouldn't have.
╭─linus@HomeLX ~/git/toltec  ‹feature/update-appmarkable-and-rmservewacominput›
╰─$ make rmservewacominput
./scripts/package_build.py  "rmservewacominput"
The build directory 'build/package/rmservewacominput' for recipe 'rmservewacominput' already exists.
Would you like to [c]ancel, [r]emove that directory, or [k]eep it (not recommended)? [C/r/k] r
[    INFO] toltec.builder: rmservewacominput: Fetching source files
[    INFO] toltec.builder: rmservewacominput: Building artifacts
[    INFO] toltec.builder: rmservewacominput: Only showing up to 50 lines of context. Use --verbose for the full output.
[   ERROR] toltec.builder: rmservewacominput: * opkg_download_file: ///repo/Packages.gz: No such file.
[   ERROR] toltec.builder: rmservewacominput: build() failed
Traceback (most recent call last):
  File "/home/linus/git/toltec/./scripts/package_build.py", line 44, in <module>
    if not builder.make(recipe, packages):
  File "/home/linus/git/toltec/scripts/toltec/builder.py", line 129, in make
    self._build(recipe, src_dir)
  File "/home/linus/git/toltec/scripts/toltec/builder.py", line 295, in _build
    self._print_logs(logs, "build()")
  File "/home/linus/git/toltec/scripts/toltec/builder.py", line 502, in _print_logs
    raise err
  File "/home/linus/git/toltec/scripts/toltec/builder.py", line 483, in _print_logs
    for line in logs:
  File "/home/linus/git/toltec/scripts/toltec/bash.py", line 413, in run_script_in_container
    raise ScriptError(f"Script exited with code {result['StatusCode']}")
toltec.bash.ScriptError: Script exited with code 1
make: *** [Makefile:68: rmservewacominput] Fehler 1

I somehow get an error now when triggering the build. Seems to be a problem of the build utils though and I'll let the ci do the build.

I’ve encountered this bug too but I haven’t found a way to reproduce it reliably yet. If you do touch build/repo/Packages.gz before running the build it should work fine.

The current packages still had some trouble. Fixed them in the last two commits (and tested the effective changes manually on-device). It should work now.


:bug: fix bug with update axes range

Fixes #119
This PR does the following;

[x] set default value for xaxis and yaxis autorange to None
[x] trigger downsampling in FigureResampler.show_dash when an xaxis has its own range in the layout
[x] add tests

Other minor stuff:

[x] make kaleido and flask-cors optional dependency (as it is only used for "inline_persistent" plotting)
[ ] update docs + contributing.md + CI-CD pipeline

TODO: properly look at reset axes and/or autoscale behavior - this does not reset axes as we would expect (bc original range not in front-end..?)
(P.S. CI-CD testing is failing when installing poetry - PR #115 fixes this)

Closing this for PR #126 - which solves just the fig update axes bug


Application Refactoring

This PR brings a lot of changes to PHPMND.

[x] Generators
[x] Objects (DetectionResult) instead of plain array
[x] Container
[x] More tests
[x] No BC breaks

Reducing memory usage and speed up scanning a bit. Real example on my current project:
current master:
Total of Magic Numbers: 17
Time: 00:06.161, Memory: 32.00 MB

This PR:
Total of Magic Numbers: 17
Time: 00:05.373, Memory: 28.00 MB

Still going though these, I will mark as hacktober accepted in case you are participating, changes look good though

@exussum12 sorry for disturbing. how is review going?

Apologies I've been away. I can take a proper look tomorrow

This is a mega refactor! Im going though the list now to try and verify its not caused any issues. Nice work some really nice changes in there

Approved. Nice work

Thanks @exussum12


Cant convert image some file PDF

  const options = {
        density: 600,
        saveFilename: req.file.filename,
        savePath: `${appRoot}/${process.env.UPLOAD_PDF_DIR}`,
        format: "jpg",
        width: 600,
        height: 600
    };
    console.log("[pdf2pic] req.file.path = ", req.file.path);
    const convert = fromPath(req.file.path, options);

    convert.bulk(-1, true).then(resolve => {
        console.log(resolve)
        req.convertInfo = resolve;
        next();
    }).catch(err => {
        console.log("[pdf2pic][convert]", err);
        return next(err);
    });

I can convert some other PDF file with resolution around 5xx, but have 1 file with resolution 5xxx then it stuck and cant move to other step.
It take long time and slow my PC but not return any error. I dont know why it happen , please help me what should i do in this case

I found solution to update this file by set density:100
but anyway we can detect file pdf to set density?

Running into issue where even if I set density to 100, it errors out

try to change format to png it work for me

Running into issue where even if I set density to 100, it errors out

  const options = {
        density: 600,
        saveFilename: req.file.filename,
        savePath: `${appRoot}/${process.env.UPLOAD_PDF_DIR}`,
        format: "jpg",
        width: 600,
        height: 600
    };
    console.log("[pdf2pic] req.file.path = ", req.file.path);
    const convert = fromPath(req.file.path, options);

    convert.bulk(-1, true).then(resolve => {
        console.log(resolve)
        req.convertInfo = resolve;
        next();
    }).catch(err => {
        console.log("[pdf2pic][convert]", err);
        return next(err);
    });

I can convert some other PDF file with resolution around 5xx, but have 1 file with resolution 5xxx then it stuck and cant move to other step. It take long time and slow my PC but not return any error. I dont know why it happen , please help me what should i do in this case

It could probably be that the resolution is too big to handle. I will do some testing from my end to see if that is the case.

Running into issue where even if I set density to 100, it errors out

@vvnsze which error message are you getting? can you send me the stack trace? thanks.


Infixo amenities 188

Just like in the comment in #188
Added missing bubbles and lines in the tooltip. Also simplified code a bit.

In general:

amenities and housing sections should use the same icons and texts
all should be either singular or plural
Let's decide and follow the rules.

Happy to defer to you on the better choices for the localized strings, so will go with your preference

Idk how to handle this "changes reqtested" status.
New review is needed.


Rye refuses installation of projects requiring a lower Python version

Steps to Reproduce
In a project that requires a lower Python version than the system Python (or self-python), rye sync will fail with unsatisfiable requirements.
❯ rye sync
Reusing already existing virtualenv
Generating production lockfile: D:\Development\the-witcher-3-mod-manager\requirements.lock
Generating dev lockfile: D:\Development\the-witcher-3-mod-manager\requirements-dev.lock
Installing dependencies
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.10,<3.11 and the-witcher-3-mod-manager==0.9.2rc0 depends on
      Python>=3.10,<3.11, we can conclude that the-witcher-3-mod-manager==0.9.2rc0 cannot be used.
      And because only the-witcher-3-mod-manager==0.9.2rc0 is available and you require the-witcher-3-mod-manager, we can conclude that the
      requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\Development\the-witcher-3-mod-manager\.venv. uv exited with status: exit code: 1

It seems to be using the default Python for this step even though it should be using the project Python.
❯ rye show
project: the-witcher-3-mod-manager
path: D:\Development\the-witcher-3-mod-manager
venv: D:\Development\the-witcher-3-mod-manager\.venv
target python: 3.10
venv python<EMAIL_ADDRESS>virtual: false
configured sources:
  default (index: https://pypi.org/simple/)
❯ rye run python --version
Python 3.10.14

Reproducible with https://github.com/Systemcluster/The-Witcher-3-Mod-manager/tree/rye. (It's an older project and that branch is experimental, it will fail to build, but it should still succeed to sync.)
I don't have this issue with rye on a Linux system where self-python is 3.10, and pdm runs on the project without issues.
Extracted from #1291, please transfer this issue to the repo where it's most appropriate.
Expected Result
Done!

Actual Result
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.10,<3.11 and the-witcher-3-mod-manager==0.9.2rc0 depends on
      Python>=3.10,<3.11, we can conclude that the-witcher-3-mod-manager==0.9.2rc0 cannot be used.
      And because only the-witcher-3-mod-manager==0.9.2rc0 is available and you require the-witcher-3-mod-manager, we can conclude that the
      requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\Development\the-witcher-3-mod-manager\.venv. uv exited with status: exit code: 1

Version Info
rye 0.38.0
commit: 0.38.0 (3e3c8540f 2024-08-02)
platform: windows (x86_64)
self-python<EMAIL_ADDRESS>symlink support: true
uv enabled: true

Stacktrace
Stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: BaseThreadInitThunk
  16: RtlUserThreadStart

It seems cloning the linked repository to another location and running rye sync there works on the same system, but I cannot pinpoint why. I assume something must be different, even after deleting .venv, .python-version and the requirements files.
Original project:
❯ pwd
Path
----
D:\Development\the-witcher-3-mod-manager

❯ git status
On branch rye
Your branch is up to date with 'origin/rye'.

❯ rye show
project: The-Witcher-3-Mod-Manager
path: D:\Development\the-witcher-3-mod-manager
venv: D:\Development\the-witcher-3-mod-manager\.venv
target python: 3.10
venv python<EMAIL_ADDRESS>virtual: false
configured sources:
  default (index: https://pypi.org/simple/)

❯ rye --version
rye 0.38.0
commit: 0.38.0 (3e3c8540f 2024-08-02)
platform: windows (x86_64)
self-python<EMAIL_ADDRESS>symlink support: true
uv enabled: true

❯ bat .\.venv\pyvenv.cfg
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: .\.venv\pyvenv.cfg
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ home =<EMAIL_ADDRESS>   2   │ implementation = CPython
   3   │ uv = 0.2.33
   4   │ version_info = 3.10.14
   5   │ include-system-site-packages = false
   6   │ relocatable = false
   7   │ prompt = The-Witcher-3-Mod-Manager
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

❯ bat .\.venv\rye-venv.json
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: .\.venv\rye-venv.json
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ {
   2   │   "python"<EMAIL_ADDRESS>   3   │   "venv_path": "D:\\Development\\the-witcher-3-mod-manager\\.venv"
   4   │ }
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

❯ rye sync
Reusing already existing virtualenv
Generating production lockfile: D:\Development\the-witcher-3-mod-manager\requirements.lock
Generating dev lockfile: D:\Development\the-witcher-3-mod-manager\requirements-dev.lock
Installing dependencies
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.10,<3.11 and the-witcher-3-mod-manager==0.9.2rc0 depends on
      Python>=3.10,<3.11, we can conclude that the-witcher-3-mod-manager==0.9.2rc0 cannot be used.
      And because only the-witcher-3-mod-manager==0.9.2rc0 is available and you require the-witcher-3-mod-manager, we can conclude that the
      requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\Development\the-witcher-3-mod-manager\.venv. uv exited with status: exit code: 1

Second location:
❯ pwd
Path
----
D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager

❯ git status
On branch rye
Your branch is up to date with 'origin/rye'.

❯ rye show
project: The-Witcher-3-Mod-Manager
path: D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager
venv: D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager\.venv
target python: 3.10
venv python<EMAIL_ADDRESS>virtual: false
configured sources:
  default (index: https://pypi.org/simple/)

❯ rye --version
rye 0.38.0
commit: 0.38.0 (3e3c8540f 2024-08-02)
platform: windows (x86_64)
self-python<EMAIL_ADDRESS>symlink support: true
uv enabled: true

❯ bat .\.venv\pyvenv.cfg
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: .\.venv\pyvenv.cfg
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ home =<EMAIL_ADDRESS>   2   │ implementation = CPython
   3   │ uv = 0.2.33
   4   │ version_info = 3.10.14
   5   │ include-system-site-packages = false
   6   │ relocatable = false
   7   │ prompt = The-Witcher-3-Mod-Manager
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

❯ bat .\.venv\rye-venv.json
───────┬────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: .\.venv\rye-venv.json
───────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ {
   2   │   "python"<EMAIL_ADDRESS>   3   │   "venv_path": "D:\\Development\\the-witcher-mm-test\\the-witcher-3-mod-manager\\.venv"
   4   │ }
───────┴────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

❯ rye sync
Reusing already existing virtualenv
Generating production lockfile: D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager\requirements.lock
Generating dev lockfile: D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager\requirements-dev.lock
Installing dependencies
Resolved 26 packages in 8ms
Audited 26 packages in 0.12ms
Done!

Is there other state stored somewhere that could influence this?

My first guess was that you already had a .venv in the first folder, and that environment used Python 3.12.3. So Rye was trying to reuse that environment even though the Python version didn't match the requirement. But you mentioned that you removed .venv, and the behavior persisted, which would rule that out.

Yeah, the .venv is definitely deleted. Here's the output with deleting it as the first step.
❯ rm -r -Force .\.venv\
❯ rm .\requirements*
❯ ll
d----    -  1 Jul 19:34 bin
d----    - 16 Jul 19:47 build
-a--- 1.4k  3 Sep  2020 LICENSE
-a--- 4.0k  9 Jul 10:32 main.py
-a--- 1.1k  3 Aug 20:00 pyproject.toml
-a--- 2.1k 18 Jul 22:14 Readme.md
d----    - 22 Jul  2022 res
-a--- 1.5k 18 Jul 22:16 setup_.py
d----    - 22 Jul  2022 src
d----    - 22 Jul  2022 tools
d----    - 20 Jan  2023 translations
-a---  762 20 Jan  2023 ts.pro
-a---  146 20 Jan  2023 ts.py

❯ pwd
Path
----
D:\Development\the-witcher-3-mod-manager

❯ rye sync
Initializing new virtualenv in D:\Development\the-witcher-3-mod-manager\.venv
Python version<EMAIL_ADDRESS>Generating production lockfile: D:\Development\the-witcher-3-mod-manager\requirements.lock
Generating dev lockfile: D:\Development\the-witcher-3-mod-manager\requirements-dev.lock
Installing dependencies
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.10,<3.11 and the-witcher-3-mod-manager==0.9.2rc0 depends on
      Python>=3.10,<3.11, we can conclude that the-witcher-3-mod-manager==0.9.2rc0 cannot be used.
      And because only the-witcher-3-mod-manager==0.9.2rc0 is available and you require the-witcher-3-mod-manager, we can conclude that the
      requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\Development\the-witcher-3-mod-manager\.venv. uv exited with status: exit code: 1

Here's the relevant output with RUST_LOG="trace" from Installing dependencies to where it diverges.
New location:
Installing dependencies
DEBUG uv 0.2.33
DEBUG Searching for Python interpreter in system path or `py` launcher
TRACE Cached interpreter info for Python 3.10.14, skipping probing: .venv\Scripts\python.exe
DEBUG Found `cpython-3.10.14-windows-x86_64-none` at `D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager\.venv\Scripts\python.exe` (active virtual environment)
DEBUG Using Python 3.10.14 environment at .venv\Scripts\python.exe
TRACE Checking lock for `.venv`
DEBUG Acquired lock for `.venv`
DEBUG Using request timeout of 30s
⠙ Resolving dependencies...                                                                                DEBUG Found PEP 621 metadata for D:\Development\the-witcher-mm-test\the-witcher-3-mod-manager in `pyproject.toml` (the-witcher-3-mod-manager)
⠙ Resolving dependencies...                                                                                DEBUG Solving with installed Python version: 3.10.14
DEBUG Adding direct dependency: charset-normalizer==3.3.2
DEBUG Adding direct dependency: colorama==0.4.6
DEBUG Adding direct dependency: fasteners==0.19
DEBUG Adding direct dependency: pyside2==<IP_ADDRESS>
DEBUG Adding direct dependency: pywin32==306
DEBUG Adding direct dependency: shiboken2==<IP_ADDRESS>
DEBUG Adding direct dependency: watchdog==4.0.1
DEBUG Adding direct dependency: the-witcher-3-mod-manager*
INFO add_decision: root @ 0a0.dev0
TRACE Fetching metadata for charset-normalizer from https://pypi.org/simple/charset-normalizer/
TRACE Fetching metadata for colorama from https://pypi.org/simple/colorama/
DEBUG Searching for a compatible version of the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-mm-test/the-witcher-3-mod-manager (*)
TRACE Fetching metadata for fasteners from https://pypi.org/simple/fasteners/
TRACE Fetching metadata for pyside2 from https://pypi.org/simple/pyside2/
TRACE Fetching metadata for pywin32 from https://pypi.org/simple/pywin32/
TRACE Fetching metadata for shiboken2 from https://pypi.org/simple/shiboken2/
TRACE Fetching metadata for watchdog from https://pypi.org/simple/watchdog/
TRACE cached request https://pypi.org/simple/colorama/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/colorama/
TRACE Received package metadata for: colorama
TRACE cached request https://pypi.org/simple/fasteners/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/fasteners/
TRACE Received package metadata for: fasteners
TRACE cached request https://pypi.org/simple/pywin32/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/pywin32/
TRACE Received package metadata for: pywin32
TRACE cached request https://pypi.org/simple/pyside2/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/pyside2/
TRACE Checking lock for `\\?\C:\Users\Chris\AppData\Local\uv\cache\built-wheels-v3\editable\c798c827ff8176b2`
DEBUG Acquired lock for `\\?\C:\Users\Chris\AppData\Local\uv\cache\built-wheels-v3\editable\c798c827ff8176b2`
TRACE Received package metadata for: pyside2
TRACE cached request https://pypi.org/simple/charset-normalizer/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/charset-normalizer/
TRACE Received package metadata for: charset-normalizer
TRACE cached request https://pypi.org/simple/shiboken2/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/shiboken2/
TRACE Received package metadata for: shiboken2
TRACE cached request https://pypi.org/simple/watchdog/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/watchdog/
TRACE Received package metadata for: watchdog
DEBUG Using cached metadata for: the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-mm-test/the-witcher-3-mod-manager
DEBUG No workspace root found, using project root
TRACE Received source distribution metadata for: the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-mm-test/the-witcher-3-mod-manager
⠙ the-witcher-3-mod-manager==0.9.2rc0                                                                                INFO add_decision: the-witcher-3-mod-manager @ 0.9.2rc0

Old location with error:
Installing dependencies
DEBUG uv 0.2.33
DEBUG Searching for Python interpreter in system path or `py` launcher
TRACE Cached interpreter info for Python 3.12.3, skipping probing: .venv\Scripts\python.exe
DEBUG Found `cpython-3.12.3-windows-x86_64-none` at `D:\Development\the-witcher-3-mod-manager\.venv\Scripts\python.exe` (active virtual environment)
DEBUG Using Python 3.12.3 environment at .venv\Scripts\python.exe
TRACE Checking lock for `.venv`
DEBUG Acquired lock for `.venv`
DEBUG Using request timeout of 30s
⠙ Resolving dependencies...                                                                                DEBUG Found PEP 621 metadata for D:\Development\the-witcher-3-mod-manager in `pyproject.toml` (the-witcher-3-mod-manager)
⠙ Resolving dependencies...                                                                                DEBUG Solving with installed Python version: 3.12.3
DEBUG Adding direct dependency: charset-normalizer==3.3.2
DEBUG Adding direct dependency: colorama==0.4.6
DEBUG Adding direct dependency: fasteners==0.19
DEBUG Adding direct dependency: pyside2==<IP_ADDRESS>
DEBUG Adding direct dependency: pywin32==306
DEBUG Adding direct dependency: shiboken2==<IP_ADDRESS>
DEBUG Adding direct dependency: watchdog==4.0.1
DEBUG Adding direct dependency: the-witcher-3-mod-manager*
INFO add_decision: root @ 0a0.dev0
TRACE Fetching metadata for charset-normalizer from https://pypi.org/simple/charset-normalizer/
DEBUG Searching for a compatible version of the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-3-mod-manager (*)
TRACE Fetching metadata for colorama from https://pypi.org/simple/colorama/
TRACE Fetching metadata for fasteners from https://pypi.org/simple/fasteners/
TRACE Fetching metadata for pyside2 from https://pypi.org/simple/pyside2/
TRACE Fetching metadata for pywin32 from https://pypi.org/simple/pywin32/
TRACE Fetching metadata for shiboken2 from https://pypi.org/simple/shiboken2/
TRACE Fetching metadata for watchdog from https://pypi.org/simple/watchdog/
TRACE cached request https://pypi.org/simple/colorama/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/colorama/
TRACE Received package metadata for: colorama
TRACE cached request https://pypi.org/simple/fasteners/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/fasteners/
TRACE Received package metadata for: fasteners
TRACE cached request https://pypi.org/simple/pywin32/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/pywin32/
TRACE Checking lock for `\\?\C:\Users\Chris\AppData\Local\uv\cache\built-wheels-v3\editable\67b2a1188c8c9744`
TRACE Received package metadata for: pywin32
DEBUG Acquired lock for `\\?\C:\Users\Chris\AppData\Local\uv\cache\built-wheels-v3\editable\67b2a1188c8c9744`
TRACE cached request https://pypi.org/simple/pyside2/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/pyside2/
TRACE Received package metadata for: pyside2
TRACE cached request https://pypi.org/simple/shiboken2/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/shiboken2/
TRACE Received package metadata for: shiboken2
TRACE cached request https://pypi.org/simple/charset-normalizer/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/charset-normalizer/
TRACE Received package metadata for: charset-normalizer
TRACE cached request https://pypi.org/simple/watchdog/ is storable because its response has a 'public' cache-control directive
TRACE freshness lifetime found via cache-control max age setting: 600s
DEBUG Found fresh response for: https://pypi.org/simple/watchdog/
TRACE Received package metadata for: watchdog
DEBUG Using cached metadata for: the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-3-mod-manager
DEBUG No workspace root found, using project root
TRACE Received source distribution metadata for: the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-3-mod-manager
DEBUG No compatible version found for: Python
INFO Start conflict resolution because incompat satisfied:
   Python >=3.10, <3.11 is forbidden
INFO prior cause: the-witcher-3-mod-manager ==0.9.2rc0 is forbidden
INFO backtrack to DecisionLevel(1)
DEBUG Searching for a compatible version of the-witcher-3-mod-manager @ file:///D:/Development/the-witcher-3-mod-manager (<0.9.2rc0 | >0.9.2rc0)
DEBUG No compatible version found for: the-witcher-3-mod-manager
INFO Start conflict resolution because incompat satisfied:
   the-witcher-3-mod-manager <0.9.2rc0 | >0.9.2rc0 is forbidden
INFO prior cause: the-witcher-3-mod-manager * is forbidden
INFO prior cause: root ==0a0.dev0 is forbidden
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.10,<3.11 and the-witcher-3-mod-manager==0.9.2rc0 depends on
      Python>=3.10,<3.11, we can conclude that the-witcher-3-mod-manager==0.9.2rc0 cannot be used.
      And because only the-witcher-3-mod-manager==0.9.2rc0 is available and you require the-witcher-3-mod-manager, we can conclude that the
      requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\Development\the-witcher-3-mod-manager\.venv. uv exited with status: exit code: 1

Looking at those logs it's obvious the issue is with C:\Users\Chris\AppData\Local\uv\cache. Removing the cache directory makes rye sync work.
I won't upload the cache directory here as it's over 2GB, but I can upload a subset if necessary.

I found an easy way to reproduce this issue. The general configuration of my installation can be seen in the above comments where relevant.
Create a new directory, here I'll use rye-py-ver.
mkdir rye-py-ver

Create a pyproject.toml with a python-version of >=3.12.
[project]
name = "rye-py-ver"
description = "Error repro for Rye"
version = "0.1"
requires-python = ">=3.12"

Now run rye sync to create the .venv. Next delete .venv, the requirements* files, and any other file that rye created.
Now edit the pyproject.toml and set python-version to >=3.10,<3.11.
[project]
#...
requires-python = ">=3.10,<3.11"

Now run rye sync again. It will fail with the error reported here.
❯ rye sync
Initializing new virtualenv in D:\Development\rye-py-ver\.venv
Python version<EMAIL_ADDRESS>Generating production lockfile: D:\Development\rye-py-ver\requirements.lock
Generating dev lockfile: D:\Development\rye-py-ver\requirements-dev.lock
Installing dependencies
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.12.3) does not satisfy Python>=3.10,<3.11 and rye-py-ver==0.1 depends on Python>=3.10,<3.11, we can
      conclude that rye-py-ver==0.1 cannot be used.
      And because only rye-py-ver==0.1 is available and you require rye-py-ver, we can conclude that the requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\Development\rye-py-ver\.venv. uv exited with status: exit code: 1

@charliermarsh I think the issue should be easy to locate with this info.

Thanks, that's helpful! I'll give it a try when I have a free moment.

Ugh, bad news -- this actually didn't fail for me. On the second sync, I got:
❯ rye sync
Python version mismatch (found<EMAIL_ADDRESS>expected cpython@3.10.9), recreating.
Initializing new virtualenv in /Users/crmarsh/workspace/puffin/rye-py-ver/.venv
Python version<EMAIL_ADDRESS>Generating production lockfile: /Users/crmarsh/workspace/puffin/rye-py-ver/requirements.lock
Generating dev lockfile: /Users/crmarsh/workspace/puffin/rye-py-ver/requirements-dev.lock
Installing dependencies
Resolved 1 package in 0.78ms
   Built rye-py-ver @ file:///Users/crmarsh/workspace/puffin/rye-py-ver
Prepared 1 package in 743ms
Installed 1 package in 0.77ms
 + rye-py-ver==0.1 (from file:///Users/crmarsh/workspace/puffin/rye-py-ver)
Done!
puffin/rye-py-ver on  main [$?] is 📦 v0.1 via 🐍 v3.12.3
❯ rye --version
rye 0.38.0
commit: 0.38.0 (3e3c8540f 2024-08-02)
platform: macos (aarch64)
self-python<EMAIL_ADDRESS>symlink support: true
uv enabled: true

Can you try it on Windows? I also can't reproduce it with Linux, but on Windows it reproduces every time. I can try on macOS later as well, but I assume the issue is Windows only.

Ah ok. Yes I can try it on Windows but not today (don't have my Windows machine with me).

I am also experiencing the same issue as described in this issue.

OS: Windows11
platform: win-amd64
Even after changing the project version from >=3.12,<3.13 to >=3.11,<3.12 and completely removing and reinstalling the .venv, the current project is still recognized as version 3.12.4.

I'll try to test it out today now that I'm back home.

I'm also experiencing this issue on the Windows platform, is there any follow up on this now?

> rye --version
rye 0.39.0
commit: 0.39.0 (bf3ccf818 2024-08-21)
platform: windows (x86_64)
self-python<EMAIL_ADDRESS>symlink support: true
uv enabled: true

> rye sync
Initializing new virtualenv in D:\project\.venv
Python version<EMAIL_ADDRESS>Generating production lockfile: D:\project\requirements.lock
Generating dev lockfile: D:\project\requirements-dev.lock
Installing dependencies
  × No solution found when resolving dependencies:
  ╰─▶ Because the current Python version (3.12.5) does not satisfy Python>=3.8,<3.9 and project==0.1.0 depends on Python>=3.8,<3.9, we can conclude
      that project==0.1.0 cannot be used.
      And because only project==0.1.0 is available and you require pcbrogocreator, we can conclude that your requirements are unsatisfiable.
error: Installation of dependencies failed in venv at D:\project\.venv. uv exited with status: exit code: 1

> rye show
project: project
path: D:\project
venv: D:\project\.venv
target python: 3.8
venv python<EMAIL_ADDRESS>virtual: false
configured sources:
  default (index: https://pypi.org/simple/)

+1. Similar issues faced on Windows. Tried pinning a lower version repeatedly and deleting and resyncing the venv. 'rye show' shows the version I pinned (3.11.9) but when I sync and install a dependency I get the same error as described above.

I ran into the same problem where I specified to use python 3.11.9 in the pyproject.toml and .python-version, but it kept using the 3.12.5 toolchain. Oddly, the issue was solved when I used requires-python = "~=3.11" in the pyproject.toml and specify the specific version (3.11.9) in the .python-version file.

works when i specify requires-python="<3.{one less (minor ver)}".


Add historical averaging

Add support for Historical Averaging of Weights as discussed in Salimans et. al. 2016

Codecov Report

Merging #54 into master will decrease coverage by 0.29%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master     #54     +/-   ##
========================================
- Coverage   24.09%   23.8%   -0.3%
========================================
  Files          24      27      +3
  Lines        1108    1298    +190
========================================
+ Hits          267     309     +42
- Misses        841     989    +148

Impacted Files
Coverage Δ

models/__init__.py
0% <0%> (ø)
:arrow_up:

test_trainer.py
100% <0%> (ø)
:arrow_up:

test_models.py
100% <0%> (ø)
:arrow_up:

losses/__init__.py
0% <0%> (ø)
:arrow_up:

losses/historical.py
0% <0%> (ø)

models/acgan.py
0% <0%> (ø)

losses/auxclassifier.py
0% <0%> (ø)

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 d0516ca...7a45e52. Read the comment docs.

@avik-pal fixed the issue, ran some error checks on my end and it runs fine now. Could get a small example tested on MNIST (just add the Historical Average losses to the DCGAN Minimax example in the Model zoo) and then merge accordingly?

Yes on it.

Codecov Report

Merging #54 into master will decrease coverage by 0.79%.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           master     #54     +/-   ##
========================================
- Coverage    22.2%   21.4%   -0.8%
========================================
  Files          31      32      +1
  Lines        1369    1420     +51
========================================
  Hits          304     304
- Misses       1065    1116     +51

Impacted Files
Coverage Δ

losses/__init__.py
0% <0%> (ø)
:arrow_up:

losses/historical.py
0% <0%> (ø)

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 ed18aa7...c95b19d. Read the comment docs.

@Aniket1998 Model is not converging. The generated images have barely changed since the first epoch. I am using Minimax + Historical Averaging on both generator and discriminator. Already trained for 25 epochs on MNIST. Adam with 0.001 lr for both.


Missing Changelog

Hi :wave:
Just as an input from someone upgrading api-pagination as a dependency: it would be nice to have a CHANGELOG.md or similar file that shows what changed between the versions. Thanks for the work on this gem! :)

Hi again, I just realized that there's a changelog in the releases, sorry. Maybe it's a good idea to link to those in a Changelog file?