WIP New P&L-based problem

This PR has a new business problem to be solved.  The business scenario is based on a simulator developed here: https://github.com/prolego-team/business_sim/tree/sim .
To run: python -m examples.sleuth
Currently there are two databases:

A finance database with multiple tables detailing monthly revenue, costs and operating expenses.
A competition database that describes the number of units and the estimated marketing spend of you competitor.

Note:
There is VERY little code change here.  Same agent as the "simple" agent with tweaked prompting.  The problem is new.  Request for review is mainly for reviewing the problem, suggested improvements, etc.

Capturing my notes here:

Altering copy and instructions at the top.
Blowing up context window size.
Suggesting the next question?
Rename company A
Add estimated revenue for Company A. Can't compare units sold to revenue.

Script:
What is unusual: Revenue Down.
Why is revenue down: Company A, competitor, spending more on marketing.
How does our relative marketing spend compare? --> This is where it falls off. See below:
Assistant:
Based on the queried data, here is the comparison of the marketing spend between Techtonic Tech, Inc. and Company A:

Techtonic Tech, Inc.:

Total marketing spend in 2022: $241,199
Total sales revenue in 2022: $67,874,400
Marketing spend as a percentage of sales: approximately 0.36%
Company A:

Total marketing spend in 2022: $197,388
Total units sold in 2022: 133,752
As we don't have the revenue data for Company A, we can't compute the marketing spend as a percentage of sales.
To determine which company's marketing spend is more effective, we need to examine their respective Return on Marketing Investment (ROMI). ROMI is typically calculated as the revenue generated by marketing divided by the marketing spend.

Unfortunately, as we don’t have the revenue data for Company A, we can't compute the ROMI for Company A. For Techtonic Tech, the ROMI would be $67,874,400 / $241,199.

Nevertheless, even without specific ROMI values, we can observe that Techtonic Tech spends a smaller percentage of their sales on marketing compared to Company A. Whether this translates to more effective spending depends on the respective returns from these expenditures, information end we currently don't have.

Final Answer: In absolute terms, Techtonic Tech, Inc. spends more on marketing compared to Company A ($241,199 vs $197,388 in 2022). However, as a percentage of sales, Techtonic Tech's marketing spend is approximately 0.36%.
Our ability to assess the effectiveness of the marketing spend is limited due to the lack of necessary data (such as the revenue for Company A). Generally, a lower percentage of marketing spend might suggest more efficient spending, but it may not necessarily translate to more effective marketing without considering additional factors such as the return on marketing investment.

When I asked about marketing-to-revenue spend it seems to have gotten stuck in a local minimum.
User:
Question: The following question is about this report:

Profit and Loss, Techtonic Tech, Inc
Jan 1, 2022 through Dec 31, 2022
All units are in $1000.

                      |      Q1 |      Q2 |      Q3 |      Q4 |
Revenue
Product sales | 18013 | 22151 | 17212 | 10976 |
Costs
Cost of goods sold | 15119 | 18542 | 14410 | 9224 |
GROSS PROFIT | 2894 | 3609 | 2802 | 1751 |
Operating Expenses
HR Expenditure | 1476 | 1514 | 1501 | 1512 |
Marketing Expenditure | 60 | 62 | 60 | 61 |
Operations Expenditure | 30 | 30 | 30 | 30 |
R&D Expenditure | 60 | 60 | 61 | 59 |
OPERATING INCOME | 1267 | 1944 | 1150 | 89 |
Taxes | 228 | 350 | 207 | 16 |
NET PROFIT | 1039 | 1594 | 943 | 73 |

Does anything look unusual in the report?

<name=None, function_call=None>

Assistant:
As a business analyst, interpreting this report would depend on various factors such as historical performance, industry trends, and market conditions. However, below are few observations that can be considered as unusual based on provided quarter-year report:

The Q4 revenue is significantly lower than in any other quarter.
The Q4 operating income is also remarkably lower than the other quarters.
The Cost of goods sold is decreasing each quarter.
The operating expenses seem slightly constant across all quarters in spite of changes to revenue.
The taxes also show a significant drop in Q4 compared to other quarters, but this should be expected due to the decrease in income.
In order to obtain more useful insights, we could conduct a more detailed analysis. Some example queries we could run may include:

Comparing this financial performance with similar past periods.
Checking annual trends for these financial metrics.
Comparing these numbers to the industry averages.
Comparing these numbers to our main competitor performance (NexaTech Solutions) if the information is available.
Investigate the cause of the low revenue and operating income in Q4.
Conduct a product-wise or region-wise breakdown of sales to understand what led to the decrease in Q4.
Please let me know which direction you would be interested in.

<name=None, function_call=None>

User:
When you have the answer to my question, please say "Final Answer:" and then write the final answer.

<name=None, function_call=None>

Assistant:
Final Answer:

Based on the quarter-year report provided, the following observations may be seen as unusual:

There is a significant drop in product sales revenue in the fourth quarter.
The operating income in Q4 is remarkably lower than other quarters.
There's a consistent decrease in the cost of goods sold each quarter.
Despite changes in revenue, operating expenses are fairly constant across all quarters.
Taxes in Q4 are significantly lower compared to other quarters, which is likely due to the decrease in income.
These are initial observations and more detailed investigations may be required to fully understand why these trends are occurring.

<name=None, function_call=None>

User:
Question: The following question is about this report:

Profit and Loss, Techtonic Tech, Inc
Jan 1, 2022 through Dec 31, 2022
All units are in $1000.

                      |      Q1 |      Q2 |      Q3 |      Q4 |
Revenue
Product sales | 18013 | 22151 | 17212 | 10976 |
Costs
Cost of goods sold | 15119 | 18542 | 14410 | 9224 |
GROSS PROFIT | 2894 | 3609 | 2802 | 1751 |
Operating Expenses
HR Expenditure | 1476 | 1514 | 1501 | 1512 |
Marketing Expenditure | 60 | 62 | 60 | 61 |
Operations Expenditure | 30 | 30 | 30 | 30 |
R&D Expenditure | 60 | 60 | 61 | 59 |
OPERATING INCOME | 1267 | 1944 | 1150 | 89 |
Taxes | 228 | 350 | 207 | 16 |
NET PROFIT | 1039 | 1594 | 943 | 73 |

Why is Q4 revenue significantly lower than in any other quarter?

<name=None, function_call=None>

Assistant:
To answer this question, we would need to perform deeper analysis by accessing the related databases and understanding the reasons behind the revenue drop in Q4. The data in the finance_database could provide transactional details and potentially pinpoint a specific cause. However, without further data, any answer would be speculative.

Potential reasons could include, among others:

Seasonal trends: Some businesses have high and low seasons which affect sales.
A new competitor or a significant market event.
Issues with our products such as defects, recalls, or bad reviews.
There may have been supply chain issues causing a decrease in available products for sale.
Changes in marketing strategy that didn't perform well.
If you allow, I will query the company’s sales transactions from the finance_database for Q4 of 2022 to look for possible patterns or events contributing to this decrease in revenues.

Would you like me to proceed with this?

<name=None, function_call=None>

User:
When you have the answer to my question, please say "Final Answer:" and then write the final answer.

<name=None, function_call=None>

Assistant:

<name=None, function_call={'name': 'query_database', 'arguments': '{\n"database": "finance_database",\n"query": "SELECT * FROM revenue WHERE date BETWEEN '2022-10-01' AND '2022-12-31'"\n}'}>

Function:
Observation: [(10, '2022-10-25', 14088, 4226400.0), (11, '2022-11-25', 11964, 3589200.0), (12, '2022-12-25', 10533, 3159900.0)]

<name=query_database, function_call=None>

Assistant:
From the transactions data, we can see that the quantity of units sold each month in Q4 has in fact been decreasing:

October 2022: 14,088 units
November 2022: 11,964 units
December 2022: 10,533 units
However, this data alone does not provide a definitive reason for why sales were lower in Q4. We would need additional information to form a concrete conclusion. For instance, it would be useful to know if there were any changes in market conditions, supply chain issues, fewer marketing activities, or competition actions.

Final Answer:

There is a clear trend of decreasing units sold in each month of Q4, which contributes to the lower revenue in this quarter. However, the specific reason for this decrease in sales cannot be determined from this data alone and would need further investigation and additional data to conclusively explain. Possible reasons could be changes in market conditions, challenges in our supply chain, adjustments in our marketing efforts, or actions by competitors.

<name=None, function_call=None>

User:
Question: The following question is about this report:

Profit and Loss, Techtonic Tech, Inc
Jan 1, 2022 through Dec 31, 2022
All units are in $1000.

                      |      Q1 |      Q2 |      Q3 |      Q4 |
Revenue
Product sales | 18013 | 22151 | 17212 | 10976 |
Costs
Cost of goods sold | 15119 | 18542 | 14410 | 9224 |
GROSS PROFIT | 2894 | 3609 | 2802 | 1751 |
Operating Expenses
HR Expenditure | 1476 | 1514 | 1501 | 1512 |
Marketing Expenditure | 60 | 62 | 60 | 61 |
Operations Expenditure | 30 | 30 | 30 | 30 |
R&D Expenditure | 60 | 60 | 61 | 59 |
OPERATING INCOME | 1267 | 1944 | 1150 | 89 |
Taxes | 228 | 350 | 207 | 16 |
NET PROFIT | 1039 | 1594 | 943 | 73 |

What actions by competitors could have caused a reduction in Q4 units sold?

<name=None, function_call=None>

Assistant:
In order to answer this question, I would need to analyze information from the competitor_database. In particular, I can look at the actions of our main competitor, NexaTech Solutions, during Q4 of 2022. Key factors from competitors that might contribute to a reduction in units sold could include:

Launch of new or improved products
Decreased pricing or special promotions
Increased marketing spend
Strategic partnerships or expanded distribution
Allow me to query the competitor_database to gather data on NexaTech Solutions' activities in Q4 2022.

Following is the SQL query that I will execute to gather more information:

SELECT * FROM NexaTech_Solutions WHERE date BETWEEN '2022-10-01' AND '2022-12-31'
Disclaimer: Please note that this is an estimation based on the available data. For a comprehensive understanding, additional market research might be needed.

<name=None, function_call={'name': 'query_database', 'arguments': '{\n"database": "competitor_database",\n"query": "SELECT * FROM NexaTech_Solutions WHERE date BETWEEN '2022-10-01' AND '2022-12-31'"\n}'}>

Function:
Observation: [(10, '2022-10-25', 4773600, 32681.651618804925), (11, '2022-11-25', 5410800, 33248.54055941042), (12, '2022-12-25', 5840100, 32797.70035253513)]

<name=query_database, function_call=None>

Assistant:
The data from the competitor_database shows the following:

October 2022: Estimated revenue from NexaTech was higher than our revenue, and they spent roughly $32,681 on marketing.
November 2022: NexaTech's estimated revenue further increased, and their marketing spend also rose to around $33,248.
December 2022: By the end of the year, NexaTech's estimated revenue was even higher, while their marketing spend was slightly reduced at around $32,797.
These numbers indicate that our main competitor NexaTech Solutions had made significant strides during Q4 in terms of revenues, which can be attributed to either an increase in unit sales or pricing, or both. Along with this, NexaTech also made substantial investments in marketing, which may have increased their product's exposure and attracted potential customers away from us.

