An error occured

Confirm this is an issue with the Python library and not an underlying OpenAI API

[X] This is an issue with the Python library

Describe the bug
i got this error named "No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/telegram/ext/dispatcher.py", line 555, in process_update
handler.handle_update(update, self, check, context)
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/telegram/ext/handler.py", line 198, in handle_update
return self.callback(update, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 17, in handle_message
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/openai/lib/_old_api.py", line 39, in call
raise APIRemovedInV1(symbol=self._symbol)
openai.lib._old_api.APIRemovedInV1:
You tried to access openai.Completion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.
You can run openai migrate to automatically upgrade your codebase to use the 1.0.0 interface.
Alternatively, you can pin your installation to the old version, e.g. pip install openai==0.28
A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742" and it said that the i tried to access openAI.Completion but its no longer supported in openai>=1.0.0
To Reproduce
error "No error handlers are registered, logging exception.
Traceback (most recent call last):
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/telegram/ext/dispatcher.py", line 555, in process_update
handler.handle_update(update, self, check, context)
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/telegram/ext/handler.py", line 198, in handle_update
return self.callback(update, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 17, in handle_message
File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.11/site-packages/openai/lib/_old_api.py", line 39, in call
raise APIRemovedInV1(symbol=self._symbol)
openai.lib._old_api.APIRemovedInV1:
You tried to access openai.Completion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.
You can run openai migrate to automatically upgrade your codebase to use the 1.0.0 interface.
Alternatively, you can pin your installation to the old version, e.g. pip install openai==0.28
A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742"
Code snippets
import telegram.ext
import openai

# Telegram bot token received from BotFather
telegram_token = 'YOUR_BOT_TOKEN'

# OpenAI GPT API key
openai.api_key = 'YOUR_API_TOKEN'

# Initialize the Telegram bot
bot = telegram.Bot(token=telegram_token)

# Function to handle incoming messages
def handle_message(update, context):
    message = update.message.text  # Get user's message
    # Process the message using GPT-3
    response = openai.Completion.create(
        engine="text-davinci-003",
        prompt=message,
        max_tokens=50  # Adjust the number of tokens for the length of the response
    )
    generated_text = response.choices[0].text.strip()  # Get GPT's response

    # Send the generated response back to the user
    update.message.reply_text(generated_text)

# Function to handle the /start command
def start(update, context):
    update.message.reply_text('Hello! I am your ChatGPT bot. Send me a message, and I will respond.')

# Function to handle the /help command
def help(update, context):
    update.message.reply_text('This bot uses AI to generate responses. Just start chatting!')

# Set command handlers
updater = telegram.ext.Updater(token=telegram_token)
updater.dispatcher.add_handler(telegram.ext.CommandHandler('start', start))
updater.dispatcher.add_handler(telegram.ext.CommandHandler('help', help))
updater.dispatcher.add_handler(telegram.ext.MessageHandler(telegram.ext.Filters.text & (~telegram.ext.Filters.command), handle_message))
updater.start_polling()
updater.idle()

OS
Android
Python version
PyDroid3
Library version
idk

v1 of the API changed somethings, you'll need to update your code:
def handle_message(update, context):
    message = update.message.text
    response = openai.chat.completions.create(
        model="gpt-3.5-turbo",
        prompt=message,
        max_tokens=50
    )


simplify Dockerfile

An attempt to simplify the Dockerfile a little. I don't understand why you needed the kubeconfig and version there, for me it works fine without from inside a GKE cluster. From other environments I would probably just spin up a kubectl proxy if helm's tunnel doesn't suffice.
Also fixes https://github.com/Eneco/landscaper/issues/31

Unfortunately we don't always run the landscaper from within the cluster we want to landscape. In our case we actually use this docker image in a .gitlab-ci.yml which is why we need this configuration to be there.
I do however like the idea of the simpler image, so maybe we could create two different flavours.

I see. I'll think about another way then. Let's try not to have two flavours.

@TommyM I'm closing this for now. No need to have dangling PRs laying around. Will come back to it at some point.


Adding Hindi (hi) language to Discourse

From last 45 days we are working hard to translate Hindi (hi) language. Currently we are somewhere 24%
Please add this language to Discourse, so we can cross-check language on live site and make relevant changes.

I'm closing this for now. Please contact me when the core translations reach about 50%.


Limited times of file upload in a period of time

In a period of time (not sure exactly how long), there can only be two file uploads (by that I mean not two files but two times, as in crawling and sending multiple images at a time counts as once). If the limit is exceeded, there will be no error, but no files would be actually uploaded to the server and thus received by the user.

Is it some WeChat restriction? How can I get pass this restriction?


Add compose multiplatform support to voyager-koin (Closes #158)

Add new koin-compose dependency
Setup Module for Compose Multiplatform
Tested on Android, iOS, Desktop JVM, Web JS

Koin supports Compose Multiplatform -> https://github.com/InsertKoinIO/koin/issues/1208#issuecomment-1536504478
@Syer10 Looks like this can be merged now

Looking to use this

The same! This would be very useful! @adrielcafe 🙏

plz update the doc for that


Update dependencies

Jackson 2.9.4 -> 2.9.5
Guava 24.0 -> 24.1
Retrofit 2.3.0 -> 2.4.0
gRPC 1.10.0 -> 1.11.0
Micrometer 1.0.1 -> 1.0.2
Netty TCNative BoringSSL 2.0.7 -> 2.0.8
Brave 4.17.2 -> 4.18.2
Zipkin 2.5.1 -> 2.7.0
Kafka Clients 1.0.1 -> 1.1.0
Jetty 9.4.8 -> 9.4.9
Hibernate Validator 6.0.8 -> 6.0.9
JCTools 2.1.1 -> 2.1.2
Mockito 2.15.0 -> 2.17.0
Build plugins:

Shadow 2.0.2 -> 2.0.3
protobuf-gradle-plugin 0.8.3 -> 0.8.5

Waiting for https://github.com/line/gradle-scripts/pull/13 to be merged to fix the build problem.

Thanks, reviewers!


So, Windows 10

Currently there appears to be some issues with this library on windows 10 (weird border, blurry text, cut off elements, flickering).

I'd be willing to work on a new "Office 2016" style (because I need it anyway) and to fix some of these bugs.

If I can ask some questions, get feed back here, and make issues here I would be willing to contribute these changes back to the community. I'm just putting this out here to see if anyone is already doing it, or has any thoughts, or would like to help in anyway (so we can divvy up the work).

Not only that, in overflow mode the content of the popup looks weird too and the ribbon rendering is also not realy correct:

Yupe, current Ribbon does not draw correctly in Windows 10. It requires a new approach, a new block of coding to draw accordingly for Win 10.

Most of the senior team members of this project are either left the project or become inactivity, so can't help much to modify the code of the Ribbon to compatible with Windows 10.

Hello mason-bially, I have invited you to the team. You can check your notification or email for the invitation link. You can commit code changes to the repository. Thanks for your contribution to the community.

I ran into that issue with the popup causing rendering issues.  Found the bug in RibbonPanel.cs, lines 444-446 in the version I downloaded.  It's inside the OnPaint event.  The fakePanel.SetOwner(Owner) call needs to be moved ABOVE the fakePanel.SetBounds(overflowBoundsBuffer) call.  The SetBounds method is referencing the Owner, which is null.  Reordering the calls fixes the issue.

Not only that, in overflow mode the content of the popup looks weird too and the ribbon rendering is also not realy correct:

Hi, jaydfox77, I have invited you as member of this project. You may check the invitation link in your message box. Then, you are welcome to commit the changes to improve this project. Thanks for your contribution.

Hi, mason-bially, none of us is fixing this issue. You are welcome to go ahead to commit the fixes into the repository directly. Thanks.

@adriancs2: Adrian, I found this Component again, after it had been abandoned a few years ago. I'm happy to see it is alive again!
Just downloaded the binary releases and saw that there are still rendering issues in Windows 10. Is it just my machine, or are there still issues open; is anyone currently working on this, and if not, may I try to do my best to fix them?
But I would need some advice where to get started as I'm completely new to the project...
However, thanks in advance and for your work respectively 🥇

@tajbender You may submit code fixes/patches by submitting a pull request

The text issues result from a erroneous "IsGlassEnabled"-property in WinAPI.cs:

   public static bool IsGlassEnabled
   {
       get
       {
           //Check is windows vista
           if (IsVista)        //         public static bool IsVista => IsWindows && Environment.OSVersion.Version.Major >= 6;
           {
               //Check what DWM says about composition
               int enabled = 0;
               int response = DwmIsCompositionEnabled(ref enabled);

               return enabled > 0;
           }

           return false;
       }
   }

So as a result, the Vista Glass-renderer path is used all the time. Just commenting out the checks leads to clear text in Windows 10:

As Windows 8 and above don't use glass effects, IMHO there shouldn't be implications if I fix this issue. Does everybody agree?
However, I cannot test Win Vista/7/8, as my machine only runs Win 10. Would be nice if someone could test the other OSes.
Then I would try to fix the caption bar issues itself...

As a quick solution to having a second OS, you can try using VMware Workstation Player or VirtualBox to install win7. You can ignore the compatibility with Vista and Win 8. and finally you may submit a pull request for the code patches. We thank for the efforts and your contribution towards the community.

There is a lot more to do then that to get a clean code base; I just started converting
Classes\WinApi.cs
into UTF-8, cause it had the wrong encoding. That's why the file history is corrupted.

I would suggest creating a branch for a new release, just to be sure to have the changes isolated from the existing codebase. Then I suggest to isolate the render paths into different classes, to gain:

Performance
Make further maintenance easier

I would also refactor the examples, cause some are broken.
I would refactor the precompiled binaries, installer, docs, etc., cause there are lots of minor issues I found. A refactoring would make it easier for other people to get in touch with the component. Finally, I suggest releasing a stable version via NuGet.

However, one person alone can't test all this things against WinVista/7/8/10, and all available Office Renderer. So, to make things easier it would be nice to get some stuff orchestrated by the project maintainer  ;)
It also would be nice if @harborsiem could contact me, since it seems he was the last person that made fundamental changes to the code.

@adriancs2: Are you okay with my ideas and suggestions? And would you assist me in testing and whenever I may have questions, and do the final code review?

@tajbender Okay, I try my best to assist you :)

I might also be able to do some testing or work. The project I was going to do this work for got scrapped for unrelated reasons, but some of the code using this ribbon still survives, but it was never worth it (and still isn't) to clean it up. But I'll see if I can contribute stuff (if at all).

@adriancs2, @mason-bially : Thank you so much for your feedback.
I'm not allowed to write to this repository, so I forked my own version here: https://github.com/tajbender/RibbonWinForms/commits/master
I'll try to make atomic commits, so the steps that will be made should be self-explanatory. Certainly everyone is welcome to take a look and contribute :wink:
There are still things that give me headache, e.g. why - and where - the window border itself is drawn; take a look at the top of the screenshot:

Perhaps someone of you has an idea, and can give me a hint where the 10 pixel at the top come from? (It's a Win 10 machine, so I don't think it's windows itself that draws that stuff in that style.)
Thanks in advance, and have a nice weekend. Take a look at the :full_moon: :new_moon:

@tajbender Hi, I have invited you to join the developer team. You may visit this link to accept the invitation. After joined, you can submit code/write to the repository directly.

Thank you so much, @adriancs2 🥇 . I'll branch the repository, import my work made so far and give feedback as soon as I have a stable version.
I'm glad to be on board and hope to be of value for the project 👍

Sorry for being late, but last week it was way too hot here in Europe to do coding stuff 😬

Perhaps someone of you has an idea, and can give me a hint where the 10 pixel at the top come from? (It's a Win 10 machine, so I don't think it's windows itself that draws that stuff in that style.)

First, to answer that, it's done in RibbonFormHelper.PaintTitleBar().
I've pushed the changes I made so far into branch Win10_Fixes_and_Refactoring. Most of them are minor changes and Refactoring, including the Win10-RibbonTab-Text-Fix mentioned above.
For now, the problem is the title bar which is always drawn in the same color, regardless of form's activation state. But I'm working on that.
However, you are always welcome to test this stuff so far, especially on Windows < 10 😁 Thanks in advance!

@adriancs2: Could you give me a hint what the default behavior for the title bar under Windows < Win 8 is?
Is there any difference, i.e., is it drawn in different colour(s) when activated, in contrast to being drawn when the window is not activated? Could you perhaps provide an image of the difference?
As said, I only have a AMD Ryzen machine, which won't run Windows < 8 cleanly, or rather I'm still working on that. And I'm a little bit confused, cause what I've seen so far the title bar itself is drawn multiple times, in different layers over themselves so to say. This doesn't make it easier, to be honest 😭

Is there any difference, i.e., is it drawn in different colour(s) when activated, in contrast to being drawn when the window is not activated? Could you perhaps provide an image of the difference?

Okay, I've found myself, it's another Colour. Now I've to found where this is done 😁

Hi, mates. Hi, @adriancs2,
after having a hard time doing these minor changes mentioned above, trying to fix the problems that followed that "simple" solution made my sick 💩
Then, I thought why to reinvent the wheel when it perhaps would be very simple. So I just dropped a manifest file to the solution, added the dpi-awareness-flag;

  <application xmlns="urn:schemas-microsoft-com:asm.v3">
    <windowsSettings>
      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
    </windowsSettings>
  </application>

and commented out a minor amount of code in OnRenderRibbonTabText, and voila:

except some minor issues cause of miscalculated rendering space (which could be fixed soon I guess), it looks pretty nice.
The changes made, well, I just commented out the Glass-rendering stuff:

           using (Brush b = new SolidBrush(GetTextColor(e.Tab.Enabled, e.Tab.Active ? ColorTable.TabActiveText : ColorTable.TabText)))
           {
               //if (e.Ribbon.ActualBorderMode == RibbonWindowMode.NonClientAreaGlass)
               //{
               //    GraphicsPath p = new GraphicsPath();

               //    float emSize = e.Graphics.DpiY * e.Ribbon.RibbonTabFont.Size / 72;
               //    p.AddString(tabText, e.Ribbon.RibbonTabFont.FontFamily, 0, emSize, r, sf);

               //    SmoothingMode sbuff = e.Graphics.SmoothingMode;
               //    e.Graphics.SmoothingMode = SmoothingMode.HighQuality;
               //    e.Graphics.FillPath(b, p);
               //    e.Graphics.SmoothingMode = sbuff;
               //}
               //else
               //{
                   e.Graphics.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
                   e.Graphics.DrawString(tabText, e.Ribbon.RibbonTabFont, b, r, sf);
               //}
           }

The advantages should be obvious. As soon as we drop the if (e.Ribbon.ActualBorderMode == RibbonWindowMode.NonClientAreaGlass), we would get a cleaner code base, the text issues should be fixed, and in the end, if I fix the form-border-color and the problems caused by the dpi-awareness-stuff, the component itself should be dpi-aware and ready for Win 10...
So, what do you think about?
@adriancs2: Could we exchange E-Mail-Addresses for easier correspondence in any form?

@tajbender Sure, here is my email.
<EMAIL_ADDRESS>

Hi @tajbender , thanks for the fixes :)


feat(config): orientation

@DSergiu is there some AUTO orientation? For example, what happens if the user rotates the device to landscape with Captcha that configured with orientation=portrait?

@DSergiu is there some AUTO orientation? For example, what happens if the user rotates the device to landscape with Captcha that configured with orientation=portrait?

There is currently no AUTO support. @CAMOBAP

@DSergiu is there some AUTO orientation? For example, what happens if the user rotates the device to landscape with Captcha that configured with orientation=portrait?

There is currently no AUTO support. @CAMOBAP

If portrait/landscape will correctly handle rotation there is probably no need to have one

Similar PR for iOS https://github.com/hCaptcha/HCaptcha-ios-sdk/pull/111


Respect CONNECT method to implement a proxy server

To be able to implement an HTTP tunneling proxy the payload received on the app logic should be wired to the actual stream and not the EMPTY_PAYLOAD one. Of course it would still need to modify the parser in the same way the WebSocket implementation works.
Also added some hardening for the Content-Length header being "0" or some other weird value.

Please add a test

tests added


Native printing on Windows

Hello!  Awesome library I've stumbled across.  Wish it was more well known.
I'm looking to allow a user to perform native printing from a Web-Client.    Currently the web-application generates a PDF of the delivery docket, which the customer then opens in a separate browser tab, hits Ctrl+P to open the browser print dialog, then selects the Print button in browser print dialog.  Not efficient for the user.
Ideally we want to speed this up for the customer so we're thinking of wrapping our SPA web-client in a Native windows application using Photino.NET.  Then when the user wants to print the delivery docket:

The user selects the print button in the SPA web-client.
The web-client then sends a command to the native-app using window.external.sendMessage(`{ "command": "print", "url": "http://../doc.pdf" }\`)
The native-app receives the command using a delegate, then
Downloads the PDF at the provided url, saves it to a temporary location.
The native-app prompts the user for the Printer using the WinForms PrintDialog dialog.
Then, uses a third-party library to send the PDF to the selected printer.

I've put together a test project to at https://github.com/nicholas-brooks/photino-dummy-print to demonstrate the part of prompting the user for the printer using PrintDialog
Do you see any issues in doing so?  I understand this ties the native-app to Windows, but for our scenario that is fine for now.
Note: I am not a WinForms expert at all so I'm probably missing lots of obvious issues here.  I've done extensive Win32 coding via Delphi in the past, but most of my recent work is backend dotnet services and spa web-clients.

An update on this:
We replaced the use of the PrintDialog with the following:

Capture the list of printers using System.Drawing.Printing.PrinterSettings.InstalledPrinters and send that to our SPA web-client (sent ahead of time)
The user is then prompted within our SPA web-client to print where they can select the printer from the list already received from the native-app.
The SPA web-client then issues a 'print' command using window.external.sendMessage(`{ "command": "print", "url": "http://../doc.pdf", "printer": "Epson Printer" }`)
The native-app then downloads the PDF and sends it to the selected printer.

We did this so we can now remember the selected printer for the particular document type the user prints.


extras.fixIP is broken with newer version of nodejs

req.socket.remoteAddress is protected and can't be overwritten.
i ditched extras.fixIP for the time beeing and doing something like this right now:

  var logger = express.logger({ format: '":date" :remote-addr :method :url HTTP/:http-version :status :referrer :res[Content-Length] :response-time ":user-agent"' });

  var loggerForwarded = express.logger({ format: '":date" :req[X-Forwarded-For] :method :url HTTP/:http-version :status :referrer :res[Content-Length] :response-time ":user-agent"' });

  app.use(function(req, res, next){
    if(req.headers['x-forwarded-for']) {
      return loggerForwarded(req, res, next);
      next();
    } else {
      return logger(req, res, next);
      next();
    }
  });

Fixed with this commit e535d02d4d9da5bc160597ee453050296b051f2b, but npm won't let me publish it at the moment.. I'll get it pushed once @isaacs get's this taken care of.

cool, that was lightning fast! ;-)


Segfault due to garbage collection

Noticed some segmentation faults in production, narrowed the issue to selma gem. Seems to happen very rarely until turning on GC.stress = true which causes it to always segfault.
I managed to create a failing test here https://github.com/gjtorikian/selma/pull/80
I'll try a workaround of using GC.disable around the call to the gem, that seems to avoid the segfault locally.

Can you share more about how you’re specifically using Selma (how are you initializing it, what do your selectors look like), or any of the failing text ?

Did the test not fail for you? I thought that would be enough sorry, we're using it basically like the test is written. I can't share the specific failing text we ran into in prod. We first thought it was the size of the text being processed, or something specific to the text, but once I turned on GC.stress = true before the Selma::Rewriter.new(...).rewrite(html) it would segfault on all text.


More clarification on how colors are handled seemingly needed for both creative designers

About this PR
Similar to issue #7, there seems to be more information developers, designers, & stakeholders  may want to have to be equipped to consistently adhere to this styleguide on how they use color.
Tasks
Here a

[ ] To what extent can a team member mutate the existing colors (to what extent can they tint/shade)
[ ] What are recommended color pairings; WCAG AAA compliancy vs WCAG AA compliancy.
[ ] How can teammates analyze whether a particular, unique color  or color combination is responsible to use; what tools you recommend teammates to use to do that in a meaningful, & justifiable way (i.e. colorsafe.co) ?
[ ] Are are tools to continuously audit these colors being adhered to at the company?
[ ] Why RGB or RGBA has historically been a great fit for what Clef has aimed to accomplish to be necessary to only use (compared to HSLA & etc).

Similar to this issue, is there a guideline for how certain UI elements should be used? Only rounded buttons? When does one use a modal? What components make up a product page?


German Version

May you Code a german Version into the bot? I'd be happy to translate everything.

Yes, just translate all the messages on enUS.py


update wording to include Outlook

Some new features were recently rolled out that allow text that was converted to a link to be protected.   This impacts Outlook as well as the other office products but it is not mentioned in this section:
Office 365 ProPlus, Office for iOS and Android
When this option is selected, ATP Safe Links protection is applied to URLs in Word, Excel, and PowerPoint files on Windows or Mac OS, Office documents on iOS, or Android devices, Visio 2016 on Windows, and the web versions of Office apps (Word, PowerPoint, Excel, and OneNote), provided the user has signed into Office 365.
Can we add Outlook to the two references above that have the list of products.

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

ID: 1541da6f-af9a-05d5-fa34-b1a5df61424f
Version Independent ID: 88e111ed-67f7-41bc-d823-863ee7ea2a2e
Content: Set up Office 365 ATP Safe Links policies
Content Source: microsoft-365/security/office-365-security/set-up-atp-safe-links-policies.md
Service: o365-seccomp
GitHub Login: @MSFTTracyP
Microsoft Alias: tracyp

@scottsa-msft -  Thank you for submitting feedback.
From our understanding, the issue has been resolved based on this merged commit https://github.com/MicrosoftDocs/microsoft-365-docs/commit/af9999707f033e0c54657fdc4c0f7386e6de881d.
Thank you for your contribution to make the docs better! Much appreciated!


[CLI] Allow to customize output sample rate

This is a feature request for the cli interface.
Can you add a parameter to allow to customize the output sample-rate when using the cli?
Thank you in advance.

Thanks for the suggestion, this definitely makes sense to add. I'm not sure exactly when I'll find time to implement this, but in the meantime you can try using something like sox to do the sample rate conversion afterwards.

I was planning to use the dasp crate to do this (and also a bunch of cleanup at the same time), but it turns out that they don't yet support choosing the number of channels at runtime... I'm going to try to get that fixed, but this will be blocked in the meantime.

Just in case you missed this one https://crates.io/crates/rubato/0.8.1


Add float, int, and boolean literal obfuscation.

Add ast helper functions to reduce ast footprint.

We can reduce complexity considerably if we import the math and binary packages in the generated code.

Oh, right, standard library imports. Hm. I assume you already copied their unsafe implementations, so I don't have further comments there.
Isn't the unsafe import a problem, by the way?

@mvdan no its not because it is imported in the runtime package.

That math comment of mine is pointless, but the others are still valid, I think :)

I should probably add a test function similar to binsubstr which can search for numbers in the binary.

@mvdan
It's a little off topic. Can we write all the obfuscation code which depends on external libraries (for example - unsafe) into a separate file in the same package and exclude it from obfuscation?

@pagran we could, but could you elaborate why?

less code to process with the obfuscator (a little bit)
less likely to appear side effects when adding (changing) imports to original files

Would that potentially solve the problem that adding crypto/aes 'too late' created?

If I understand the reasons for the error correctly, yes, it should help.

I don't think a separate file would help with dependencies in any way. The dependencies are at the package level, so splitting the code/imports into more files doesn't change anything.
There is no problem with the unsafe import here because, as @lu4p correctly pointed out, the unsafe package is always built with garble - that's because it's used by runtime, which is always implicitly depended upon.


keepalived.conf sample configuration

Could you please include in the README.md a sample keepalived.conf file with the minimal configuration needed for keepalived to work in 2 Hetzner servers ?

global_defs {
notification_email {
<EMAIL_ADDRESS>}
notification_email_from<EMAIL_ADDRESS>smtp_server <IP_ADDRESS>
smtp_connect_timeout 30
router_id server1.domain.com
}
vrrp_instance hv {
state BACKUP
priority 100
unicast_src_ip <IP_ADDRESS>
unicast_peer {
<IP_ADDRESS>
}
interface eth0
track_interface {
eth0
}
garp_master_delay 5
virtual_router_id 10
advert_int 1
authentication {
auth_type PASS
auth_pass password-goes-here
}
virtual_ipaddress {
<IP_ADDRESS>/24 dev br0
<IP_ADDRESS>/29 dev eth0
<IP_ADDRESS>/29 dev eth0
}
virtual_routes {
<IP_ADDRESS>.17/32 via <IP_ADDRESS> dev br0
# OTHER ROUTES HERE
}
track_script {
}
notify_master "/usr/local/sbin/keepalived-hetzner.py"
notify "/usr/local/sbin/keepalived-notify.sh"
smtp_alert

}

keepalived-notify.sh script:

#!/bin/bash
The script saves keepalived instance state to the file

mkdir -m 0700 -p /var/run/keepalived
rm -f /var/run/keepalived/*.state
echo $1 $2 is in $3 state > /var/run/keepalived/$2.state```

Added to the repo. Also new version of the script is here ;)


njit with parallel=True causes fatal Python error and aborted

Reporting a bug
import time
import unittest
import pandas as pd
import numpy as np
from numba import njit, prange, typed

num_columns, num_rows, num_borders = 50, 100_000, 20
target_col = 'col0'

features = [f'col{i}' for i in range(num_columns)]
input_df = pd.DataFrame(np.random.rand(num_rows, num_columns), columns=features)
borders = tuple([x/100 for x in range(0, 100, 3)][:num_borders])

# ndarray_2d: N * M, ndarray_1d: N
def _compute(ndarray_2d, ndarray_1d, numba_list):
    for i in prange(len(borders)):
        filtered = (ndarray_2d >= borders[i]).astype(np.int_) # filtered: N * M
        filtered_1d = filtered.sum(axis=0).astype(np.float_) # filtered_1d: M
        another_filtered_1d = (filtered.transpose() * ndarray_1d).sum(axis=1) # another_filtered_1d: M
        for item in zip(filtered_1d, another_filtered_1d):
            numba_list.extend(item)

class MyTestCase(unittest.TestCase):
    @staticmethod
    def test_something():
        numba_list = typed.List()
        numba_list.append(0.1)
        ndarray_2d = input_df.to_numpy()
        ndarray_1d = input_df[target_col].to_numpy()

        njit_parallel_func = njit(parallel=True)(_compute)
        # njit_parallel_func(ndarray_2d, ndarray_1d, numba_list)

        python_func = _compute
        numba_list = []
        start_time = time.time()
        python_func(ndarray_2d, ndarray_1d, numba_list)
        print(f'python time = {time.time() - start_time}s')

        njit_func = njit(_compute)
        for _ in range(5):
            numba_list = typed.List()
            numba_list.append(0.1)
            middle_time = time.time()
            njit_func(ndarray_2d, ndarray_1d, numba_list)
            print(f'njit time = {time.time() - middle_time}s')

if __name__ == '__main__':
    unittest.main()

In this test code:

if uncomment njit_parallel_func(ndarray_2d, ndarray_1d, numba_list), python process will be killed by sth bad happend in numba internal.

test_parallel.py::MyTestCase::test_something Fatal Python error: Aborted

Thread 0x000000011094f600 (most recent call first):
  File "/Users/.../debug-numba/test_parallel.py", line 36 in test_something
  File "/usr/local/anaconda3/lib/python3.8/unittest/case.py", line 633 in _callTestMethod
  File
Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

I think this is a bug with parallel=True

Besides, the function _compute() run much slower than pure python, I couldn't figure it out where I don't write well for numba compilation.

python time = 0.7888021469116211s
njit time = 8.057817935943604s
njit time = 4.105954885482788s
njit time = 4.527366876602173s
njit time = 4.559357166290283s
njit time = 4.574266672134399s

I haven't check out whether the final numba_lists are equal.

Mac & conda env: Python 3.8.8 & numba  0.54.0 & numpy 1.19.5

Thanks for the report. I suspect this is due to mutating a list in a parallel region, which is not supported as such containers are not threadsafe. xref docs: https://numba.readthedocs.io/en/stable/user/parallel.html#unsupported-operations.

if uncomment njit_parallel_func(ndarray_2d, ndarray_1d, numba_list), python process will be killed by sth bad happend in numba internal.

Pretty sure it is problem due to mutating list in parallel region as noted by @stuartarchibald. This issue is tracking at https://github.com/numba/numba/issues/2408

Besides, the function _compute() run much slower than pure python, I couldn't figure it out where I don't write well for numba compilation.

Problem seems to come from:
another_filtered_1d = (filtered.transpose() * ndarray_1d).sum(axis=1)

filtered and ndarray_1d end up being strided by 400 bytes. The numba implementation is generating a loop that operates on such layout and is very inefficient.
I believe nowadays numpy would do a better job here with chunking. Something that Numba needs to starting doing to stay competitive on strided arrays.

Did https://github.com/numba/numba/pull/7622 fix this issue?

close it for now.


Make README accessible

Add accessibility features to README file based on the top tips from GitHub: https://github.blog/2023-10-26-5-tips-for-making-your-github-profile-page-accessible/

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Add accessibility features to README file based on the top tips from GitHub: https://github.blog/2023-10-26-5-tips-for-making-your-github-profile-page-accessible/

Why was this change needed? (You can also link to an open issue here)

The README on your GitHub profile acts like a front door to your work, skills, and professional self, so it’s important that everyone who visits your profile can read and understand it.

Thank you so much for making this page more accessible but looks like we also remove a lot of content on the readme, can we leave the other content in please.

I haven't removed any content @dartpain, everything should be exactly the same; just added accessibility; nothing should actually look any different unless we dug into the code behind it. So at face value it should look the same 😉

Oh I see what's happened... that's on my end... let me fix 😄

@dartpain all fixed and ready to go :smile: :heart:

Thank you so much!
@holopin-bot @mishmanners


Failed to build backend due to error: Cannot find module 'knex/lib/dialects/postgres/schema/pg-tablecompiler'

The yarn setup-db command failed at the build stage due to the following error:
Error: Cannot find module 'knex/lib/dialects/postgres/schema/pg-tablecompiler'

I checked the node_modules\knex\lib\dialects folder didn't see the postgres folder however there is pgnative though

Below is the vesion info

I tried clean install few times but still facing the same issue...has anyone encountered this issue? if so how do you solve it?
Thanks!

This error is gone now after I upgrade the yarn to v4


Add async interface for the chain

Hey @eyurtsev,
If no one is working on this, may I take this up?
Cheers,
Sachin


Update create-api-token.md

Update: Update screenshot. File to be added to _media

I cannot upload updated screenshots to the _media folder, hence closing this PR. IGNORE.


Add pipeline to build our own concourse-rclone-resource

Build our own Docker image for concourse-rclone-resource so that we can use our own fork of the project, which removes a hardcoded argument to 'rclone' that we do not want.

:+1:


Add various unit tests for pipes

Please fix any broken tests and try to keep up to our quality standards

Chakir,
there are two issues in CompareStringPipeTest.java that can be simply solved: both unused imports. see [https://app.codacy.com/app/nielsm5/iaf/pullRequest?prid=2713373]
Apart from that, I see that in Base64PipeTest.java, you removed tests noDirection(), wrongInputEncoding() and wrongOutputEncoding()
Why is that? Are those test not necessary anymore?
I would suggest to re-include those tests, and to extend them with a check for meaningful phrase in the exception message
Gerrit


Math support in Object Inspector/Sphinx

From<EMAIL_ADDRESS>on 2011-06-28T01:27:56Z
Math is supported in sphinx ( http://sphinx.pocoo.org/ext/math.html?highlight=math#math ) but not in the object inspector. See this tread http://groups.google.com/group/spyderlib/browse_frm/thread/67647e4f4be67dc0/caf4fcbbe6b4f066?show_docid=caf4fcbbe6b4f066 .
This would be a great enhancement to a scientific IDE.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=698

From ccordoba12 on 2011-10-29T05:57:11Z
I'll see what I can do about it after 2.1 is released.
Labels: Cat-ObjectInspector

From ccordoba12 on 2011-10-29T06:17:59Z
Labels: -Type-Defect Type-Enhancement

From ccordoba12 on 2012-03-06T08:49:48Z
This issue was updated by revision f952d62eee3c .
Status: Fixed

From ccordoba12 on 2012-02-22T14:38:40Z
I have a working version of this one. For sure will be in 2.2.
Labels: Milestone-Release2.2


Array of Enum values

I have a jsonArrayMember that looks like the following:
@jsonObject
export class Item {
...
  @jsonArrayMember(String)
  gemSockets: GemSocketColor[] = [];
...
}
export enum GemSocketColor {
  yellow = 'yellow',
  blue = 'blue',
  red = 'red',
  green = 'green',
}

and then later on in the program
    const json = this.serializer.stringify(this.item)` //works and gives me the JSON representation

    this.serializer.parse(json) || new Item(); // throws TypeError: Could not deserialize gemSockets as Array: incorrect TypeDescriptor detected, please use proper annotation or function for this type

NOTE: I have to have the || new Item() on the end otherwise Typescript throws a fit saying that "Item | Undefined cannot be assigned to type Item"

What happens if you swap the order, i.e. move GemSocketColor before Item?

Hi @westlakem, there is one more thing to check. Are you by any chance running in typescript strict null checking mode? If so, you may want to try the latest rc version - 1.7.0-rc3 where we have a fix for that.
btw. if you are sure that TypedJSON will be able to deserialise your object you can just use a non null assertion by adding a ! just after the parse like this:
 this.serializer.parse(json)!;

@JohnWeisz @Neos3452 Neither of those solutions worked.
I ended up switching to use the typescript-json-serializer package that worked right out of the box.

Sorry to hear that. It would be really awesome if you could provide more info on your case as your code works for me in both normal and strict mode. Below prints {"gemSockets":["blue","green"]}, and Item { gemSockets: [ 'blue', 'green' ] } which is expected.
        @jsonObject
        class Item {
            @jsonArrayMember(String)
            gemSockets: Array<GemSocketColor> = [];
        }
        enum GemSocketColor {
            yellow = 'yellow',
            blue = 'blue',
            red = 'red',
            green = 'green',
        }
        const item = new Item();
        item.gemSockets = [GemSocketColor.blue, GemSocketColor.green];
        const json = TypedJSON.stringify(item, Item);
        console.log(json);
        const parsed = TypedJSON.parse(json, Item);
        console.log(parsed);


[patch.crates-io] is not working ?

minimal reproduced: https://github.com/sksat/cargo-workspace-deps-overwrite-not-working-repro

If deps version does not published (kble-socket 0.3.0), it works: #66


Enable docker feature for SPA templates

Currently when you create a new Angular/React project, the Enable Docker support option is disabled because the template config doesn't declare support for that.
We should implement support for this. AFAIK it should be able to work the same way as other ASP.NET templates.

I've been having a great deal of trouble getting docker to work with the version of the ANgular SPA package that uses angular 4.2.5. I would love for this to just work.

@zippy1981 I've made some docker images that works well with angular SPA that uses angular@6, hope this can help you: https://hub.docker.com/r/zeekozhu/aspnetcore-build-yarn/tags/

Hopefully @ZeekoZhu's suggestion above will give us clues about a good starting point for implementing this.
Having discussed wth Eilon, it's not yet decided whether this really goes in 2.2 Preview 1 or who would be doing the implementation work on it. So I'm going to unassign myself and hereby ping @mkArtakMSFT for this to be triaged. Also CC @danroth27 @DamianEdwards in case they have a view on the importance or not of this work item.

Also CC @danroth27 @DamianEdwards in case they have a view on the importance or not of this work item.

We chatted about this and agreed this should be done for 2.2.

Talked to @danroth27 offline regarding this and we're moving this out to a future release as we have not enough resources to handle this in the current milestone.

Is the work here just to add this line to the spa templates, or is there more to this that I'm just not seeing?

@glennc @lisaguthrie Can you guys provide some guidance on the work needed here?

A reminder that I still need some clarification and guidance from @glennc and/or @lisaguthrie.

More work required than just updating the template to support Docker. I ran a quick test creating an Angular project and then adding Docker support post-create (which is possible) and F5 failed. I'm guessing the Dockerfile needs to be updated to be Angular/React-aware and ensure all the right bits end up in the Docker image, but someone would need to look into this further to confirm.

I'm guessing the Dockerfile needs to be updated to be Angular/React-aware

Which Dockerfile? As far as I can tell there are no Dockerfiles in the aspnet/Templating repo, even for projects which claim support. Is the work then to create DockerFiles for ALL the templates in this repo? If so @danroth27 and I need to have some discussions about what the goals of this work are, because it's likely much larger than what we thought.

@glennc it's unclear what the requirements are on this issue.
CC @mkArtakMSFT.


Use fields defined in required to enforce nullability

+1

Sounds good, we'll prioritize this for 1.1

PR here:
https://github.com/pinterest/plank/pull/64

Merged


The description for arguments not showing

Hi, I have added a description for argument. But, It will not show in graphiql.I can find the description in http response:

But it will not show in doc.

i started experimenting with this, very easy to add programatically, but I'm not sure how or where it should render. Do you have any suggestions as to how it should look?

this is what it looks like without any styling :/

@acao I'd like to work on this. Can you help me get started?

sure! offhand I believe the file is packages/graphiql/src/components/DocExplorer/Arguments.tsx
probably best to re-use or create a new css class to style this description item as well

We resolved this bug last year - enjoy!
While you're here, we also now have field argument deprecation 😍
Thanks for reporting this!


Prevent keydown events when index is not set

The Problem
I have implemented vue-gallery-slideshow in one of my projects, but I have encountered a bug which causes the slideshow to open on key events. (RIGHT_ARROW and LEFT_ARROW) This should not happen when the gallery is closed.
Desired behaviour
The keydown event methods should only execute if the slideshow is currently opened.
Solution
I have added a null check for the index in the onPrev and onNext methods. I have also written two tests:

test if keyboard events are being ignored if slideshow is not opened
test if keyboard events do work if slideshow is opened

Wow, thanks for finding and fixing the bug! Also with testing👌I will merge this PR now. Cheers 🍻

I will release an updated hotfix version soonish


Checkmate - Erasure

blocked due to https://github.com/ethyca/fidesops/issues/1188#issuecomment-1279319769


Stream responds very slow if there hasn't been new data for a long time

Hello,
I am currently using ESP8266 to switch a light whenever I update a value in my firebase realtime databse. For that, I use stream, so that the ESP8266 reacts only when there's new data available. This works almost instantly BUT when I haven't updated the data for a day or so, it take's about 30 seconds to react to data changes and then returns to normal behaviour. Any ideas why?
This is the code:
void loop() {
  if ( (long)( millis() - lWaitMillis ) >= 0) {
    if (WiFi.status() == WL_CONNECTED) {
      int firebaseResult = firebaseGet(PATH_LAMP).toInt();
      if (firebaseResult != stateint) {
        if (firebaseResult == 1) {
          turnOn();
        }
        else if (firebaseResult == 0) {
          turnOff();
        }
      }
    }
    else {
      Serial.println("No Wifi");
    }
    yield();
  }
  else {
    yield();
    delay(1);
  }

}
void turnOn() {
  digitalWrite(LAMPPIN, HIGH);
  Serial.println("ON");
  stateint = 1;
}
void turnOff() {
  digitalWrite(LAMPPIN, LOW);
  Serial.println("OFF");
  stateint = 0;
}
String firebaseGet(String s) {
  if (!Firebase.readStream(firebaseData))
  {
    Serial.println("------------------------------------");
    Serial.println("Can't read stream data...");
    Serial.println("REASON: " + firebaseData.errorReason());
    Serial.println("------------------------------------");
    Serial.println();
  }
  if (firebaseData.streamTimeout())
  {
    Serial.println("Stream timeout, resume streaming...");
    Serial.println();
  }
  if (firebaseData.streamAvailable())
  {
    Serial.println("Stream Data available...");
    Serial.println("STREAM PATH: " + firebaseData.streamPath());
    Serial.println("EVENT PATH: " + firebaseData.dataPath());
    Serial.println("DATA TYPE: " + firebaseData.dataType());
    Serial.println("EVENT TYPE: " + firebaseData.eventType());
    if (firebaseData.dataType() == "string") {
      returnDataTemp = firebaseData.stringData();
      if (returnDataTemp == "1" || returnDataTemp == "0") {
        returnData = returnDataTemp;
        lWaitMillis = millis() + 500;
      }
    }
    Serial.println("------------------------------------");
    Serial.println();
  }
  yield();

  return (returnData);
}

And these commands are in setup:
  Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
  Firebase.reconnectWiFi(true);
  Serial.println("Debug");
  delay(1000);
  if (Firebase.setString(firebaseData, PATH_LAMP, "1"))
  {
    Serial.println("PASSED");
  }
  else {
    Serial.println("FAILED");
    Serial.println("REASON: " + firebaseData.errorReason());
    Serial.println("------------------------------------");
    Serial.println();
  }
  stateint = state.toInt();
  lWaitMillis = millis() + 500;  // initial setup
  while (!Firebase.beginStream(firebaseData, PATH_LAMP))
  {
    Serial.println("------------------------------------");
    Serial.println("Can't begin stream connection...");
    Serial.println("REASON: " + firebaseData.errorReason());
    Serial.println("------------------------------------");
    Serial.println();
  }
  Firebase.setReadTimeout(firebaseData, 300);

Regards, MajorLennox

As long as Firebase.readStream and Firebase.streamDataAvailable are stayed in loop without blocking code, your stream will be responsed immediately unless stream timeout was occurred or your internet connection status and traffic (even WiFi was connected).
For better performance, readStream should run repeatedly as fast as possible, place inside millis or condition statement is not recommend.

When does stream timeout trigger and for how long will it time out? WiFi connection was established, and internet connection aswell (at least with my phone, which uses the same).
Should readStream also run as fast as possible when there's no WiFi Connection?

When the device connected to Firebase in stream mode, server and client are open the connection for each other and server will send keep-alive message to client periodically (sometimes within 30 seconds or more) which depends on server operation and server-clent connection status. The library use this message to determine the timeout status, if there are absent of this message for 30 seconds, set the timeout status and begin to re-connect the stream again. The time used for begin the new stream connection is the same as other Firebase calls.
Every Firebase calls and stream read, WiFi connection was checkef and try to re-connect if WiFi disconnected without blocking operation or without waiting or delay and set the status and exit from that function immediately.
WiFi radio interference from other device with the same channel, your router or hotspot hang or other factors can happen.
For your case, you may need to check your internet connection periodically to prove the internet availability with ping.
The ping function is available or use library.
The readStream function is for data polling. If you delay or periodically run it with millis or delay then you will not get the data in real time.
You device will not sleep without set it to sleep.

I see, thanks for explaining this to me. But if it's a problem related to internet, then why does the issue only come up if I haven't updated any data for a long time?

I don't know all your situation but from the client side, its operation is straight forward.  You may need to debug the WiFi operation from IDE to see what happens.
WiFi may unreliable when the board voltage are not stable, low memory or some blocking operation.

Hm. I can't really narrow it down, but it happens only when I wasn't home for a couple of hours. I come back home, change the Firebase Data via an Android App -> nothing happens til a  minute or so has passed, then the ESP8266 recieves all changes and executes all of them. Could it be that the WiFi connection gets set to sleep since there hasn't been any new data for a while and waking it up takes a bit of time? If it was a connection issue, this problem would also occur when I use the esp8266 regularly, however the issue only occures when there hasn't been any new data for a long time.

Let try to remove yield() from your code.

I've changed the code as follows, but the issue is still present:
/*#### Changelog ####
TO-DO:
(- add status indicator LED in case)
v1.4: ..................to be tested

removed wifi connection check as well as 500ms timer

add feedback to indicate success of operation
v1.3: ..................working

back to esp8266
v1.2:
switched from constantly asking for new values to EventListener
v1.1:
added 500ms delay for requests (lWaitMillis)
v1.0:
switched to FirebaseArduino https://github.com/FirebaseExtended/firebase-arduino, hoping to prevent random restarts from happening
v0.1:
added yield() after read to prevent watchdog from triggering due to delays in reading
*/

void setup() {

  WiFi.persistent(false);
  Serial.begin(115200);

  Serial.println(WiFi.macAddress());
  pinMode(WIFI_LED, OUTPUT);
  IPAddress ip(192, 168, 0, 250);
  IPAddress gateway(192, 168, 0, 1);
  IPAddress subnet(255, 255, 255, 0);
  IPAddress dns(8, 8, 4, 4);
  // WiFi.config(ip, gateway, subnet);
  wifi_set_macaddr(0, const_cast<uint8*>(mac));
  Serial.println(WiFi.macAddress());

  WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
  while (WiFi.status() != WL_CONNECTED) {
    delay(100);
    digitalWrite(WIFI_LED, LOW);
    delay(100);
    digitalWrite(WIFI_LED, HIGH);
    Serial.print(".");
  }
  Serial.println("");
  Serial.println("WiFi connected");
  digitalWrite(WIFI_LED, HIGH);
  Serial.println("IP address: ");
  Serial.println(WiFi.localIP());
  Serial.println("Gateway address: ");
  Serial.println(WiFi.gatewayIP().toString());
  Serial.print("AP subnet mask: ");
  Serial.println(WiFi.subnetMask());

  delay(1000);
  Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
  Firebase.reconnectWiFi(true);
  Serial.println("Debug");
  delay(1000);
  if (Firebase.setString(firebaseData, PATH_LAMP, "1"))
  {
    Serial.println("PASSED");
  }
  else {
    Serial.println("FAILED");
    Serial.println("REASON: " + firebaseData.errorReason());
    Serial.println("------------------------------------");
    Serial.println();
  }
  stateint = state.toInt();  // initial setup
  while (!Firebase.beginStream(firebaseData, PATH_LAMP))
  {
    Serial.println("------------------------------------");
    Serial.println("Can't begin stream connection...");
    Serial.println("REASON: " + firebaseData.errorReason());
    Serial.println("------------------------------------");
    Serial.println();
  }
  Firebase.setReadTimeout(firebaseData, 300);

}

void loop() {
  int firebaseResult = firebaseGet(PATH_LAMP).toInt();
  if (firebaseResult != stateint) {
    if (firebaseResult == 1) {
      turnOn();
    }
    else if (firebaseResult == 0) {
      turnOff();
    }
  }

}
void turnOn() {
  digitalWrite(LAMPPIN, HIGH);
  Serial.println("ON");
  stateint = 1;
}
void turnOff() {
  digitalWrite(LAMPPIN, LOW);
  Serial.println("OFF");
  stateint = 0;
}
String firebaseGet(String s) {
  if (!Firebase.readStream(firebaseData))
  {
    Serial.println("------------------------------------");
    Serial.println("Can't read stream data...");
    Serial.println("REASON: " + firebaseData.errorReason());
    Serial.println("------------------------------------");
    Serial.println();
  }
  if (firebaseData.streamTimeout())
  {
    Serial.println("Stream timeout, resume streaming...");
    Serial.println();
  }
  if (firebaseData.streamAvailable())
  {
    Serial.println("Stream Data available...");
    Serial.println("STREAM PATH: " + firebaseData.streamPath());
    Serial.println("EVENT PATH: " + firebaseData.dataPath());
    Serial.println("DATA TYPE: " + firebaseData.dataType());
    Serial.println("EVENT TYPE: " + firebaseData.eventType());
    if (firebaseData.dataType() == "string") {
      returnDataTemp = firebaseData.stringData();
      if (returnDataTemp == "1" || returnDataTemp == "0") {
        returnData = returnDataTemp;
        Firebase.setString(firebaseData2, PATH_CHECK, "check");
      }
    }
    Serial.println("------------------------------------");
    Serial.println();
  }
  return (returnData);
}

You show me some of incompleted code.
You should debug the WiFi and check what's going on with your WiFi.
https://arduino-esp8266.readthedocs.io/en/latest/Troubleshooting/debugging.html
Your issue is not related to the library but your network then I will close this issue.

Hi...folks... I had also same problem that sometimes the esp8266 wont trigger when firebase updated... So i tired of many things like removing extra blocks which not required making it so faster iteration. but nothing works. Finally i got with these just by adding a delay of 10 milliseconds at bottom of the code...
Now it's totally reliable .. i had given 100 triggers and kept at closed small room where network is very too low.. and perfect i got all triggers. Thanks for the developer.. Here is my code below.
void setup()
{
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN,HIGH);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to Wi-Fi");
while (WiFi.status() != WL_CONNECTED)
{
Serial.print(".");
delay(300);
}
Serial.println();
Serial.print("Connected with IP: ");
Serial.println(WiFi.localIP());
Serial.println();
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
Firebase.reconnectWiFi(true);
if (!Firebase.beginStream(firebaseData, path))
{
Serial.println("------------------------------------");
Serial.println("Can't begin stream connection...");
Serial.println("REASON: " + firebaseData.errorReason());
Serial.println("------------------------------------");
Serial.println();
}
}
void loop(){
if (!Firebase.readStream(firebaseData)){
Serial.println("------------------------------------");
Serial.println("Can't read stream data...");
Serial.println("REASON: " + firebaseData.errorReason());
Serial.println("------------------------------------");
Serial.println();
}
if (firebaseData.streamTimeout()){
Serial.println("Stream timeout, resume streaming...");
Serial.println();
}
if (firebaseData.streamAvailable()){
if((firebaseData.dataType()).equals("boolean")){
if(firebaseData.boolData()){
Serial.println("yes");
digitalWrite(LED_BUILTIN,LOW);
}else{
Serial.println("no");
digitalWrite(LED_BUILTIN,HIGH);
}}}
delay(10);
}

@prakash50160 It's not because of just using the small delay you use.
You should update the library and esp8266 core sdk to the latest.
You should check the internet connectivity from ISP to your device,  radio interference, stability of your power supply.

Dear friends, I have also a speed problem when reading int values from Firebase.
This is what I want to do:
I have created an app with MIT AppInventor in order to control 2 electric doors via my smart phone. The app has 11 buttons (including 4 buttons for test purposes (see below ***** debug mode *****)):

There is (also for test purposes) a counter which runs at the ESP8266. It is increased every progam cycle and is displayed in the app ("from ESP8266: 56") to check the data transfer from the ESP8266 to the app (it works, but also very slow).
To get the state of the buttons from the app to the ESP8266, I first store them in Firebase and then read them from the ESP8266. When a button is pressed, an int value is set to 1 until the button is released.
My problem is that it takes several seconds until the data are available at the ESP8266. Each time a button is pessesd in the app, the int LED at the ESP8266 is activated. The connection from the app to Firebase is not the issue, the values change without any recognizable delay when I press any button in the app.
One additional information: at the beginning I used only 2 buttons (and the counter) and it reacted much faster, but also with a recognizable delay (approx. 500ms).
Here is the code on the ESP8266:

 /**********************************************************
  * author:       Hubert Unterberger                       *
  * created:      05.01.2023                               *
  * last update:  07.01.2023                               *
  * board:        Lolin(Wemos) D1 R2 & mini                *
  * ------------------------------------------------------ *
  * ESP8266 board 2.7.x, --> NOT newer                     *
  * library: ArduinoJson version 5.13.5, --> NOT newer     *
  **********************************************************/

#include <FirebaseESP8266.h>
#include  <ESP8266WiFi.h>
#include "credentials.h"

#define WIFI_SSID SECRET_SSID               // WIFI SSID
#define WIFI_PASS SECRET_PASS               // WIFI password

#define FIREBASE_HOST SECRET_FIREBASE_HOST  // Firebase Host adress
#define FIREBASE_AUTH SECRET_FIREBASE_AUTH  // Firebase Authorization key

#define intLED 2                            // Pin of internal LED

FirebaseData firebaseData;
FirebaseJson json;

unsigned long cycleTimer;
unsigned long cycleTime = 5;
unsigned int counter = 0;

int app_alle_UP, app_alle_DOWN;
int app_garage_UP, app_garage_DOWN;
int app_gartentor_UP, app_gartentor_DOWN;
int app_stopp;

// ---------------------------------------------------- only for debug mode
int app_garage_bewegt_auf, app_garage_bewegt_zu;
int app_gartentor_bewegt_auf, app_gartentor_bewegt_zu;
// ---------------------------------------------------- only for debug mode

void setup() {
  Serial.begin(115200);
  WiFi.begin (WIFI_SSID, WIFI_PASS);
  Serial.print("Connecting...");

  while (WiFi.status() != WL_CONNECTED)
  {
    Serial.print(".");
    delay(300);
  }

  pinMode(intLED, OUTPUT);
  Serial.println();
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP());
  Serial.println();
  delay(500);
  Firebase.begin(FIREBASE_HOST,FIREBASE_AUTH);
}

void loop() {
  cycleTimer = millis();
  counter++;
  if (counter > 100) counter = 1;
  Firebase.setInt(firebaseData, "esp8266/random", counter);

  if (Firebase.RTDB.getInt(&firebaseData, "alle_UP/command")) app_alle_UP = firebaseData.intData();
  if (Firebase.RTDB.getInt(&firebaseData, "alle_DOWN/command")) app_alle_DOWN = firebaseData.intData();
  if (Firebase.RTDB.getInt(&firebaseData, "garage_UP/command")) app_garage_UP = firebaseData.intData();
  if (Firebase.RTDB.getInt(&firebaseData, "garage_DOWN/command")) app_garage_DOWN = firebaseData.intData();
  if (Firebase.RTDB.getInt(&firebaseData, "gartentor_UP/command")) app_gartentor_UP = firebaseData.intData();
  if (Firebase.RTDB.getInt(&firebaseData, "gartentor_DOWN/command")) app_gartentor_DOWN = firebaseData.intData();
  if (Firebase.RTDB.getInt(&firebaseData, "stopp/command")) app_stopp = firebaseData.intData();

// ---------------------------------------------------- only for debug mode
  if (Firebase.RTDB.getInt(&firebaseData, "garage_bewegt_auf/command")) app_garage_bewegt_auf = firebaseData.intData();
  if (Firebase.RTDB.getInt(&firebaseData, "garage_bewegt_zu/command")) app_garage_bewegt_zu = firebaseData.intData();
  if (Firebase.RTDB.getInt(&firebaseData, "gartentor_bewegt_auf/command")) app_gartentor_bewegt_auf = firebaseData.intData();
  if (Firebase.RTDB.getInt(&firebaseData, "gartentor_bewegt_zu/command")) app_gartentor_bewegt_zu = firebaseData.intData();
// ---------------------------------------------------- only for debug mode

// int LED on ESP8266 on, when a button is pressed in the App
  if (app_alle_UP == 1 || app_alle_DOWN == 1 || app_garage_UP == 1 || app_garage_DOWN == 1 || app_gartentor_UP == 1 || app_gartentor_DOWN == 1 || app_stopp == 1 || app_gartentor_bewegt_auf == 1 || app_gartentor_bewegt_zu == 1 || app_garage_bewegt_auf == 1 || app_garage_bewegt_zu == 1){
    digitalWrite(intLED, LOW);
  }
  else {
    digitalWrite(intLED, HIGH);
  }

// print the actual state of the buttons in the app and (only for test purposes) a counter value which is sent from the ESP8266 to the app
  Serial.println(counter);
  Serial.print(app_garage_UP); Serial.print(app_gartentor_UP); Serial.println(app_alle_UP);
  Serial.print(app_garage_DOWN); Serial.print(app_gartentor_DOWN); Serial.println(app_alle_DOWN);
  Serial.print(app_stopp);
  Serial.print(app_garage_bewegt_auf); Serial.println(app_gartentor_bewegt_auf);
  Serial.print(app_garage_bewegt_zu); Serial.println(app_gartentor_bewegt_zu);
  Serial.println(" ");

  while (millis() < cycleTimer + cycleTime) {
    // idle (for 5ms)
  }

}

What am I doing wrong.
Please help me.

@Hubert5111
Reading many database data in loop like that is inefficient due to multiple requests required the time for process the http request/response.
Firebase provides Realtime database which we can observe its changes in real-time using stream (SSE HTTP mode) feature.
Please see these examples for how to use stream.

@mobizt
Thank you for your support und your suggestion to use stream.
For now I solved the problem by combining the status of all 11 buttons in the app to one value, and now I send just this single value instead of 11.
It‘s not super fast, approx. 400ms until I receive the value, but it‘s ok for my purposes.
I‘m still wondering, if there is a super fast possibility ( e.g. 10ms) to get the info from the app in case a button is pressed.
Thanks again Mobizt,
Hubert

@Hubert5111
It depends on how your codes block the stream.
In ESP8266, for Stream callback, the readStream function will be executed repeatedly in task scheduler.
Without stream callback, you need to place readStream() in main loop() to run repeatedly.
If some codes or tasks that use delay or something that blocking, run in the main loop(), the data received from stream will be delayed.
Normally, stream should be received in few milliseconds to tenths by its HTTP SSE technique.
Due to ESP8266 is single core MCU that all codes run serially, the stream may not fast as it should but it's not over 100 ms to received data.
This example shows your code performance for stream. The database will be updated repeatedly 10000 times and your device should get all 10000 data changes events.
If you get some data lost from running test, your internet connection drop is a problem.
If you get all 10000 data changes but lagging, your device has some codes or tasks that block the stream.
You should use ESP32 in case you want Ideal Realtime response which the Stream (with callback) will run on separate FreeRTOS task which will no user codes can block it from running unless system tasks.
Even Raspberry Pi Pico that the Stream process runs on a single CPU core, the stream event will be received in Realtime as ESP32.
If you update the library, this library is now supported Raspbery Pi Pico which Pico W device is ESP8266 replacement with the very cheap price.

@mobizt
thank you again for your support.
So stream is the solution to improve the speed of my data communication. 100ms max. response time is just perfect, I will try that!
Wish you a nice weekend and many thanks again,
Hubert


chore: move is-mergeable-object as dependency

is-mergeable-object doesn't need to be installed to use deepmerge as a dependency - see https://github.com/KyleAMathews/deepmerge/issues/87#issuecomment-392134364


fix: Remove obsolete console.log statement from utils.js

thank you, it was removed during rewrite


feat: Support Gateway API route attachment constraints

Gateway API has some constraints about Route Attachment.
Such as:

Gateway AllowedRoutes defines which Routes may be attached
CommomRouteSpec ParentReference defines which Gateway it want to attachment.

This feature is not implemented in the project yet, and I can help to do that.

cool! Thanks for your help!


How to combine function expressions?

I'm trying to combine two function expressions, more specifically if_not_exists and list_append as shown here.
I expected something like this to work:
const expr = new UpdateExpression();

expr.set(
  'my_list',
  new FunctionExpression(
    'list_append',
    new FunctionExpression(
      'if_not_exists',
      new AttributePath('my_list'),
      [],
    ),
    ['my_value'],
  ),
);

but it doesn't seem to be supported, is there an other way?

@antogyn did you manage how to do it?


Fix compile warning by remove comparison of unsigned < 0

Unsigned int32 always >= 0.
Fixes: https://github.com/facebookincubator/velox/issues/9542

@Yohahaha We removed the code in https://github.com/facebookincubator/velox/pull/9534, can you double check if the issue is still there?

@Yohahaha We removed the code in #9534, can you double check if the issue is still there?

the issue was fixed after rebase, thank you!


Support on_call_node_leave events in index enhancement

Motivation
For addons to build data structure that mimic scopes defined by DSLs (e.g. RSpec's context blocks), Ruby LSP's index enhancement needs to allow listening to on_call_node_leave events too.
Implementation

Rename on_call_node to on_call_node_enter so it aligns with Prism's dispatcher event name and will allow a on_call_node_leave event too
Support on_call_node_leave event to index enhancement

Automated Tests

Manual Tests

We'll need to also update jekyll/add-ons.markdown.

We'll need to also update jekyll/add-ons.markdown.

Done 👍


Epub - rendering errors after font size adjustment

Bug Report

Epub file is opened with the default font settings.
User enlarges the font size to the maximum
Bug: the text is rendered with errors. Some letters overlap and obscure each other.
App revision number: 30c729636be4057a9144f2dd6ee3428309088fe1
Movie attached

https://user-images.githubusercontent.com/56821812/200568961-6487c09c-e4cd-4039-b5d7-dedeca8ffa26.mp4

I'm not sure how to address this one.
There's not enough room to display the word entirely in the viewport, so the CSS columns are overlapping. If you disable publisher styles and enable hyphenation, it should help.
Without hyphenation:

With hyphenation:

I think we can reduce the maximum size for the font size, but the font size range can be customized by each app anyways.


setuptools - raise ValueError("path '%s' cannot be absolute" % pathname)

I've encountered the installation problem on share=1.0.4 module. With the suggested environment config. Installed setuptools=66.0.0 and wheel=0.41.2.
I don't want to alter any code from setuptools. But if it's the only way to do it, please suggests. Thanks.
  Building wheel for share (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [40 lines of output]
      C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\<my_user_name>\AppData\Local\Temp\pip-install-xyoqj7k8\share_84a33f02528d4e36a4ca9998fc05ed01\setup.py", line 11, in <module>
          setup(
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\dist.py", line 1208, in run_command
          super().run_command(command)
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\wheel\bdist_wheel.py", line 399, in run
          self.run_command("install")
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\dist.py", line 1208, in run_command
          super().run_command(command)
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\command\install.py", line 68, in run
          return orig.install.run(self)
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\command\install.py", line 709, in run
          self.run_command(cmd_name)
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\dist.py", line 1208, in run_command
          super().run_command(command)
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\command\install_data.py", line 61, in run
          dir = convert_path(f[0])
        File "C:\Users\<my_user_name>\.conda\envs\anydoor\lib\site-packages\setuptools\_distutils\util.py", line 139, in convert_path
          raise ValueError("path '%s' cannot be absolute" % pathname)
      ValueError: path '/etc' cannot be absolute
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for share
  Running setup.py clean for share
Failed to build share
ERROR: Could not build wheels for share, which is required to install pyproject.toml-based projects

(anydoor) C:\Users\<my_user_name>\...\0001_Github_Downloads\AnyDoor - Image Customization, virtual try-on>pip list
Package       Version
------------- -------
cmake         3.28.1
ffmpeg-python 0.2.0
pip           23.3.1
setuptools    66.0.0
wheel         0.41.2

I solved it by modifying "util.py" function:
def convert_path (pathname):
    if os.sep == '/':
        return pathname
    if not pathname:
        return pathname
    if pathname[0] == '/':
        raise ValueError("path '%s' cannot be absolute" % pathname)
    if pathname[-1] == '/':
        raise ValueError("path '%s' cannot end with '/'" % pathname)

    paths = pathname.split('/')
    while '.' in paths:
        paths.remove('.')
    if not paths:
        return os.curdir
    return os.path.join(*paths)

TO
def convert_path (pathname):
    if os.sep == '/':
        return pathname
    if not pathname:
        return pathname

    paths = pathname.split('/')
    while '.' in paths:
        paths.remove('.')
    if not paths:
        return os.curdir
    return os.path.join(*paths)

OR There is a forked repository "AnyDoor-for-windows" with modified "util.py" you may use that to build "share" successfully.

sohaibhaide
I have a question. It seems there is no "util.py" file in the latest commit of AnyDoor repo.
So how can midify the "util.py" file in the AnyDoor repo.
https://github.com/ali-vilab/AnyDoor/tree/main/scripts


wasi: implements clock_time_get and stubs fd_seek (for TinyGo 0.22.0)

Adding WASI host calls for fd_seek (stub) and clock_time_get to support TinyGo 0.22.0. (Pulled out of my other PR)
Should fix the errors in #167
/cc @mathetake

you are so fast :) can you rebase? we just merged code that allows us to integration test via %.wat. you can follow the pattern here https://github.com/tetratelabs/wazero/pull/185

Made the requested changes. Ready for re-review.

I created a clock.wat and made the other tweaks. Thanks for the super fast review/turn around. Very impressive for an OSS project.

Thank you so much for your contribution here! @pkedy 🏅 💯

No problem. I'm hoping rebasing #167 will fix the tests for you and you can close that one too.

nice job


Adding baseline models?

This project looks exciting. Why don't you add a few baseline models to compare the BERT model with? For example, you can try to solve the task using a traditional n-gram language model or a neural one like fairseq pretrained wiki103 lm. I'm curious if BERT outperforms those two competitors.

I also think good idea! I will try to adding baseline model that you recommended.
Can you recommend more model to use baseline? Thanks

Nothing particular else. Great job!


install-chef-suse: Fix syntax error

Backport of 5069cbaf9ebcea93b493e8ecc1d5f9998fb9aa82

Can you add (bsc#1004020) to the commit message?

@rsalevsky done

@nicolasbock install-chef-suse: Fix syntax error (bsc#1004020) would be better to follow the same style as usual

@rsalevsky is a cherry-pick, not sure that is a good idea to change the format ...

@aplanas That's fine as long we have the cherry-picked comment in the commit message. If we don't add the bsc number then the maint team complains.

@rsalevsky Are you fine then with the current commit message? Or should I change it?

@nicolasbock I would like if you can change it.

@rsalevsky AFAICS it is: https://github.com/crowbar/crowbar/pull/2272/commits/0e224b8b11e35fd305e545d80001db7d7a84d5be
The PR message don't show it, but is in the commit at least

+1

Failing in cct, not related to PR.

@rsalevsky As far as I can tell, we are not testing the code path touched by this PR. Since it's a backport that has been in tree since April, I think it's safe to assume that we can merge this PR as well.


parsing file paths from foundry.toml

Motivation
Related to: https://github.com/foundry-rs/foundry/issues/1200

Solution
Adding ignored_file_paths field and parsing it.

Can you pls rebase to run CI https://github.com/foundry-rs/foundry/pull/7064


[SUPPORT]hudi way of doing bucket index cannot be used to improve query engines queries such join and filter

According to [parisni in [HUDI-6150] Support bucketing for each hive client (https://github.com/apache/hudi/pull/8657)
"So I assume hudi way of doing (which is not compliant with both hive and spark) cannot be used to improve query engines queries such join and filter. Then this leads all of below are wrong:
the current config https://hudi.apache.org/docs/configurations/#hoodiedatasourcehive_syncbucket_sync
this current PR
the rfc statement about support of hive bucketing https://cwiki.apache.org/confluence/display/HUDI/RFC+-+29%3A+Hash+Index"
Do you have any update on this?

Hi Danny0405,
I think the support for 2 hudi tables' Spark sort-merge-join with bucket optimization is an important feature.
Currently if we join 2 hudi tables, the bucket index's bucket information is not usable by spark, so shuffle is always needs. As explained in 8657 - hashing- file naming- file numbering- file sorting are different.
Unfortunately, according to https://issues.apache.org/jira/browse/SPARK-19256, spark bucket is not compatible with hive bucket yet. So if we have to choose one between spark and hive, I think spark might be of higher priority.

So if we have to choose one between spark and hive, I think spark might be of higher priority

I agree, do you have energy to complete that suspended PR.

I'm a newbie. It took me a while to understand why bucket join does not work.

@KnightChess do you have intreast to push-forward this feature?

@KnightChess do you have intreast to push-forward this feature?

@danny0405 yes, I follow up this problem


Support --quiet for --list subcommand

I don't think --quiet is the appropriate flag, since it says No output printed to stdout but this still prints to stdout.  I also don't equate "quiet" with "machine-parseable".  Can you say more about the motivation for this change?  There are several scripts which use the current format without problems.

I need something like brew commands --quiet – simple list of all commands without any headers or additional info. Just for generate some auto-completion list without any other tools.
FYI, --list --quiet will print just as --list, flag is ignored currently.

I'd be fine with this, but with the following changes:

a change to the description of --quiet, maybe something like "Less output printed to stdout"
a test capturing the behaviour, ideally including an external command
perhaps comment the args.is_present("quiet") line explaining it's used for completions

I'm gonna close this since it's been in active for some time now, but it can of course be resubmitted!


Immutablejs

First things first: I loved this lib!
Is there a way to add ImmutableJS into dot-object lib? I think it would be cool and would enhance the performance.

That would become a different library I think, dot-object is mutating everything in-place.
What methods /  functions would like to use along side with ImmutableJS?

I see... I thought it was mutating the source element into something else, that's why I opened this issue to see if you could use ImmutableJS in this lib advantage.
I read the move and set functions and now I get what the lib's doing.
It might be a crazy idea, but... I think dot-object can use it. Since it is creating a new object, it could create a immutable one. How? The main idea would be:
const obj = {
  'first_name': 'John',
  'last_name': 'Doe'
};

const attributeList = [
  'from|to',
  'first_name|contact.firstname',
  'last_name|contact.lastname'
];

const immutableObj = dot.move(attributeList, obj);

Then, the move function would be something that uses the Immutable.Map, for example, and would return a immutable object as result;
export const move = (attributeList, obj) => {
  const aux = (Iterable.isIterable(obj)) ? obj : Immutable.Map(obj);
  const nObject = ... // apply attributeList `aux` to create nObject;
  return Immutable.Map(nObject);
};

That function could check if the obj is already a ImmutableJS obj and take advantage on delete, set, get, merge, and some other cool functions provided by ImmutableJS itself.


feat(protocol): add DevnetTaikoL1

Need to forge fmt again

Need to forge fmt again

Seems its auto-formatted by the ci?

Need to forge fmt again

Seems its auto-formatted by the ci? 9e5ae67

Seems so....


Test oceananigans.jl enzyme composability

There are some ongoing efforts to make Oceananigans.jl composable with Enzyme.jl (an AD package).
This is currently spearheaded by DJ4Earth:
https://dj4earth.github.io/
With a project update here:
https://www.youtube.com/live/fRZwgVbcdv8?si=YUa_nGelNINaB50P&t=4344
And the associated repo:
https://github.com/glwagner/Enzymanigans.jl/tree/main
If we can tap into this with Agate.jl, it would open up a lot of exciting opportunities (e.g. sensitivity analysis, data assimilation, and parameter estimation in combination with a gradient based optimisation scheme). It also opens up some fun spatial stuff (for high-level examples of how adjoints are currently used in 3D physical ocean systems see):
https://www.ecco-group.org/adjoint.htm
There is a nice talk from one of the DJ4Earth PhD students, providing some background and looking at a simple AD example:
https://www.youtube.com/watch?v=7jyOY2cn4Dk
To get Enzyme working there is are a few things to do:

Reproduce the enzymanigans repo (the last update was 2 months ago, we need to check if it is still working)
Test a hydrostatic model (likely not working)
Define a toy problem that is relevant to a bigeo experiment. There is a nonhydrostatic example in the Oceananigans github, but nonhydrostatic models are currently not tested with enzyme so we'll likely have to change the example to an hydrostatic model
Create a more complex biogeo object and test if this breaks things (Radka and I are working on polishing a NPZD biogeo object)
Define a cost function relevant to our work (e.g. model observation misfit)
Add nonhydrostatic support (low priority. We would use hydrostatic models for global runs, although it might be useful for 1D runs - something to discuss with Steph/Chris)

@ljwolf is this something you'd be interested in looking into?

Mooncake.jl is a  robust, competitive alternative to Enzyme under active development written entirely in Julia. It might be worth investigating this as well. It is developed by the Turing.jl team and they might be able to provide some help there.

Oceananigans is being actively developed with support for enzyme and actively tested with Enzyme. If you have any issues, let me know happy to help.

Thanks for reaching out @wsmoses that's great to know!


Use --raw-output switch on jq in lieu of xargs

Here xargs is just stripping the surrounding double quotes, but jq has the --raw-output switch for that.
This has the added benefit that any json string formatting will not be present in the output.

Oh, there's some syntax errors.
Assuming credentials are what they should be, you should run the following to see what that's about
circle orb validate orb.yml

Testing instructions: https://github.com/trussworks/orb-ecr-image-scan-findings/pull/2

Oh, there's some syntax errors.

Odd. I'll check it out.

I pushed a fix for the validation error. I'll follow up with build test results at a later date.

I got an AUTHORIZATION_FAILURE when attempting to publish the orb for testing :(

Oh no. I think you need to be a GitHub owner to publish the orb for testing. https://github.com/trussworks/Engineering-Playbook/blob/master/infrasec/circleci/orbs.md#requirements


Test on ETH3D dataset and DTU dataset

Hi, thank you for opening this project.
I'm very confused that why some CNN based depth estimation methods will test on DTU dataset or Tanks and Temples dataset (mvsnet, cas-mvsnet), while some others will demonstrate their accuracy on ETH3D dataset (DPSNet, DeepMVS). Then your method show the results on DeMoN and ScanNet dataset, how can these method compete which each other?
Or are these methods dealing with different problem but I'm not aware?

Recent stereo works can be broadly classified into two depending on the end-goal, accurate 3d reconstructions of an object in question given multiple views, or better depth estimation of a scene as views become increasingly available (but mostly we might end up with just two views). Broadly speaking, both kinds of works should be cross-applicable and the problem isn't fundamentally different, but we constrained ourselves to the target application of improving depth estimation. So we evaluate over scene datasets like DeMoN and one particular reason to use ScanNet is to demonstrate our multi-view normal estimation benefits compared to single-view methods on a dataset that provides stereo input.

Hi, I am a bit confused either. In my opinion, datasets like KITTI are widely research, but papers like DPSNet do not consider them. In addition,  I agree to the your idea that the problem isn't fundamentally different. Thus, I wonder the accuray of 3d reconstruction models using depth estimations in your paper. Have you done some related experiments ? Thanks!


When doing linting OpenAPI specification it produces invalid error message

OpenAPI specification checked by using spectral linter.
However due to bugs in spectral linter (see https://github.com/stoplightio/spectral/issues/403) perfectly valid OpenAPI specifications might produce errors if use externally defined JSON Schema type definitions.
This issue can not be fixes until https://github.com/stoplightio/spectral/issues/403 fixed.

I'm not sure I follow. #403 is about invalid schemas, but you are saying that valid OpenAPI can still produce this error message? Got an example OpenAPI file you could give us to reproduce this?

Hi @philsturgeon sorry for slow response.
We have schemas as external files from maas-schemas project
We copy them locally and their are valid according to spectral
>git clone https://github.com/maasglobal/maas-tsp-api
>cd maas-tsp-api
>npm install
>npm run build
>npx spectral lint schemas
Found 54 rules (43 enabled)
No results with a severity of 'error' or higher found!

However, when we run lint against OpenAPI which references schemas, we get error
>NODE_OPTIONS=--max_old_space_size=4096 npx spectral lint specs/booking.yml
OpenAPI 3.x detected
/home/user/src/maas/maas-tsp-api/specs/booking.yml
 396:11  error  oas3-schema  `4` property should have required property `$ref`
✖ 1 problem (1 error, 0 warnings, 0 infos, 0 hints)

It would be great if you can help me understand errors in schemas or OpenAPI so I can fix them.

We've figured out a workaround for making the AJV error output more useful for most use cases: https://github.com/stoplightio/spectral/pull/1071
Please let us know if it's still a problem.

Thanks for taking a look at this!
I've done the following:

Forked stoplightio/spectral current develop #3041eaa to https://github.com/huksley/spectral
Build and published as @huksley/spectral 5.3.4

git clone https://github.com/maasglobal/maas-tsp-api
cd maas-tsp-api
npm install
npm remove @stoplight/spectral
npm install --save @huksley/spectral
npm run build
NODE_OPTIONS=--max_old_space_size=4096 npx spectral lint specs/booking.yml

OpenAPI 3.x detected
/Users/user/src/maas-tsp-api/schemas/core/components/travel-mode.json
 1:1  error  oas3-schema  Property `$id` is not expected to be here.

✖ 1 problem (1 error, 0 warnings, 0 infos, 0 hints)

I see no problem with this JSON schema file, see https://github.com/maasglobal/maas-schemas/blob/develop/maas-schemas/schemas/core/components/travel-mode.json
Could I am using it wrong ?

It's valid JSON Schema, but it's not valid OpenAPI. If specs/booking.yml is OpenAPI then you cannot $ref to proper JSON Schema files, only OpenAPIish Schema Objects.
This is the bane of my existence, and is being resolved in OpenAPI v3.1. https://www.apisyouwonthate.com/blog/openapi-v31-and-json-schema-2019-09


Added errorIfNot2XX option to HTTP binding docs

Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:

[X] Commits are signed with Developer Certificate of Origin (DCO - learn more)
[X] Read the contribution guide
[ ] Commands include options for Linux, MacOS, and Windows within codetabs
[ ] New file and folder names are globally unique
[ ] Page references use shortcodes instead of markdown or URL links
[ ] Images use HTML style and have alternative text
[ ] Places where multiple code/command options are given have codetabs

In addition, please fill out the following to help reviewers understand this pull request:
Description
This documents the errorIfNot2XX option which has been part of the HTTP binding component since v1.10 or v1.11
Issue reference

@wimvc1 - Can you find the issue when this code was added?

@wimvc1 - Can you find the issue when this code was added?

I think it is this one:
https://github.com/dapr/components-contrib/pull/2321


Make lint-on-save and format-on-save configurable

I personally do not prefer doing linting or formatting on save as it may cause confusing diffs in contributions to other projects if I autoformat every file I modify. However, janet.kak previously hardcoded this functionality, and I couldn't even disable it as the hooks had no group, so I had to remove that part of the code locally. Since I'd prefer not maintaining a fork, I decided to come up with a more constructive solution, which was simply defining config options that can be included in kakrc like so:
plug "pepe/janet.kak" config %{
    set-option global janet_autoformat true
    set-option global janet_autolint true
}

Additionally I made some miscellaneous changes:

Normal mode mapping of <a-space> is removed and a snippet of how the user can access the Janet user mode is added to README. It is unidiomatic to define normal mode mappings in Kakoune plugins but you can feel free to define them in your personal kakrc.
Default commands for linter and formatter are no longer hardcoded to /usr/local/bin; now they simply expect the command to be in PATH. Users can feel free to override this new behavior by setting janet_formatcmd or janet_lintcmd.

Thank you for making this plugin, it's nice to see other Kakoune users out there. :)

Thank you for the very kind words, and indeed I am happy to know another Kakoune + Janet user out there. Especially with PR :-D. I need to look closely at the .kakrc of yours to learn something. Just from little snoop, Joule became my default color scheme.

@katesuyu FYI, it seems that for some reason, janet-configure-buffer is not called when opening Janet files. I have set both variables to true, but without running :janet-configure-buffer after loading buffer, they have no effect.
Also, janet user-mode is not working anymore, even after janet-configure-buffer.


Syntax highlighting to be updated

More colorful syntax highlighting to be added for additional clarity in notes.

The completed or cancelled checkboxes should be green or red, respectively
Completed tasks should be dimmed after the colored check or x
Timestamps should be colored for extra clarity

Added improved syntax highlighting


Error while installing inside Termux (android)

I tried installing inside Termux, the script completes but I'm not able to run mise
Getting following error
~ $ curl https://mise.run | MISE_DEBUG=1 sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  5897  100  5897    0     0   3383      0  0:00:01  0:00:01 --:--:--  3385
mise: installing mise...
> curl -#fLo /data/data/com.termux/files/usr/tmp/tmp.yZp8zhQJPQ/mise-v2024.4.8-linux-arm64.tar.gz https://github.com/jdx/mise/releases/download/v2024.4.8/mise-v2024.4.8-linux-arm64.tar.gz
######################################################################## 100.0%
mise-setup: tarball=/data/data/com.termux/files/usr/tmp/tmp.yZp8zhQJPQ/mise-v2024.4.8-linux-arm64.tar.gz
validating checksum
mise: installed successfully to /data/data/com.termux/files/home/.local/bin/mise
mise: run the following to activate mise in your shell:
echo "eval \"\$(/data/data/com.termux/files/home/.local/bin/mise activate bash)\"" >> ~/.bashrc

mise: this must be run in order to use mise in the terminal
mise: run `mise doctor` to verify this is setup correctly
~ $ ~/.local/bin/mise
bash: /data/data/com.termux/files/home/.local/bin/mise: cannot execute: required file not found

If I install using
curl https://mise.jdx.dev/mise-latest-linux-armv7 > ~/.local/bin/mise

I get following error on running mise
~ $ ~/.local/bin/mise
bash: /data/data/com.termux/files/home/.local/bin/mise: Bad address

System info
~ $ uname -a
Linux localhost 4.14.186-27095505 #1 SMP PREEMPT Fri Dec 29 13:19:18 KST 2023 aarch64 Android

I was curious why it doesn't work, in my case the reason is
executable's TLS segment is underalignment: alignment is 16, needs to be at least 64 for ARM64 Bionic

Same error
  ~                                                                                  1m 57s u0_a446@localhost   18:23:40
❯ curl https://mise.run | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6323  100  6323    0     0  25531      0 --:--:-- --:--:-- --:--:-- 25495
mise: installing mise...
######################################################################## 100.0%
mise: installed successfully to /data/data/com.termux/files/home/.local/bin/mise
mise: run the following to activate mise in your shell:
echo "eval \"\$(/data/data/com.termux/files/home/.local/bin/mise activate zsh)\"" >> "/data/data/com.termux/files/home/.zshrc"

mise: this must be run in order to use mise in the terminal
mise: run `mise doctor` to verify this is setup correctly
  ~                                                                                  6s u0_a446@localhost   18:23:48
❯ ls ~/.local/bin
 mise
  ~                                                                                u0_a446@localhost   18:23:52
❯ ~/.local/bin/mise doctor
zsh: no such file or directory: /data/data/com.termux/files/home/.local/bin/mise
  ~                                                                                u0_a446@localhost   18:23:59
❯ bash
~ $ ~/.local/bin/mise doctor
bash: /data/data/com.termux/files/home/.local/bin/mise: cannot execute: required file not found

@avoidik Understood. Looks like the issue is still open upstream and will get hopefully fixed one day.

mise metadata server will be missing android catalog entirely
Don't know since mise is already broken on android, but I guess android will be using aarch64 architecture mostly. uname -m gives same.

Long story short, mise doesn't support Android, because there's no packages specifically created for it.
Every tool provided by mise has a corresponding manifest file with a list of supported operating systems, architectures, links, and so on, and there's no Android as class. You may try to convince mise to detect Android as a Linux, but again -- it wouldn't work due to lack of interoperability between Android and Linux binaries in most of the cases.
Unless package vendors would consider android compiled binaries (read it as never). Just forget about it.

That's a bummer, I run a ton of rust based CLI apps on Termux, fish, starship, minijinja-cli and more without an issue. Hopefully someday mise can be supported too.

@onedr0p  That works really well.
I know I am commenting on a closed issue, but I want to add that fixing this issue is also a minimal effort.
We should replace the sys-info crate with sysinfo crate. Rationale

sys-info hasn't been updated for years, but sysinfo is regularly updated.
sys-info is used only to get linux os name, that too only to identify alpine and nixos. I guess sysinfo's name is all we need, though I don't have access to alpine/nixos and cannot verify myself. But certainly, there can be many easy ways to detect alpine/nixos.


Added the function check_vert_num that ensures that a set does not co…

…ntain more points than the graph

Thanks for your contribution! I have a couple of comments:
Firstly, there is a slight misunderstanding in the requirements of this issue. In particular, the input vertex set could be shorter than the number of vertices in the graph, but still contain indices which are out of range. In this case, the clear error message should also be returned. Could you please add the following test case to the test_graph.py file and ensure that it passes. Hopefully this will clear up any confusion about the requirements.
def test_out_of_range():
    # Create a graph
    graph = sgtl.graph.complete_graph(5)

    # Check the error message when trying to access a vertex which doesn't exist
    with pytest.raises(IndexError, match="Input vertex set includes indices larger than the number of vertices."):
        _ = graph.volume([6])
    with pytest.raises(IndexError, match="Input vertex set includes indices larger than the number of vertices."):
        _ = graph.volume([0, 1, 2, 3, 4, 5])
    with pytest.raises(IndexError, match="Input vertex set includes indices larger than the number of vertices."):
        _ = graph.weight([0, 1, 2], [6])

Then, just a couple of minor points:

The method check_vert_num should be renamed _check_vert_num since it is an internal method which should not be called by the user and will not appear in the documentation.
Once the method is updated to address the test-case above, please make sure to update the docstring on the _check_vert_num method to accurately reflect what it does.

Please make sure to run the ./check.sh script to run all of the tests once you have made your changes, then please update this pull request with the new version. Thanks¬

One other thing: please add an entry to the changelog.rst file for the change you have made. Please see the contributing guidelines for more details.

Just to make up for my lack of knowledge in graph theory: are the vertices on the graph numbered sequentially?
What I mean is that if a graph has 5 verteces, will these definitely be numbered 0, 1, 2, 3, 4? Or could they be numbered differently?

In this library, a vertex is simply referred to by its index in the adjacency matrix. So yes, you can assume the vertices are numbered 0, 1, 2, 3, 4 as you say.


Addresses #78: Invalid Note Syntax

fixes #78

#sign-off

Already fixed, along with the C# error.