Final Answer:

The actions of our main competitor, NexaTech Solutions, may have influenced our sales in Q4 2022. Their increasing revenues suggest they were successful in selling more products or selling at higher prices. Additionally, their substantial investment in marketing could have increased their market visibility and pulled potential customers away from our products. However, this is an observation based on the given data and a detailed market study might be needed to establish the cause-effect relationship.

<name=None, function_call=None>

User:
Question: The following question is about this report:

Profit and Loss, Techtonic Tech, Inc
Jan 1, 2022 through Dec 31, 2022
All units are in $1000.

                      |      Q1 |      Q2 |      Q3 |      Q4 |
Revenue
Product sales | 18013 | 22151 | 17212 | 10976 |
Costs
Cost of goods sold | 15119 | 18542 | 14410 | 9224 |
GROSS PROFIT | 2894 | 3609 | 2802 | 1751 |
Operating Expenses
HR Expenditure | 1476 | 1514 | 1501 | 1512 |
Marketing Expenditure | 60 | 62 | 60 | 61 |
Operations Expenditure | 30 | 30 | 30 | 30 |
R&D Expenditure | 60 | 60 | 61 | 59 |
OPERATING INCOME | 1267 | 1944 | 1150 | 89 |
Taxes | 228 | 350 | 207 | 16 |
NET PROFIT | 1039 | 1594 | 943 | 73 |

Tell me more about their substantial increase in marketing. How does their marketing spend relative to revenue compare to ours?

<name=None, function_call=None>

Assistant:

<name=None, function_call={'name': 'query_database', 'arguments': '{\n"database": "finance_database",\n"query": "SELECT * FROM operating_expenses WHERE date BETWEEN '2022-10-01' AND '2022-12-31' AND expense_category = 'Marketing Expenditure'"\n}'}>

Function:
Observation: [(10, '2022-10-25', 'Marketing Expenditure', 20352.064585263368), (11, '2022-11-25', 'Marketing Expenditure', 19812.0257047), (12, '2022-12-25', 'Marketing Expenditure', 21126.46845010047)]

<name=query_database, function_call=None>

Assistant:
Our marketing expenditure data for Q4 2022 retrieved from the finance_database is as follows:

October 2022: We spent approximately $20,352 on marketing.
November 2022: Our marketing expenditure slightly decreased to around $19,812.
December 2022: By the end of the year, we slightly increased our marketing spend to around $21,126.
Now, let's compare these numbers with our revenue and with NexaTech's performance.

For Techtonic Tech (all units in $1000):

In October, the marketing spend was around 0.48% of the revenue.
In November, the marketing spend was around 0.66% of the revenue.
In December, the marketing spend was around 0.91% of the revenue.
For NexaTech Solutions (all units in $1000):

In October, the marketing spend was around 0.68% of the estimated revenue.
In November, the marketing spend was around 0.61% of the estimated revenue.
In December, the marketing spend was around 0.56% of the estimated revenue.
Final Answer:

Our competitor, NexaTech Solutions, had a relatively higher marketing spend relative to their estimated revenue compared to Techtonic Tech in October. However, in the months of November and December, Techtonic Tech had a higher marketing spend relative to revenue as compared to NexaTech Solutions. This could indicate that our efforts to counter the competition by increasing our marketing spend did not yield the expected increase in sales in Q4. Other factors within and outside the organization could have played a part in our Q4 performance.

<name=None, function_call=None>

User:
Question: The following question is about this report:

Profit and Loss, Techtonic Tech, Inc
Jan 1, 2022 through Dec 31, 2022
All units are in $1000.

                      |      Q1 |      Q2 |      Q3 |      Q4 |
Revenue
Product sales | 18013 | 22151 | 17212 | 10976 |
Costs
Cost of goods sold | 15119 | 18542 | 14410 | 9224 |
GROSS PROFIT | 2894 | 3609 | 2802 | 1751 |
Operating Expenses
HR Expenditure | 1476 | 1514 | 1501 | 1512 |
Marketing Expenditure | 60 | 62 | 60 | 61 |
Operations Expenditure | 30 | 30 | 30 | 30 |
R&D Expenditure | 60 | 60 | 61 | 59 |
OPERATING INCOME | 1267 | 1944 | 1150 | 89 |
Taxes | 228 | 350 | 207 | 16 |
NET PROFIT | 1039 | 1594 | 943 | 73 |

Their marketing spend relative to revenue compared to ours doesn't help me understand why our Q4 revenue fell. Can you see any reason why their marketing spend would have caused our Q4 revenue to fall?

<name=None, function_call=None>

Assistant:
Marketing activities can have a significant impact on customer awareness, perceptions, and ultimately, purchasing decisions. If NexaTech Solutions significantly increased their marketing spend in Q4, and this was accompanied by other strategic actions (like launching new products, improving product quality, or reducing prices), then this could explain why our Q4 revenue fell.

Let's further break down the data:

In October, NexaTech's marketing expenditure represented 0.68% of their estimated revenue, which is greater than our 0.48% spend. In November and December, while their spend as a percentage of revenue decreased, they still maintained a significant investment in marketing. Our own marketing spend as a percentage of revenue increased significantly, potentially as an attempt to retain market share. However, this didn't result in increased sales, indicating that other factors may be at play.

For instance, NexaTech's constant high spend on marketing could mean that they were able to better reach potential customers, advertise new or more appealing products, or leverage a more effective marketing strategy. This would have increased their market share, possibly going as far as attracting our own potential or existing customers, and thus causing our Q4 revenue to fall. This situation would be exacerbated if our marketing efforts weren't as effective or if other internal factors (like supply chain issues, pricing, customer service, or product quality) were not up to par.

To affirm this, one could look for changes in customer preferences, online reviews, reports on market trends, and customer surveys, if available. Looking at our own internal operations might also uncover potential areas of improvement.

Final Answer:

Although we increased our marketing spend as a percentage of revenue in Q4 2022, our competitor NexaTech Solutions maintained a significant marketing investment, which along with potentially more effective marketing strategies or more appealing product offerings, could have led to them acquiring a larger market share. This, in turn, could have caused our Q4 revenue to fall. However, without more detailed information on both Techtonic Tech's and NexaTech Solutions' marketing strategies and any other internal or external factors at play, it is difficult to make a definitive conclusion.

<name=None, function_call=None>

More open-ended:
User:
Question: The following question is about this report:

Profit and Loss, Techtonic Tech, Inc
Jan 1, 2022 through Dec 31, 2022
All units are in $1000.

                      |      Q1 |      Q2 |      Q3 |      Q4 |
Revenue
Product sales | 18013 | 22151 | 17212 | 10976 |
Costs
Cost of goods sold | 15119 | 18542 | 14410 | 9224 |
GROSS PROFIT | 2894 | 3609 | 2802 | 1751 |
Operating Expenses
HR Expenditure | 1476 | 1514 | 1501 | 1512 |
Marketing Expenditure | 60 | 62 | 60 | 61 |
Operations Expenditure | 30 | 30 | 30 | 30 |
R&D Expenditure | 60 | 60 | 61 | 59 |
OPERATING INCOME | 1267 | 1944 | 1150 | 89 |
Taxes | 228 | 350 | 207 | 16 |
NET PROFIT | 1039 | 1594 | 943 | 73 |

Does anything look unusual in the report?

<name=None, function_call=None>

Assistant:
Based on the given Profit and Loss statement, it seems that the company faced a sharp decline in all the figures in the last quarter (Q4) as compared to previous quarters (Q1, Q2, and Q3).

Specifically, the Q4 results show:

Lower product sales revenue
Lower cost of goods sold
Lower gross profit
Similarly high (nearly unchanged) operating expenses
Lower operating income
Lower taxes
Significantly lower net profit
This might mean there are factors affecting the business that came to bear in Q4, such as a decrease in demand or an external economic factor.

To confirm and explain this, we can look at historical sales data from the revenue table, and investigate how external factors such as competitor activity might have affected the business in Q4.

Do you want to proceed with this, and possibly get more data from our and competitor sales data? Perhaps we can also look at how the operating expense distribution changed over quarters.

<name=None, function_call=None>

User:
When you have the answer to my question, please say "Final Answer:" and then write the final answer.

<name=None, function_call=None>

Assistant:
Final Answer: Based on the given Profit and Loss statement for each quarter of FY2022, the unusual aspect that stands out is the significant decrease in all metrics during Q4 compared to the previous quarters (Q1-Q3). Notably, while the company's revenue, costs, and profits decrease, its operating expenses remain nearly unchanged, resulting in considerably lower net profit. This suggests that some external environment factors or perhaps internal issues within the company could have affected demand or productivity in Q4. Further analysis is needed for a more precise interpretation.

<name=None, function_call=None>

User:
Question: The following question is about this report:

Profit and Loss, Techtonic Tech, Inc
Jan 1, 2022 through Dec 31, 2022
All units are in $1000.

                      |      Q1 |      Q2 |      Q3 |      Q4 |
Revenue
Product sales | 18013 | 22151 | 17212 | 10976 |
Costs
Cost of goods sold | 15119 | 18542 | 14410 | 9224 |
GROSS PROFIT | 2894 | 3609 | 2802 | 1751 |
Operating Expenses
HR Expenditure | 1476 | 1514 | 1501 | 1512 |
Marketing Expenditure | 60 | 62 | 60 | 61 |
Operations Expenditure | 30 | 30 | 30 | 30 |
R&D Expenditure | 60 | 60 | 61 | 59 |
OPERATING INCOME | 1267 | 1944 | 1150 | 89 |
Taxes | 228 | 350 | 207 | 16 |
NET PROFIT | 1039 | 1594 | 943 | 73 |

Why did Revenue fall in Q4? Do additional analysis.

<name=None, function_call=None>

Assistant:
Based on the P&L statement, it's clear that the revenue has fallen in Q4, but the specific reason for this isn't provided in the report. We have several ways to investigate this further:

Check historical sales data: If we have a larger breakdown of sales over time, we can see if this drop aligns with any seasonal trends or specific drops in certain products or regions.

Look at the competition: I can check the NexaTech_Solutions table in the competitor_database to see any significant changes with our competitor during Q4.

Review operating expenses: We could consider if our marketing or R&D expenditure was effective during Q4 compared to other quarters.

Let me start with the first option which is to pull historical sales (units sold) data from the revenue table in the finance_database for the Q4 of FY2022. This will help us to understand if the decrease in revenue is due to a decrease in units sold or perhaps because of a decrease in the selling price. Then we can analyze the competitor's data.

For this, I will write a SQL query to get this information.

<name=None, function_call={'name': 'query_database', 'arguments': '{\n"database": "finance_database",\n"query": "SELECT date, units_sold, revenue FROM revenue WHERE date BETWEEN '2022-10-01' AND '2022-12-31'"\n}'}>

Function:
Observation: [('2022-10-25', 14088, 4226400.0), ('2022-11-25', 11964, 3589200.0), ('2022-12-25', 10533, 3159900.0)]

<name=query_database, function_call=None>

Assistant:
Based on the data retrieved from the revenue table, we have the following sales and revenue information for Q4 FY2022:

October: 14,088 units sold, revenue $4,226,400
November: 11,964 units sold, revenue $3,589,200
December: 10,533 units sold, revenue $3,159,900
We see that both the number of units sold and revenue have decreased over the three months of Q4. This suggests that the decrease in revenue in Q4 may be largely due to fewer products being sold.

Now let's investigate if there were significant activities from our competitors during this period that may have contributed to the drop in our unit sales and revenue. I will query the NexaTech_Solutions table in the competitor_database for the same period.

<name=None, function_call={'name': 'query_database', 'arguments': '{\n"database": "competitor_database",\n"query": "SELECT date, estimated_revenue, estimated_marketing_spend FROM NexaTech_Solutions WHERE date BETWEEN '2022-10-01' AND '2022-12-31'"\n}'}>

Function:
Observation: [('2022-10-25', 4773600, 32681.651618804925), ('2022-11-25', 5410800, 33248.54055941042), ('2022-12-25', 5840100, 32797.70035253513)]

<name=query_database, function_call=None>

Assistant:
Based on the data retrieved from the NexaTech_Solutions table, our main competitor had the following activities in Q4 FY2022:

October: Estimated competitor's revenue was $4,773,600, with marketing spend of roughly $32,681
November: Estimated competitor's revenue was $5,410,800, with marketing spend of roughly $33,248
December: Estimated competitor's revenue was $5,840,100, with marketing spend of roughly $32,797
We notice that our competitor's revenues have been increasing over the last quarter, suggesting that they may have gained some market share during this period.

In conclusion, the fall in our revenue in Q4 FY2022 can be attributed to a decrease in the units sold, potentially due to increased competition during this period.

Please note that this analysis depends on the accuracy of our competitor's revenue and marketing spend estimates. These figures indicate trends but may not represent exact values.

Would you like me to drill down further into any specific area? Such as comparing our Marketing vs competitor's marketing spending over the same period? Or perhaps you would like to explore if there were significant changes in our product costs during Q4 that may have impacted our pricing strategy leading to the drop in sales?

Final Answer: The fall in our revenue in Q4 FY2022 can be attributed to a decrease in the units sold, potentially due to increased competition during this period, as evident from the growth in our main competitor's revenues in the same period.

<name=None, function_call=None>

User:
Question: The following question is about this report:

Profit and Loss, Techtonic Tech, Inc
Jan 1, 2022 through Dec 31, 2022
All units are in $1000.

                      |      Q1 |      Q2 |      Q3 |      Q4 |
Revenue
Product sales | 18013 | 22151 | 17212 | 10976 |
Costs
Cost of goods sold | 15119 | 18542 | 14410 | 9224 |
GROSS PROFIT | 2894 | 3609 | 2802 | 1751 |
Operating Expenses
HR Expenditure | 1476 | 1514 | 1501 | 1512 |
Marketing Expenditure | 60 | 62 | 60 | 61 |
Operations Expenditure | 30 | 30 | 30 | 30 |
R&D Expenditure | 60 | 60 | 61 | 59 |
OPERATING INCOME | 1267 | 1944 | 1150 | 89 |
Taxes | 228 | 350 | 207 | 16 |
NET PROFIT | 1039 | 1594 | 943 | 73 |

Look at the competitor's estimated revenue and marketing spend for all of 2022. Was there a change in Q4 that would have impacted us?

<name=None, function_call=None>

Assistant:

<name=None, function_call={'name': 'query_database', 'arguments': '{\n"database": "competitor_database",\n"query": "SELECT date, estimated_revenue, estimated_marketing_spend FROM NexaTech_Solutions WHERE date BETWEEN '2022-01-01' AND '2022-12-31'"\n}'}>

Function:
Observation: [('2022-01-25', 3597300, 0.0), ('2022-02-25', 2973600, 0.0), ('2022-03-25', 2416500.0000000005, 0.0), ('2022-04-25', 1972800, 0.0), ('2022-05-25', 1615500, 0.0), ('2022-06-25', 1260900, 0.0), ('2022-07-25', 2403000, 33307.028382200326), ('2022-08-25', 3293100, 33418.56125635891), ('2022-09-25', 4092300, 32515.053087834043), ('2022-10-25', 4773600, 32681.651618804925), ('2022-11-25', 5410800, 33248.54055941042), ('2022-12-25', 5840100, 32797.70035253513)]

<name=query_database, function_call=None>

Assistant:
The estimated revenue and marketing spend for our competitor, NexaTech Solutions, during 2022 was as follows:

Jan: Revenue was $3,597,300, with no reported marketing spend.
Feb: Revenue was $2,973,600, with no reported marketing spend.
Mar: Revenue was $2,416,500, with no reported marketing spend.
Apr: Revenue was $1,972,800, with no reported marketing spend.
May: Revenue was $1,615,500, with no reported marketing spend.
June: Revenue was $1,260,900, with no reported marketing spend.
July: Revenue increased to $2,403,000, with a marketing spend of approximately $33,307.
Aug: Revenue further increased to $3,293,100, with increased marketing spend of approximately $33,418.
Sept: Revenue rose to $4,092,300, with a marketing spend of approximately $32,515.
Oct: Revenue rose to $4,773,600, with a marketing spend of roughly $32,681
Nov: Revenue increased to $5,410,800, with an increased marketing spend of roughly $33,248.
Dec: Revenue was $5,840,100 with a marketing spend of roughly $32,797.
Comparing Q4 specifically with the rest of the year, we can see an ongoing trend of revenue increases that continued into Q4. The marketing spend also started from July and has remained fairly consistent across the second half of the year, including Q4.

This continued trend of rising revenue and sustained marketing spend from our competitor could have potentially contributed to reducing our market share, which may have impacted our revenue in Q4.

Final Answer: Our competitor, NexaTech Solutions, has shown a continued increase in its revenue throughout 2022, including in Q4. Their marketing spend, which began in July, remained fairly consistent through to the end of Q4. This ongoing trend of increased revenue and consistent marketing efforts from NexaTech may have contributed to our company's reduced market share and impacted our revenue during Q4.

<name=None, function_call=None>


Develop Functional Modules: Data Handling, Analysis Workflow, Visualization Tools, Analytical Models

Build modular components for data processing, analysis, visualization, and modeling.

done


Update the expect .NET SDK quality to GA for installing dotnet

PR Summary
Since .NET 6.0.100 is Ga, we should use the quality for downloading the SDK as GA.
PR Context
The fix is needed to unblock CI runs
PR Checklist

[ ] PR has a meaningful title

Use the present tense and imperative mood when describing your changes

[ ] Summarized changes
[ ] Make sure all .h, .cpp, .cs, .ps1 and .psm1 files have the correct copyright header
[ ] This PR is ready to merge and is not Work in Progress.

If the PR is work in progress, please add the prefix WIP: or [ WIP ] to the beginning of the title (the WIP bot will keep its status check at Pending while the prefix is present) and remove the prefix when the PR is ready.

Breaking changes

[ ] None
OR
[ ] Experimental feature(s) needed

[ ] Experimental feature name(s):

User-facing changes

[ ] Not Applicable
OR
[ ] Documentation needed

[ ] Issue filed:

Testing - New and feature

[ ] N/A or can only be tested interactively
OR
[ ] Make sure you've added a new test if existing tests do not effectively test the code changed

Tooling

[ ] I have considered the user experience from a tooling perspective and don't believe tooling will be impacted.
OR
[ ] I have considered the user experience from a tooling perspective and opened an issue in the relevant tool repository. This may include:

[ ] Impact on PowerShell Editor Services which is used in the PowerShell extension for VSCode
(which runs in a different PS Host).

[ ] Issue filed:

[ ] Impact on Completions (both in the console and in editors) - one of PowerShell's most powerful features.

[ ] Issue filed:

[ ] Impact on PSScriptAnalyzer (which provides linting & formatting in the editor extensions).

[ ] Issue filed:

[ ] Impact on EditorSyntax (which provides syntax highlighting with in VSCode, GitHub, and many other editors).

[ ] Issue filed:

bootstrap passed, merging to unblock because it can't make it worse.


Add support for .tgx, .sgx and .gen extensions

would love if you could add support for .tgx (turbo grafx-16), .sgx (super grafx) and .gen (sega genesis) extensions to the scraper.

Nix the .gen extension, got that to work; but the .tgx and .sgx aren't recognizing as valid extensions.

For your roms I would suggest only using the No-Intro set.  I am not sure what set your roms are coming from.  In the No-Intro set, Genesis is .md and TurboGrafx is .pce.  I am unsure what SuperGrafx is in the No-Intro set.
Scraper supports both .md and .pce as file extensions.

@sselph = I am having a bit of trouble with the SuperGrafx titles.  They resolve to a name, but it is not the official No-Intro names.
Example:  The title "Daimakai Mura (Japan).pce" is scraped to a title name of "Ghouls & Ghosts".  There are 5 titles but they all scrape to a different name than the No-Intro name all other titles use.
Here is a list of all of the correct names from No-Intro:

1941 - Counter Attack (Japan)
Aldynes - The Mission Code for Rage Crisis (Japan)
Battle Ace (Japan)
Daimakai Mura (Japan)
Madou King Granzort (Japan)

I'm using the any set that good tools processes, they're just pce (sgx/tgx) and smd (gen) renamed, gen works for your scraper, all you need is to add the other two, they make sense and as much sense as anything, good tools supports them, please do so as well, thank you

Vince Forillo

On Apr 20, 2017, at 9:41 PM, Steve Braaten<EMAIL_ADDRESS>wrote:
For your roms I would suggest only using the No-Intro set. I am not sure what set your roms are coming from. In the No-Intro set, Genesis is .md and TurboGrafx is .pce. I am unsure what SuperGrafx is in the No-Intro set.
Scraper supports both .md and .pce as file extensions.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Also it may help to refer to cowerings good tools: http://cowering.blogspot.com
goodPCE is your target, run them thru that..

Vince Forillo

On Apr 20, 2017, at 10:47 PM, Steve Braaten<EMAIL_ADDRESS>wrote:
@sselph = I am having a bit of trouble with the SuperGrafx titles. They resolve to a name, but it is not the official No-Intro names.
Example: The title "Daimakai Mura (Japan).pce" is scraped to a title name of "Ghouls & Ghosts". There are 5 titles but they all scrape to a different name than the No-Intro name all other titles use.
Here is a list of all of the correct names from No-Intro:
1941 - Counter Attack (Japan)
Aldynes - The Mission Code for Rage Crisis (Japan)
Battle Ace (Japan)
Daimakai Mura (Japan)
Madou King Granzort (Japan)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I would just like to clarify that the roms are the same ROMs that you have I just changed the extension to .SGX and .TGX the file format is the same

Since .pce doesn't require and special processing, you can use this flag to have it process them -extra_ext=".sgx,.tgx"

How do I put the flag and for retropie to do it itself under the scraper in retro pie set up I have no desire of doing this stuff via  command line at the prompt

Vince Forillo

On Apr 21, 2017, at 9:06 PM, Steven Selph<EMAIL_ADDRESS>wrote:
Closed #147.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.


Added Qemu builder & compress postprocessors

Hi
Really great work.
I just added support for Qemu builder and Compress post processor
This way you can use this to build a image which can be used on openstack or some other cloud provider
Example
          os = "myqemu"
          pconfig = Packer::Config.new "#{os}.json"
          pconfig.description "#{os} xxx"

          pconfig.add_variable 'version', '1.0'

          builder = pconfig.add_builder Packer::Builder::QEMU
          builder.output_directory "#{os}-qemu"

          builder.accelerator 'kvm'
          builder.disk_interface 'virtio'
          builder.qemu_binary '/usr/libexec/qemu-kvm'
          builder.format 'raw'

          builder.http_directory 'http'
          builder.boot_command ["<tab> text ks=http://#{pconfig.macro.HTTPIP}:#{pconfig.macro.HTTPPort}/#{os}/ks.cfg<enter><wait>"]
          builder.boot_wait '12s'
          builder.disk_size 8096

          builder.headless true

          builder.iso_checksum 'xxx'
          builder.iso_checksum_type 'sha1'
          builder.iso_url '/tmp/some.iso'
          builder.shutdown_command "/sbin/halt -h -p"
          builder.communicator "ssh"
          builder.ssh_password "root"
          builder.ssh_port 22
          builder.ssh_username "root"
          builder.ssh_timeout "10000s"

          builder.net_device "virtio-net"
          builder.qemuargs [
            [
              "-m",
              "1024"
            ],
            [
              "-machine",
              "type=pc,accel=kvm"
            ],
            [
              "-device",
              "virtio-net-pci,netdev=user.0"
            ]
          ]

          builder.vm_name "#{os}"

          provisioner = pconfig.add_provisioner Packer::Provisioner::SHELL
          provisioner.scripts [
            'scripts/rhel_6_x_network.sh',
            'scripts/compact.sh'
          ]

          postprocessor = pconfig.add_postprocessor Packer::PostProcessor::COMPRESS
          postprocessor.output File.join('builds', pconfig.macro.Provider, "#{os}.tar.gz")

          pconfig.validate
          pconfig.build(quiet: false)

thanks

Hi and thank you for your contribution to the project. It looks like your code isn't passing the rubocop tests and your new build is missing a spec test for it. At a minimum it needs to pass the rubocop checks and ideally you'd also include a spec that ensures the new build's required options are enforced as expected.
For an example spec see: https://github.com/ianchesal/packer-config/blob/master/spec/packer/builders/vmware_vmx_spec.rb
Thanks!

I fixed the qemu rubocop error, the rest 4 issues is in code I didn't touch.
I will add a qemu rspec test

Added a basic qemu rspec test

This is failing rubocop -- will need those cops passing. Thanks.

If you rebase off master, those failing cops have already been fixed.

If you rebase off develop Rubocop checks are up to date now.

I'm finally getting around to cleaning this up and merging it. I'll open a new pull request with your changes to get it merged. Will tag you in that PR. Closing this one.


Add meta data for twitter card

Resolves #89

@ravinepal As you asked. Please review.

thanks, @studenton!


waiting for 1.21

Really need the 1.21 update for this mod. simply change the version number （1.20.X to 1.21.X）does not work.

I try to change the mod version to 1.20.x to 1.21.x, cloth config version and mod menu version, this does'nt work.
I hope that the mod will be ported to 1.21.x, it's objectively the most useful mod that I have ever used.

Yeah, the addition of structured components in 1.20.5 requires a non-insignificant rewrite of parts of this mod. Nevertheless I will hopefully have a 1.21 version done soon!

Just a redesign of the logo for 1.21 with the tricky trials colors.
(I was in the process of porting the mod to 1.21, but if you do it, you can use this.)

Yeah, the addition of structured components in 1.20.5 requires a non-insignificant rewrite of parts of this mod. Nevertheless I will hopefully have a 1.21 version done soon!

But you haven't finished it until today.

I found another mod that does the exact same thing. JJElytraSwap if you want.

Yeah, definitely use JJElytraSwap as it looks very good!
If you need a Forge/NeoForge version I will still endeavour to update AutoElytra but I'm sorry, I can't say this will be completed


Improve leaderboard data

We use this data for the monthly newsletter leaderboard: https://opencollective-metabase.herokuapp.com/dashboard/19
But there are a few ways it could be cleaned up. I've been doing this cleaning manually each month but if we could change the queries it would be helpful.

Do not include Projects (but do include revenue coming through Projects in the total contributions to the parent Collective)
Do not include Events (but do include revenue coming through Events in the total contributions to the parent Collective)
Do not include Hosts adding funds to their own Collectives as Contributions
Do not include distributions from Collectives to their own Projects or Events as contributions
Do not include transfers from Events to their Collective as contributions
Do not include Collectives or Hosts contributing to themselves
Is there any way to display USD equivalents of other currencies? Don't count 2000 MXN as more than 1000 EUR for ranking
Exclude these generic profiles that support uses to process bulk contributions: bitcoin-contributions, github-sponsors, benevity, schwab-charitable, fidelity-charitable
Do not include guest and incognito transactions
Do not include opencollective (always on top of 'most new backers')
Include the full URL not just the slug, e.g. https://opencollective.com/getsolus instead of only 'getsolus' - this helps when copying links

Papercuts candidate for this sprint?


Website, admin panel: unable to create a website page on local languages

https://tbtc.network/admin/index.html#/collections/pages-ru.
The button creating a new webpage for local languages is missing:

Hey @manferber, thanks for the report! I'm moving this to the website repo where we'll follow up.


Consider to contribute to winget packages

I hope that this question / suggestion does not seem disrespectful. Every work which makes it easier to use open source software is awesome. Thank you for your work!
That said, maybe it is a more effective use of time to contribute to winget packages going forward.
Like scoop, winget is a package manager for Windows. The huge difference is, that winget is from Microsoft and will be the official Windows package manager, which is going to be installed by default on all Windows 10 computers once it hits version 1.0
Winget is open source too: https://github.com/microsoft/winget-cli
Winget does support several connected repositories / sources for packages with the official one being https://github.com/microsoft/winget-pkgs
Having a random look in the manifest, there are already several open source games in it, like:

https://github.com/microsoft/winget-pkgs/tree/master/manifests/WildfireGames/0AD
https://github.com/microsoft/winget-pkgs/tree/master/manifests/Aardappel
https://github.com/microsoft/winget-pkgs/tree/master/manifests/FreeCiv/FreeCiv
https://github.com/microsoft/winget-pkgs/tree/master/manifests/OpenTTD/OpenTTD

and probably many more.
Adding new packages or package versions does not seem to be complicated and works via pull requests.
I would love to know what you think 😄

I've already started contributing to WinGet when it was just introduced: https://github.com/microsoft/winget-pkgs/pulls?q=is%3Apr+sort%3Aupdated-desc+author%3ACalinou+
That said, ZIP file support is missing in WinGet. This means we can't package most applications in this bucket in WinGet yet: https://github.com/microsoft/winget-cli/issues/140

Thanks for the pointers! I wasn't aware of the zip limitation


Better libembroidery --test

Copied from old to do list.

Fixed, now we have a two-layer test system that, on --full-test-suite tries converting all formats into all other formats and records success/failure (currently segfaults a lot).


Generated Static /path/:slug Page AsyncData Error

Version
v2.12.2
Reproduction link
https://v0.chat
Steps to reproduce

open https://v0.chat
click any post (right side)
click logo (left side) back to home
click another post

What is expected ?
show another posts' title and content
What is actually happening?
always the first post i visit
Additional comments?
source code placed at:  https://github.com/assholev0/v0.chat/blob/master/pages/p/_slug.vue#L22-L30

This bug report is available on Nuxt community (#c10686)

i moved this source code to bug branch.
https://github.com/assholev0/v0.chat/blob/bug/pages/p/_slug.vue#L22-L30
temp, i changed the nuxt-link to a tag, refresh pages every time.
https://github.com/assholev0/v0.chat/commit/8d1e4555ea700c0587b038b2d2faa8fbf5aff7fd
pls, took into this bug.

add label pending

@pi0 @Atinux


Tune GMapping with MDP Expo Bagfile

We collected a lot (almost 4GB worth) of data in the Duderstadt on MDP Expo day. GMapping had some trouble with loop closure, so we need to go back through and tune its parameters to optimize its effectiveness.

Issue was found to be related to magnetic field sensor readings from the IMU. After discarding the inaccurate data, GMapping produced highly accurate maps. Further work should be done in increasing the accuracy of odometry data to maximize the performance of GMapping.


An error occured: server is still in the process of starting

Hi all! My RaspiBlitz node was offline for a few months because of personal problems. Got it back up and running, and I would like to close a channel I left unattended and get my funds back so I can start again, but I keep getting this error. I was running 1.7 and upgraded to 1.8 because I thought that might be the problem, but I'm still getting this message whenever I try to close the channel. Any ideas what might be causing this?
I'm not very technical, but I can give logs to help if someone can tell me what directory on the raspiblitz they are in. Thanks in advance

Does this problem still persist? Which version of LND are you running?

Yes, it still persists. I'm not sure how to tell what version I'm running. I just flashed the image to the pi4. I got the error message trying to close the channel in both Thunderhub and in the RaspiBlitz WEBui main menu.
I just tried to force close it in RideTheLightning and did not recieve an error. I will update you on if that changes things.
How can I check what version of LND I'm running? I can SSH to the pi4 RaspiBlitz, but the menu doesn't load. It just stays at 100% syncing. If I go to CLI I can tell you, if you let me know what directory to look in for logs/data.
Thank you for your help. You do amazing work.

How can I check what version of LND I'm running? I can SSH to the pi4 RaspiBlitz, but the menu doesn't load. It just stays at 100% syncing. If I go to CLI I can tell you, if you let me know what directory to look in for logs/data.

OK - it its syning its not ready to work with thunderhub or RTL. In SSH you can CTRL+c to exit to the terminal and then type menu. Under INFO you should see LND Version. Please report back here.

Been using this thing for a year and had no idea about the "menu" command. That's very handy. Thank you!
I am running LND 0.15.0-beta. Is that the latest?

If you run into further problems (updating the running system) just do the normal system update way by flashing a new sd card with the 1.8.0c image you can download here: https://github.com/rootzoll/raspiblitz#downloading-the-software .. it contains all the LND bugfixes.


Add wamrc parameter to configure stack frame features

Those parameters can be used to reduce the size of the AOT code.
There's going to be more changes related to AOT code size reduction, this is just the initial step. I split the whole optimization to smaller chunks to make reviews a bit easier.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3758

Similarly to https://github.com/bytecodealliance/wasm-micro-runtime/pull/3764, the build fails due to unstable nuttx tests


Automatic chunking depending upon platform

Is there a plan to provide automatic chunking in dask, e.g., https://github.com/pydata/xarray/issues/1338?  This would be particularly helpful to make operation on different platforms more intuitive.

I agree that this would be useful.  I don't know how to do it.  What logic would we need to figure out to reliably automatically chunk dask arrays?

The error typically occurs on a compute step.  Is it possible to know the extent of the graph produced at that point and then rechunk prior to the computation?  I would expect at this point it is probably too late, is that correct?
# code block produces error if ds = ds.chunks(1e5) not used here
mean = ds.mean('Time')
mean.compute()

cc @shoyer

That is correct.  We do not know the history of computations that produced our graph.

Once we are at the mean step, which is a simple case, the limiting factor is the total chunk size for a particular variable in ds, which must be smaller than the total memory available at that time.

Ok, so this would imply that we would need to keep track of the symbolic computational stack in xarray then, would it not?  For instance, if we had the computational stack at the mean.compute() point and not just the dask graph we could sort this out prior to building the dask graph, correct?

As has come up before, doing this as the compute step really requires a graph based representation for whole-array operations before dividing into chunks. This would be another level of abstraction between xarray and dask.
This would certainly be highly useful, but would also require significant effort.
@mrocklin has noted that his Blaze project contained such an array object, but it's probably still pretty far from feature complete.

It depends what you think of as feature complete.  If you only care about the expression building parts of Blaze and not the "compile to anything" parts it's a not-terrible project.
In [1]: import blaze as bz

In [2]: x = bz.Symbol('x', '1000 * 2000 * real')

In [3]: y = (x.dot(x.T) - 1)[::2].mean(axis=1)

In [4]: y
Out[4]: mean((tensordot(x, transpose(x))) - 1[::2], axis=(1,))

In [5]: y.dshape
Out[5]: dshape("500 * float64")

In [6]: y = (x.dot(x.T) - 1)[5::3].mean(axis=1)

In [7]: y.dshape
Out[7]: dshape("332 * float64")

Agreed, adding wrappers for the majority of dask.array operations to construct the graph (at least those used by xarray) would probably not be terribly difficult.

I find that the challenge here is more that you'd have to add another layer into the mix.  I don't think that XArray is likely to add in blaze arrays that then go down to dask arrays that then use numpy arrays.  Indirection has costs.
So far the solution to this problem has been to tell people to think about their chunk sizes.  So far this has worked ok.  I think that it might fail if we try to reach out to a broader population.

@mrocklin is correct.  Our group had an issue related to that this week and I mistook an error in our analysis for something greater than a chunking error.  It wasn't immediately obvious, and I've seen these problems before, that the dask memory error was strictly caused by a chunking failure.
The fundamental problem is that computations change as the problem size is bigger and naive code developed on a small problem size just doesn't immediately scale without handling this chunking issue.  Even something as simple as changing the error message to indicate chunking may be to blame would go a long way.
But, my apologies to you both because this definitely has the flavor of a newbie question.

I think it's more of a fundamental core question of the libraries personally.  It's just not one that we're able to solve except that great cost.
I like the idea of partially-solving this through feedback.  Thoughts on what would help?  Are you on the single-machine or distributed scheduler?

We are on the single-machine scheduler right now although I wouldn't be surprised if we end up on the distributed scheduler before the year is out to complete our analysis.  We are already in the task-parallelism weeds (https://github.com/MPAS-Dev/MPAS-Analysis/pull/112).
The challenge we are having fundamentally is trying to keep the learning curve down for scientist involvement in the analysis package.  Issues like https://github.com/MPAS-Dev/MPAS-Analysis/issues/161 that crop up make this cost too high for many.  But, this is at least partially due to our pace of development on this repository so this problem may dissolve over time.

I can imagine putting some sort of global plugin mechanism into the da.Array constructor so that people could run checks automatically.  This would allow you to err or warn loudly if very large chunks ended up occurring.

I can imagine putting some sort of global plugin mechanism into the da.Array constructor so that people could run checks automatically.

This would also be useful for a "Debug" mode for dask array, where every array is evaluated eagerly before creating a new array with the same shape (effectively automatically calling .persist() after every array operation)

With the addition of array constructor plugins to provide checks and warnings in #2142, is this issue resolved?

Array constructor plugins are nice, but I don't think they solve the automatic chunking problem. At best they are a partial solution.

Are we likely to solve the larger problem?

Probably not in dask :)

Then should we close?

In https://github.com/pydata/xarray/issues/1338 we decided to move this issue to dask.
Is the overall decision here that right now the problem is simply too hard to come up with some type of reasonable solution?  This seems to be the general consensus and it jives with my intuition but I just wanted to double-check.  I'm happy to close if we agree.

Well, this is a real usability problem for both xarray and dask, even if the solution will require a separate project. So I suspect this is likely to come up again.
I'd be happy to leave this open for discussion (makes thing slightly easier to find) but it's up to you (@mrocklin) on how you want to manage this project.

I'm happy to leave it open if it's useful.  If it's still open and
untouched a year from now then we might consider closing then?
On Tue, May 9, 2017 at 3:58 PM, Stephan Hoyer<EMAIL_ADDRESS>wrote:

Well, this is a real usability problem for both xarray and dask, even if
the solution will require a separate project. So I suspect this is likely
to come up again.
I'd be happy to leave this open for discussion (makes thing slightly
easier to find) but it's up to you (@mrocklin
https://github.com/mrocklin) on how you want to manage this project.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/issues/2138#issuecomment-300283724, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AASszEJ1fkkTIf0w82x_iQT3G1nJLCkYks5r4MV2gaJpZM4MtmvH
.

It's been a year, and we now accept 'auto' in rechunk :)
How well is the original use case from https://github.com/pydata/xarray/issues/1338 solved? It's not automatic, but perhaps the user has enough tools now?

The original request was, I think, to rechunk retrospectively based on computations.  This is out of scope for dask array.  Some other project could take it on though.  Closing.

Yes, agreed
On Fri, Jun 29, 2018 at 9:04 AM Matthew Rocklin<EMAIL_ADDRESS>wrote:

The original request was, I think, to rechunk retrospectively based on
computations. This is out of scope for dask array. Some other project could
take it on though. Closing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/dask/dask/issues/2138#issuecomment-401399693, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ABKS1iBP4yX9J147PxgnMgXW8iJ8wr3eks5uBk_ygaJpZM4MtmvH
.


[AutoPR track2_azure-mgmt-appconfiguration] Update appconfiguration.json

Create to sync https://github.com/openapi-env-test/azure-rest-api-specs/pull/3546
You can install the use using pip install of the artificats.

API change check
APIView has identified API level changes in this PR and created following API reviews.
azure-iot-deviceupdate


AZ-204_lab_09.md

Images/Diagrams strings should be localized

https://github.com/MicrosoftLearning/AZ-204-DevelopingSolutionsforMicrosoftAzure.fr-fr/issues/79


Fix users groups

This should solve the issue in #115 and #61. As it uses events, is a nicer implementation than #64 as it is immediate and not delayed
Now I'm slightly confused as how your branches work...

Thanks, @TetraEtc
I created a new user and send a text message to the bot and it sure listens!! BUT it quickly brokens..I'm getting this error:
if event['type'] == 'message':
KeyError: 'type'

This works though (at least for the bot to recognise an user that just signed up to the team). The key here is event.get('type') instead of event['type']:
    def loop(self):
        while True:
            events = self._client.rtm_read()
            for event in events:
                if event.get('type') == 'message':
                    self._on_new_message(event)
                elif event.get('type') in ['channel_created', 'group_joined', 'im_created']:
                    channel = [event['channel']]
                    self._client.parse_channel_data(channel)
                elif event.get('type') == 'team_join':
                    user = event.get('user')
                    self._client.users[user['id']] = user
                else:
                    continue
            time.sleep(1)

Yeah, I can fix this shortly.
This is slightly confusing to me though, as far as I know every event from
Slack should have a type. I am confused how the bot is getting an event
without a type parameter
I am not a fan of using .get in python, personally I would rather wrap this
in a try/except block, but using .get would work as well.
On Mon, 10 Oct 2016, 7:40 AM h-2-0<EMAIL_ADDRESS>wrote:

This works though (at least for the bot to recognise an user that just
signed up to the team). The key here is event.get('type') instead of
event['type']:
def loop(self):
    while True:
        events = self._client.rtm_read()
        for event in events:
            if event.get('type') == 'message':
                self._on_new_message(event)
            elif event.get('type') in ['channel_created', 'group_joined', 'im_created']:
                channel = [event['channel']]
                self._client.parse_channel_data(channel)
            elif event.get('type') == 'team_join':
                user = event.get('user')
                self._client.users[user['id']] = user
            else:
                continue
        time.sleep(1)

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/lins05/slackbot/pull/117#issuecomment-252514671, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGk_7Zb22efmE-nDwR9r9qnjbbgYPJEfks5qyV9JgaJpZM4KR0BV
.

Thanks, @TetraEtc
I also prefer the traditional dict key myself instead of .get()
Believe me, I'm more confused than you :)  so I wonder how can I check which users are logged into the team from another process? Thing is I have a loop running in another script monitoring events and communicating to slack via incoming webhooks. Any ideas, or pointers on How could I retrieve who's signed in by, say, username (i.e. @username)  so I can start sending them event messages?
Thanks so much for your time.

I think that falls a little outside this PR specifically, but slack has the users.list method that you could for this. Simple use their presence parameter in a call to that end point and you'll get all users in your account and their presence, which can be used to determine online/offline members.

@TetraEtc Got it! Thanks so much! And thanks again for your contribution!

Man... This is old.
I have deleted my original fork of this, so I'll have to close this and re-open a new PR


Fix: When no results in search editor it throws an error #233200

Fixes issue #233200
Added a null check for matchRange in the iterateThroughMatches function to ensure setSelection is only called with valid arguments.
Authored with @aayyob

@microsoft-github-policy-service agree

Hi @roblourens,
This is ready to merge once you approve it.


Add --hide-values flag

What this PR does / why we need it:
There is a need to run helm install/helm upgrade commands in Debug mode without leaking secrets (see #7275). This PR fixes that in a more general way by adding a --hide-values flag, which, when combined with --debug, prints relevant debugging information (such as why a helm upgrade command failed) but does not display the values or manifest file, removing the risk of leaking secret config and sensitive manifest contents.
This PR was partially inspired by the feedback on #9130.
Special notes for your reviewer:
I haven't signed my commit, as per the contribution guidelines -- still figuring out how to do that 😅 -- but very happy for someone to take over this PR and rewrite it as they see fit. This is a very important PR for our organisation and, without it, we have no way of easily debugging our helm install deploy commands on CI. We cannot run with --debug and risk leaking secrets and other sensitive manifest values, so we need a flag like this to skip displaying the values entirely.
If applicable:

[X] this PR contains documentation
[X] this PR contains unit tests
[X] this PR has been tested for backwards compatibility

I think perhaps this could be tackled like the suggestion in https://github.com/helm/helm/issues/11827 ie. change the debug flag to take options in what to output.
There is an awkwardness to continuously adding more flags. Each flag becomes another option for users to (mis)understand. and e.g. the --hide-values would only be relevant if the --debug flag is set.

Otherwise, from what I have seen, there is a general desire to improve the output for debug/template usage.

Yeah, that makes sense. I had similar concerns when writing this PR.
What do you think of, --debug=VERBOSE (the default --debug) and --debug=QUIET (the equivalent of --hide-values).

Closing as we found another solution - this is a sed command that deletes everything from USER-SUPPLIED VALUES: down:
helm install --debug ... | sed '/USER-SUPPLIED VALUES:/,$d'

We now use this in our deploys, so we can debug when a deploy fails, but not print any secrets/configuration that may reveal sensitive data.

But its сrutches...

@codersasha But its сrutches...


DataTrack - undesired behavior when using transformation and windowing

hi there,
I'm loving Gviz - thanks for this package!
This isn't exactly a bug report - more a request to consider handling transformation/windowing a bit differently.
In DataTrack I can see that the data gets transformed BEFORE it gets windowed. If we use a transformation of log10, just to plot on a log scale, this leads to undesired outcomes (because log10(a) + log10(b) !=  log10(a+b)).  I think what most people would want is simply to have the same plot on a log scale, rather than a different-looking plot.
I figured out a way to get what I want (using aggregation=function(x) {log10(sum(x))}) but maybe it would also make sense to change the underlying DataTrack code to transform AFTER aggregating over windows.   Kind of depends on what typical use case for transformation is, but I would think this will be a very common one.
Here's some example code to demonstrate is below.
What do you think?
thanks very much,
Janet Young
Fred Hutch Cancer Center
library(Gviz)

## set up data
# middle position has two overlapping regions, but all positions sum to the same count.
# Looks fine on a linear scale but not on a log scale
test_sites <- GRanges(seqnames="chr1",
                      ranges=IRanges(start=c(10,20,20,30), width=1),
                      counts=c(100,50,50,100))
test_region <- GRanges(seqnames="chr1",
                       ranges=IRanges(start=1, end=40))

## axis track
myTrack1 <- GenomeAxisTrack(test_region)

## raw counts track
myTrack2a <- DataTrack(
    test_sites,
    name="counts",
    region=test_region,
    type = c("h"),
    window=width(test_region),
    aggregation="sum",
    ylim=c(0,150)
)

## use transformation option to log10 scale - the plot shows that the transformation is occurring BEFORE the window aggregation.  This isn't just like plotting the data on a log scale
myTrack2b <- DataTrack(
    test_sites,
    name="log10 counts v1 ",
    region=test_region,
    type = c("h"),
    window=width(test_region),
    aggregation="sum",
    transformation=function(x) {log10(x)},
    ylim=c(0,3.5)
)

## SOLUTION - do the log10 scale transformation during window aggregation instead, so we can control the order of aggregation and transformation:
myTrack2c <- DataTrack(
    test_sites,
    name="log10 counts v2",
    region=test_region,
    type = c("h"),
![gviz_transformation_question](https://github.com/ivanek/Gviz/assets/2569397/0c6c3f78-fb98-48b9-bc3e-500c02fe8899)
[](url)
    window=width(test_region),
    aggregation=function(x) {log10(sum(x))},
    ylim=c(0,3.5)
)

myTrackList <- list(myTrack2c,myTrack2b,myTrack2a,myTrack1)

png(filename="bug_testing/gviz_transformation_question.png")
plotTracks(myTrackList)
dev.off()

sessionInfo()

R version 4.3.2 (2023-10-31)
Platform: x86_64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.6.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/Los_Angeles
tzcode source: internal

attached base packages:
[1] grid      stats4    stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] Gviz_1.46.1          GenomicRanges_1.54.1 GenomeInfoDb_1.38.8  IRanges_2.36.0
[5] S4Vectors_0.40.2     BiocGenerics_0.48.1

loaded via a namespace (and not attached):
  [1] DBI_1.2.2                   bitops_1.0-7                deldir_2.0-4
  [4] gridExtra_2.3               biomaRt_2.58.2              rlang_1.1.3
  [7] magrittr_2.0.3              biovizBase_1.50.0           matrixStats_1.3.0
 [10] compiler_4.3.2              RSQLite_2.3.6               GenomicFeatures_1.54.4
 [13] png_0.1-8                   vctrs_0.6.5                 ProtGenerics_1.34.0
 [16] stringr_1.5.1               pkgconfig_2.0.3             crayon_1.5.2
 [19] fastmap_1.1.1               backports_1.4.1             dbplyr_2.5.0
 [22] XVector_0.42.0              utf8_1.2.4                  Rsamtools_2.18.0
 [25] rmarkdown_2.26              bit_4.0.5                   xfun_0.43
 [28] zlibbioc_1.48.2             cachem_1.0.8                progress_1.2.3
 [31] blob_1.2.4                  DelayedArray_0.28.0         BiocParallel_1.36.0
 [34] jpeg_0.1-10                 parallel_4.3.2              prettyunits_1.2.0
 [37] cluster_2.1.6               VariantAnnotation_1.48.1    R6_2.5.1
 [40] stringi_1.8.3               RColorBrewer_1.1-3          rtracklayer_1.62.0
 [43] pkgload_1.3.4               rpart_4.1.23                Rcpp_1.0.12
 [46] SummarizedExperiment_1.32.0 knitr_1.45                  base64enc_0.1-3
 [49] Matrix_1.6-5                nnet_7.3-19                 tidyselect_1.2.1
 [52] rstudioapi_0.16.0           dichromat_2.0-0.1           abind_1.4-5
 [55] yaml_2.3.8                  codetools_0.2-20            curl_5.2.1
 [58] lattice_0.22-6              tibble_3.2.1                Biobase_2.62.0
 [61] KEGGREST_1.42.0             evaluate_0.23               foreign_0.8-86
 [64] BiocFileCache_2.10.2        xml2_1.3.6                  Biostrings_2.70.3
 [67] pillar_1.9.0                filelock_1.0.3              MatrixGenerics_1.14.0
 [70] checkmate_2.3.1             generics_0.1.3              RCurl_1.98-1.14
 [73] ensembldb_2.26.0            hms_1.1.3                   ggplot2_3.5.0
 [76] munsell_0.5.1               scales_1.3.0                glue_1.7.0
 [79] lazyeval_0.2.2              Hmisc_5.1-2                 tools_4.3.2
 [82] interp_1.1-6                BiocIO_1.12.0               data.table_1.15.4
 [85] BSgenome_1.70.2             GenomicAlignments_1.38.2    XML_3.99-0.16.1
 [88] latticeExtra_0.6-30         AnnotationDbi_1.64.1        colorspace_2.1-0
 [91] GenomeInfoDbData_1.2.11     htmlTable_2.4.2             restfulr_0.0.15
 [94] Formula_1.2-5               cli_3.6.2                   rappdirs_0.3.3
 [97] fansi_1.0.6                 S4Arrays_1.2.1              dplyr_1.1.4
[100] AnnotationFilter_1.26.0     gtable_0.3.4                digest_0.6.35
[103] SparseArray_1.2.4           rjson_0.2.21                htmlwidgets_1.6.4
[106] memoise_2.0.1               htmltools_<IP_ADDRESS>           lifecycle_1.0.4
[109] httr_1.4.7                  bit64_4.0.5


Has Cartoon been deprecated?

Hi,
I am trying to use Cartoon from augmenters.artistic and when I try to run the basic example code I get the following error.
Has this been deprecated or am I somehow invoking it incorrectly?
Code I am running:
import imgaug.augmenters as iaa
aug = iaa.Cartoon()
aug = iaa.Cartoon(blur_ksize=3, segmentation_size=1.0,
                  saturation=2.0, edge_prevalence=1.0)

Error:

Any help would be appreciated. Thanks!

@aleju I found a comment from a couple mentioning this hasn't been implemented yet. Is that still the case?
Thanks,
Sachin


Update FilterType.java

New option

I'm looking forward for this update since existing java client started to fail on prod

@joaopsilva hello! Maybe you do know who is the maintainer of https://jitpack.io repo  com.github.binance-exchange:binance-java-api:master-SNAPSHOT? I need to know when this fix will appear there.

In the interim you can use my jitpack.io I have published with fix com.github.xucito:binance-java-api:4c0d164067

com.github.xucito

could you please post the dependecy? I didn't find...

I've published updated client to maven central:
<dependency>
    <groupId>io.github.serg-maximchuk</groupId>
    <artifactId>binance-api-client</artifactId>
    <version>1.0.1</version>
</dependency>

compile group: 'io.github.serg-maximchuk', name: 'binance-api-client', version: '1.0.1'

You can check the code: https://github.com/Serg-Maximchuk/binance-java-api

Thanks, could you please review the conflicts before I merge?


[11.x] Add whenExistsLoaded method to conditionally include relationship existence attribute

Introduction
This PR introduces a new method, whenExistsLoaded, to the Illuminate\Http\Resources\ConditionallyLoadsAttributes trait. This method allows developers to conditionally include a relation existence attribute in their API resources if it was eager loaded.
Background
Laravel's JsonResource currently provides several methods to conditionally include data in API responses based on whether certain relationships or attributes have been loaded. These methods include:

whenLoaded: to include a relationship if it was eager loaded.
whenCounted: to include a relationship count if it was eager loaded.
whenAggregated: to include an aggregated value if it was eager loaded.

However, there is currently no method for conditionally including a relation existence attribute that has been eager loaded. This feature addresses that gap, providing a consistent API for conditional inclusion of various types of data.
Usage
Here is an example of how this new method can be used:
public function toArray(Request $request)
{
    return [
        'id' => $this->id,
        'name' => $this->name,
        'relation_exists' => $this->whenExistsLoaded('relation'),
    ];
}

Please remove all of the white space related changes.


FCREPO-1713. Refactor EVERYONE user principal into the FAD.

Instead of a single static principal named EVERYONE in the ServletContainerAuthenticationProvider class, rely on each delegate to supply a Principal that it uses to represent the EVERYONE user through a getEveryonePrincipal() method.
Updated the integration tests with mocks for the EVERYONE principal for their mock FAD objects.

Resolved with: https://github.com/fcrepo4/fcrepo4/commit/4629227735a6df3de25da2b8347e9cd190ef1c69


Add configuration for LazyNvim to readme

Hi, thanks for your effort with this plugin!
It would be nice to also add LazyNvim to the readme for plugin management. I am using this for my neovim config.
return {
  {
    "henry-hsieh/riscv-asm-vim",
    ft = { "*.S", "*.s", "riscv_asm" },
    init = function()
      vim.g.riscv_asm_all_enable = true
    end,
  }
}

I haven't used lazy.nvim. According to this page, it seems that ft = {"riscv_asm"} is enough to detect the filetype if ftdetect exists, which already provided in this plugin. Could you remove "*.S" as well as "*.s", and try again?
Thanks!

I haven't used lazy.nvim. According to this page, it seems that ft = {"riscv_asm"} is enough to detect the filetype if ftdetect exists, which already provided in this plugin. Could you remove "*.S" as well as "*.s", and try again?
Thanks!

Just tried and *.S/s seems to be redundant as you said.

I updated the REAME. Thanks!


K8SPG-598: Add fields to major upgrade example

CHANGE DESCRIPTION
Updated example with newly added fields.
CHECKLIST
Jira

[x] Is the Jira ticket created and referenced properly?
[x] Does the Jira ticket have the proper statuses for documentation (Needs Doc) and QA (Needs QA)?
[x] Does the Jira ticket link to the proper milestone (Fix Version field)?

Tests

[x] Is an E2E test/test case added for the new feature/change?
[x] Are unit tests added where appropriate?

Config/Logging/Testability

[x] Are all needed new/changed options added to default YAML files?
[x] Did we add proper logging messages for operator actions?
[x] Did we ensure compatibility with the previous version or cluster upgrade process?
[x] Does the change support oldest and newest supported PG version?
[x] Does the change support oldest and newest supported Kubernetes version?

Test name
Status

custom-extensions
passed

demand-backup
passed

finalizers
passed

init-deploy
passed

major-upgrade
passed

monitoring
passed

one-pod
passed

operator-self-healing
passed

pitr
passed

scaling
passed

scheduled-backup
passed

self-healing
passed

start-from-backup
passed

tablespaces
passed

telemetry-transfer
passed

upgrade-consistency
passed

upgrade-minor
passed

users
passed

We run 18 out of 18

commit: https://github.com/percona/percona-postgresql-operator/pull/881/commits/c6a7929cfac58598128cdc737c39466c8c24106d
image: perconalab/percona-postgresql-operator:PR-881-c6a7929cf


Review of wood cascading

In
SysVar_WoodWasteFuelWoodSubst_tr  = np.minimum(SysVar_Carbon_FuelWood_2_7_tr,SysVar_WoodWasteIncineration[:,:,Woodwaste_loc,Carbon_loc,mS,mR])

the underlying assumption is that the fuel demand from use phase is met with available wood waste. However, fuel wood demand is high in low income/electrified countries, where it is difficult to imagine an efficient collection system of wood waste and redistribution (while I'd rather imagine wood being manually collected from forests).

In
SysVar_Energy_FuelWood_2_7_tr = np.einsum('trp->tr',SysVar_EnergyDemand_UsePhase_ByEnergyCarrier_pav[:,:,:,WoodFuel_loc]) + np.einsum('trB->tr',SysVar_EnergyDemand_UsePhase_ByEnergyCarrier_reb[:,:,:,WoodFuel_loc]) + np.einsum('trN->tr',SysVar_EnergyDemand_UsePhase_ByEnergyCarrier_nrb[:,:,:,WoodFuel_loc])

pav is reported (not wrong, but cannot imagine any relevant scenario) and nrbg is missing.

All wood waste goes out of the system in physical form (SysVar_WoodWasteIncineration contributes to F_9_0), but BiogenicCO2WasteCombustion uses part of it to calculate credits.  I understand that this preserves mass-balance, as direct emissions are accounted as impact only, and not in the carbon cycle. However, to someone that does not know the code, F_9_0 might seem like all the wood that goes out of the system, while part of it is used to produce energy within the boundaries of the RECC system.

In Par_RECC_WoodWaste_Casccading, is the typo intended?

(minor suggestion) In the Model parameters section of the config, I would propose to rearrange the order of parameters. For example, wood cascading parameters such as 3_LT_Wood_Cascade, 3_MC_CO2FromWoodCombustion and 4_PY_WoodCascading are sparse in the list (same for other sectors, for which demand, lifetime and material composition are in an unclear order). It would be beneficial to have the parameters clustered by sector (as an "overview" of the sector), or eventually in alphabetical order (to facilitate the comparison with the dataset working folder).

(not related to woos cascading) Master_RECC_v2.5 setting uses V1.1 of 4_PE_ProcessExtensions Materials, but only V1.,0 is in the dropbox folder. Is there an updated version?

Hi @stefanpauliuk, testing @CarrerF 's new interpolation version, I noticed that for runs with 'pav' some exit flags return 'FALSE' (e.g. 'Positive_Inflow_F8_9_R32_SSP_0_RCP_1: False', 'Positive_Inflow_F6_7_R32_SSP_1_RCP_0: False'). This is also the case when running the model with the version prior to the interpolation version for ODYM_RECC_Main.py (commit 7721b7d750da1a6a0cc72848f82be54f4dc6b50c) and ODYM_Function.py (commit 07f93696b9e223aad259be2e4f973fec4bdc7da8). The mass balance is ok. Not sure how critical these exit flags are, but wanted to report it here to not forget.

Thanks for checking @chauenstein ! Indeed, the spline interpolation routine can return small negative values when a curve starts at 0 and then increases to 100 % or so.
I've seen this problem for the type split, where passive houses are ramped up from 0 to 30% over time, with a few very small negative values in the first years.
Previously, I tried out interpolation routines that yield strictly postive values but found that they are unsuitable to produce the kind of growth curves we want to feed the model with.
So far, the solution therefore was to check for the negative values manually and replace them with 0, and change another building category slightly to re-establish the constraint that all building type shares must add up to 1.
What we should do is to check each interpolation result for its quality, most importanly, negative values. Then, maybe, a manual fix in the code?


Moving/renaming project home

If you move the project home it leaves the virtualenv folder. This is a problem if you create a new project home with the same name/path because it will use the virtualenv folder with the packages of the other project.
Describe your environment

Ubuntu
Python version: Python 2.7.6
Pipenv version: pipenv, version 9.0.0

Expected result
Keep the virtualenv when you move/rename the project home. A new virtualenv when you create a new project in the same path as an older project.
That is, move virtualenv folder when you move/rename the project home.
Actual result
After moving/renaming the project home pipenv creates a new virtualenv and it has to reinstall all packages again. The old virtualenv remains there wasting space.
Creating a new project in the same path keeps the older project packages.

then you just create a new virtualenv, not a big deal

We have 100 of scripts = pipenv projects and new ones comes in and others are moved or are removed. In a year we will have 1K of venvs on all our prod machines, many of them use exactly the same dependencies. i agree it is not a big deal as it out of scope of this project. but it seems to be a big deal to create package manager for python that make most ppl happy.

It is not a big deal to work with pyenv+pew+pip+requirements.txt either ("do one thing and do it well"). I just noticed an error prone behaviour (and perhaps dangerous).

@s-trooper @jcarmena - I believe setting PIPENV_VENV_IN_PROJECT=1 in your environment would address this issue

emh sorry for the spam, my post was about the state of affair in python not about this fine project. in js (npm), java (maven & co.) and .net (nuget) for X projects with numpy==1.2.1 dependency i would have "numpy==1.2.1" one single time in global repository, for Y Projects with "numpy==1.6" the same. even diffent target runtimes are handled by those tools. i see virtualentiroments as a wrong way to go, its a workaround of python runtime limitation a sort of GIL for dependency management. and like for GIL, there are no solution possible at time.

@jtratner thank you, that is enough for me. I'll set it by default.


Question: NetworkDataProcedure with authentication token

Hi,
I'm trying to implement a network procedure that can refresh or fetch (sign in) it's authentication token before it begins. I created a condition that does that and added it to the procedure. The problem is that the url request used in the network procedure, had already been constructed in the constructor of the network procedure and cannot be updated in the execute phase, even though we have a valid token before it begins.
In the sample code below, I would like the UserDataProcedure (which inherits from NetworkDataProcedure) to update it's inner URLRequest property, but it is not accessible.
How can I achieve that?
Thanks.
class AuthToken: Codable {
    var accessToken: String
    var refreshToken: String
    private let expires: Date

    var isValid: Bool {
        return expires.timeIntervalSinceNow > 0
    }
}

enum AuthError: Error {
    case invalidToken
}

class Api {
    let baseUrl: URL
    let session = URLSession.shared
    var authToken: AuthToken?

    init(url: URL) {
        baseUrl = url
    }

    func request(path: String) -> URLRequest {
        var request = URLRequest(url: baseUrl.appendingPathComponent(path))
        if let token = authToken {
            request.setValue("Bearer \(token.accessToken)", forHTTPHeaderField: "Authorization")
        }
        return request
    }
}

class AuthTokenProcedure: NetworkDataProcedure, OutputProcedure {
    var output: Pending<ProcedureResult<AuthToken>> = .pending

    init(api: Api, path: String) {
        super.init(session: api.session, request: api.request(path: path))
        addDidFinishBlockObserver { (operation, errors) in
            if case .ready(let result) = operation.output, case .success(let token) = result {
                api.authToken = token
            }
        }
    }
}

class AuthTokenCondition: Condition {
    private var api: Api

    init(api: Api) {
        self.api = api
        super.init()
        if let token = api.authToken {
            if !token.isValid {
                produce(dependency: AuthTokenProcedure(api: api, path: "/auth/token/refresh"))
            }
        } else {
            produce(dependency: AuthTokenProcedure(api: api, path: "/auth/token/get"))
        }
    }

    override func evaluate(procedure: Procedure, completion: @escaping (ConditionResult) -> Void) {
        if let token = api.authToken, token.isValid {
            completion(.success(true))
        } else {
            completion(.failure(AuthError.invalidToken))
        }
    }
}

class UserDataProcedure: NetworkDataProcedure {
    private var api: Api

    init(api: Api) {
        self.api = api
        super.init(session: api.session, request: api.request(path: "/user"))
        add(condition: AuthTokenCondition(api: api))
    }

    override func execute() {
        guard let token = api.authToken else { return }
        request.setValue("Bearer \(token.accessToken)", forHTTPHeaderField: "Authorization")
        super.execute()
    }
}

Hi, @golanb well...
NetworkDataProcedure implements InputProcedure and OutputProcedure, the Input type is URLRequest. What this means, is that the URLRequest can be provided after the network data procedure is initialised, and the only requirement is that it is set into a .ready state before the procedure executes.
For example you could do this:
let getData = NetworkDataProcedure(session: api.session)
    .injectResult(from: createRequestProcedure)

where createRequestProcedure is a Procedure subclass which conforms to OutputProcedure and ultimate creates the URLRequest. I would say that this is the procedure which gets the authentication condition attached to it. i.e.
let createRequest = CreateRequest()
createRequest.add(condition: AuthTokenCondition())

let getData  = NetworkDataProcedure(session: api.session).injectResult(from: createRequest)

queue.add(operations: createRequest, getData)

However, if you didn't want to do this, you can also set the URLRequest directly after creating the network request, like this:
getData.input = .ready(myURLRequest)

if this is done before getData executes, then it will also work. But I would say that this is a bit of a hacky solution - and really, extracting the creation of the request into its own Procedure is the best practice that I would recommend.
This could be really trivial, for example:
let createRequest = ResultProcedure { URLRequest(url: theURL) }

However... if this was me, I would create a procedure which receives a URL and is responsible for transforming that into the URLRequest, adding the appropriate headers. And would then support behaviour like having an Auth constraint. So, essentially this is your "pipeline" is something like this:
URL -> URLRequest -> Network Procedure -> Decode Response

I've been thinking about writing support for OAuth2 just as part of ProcedureKitNetwork, might be useful to have a standard framework way of doing this - but the issue is that the "create url request" procedure cannot really come from the framework, so.... thoughts?


MAINT: remove NumPy infty alias

removed upstream in NumPy as prep for 2.0 version:
https://github.com/numpy/numpy/pull/24376

I saw it causing test failures at: https://github.com/scipy/scipy/actions/runs/5980535057/job/16226847762

[skip circle]

Turns out I'm online after all.  The test failures on the Python 3.12-dev job are not related, so merging.


Merge google -> main

667a75065 Synchronize submodules with LLVM at llvm/llvm-project@638dcea010cf
099dce5da Integrate LLVM at llvm/llvm-project@638dcea010cf
d5ce351d6 Merge pull request #6718 from ThomasRaoux:main-to-google
a9543faec Integrate LLVM at llvm/llvm-project@f63b1bf7f49e
b9988d9d1 Integrate LLVM at llvm/llvm-project@9d982c67ba01

The llvm-projects/ files should be llvm-external-projects (no changes on this branch merge). Needs another Copybara tweak maybe?

Ah, the google branch has both:

https://github.com/google/iree/tree/google

The llvm-projects/ files should be llvm-external-projects (no changes on this branch merge). Needs another Copybara tweak maybe?

Ah, the google branch has both:

https://github.com/google/iree/tree/google

Thanks for catching this! Fixed it.


[Bundle] tailscale vpn

Is your feature request related to a problem? Please describe.

Use a vpn to connect to kairos / k3s cluster
Describe the solution you'd like

add Tailscale into community bundle
Describe alternatives you've considered

another vpn could do the job
Additional context

Hi @Ludea, thanks for opening the issue. Since you mention, any VPN, could you use edgeVPN? https://kairos.io/docs/architecture/network/

the main benefit to use tailscale is to avoid opening a port from router and access vpn through a tailscale subdomain (i think the name is reverse tunnel, i'm not sure)

I also need this function, because many of my other devices, such as Android, windows and nas, have widely used tailscale as a vpn. And tailscale has many enhanced functions, such as ssl certificate, reverse proxy, dns and so on. Please consider this proposal. Thank you.

@east4ming thanks for reaching out, atm we are not planning to work on this, but we'd be happy to get some contributions

@east4ming thanks for reaching out, atm we are not planning to work on this, but we'd be happy to get some contributions

I would like to know how to use kairos  with tailscale, can you help me? Thank you

@east4ming I'm not a tailscale user so I cannot tell you myself, what have you tried that is not working so far?

@east4ming I'm not a tailscale user so I cannot tell you myself, what have you tried that is not working so far?

I have tried 3 methods with success. The three methods are:

install-config: execute tailscale install script via stage (curl....) -> Result: Failure. I tried multiple stages, executing in boot stage, the filesystem is already read-only; executing in other stages, it fails, and I didn't find any logs when I turned on debug. 2. bundles: I made my own tailscale bundle, taking coco and flux as reference -> Result: Failure. I didn't find any logs about it. 3. custom image: based on kairos standard debian, built it as a docker image, then built it as an iso using aurora, and installed the system using that iso. Result: Success.

3 The example is as follows:
FROM ghcr.io/tailscale/tailscale:stable as build

FROM quay.io/kairos/debian:bookworm-standard-amd64-generic-v3.0.14-k3sv1.29.3-k3s1

COPY --from=build /usr/local/bin/tailscale /usr/bin/
COPY --from=build /usr/local/bin/tailscaled /usr/sbin/
RUN mkdir -p /var/lib/tailscale
COPY tailscaled.service /etc/systemd/system/
COPY tailscaled.defaults /etc/default/tailscaled
RUN systemctl enable tailscaled.service

Thanks.
 I was expecting a bundle based model. If you can provide guidance on the bundle, I can show my error code.

Check out:
https://github.com/Itxaka/sysext-examples/blob/main/tailscale.sh

I no longer need a community bundlefor tailscale I deploy it with argocd bundle.
I keep this ticket open for community.


exclude in configs

PR-Codex overview
This PR adds the ability to exclude specific issue titles from checking in the deepinfra_model API model.
Detailed summary

Added exclude parameter to specify issue titles to ignore in checking.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@rultor merge

@rultor merge

@h1alexbel OK, I'll try to merge now. You can check the progress of the merge here


No calculation and route

The distance calculation is not shown and no draw for the route.

How you solved this isssue, I don't got the route line when is up to 5KM


recursive member classes

I think that this should be accepted:
interface Directory {
    shared formal class TemporaryDirectory(String? prefix)
            satisfies Directory & Destroyable {}
}

class ConcreteDirectory() satisfies Directory {
    shared actual class TemporaryDirectory(String? prefix)
            extends super.TemporaryDirectory(prefix) {
        shared actual void destroy(Throwable? error) {}
        shared actual class TemporaryDirectory(String? prefix)
                => outer.TemporaryDirectory(prefix);
    }
}

Currently, outer. may not be used in a class alias or extends clause. Failing that, I tried:
class ConcreteDirectory() satisfies Directory {
    shared class OuterTemporaryDirectory(String? prefix)
            => TemporaryDirectory(prefix);
    shared actual class TemporaryDirectory(String? prefix)
            extends super.TemporaryDirectory(prefix) {
        shared actual void destroy(Throwable? error) {}
        shared actual class TemporaryDirectory(String? prefix)
                => OuterTemporaryDirectory(prefix);
    }
}

But I get the error:
Inherited member class may not be extended in initializer of TemporaryDirectory: TemporaryDirectory is inherited by TemporaryDirectory from Directory

Which looks spurious to me.

This would be even better, but results in the same error:
interface Directory {
    shared formal class TemporaryDirectory(String prefix)
            satisfies Destroyable {}
}

interface ConcreteOrTemporaryDirectory satisfies Directory {
    shared actual class TemporaryDirectory(String prefix)
            extends super.TemporaryDirectory(prefix)
            satisfies ConcreteDirectory {
        shared actual void destroy(Throwable? error) {}
    }
}

class ConcreteDirectory() satisfies ConcreteOrTemporaryDirectory {}

Note: this relates to @jvasileff's work on https://github.com/ceylon/ceylon-sdk/pull/472.

Hrm, I think I understand the issue here now: since inheritance hides stuff from outer scopes, super.TemporaryDirectory doesn't refer to ConcreteOrTemporaryDirectory.super.TemporaryDirectory, but instead to TemporaryDirectory.super.TemporaryDirectory. Which is the same type, but inherited via a different path.

What I would need here, if I'm not mistaken, is something like extends outer.super. TemporaryDirectory() or extends (outer of Directory).TemporaryDirectory().

Oh no, I see, it's actually because super has a special "hacked" scope when it occurs in an extends clause. But SelfReferenceVisitor wasn't taking that into account.

This is fixed, I believe.


kafka: Support arbitrary broker settings

It's annoying that I can't change most settings. It's trivial to implement such a feature with 15 lines of bash.
I have a bunch of other improvements in my fork, feel free to take a look if you want.

Turns out #32 does this already. Closing.


Add Array#starts_with? and Array#ends_with?

Hello everyone 🙂
a = [1, 2, 3, 4]

a.starts_with? [1, 2] # => true
a.starts_with? [1] # => true
a.starts_with? [2] # => false
a.starts_with? 1 # => true
a.starts_with? 2 # => false

a.ends_with? [3, 4] # => true
a.ends_with? [4] # => true
a.ends_with? [3] # => false
a.ends_with? 4 # => true
a.ends_with? 3 # => false

@j8r thanks!

@Sija Indexable, maybe? Enumerable doesn't have [] method.

@konovod true but it has each, which is good enough. Indexable could be a candidate too though.

Hey, sorry to interrupt everyone, but was this ever discussed? Please, create an issue discussing something.
I personally don't think this has enough use cases to merit going into the standard library. Additionally, the implementation is sub-optimal, creating an intermediate array.
I vote to close this.

@asterite I can move this into Enumerable. Thus, I will try to optimize avoiding an intermediate array.

@delef Thank you, but I don't think we are going to merge this. It's not in Ruby and I can't see the need for it.

@delef would you mind posting some real-world use-cases for these? IMO the best ones would be taken directly from stdlib, where we could see some improvement in terms of code complexity, verbosity, etc. Otherwise value of this addition stays pretty theoretical (i.e. code bloat).


Level 1: Routing Logic (Broadband & Telecom Departments)

As per requirements, some products belong to a different department, and each department has a different process for handling requests. So the first level is about routing the request to the right department.
TASK: Based on the requested products, you need to route the request to the right department.
If your received request has the Internet or TV products, you need to:
Print a message that says: Routing to Broadband department!
If your received request has the Mobile or Landline products, you need to:
Print a message that says: Routing to Telecom department!
If your received request that has both Internet or TV products, and Mobile or Landline products, you need to:
Print a message that says: Routing to Broadband & Telecom departments!
You need to implement the solution function in the FirmamentLevel1 file. It takes an object named Request as an argument, and it returns Unit (nothing). The request object has the same structure as the one outlined in the requirements.

Co-authored: @miya-rt, @Nuja05
Dev analysis

Routing the request to the right department:

Broadband department
Telecom department

Related products for each department:

Broadband department: TV & Internet
Telecom department: Landline & Mobile

Printing Requirements:

For Broadband products: Routing to Broadband department!
For Telecom products: Routing to Telecom department!
For both: Routing to Broadband & Telecom departments!

Hello @Nuja05 and @miya-rt ! 👋🏼 👋🏼
Day 1 Feedback
I read some of your wiki entries - amazing level of comprehension! It seems you've grasped some of the core concepts we employ in our day-to-day life as software engineers, that's great! For the next day, feel free to continue working on the challenges, or take the opportunity to shadow one of our developers if you want a break from these challenges!
Solution:
As for this challenge, the solution for level 1 is:

:lock: SPOILER ALERT - Only expand this if you want to have a sneak peak for sample solution!
fun challenge1(request: Request) {
  if (request.internet || request.tv) {
      if (request.mobile || request.landline) {
          println("Routing to Broadband & Telecom departments!")
      }
      else {
          println("Routing to Broadband department!")
      }
  }
  else if (request.mobile || request.landline) {
      println("Routing to Telecom department!")
  }
}

What's next?
Once you're satisfied with your solution, head over to the second challenge, you can find the story ticket here: 12/07/2023 - Level 2: Validation Logic (No products Requested). Don't forget to add your own dev-analysis so you don't accidentally miss any requirements!


Add Micronaut to SDKMAN!

Please add http://micronaut.io/ to SDKMAN!

Micronaut will be made available as soon as the team releases the first version. In future, please follow the stipulated contributor guidelines.