Can we use this library with Stm32 and GSM ?

Hello @mobizt,
I am just curious, can we interface the Stm32 and GSM to send data on firebase using this library ?
If yes then
What setup steps are required to make it work?

How can I send data to Firebase using the HTTP protocol with this library, considering that Firebase supports the REST API?

Are there any particular challenges I might encounter when using this library for STM32 and GSM communication with Firebase?

Can you provide a code example or reference for interfacing STM32 and GSM using FirebaseClient to post data to Firebase Realtime Database?

Thank you

The question should be in the Discussions.
https://github.com/mobizt/FirebaseClient?tab=readme-ov-file#supported-devices
There is no extra works for specific devices if flash and memory meet the application requirement.
The examples are generic for all support devices.
https://github.com/mobizt/FirebaseClient/blob/main/examples/RealtimeDatabase/Async/Callback/StreamGSM/StreamGSM.ino

getting authenticating error:
`/**

SYNTAX:

RealtimeDatabase::get(, , , , );

RealtimeDatabase::get(, , , , );

 - The async client.
 - The node path to get/watch the value.
 - The database options (DatabaseOptions).
 - The async result callback (AsyncResultCallback).
 - The user specified UID of async result (optional).
 - The Server-sent events (HTTP Streaming) mode.

The complete usage guidelines, please visit https://github.com/mobizt/FirebaseClient
*/

#include <Arduino.h>
#define TINY_GSM_MODEM_SIM7600 // SIMA7670 Compatible with SIM7600 AT instructions
// Set serial for debug console (to the Serial Monitor, default speed 115200)
#define SerialMon Serial
HardwareSerial SerialAT(PA3, PA2);
// See all AT commands, if wanted
// #define DUMP_AT_COMMANDS
// Define the serial console for debug prints, if needed
#define TINY_GSM_DEBUG SerialMon
#define TINY_GSM_USE_GPRS true
#define TINY_GSM_USE_WIFI false
// set GSM PIN, if any
#define GSM_PIN ""
// Your GPRS credentials, if any
const char apn[] = "";
const char gprsUser[] = "";
const char gprsPass[] = "";
#define UART_BAUD 115200
// Include TinyGsmClient.h first and followed by FirebaseClient.h
#include <TinyGsmClient.h>
#include <FirebaseClient.h>
// The API key can be obtained from Firebase console > Project Overview > Project settings.
#define API_KEY "************"
#define USER_EMAIL ""
#define USER_PASSWORD ""
#define DATABASE_URL "****************"
TinyGsm modem(SerialAT);
TinyGsmClient gsm_client1(modem, 0);
TinyGsmClient gsm_client2(modem, 1);
// This is the library internal SSL clients.
// You can use any SSL Client that works with Ethernet library.
// The ESP_SSLClient uses PSRAM by default (if it is available), for PSRAM usage, see https://github.com/mobizt/FirebaseClient#memory-options
// For ESP_SSLClient documentation, see https://github.com/mobizt/ESP_SSLClient
ESP_SSLClient ssl_client1, ssl_client2;
GSMNetwork gsm_network(&modem, GSM_PIN, apn, gprsUser, gprsPass);
UserAuth user_auth(API_KEY, USER_EMAIL, USER_PASSWORD);
FirebaseApp app;
using AsyncClient = AsyncClientClass;
AsyncClient aClient1(ssl_client1, getNetwork(gsm_network)), aClient2(ssl_client2, getNetwork(gsm_network));
void asyncCB(AsyncResult &aResult);
void printResult(AsyncResult &aResult);
RealtimeDatabase Database;
unsigned long ms = 0;
void setup()
{
Serial.begin(115200);
delay(10);

DBG("Wait...");

delay(3000);

SerialAT.begin(UART_BAUD);

// Restart takes quite some time
// To skip it, call init() instead of restart()
DBG("Initializing modem...");
if (!modem.init())
{
    DBG("Failed to restart modem, delaying 10s and retrying");
    return;
}

/*
2 Automatic
13 GSM Only
14 WCDMA Only
38 LTE Only
*/
Serial.println(modem.getNetworkMode());
modem.setNetworkMode(38);
if (modem.waitResponse(10000L) != 1)
{
    DBG(" setNetworkMode faill");
}

String name = modem.getModemName();
DBG("Modem Name:", name);

String modemInfo = modem.getModemInfo();
DBG("Modem Info:", modemInfo);

Firebase.printf("Firebase Client v%s\n", FIREBASE_CLIENT_VERSION);

ssl_client1.setInsecure();
ssl_client1.setDebugLevel(1);
ssl_client1.setBufferSizes(2048 /* rx */, 1024 /* tx */);
ssl_client1.setClient(&gsm_client1);

ssl_client2.setInsecure();
ssl_client2.setDebugLevel(1);
ssl_client2.setBufferSizes(2048 /* rx */, 1024 /* tx */);
ssl_client2.setClient(&gsm_client2);

Serial.println("Initializing app...");

initializeApp(aClient1, app, getAuth(user_auth), asyncCB, "authTask");

// Binding the FirebaseApp for authentication handler.
// To unbind, use Database.resetApp();
app.getApp<RealtimeDatabase>(Database);

Database.url(DATABASE_URL);

Database.setSSEFilters("get,put,patch,keep-alive,cancel,auth_revoked");

// The "unauthenticate" error can be occurred in this case because we don't wait
// the app to be authenticated before connecting the stream.
// This is ok as stream task will be reconnected automatically when the app is authenticated.

Database.get(aClient1, "/Device/AD_001/contact_1", asyncCB, true /* SSE mode */, "streamTask");

}
void loop()
{
// The async task handler should run inside the main loop
// without blocking delay or bypassing with millis code blocks.
app.loop();

Database.loop();

if (millis() - ms > 20000 && app.ready())
{
    ms = millis();

    JsonWriter writer;

    object_t json, obj1, obj2;

    writer.create(obj1, "ms", ms);
    writer.create(obj2, "rand", random(10000, 30000));
    writer.join(json, 2, obj1, obj2);

    Database.set<object_t>(aClient1, "/test/stream/number", json, asyncCB, "setTask");
    Database.get(aClient1, "/Device/AD_001/contact_1", asyncCB, true /* SSE mode */, "streamTask");
}

}
void asyncCB(AsyncResult &aResult)
{
// WARNING!
// Do not put your codes inside the callback and printResult.
printResult(aResult);

}
void printResult(AsyncResult &aResult)
{
if (aResult.isEvent())
{
Firebase.printf("Event task: %s, msg: %s, code: %d\n", aResult.uid().c_str(), aResult.appEvent().message().c_str(), aResult.appEvent().code());
}
if (aResult.isDebug())
{
    Firebase.printf("Debug task: %s, msg: %s\n", aResult.uid().c_str(), aResult.debug().c_str());
}

if (aResult.isError())
{
    Firebase.printf("Error task: %s, msg: %s, code: %d\n", aResult.uid().c_str(), aResult.error().message().c_str(), aResult.error().code());
}

if (aResult.available())
{
    RealtimeDatabaseResult &RTDB = aResult.to<RealtimeDatabaseResult>();
    if (RTDB.isStream())
    {
        Serial.println("----------------------------");
        Firebase.printf("task: %s\n", aResult.uid().c_str());
        Firebase.printf("event: %s\n", RTDB.event().c_str());
        Firebase.printf("path: %s\n", RTDB.dataPath().c_str());
        Firebase.printf("data: %s\n", RTDB.to<const char *>());
        Firebase.printf("type: %d\n", RTDB.type());

        // The stream event from RealtimeDatabaseResult can be converted to the values as following.
        bool v1 = RTDB.to<bool>();
        int v2 = RTDB.to<int>();
        float v3 = RTDB.to<float>();
        double v4 = RTDB.to<double>();
        String v5 = RTDB.to<String>();
    }
    else
    {
        Serial.println("----------------------------");
        Firebase.printf("task: %s, payload: %s\n", aResult.uid().c_str(), aResult.c_str());
    }
    // Firebase.printf("Free Heap: %d\n", ESP.getFreeHeap());
}

}`
Output:
OK
[17408] ### Unhandled: +NETOPEN: 0
OK
Debug task: streamTask, msg: Network connected
Error task: streamTask, msg: unauthenticate, code: -106
Event task: authTask, msg: authenticating, code: 7
Debug task: authTask, msg: Connecting to
Event task: authTask, msg: auth request sent, code: 8
Debug task: streamTask, msg: GPRS/EPS connected
Debug task: streamTask, msg: Terminating the server connection...
Debug task: streamTask, msg: Connecting to server...
Debug task: streamTask, msg: Terminating the server connection...
Debug task: streamTask, msg: Terminating the server connection...
Event task: authTask, msg: error, code: -1
Event task: authTask, msg: authenticating, code: 7
Event task: authTask, msg: auth request sent, code: 8
May I know the main cause

You should read the library documentation thoroughly because of incorrect usage.
You should understand Firebase Realtime Database Streaming (SSE) and the AsyncClient concept and how to use it correctly.
Follow the example for how to connect the Stream correctly.

Calling this many places means you don't get the library API and concept.
You have to spend the time to play with Firebase Realtime Database example in the network ready devices e.g. ESP8266, ESP32, Raspberry Pi Pico W, Arduino MKRs (SAMD) or Arduino UNO R4 WiFi to be familiar with the library API and concept because it is internet ready device.

The library provides the App initialization (Firebase authentication) only examples as the starting points.
This is for GSM, and you can start here.
https://github.com/mobizt/FirebaseClient/blob/main/examples/App/NetworkInterfaces/Async/Callback/GSMNetwork/GSMNetwork.ino
When you ask me for GSM application, I assume you are familiar with Firebase REST API and library usage with popular Arduino WiFi capable devices.

@mobizt , I would like to express my gratitude for your valuable assistance. Your support has been incredibly helpful.
I have a question regarding the communication model used in the current implementation. Specifically, I am curious if it is possible to switch to synchronous communication for the operations we're performing, rather than relying on asynchronous communication. Could you kindly provide guidance on how we might achieve this or if it is recommended for this scenario?
Thank you once again for your time and support.

The library provides the sync and async examples which you can use pure sync/async functions or mix between them.
https://github.com/mobizt/FirebaseClient?tab=readme-ov-file#examples
The Realtime Database Stream is async by design based on the real-time/responsive concept.
The async task handler is running in the user main loop then it can be interrupted by your code that runs on the same loop too which you should be aware when you use Realtime Database Stream with your blocking code.
The maximum delay or time uses by your all blocking tasks should not greater than 5 seconds because the Stream will be timed out all the time.

Any Example for Synchrous communication GSM?

The library provides the sync and async examples which you can use pure sync/async functions or mix between them.
https://github.com/mobizt/FirebaseClient?tab=readme-ov-file#examples

Also, in the documentation

The following section will provide the basic (bare minimum) code example and the links: for the examples, class and functions description and Google API documentation.

For the Library Examples Structure, please click here... bla bla bla


Mac: Add support for EnergyScan operation at mac layer.

This commit adds support for energy scan operation at mac layer.

@jwhui I set this PR for code review now. I'd like to add the counterpart for energy-scan in wpantund and test everything together. Can you please merge this after the test? Thanks.

Current coverage is 65.34% (diff: 36.36%)

Merging #580 into master will decrease coverage by 0.14%

@@             master       #580   diff @@
==========================================
  Files            90         90
  Lines         12362      12410    +48
  Methods        1714       1720     +6
  Messages          0          0
  Branches       1437       1442     +5
==========================================
+ Hits           8095       8109    +14
- Misses         3837       3873    +36
+ Partials        430        428     -2

Powered by Codecov. Last update 6d2dfa5...82767bc

The counterpart of this in wpantund is in PR55.
Both changes are tested/verified together. This is ready for review and merge. Thanks

LGTM :+1:


[WFLY-7183] 'name' attribute missing in XSD while required by web

https://issues.jboss.org/browse/WFLY-7183
downstream https://bugzilla.redhat.com/show_bug.cgi?id=1365939

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

this is ok to test


Unmaintained dependency - dkjson

Details
The dkjson package required to load the tags to JSONB (instead of HSTORE) is unmaintained (https://github.com/LuaDist/dkjson).  Reported on #81, tracking here to avoid losing sight of this.
The dkjson package was suggested by the osm2pgsql project examples (see https://github.com/openstreetmap/osm2pgsql/blob/master/flex-config/places.lua#L5-L7), not sure what other alternatives/options may exist at this time.

Planning to use https://github.com/rxi/json.lua
The rxi project has >1k stars and 245 forks and had relatively recent activity. Their docs mentioned being faster than other options (including dkjson) so did a quick test.
I ran tags.lua to load Colorado 3x w/ dkjson and and 3x w/ rki-json.  4CPU, 8 GB RAM, SSD.  Basic command:
osm2pgsql --slim --drop \
  --output=flex --style=./style/tags.lua \
  --cache 3000 -d $PGOSM_CONN ~/pgosm-data/colorado-latest.osm.pbf

rki-json.lua loaded in an average of 119 seconds vs 136s for dkjson, so ~13% faster with this option.
I looked at a few other options but none were as popular, recently updated, or as simple/straightfoward.  I plan to include the json.lua script in the flex-config/ directory with a link back to the project for the ultimate source.  Will have to occasionally check on the parent project for updates.  The json script can then be included directly (like helpers.lua) without additional prereq to install.


feat: create and restore spies with other test frameworks

Refs #143
By default the mock will use sinon or jest support to create and restore spies.
This commit adds a spy option that allows to use a different testing framework,
by providing a method to create spies, and one to restore them.
For example, with vitest:
const router = createRouterMock({
  spy: {
    create: fn => vi.fn(fn),
    restore: spy => () => spy.restore()
  }
});

I'm doing a few changes to this and pushing a new version so I can release a new version with the feature.
One of the changes I needed is to add a reset option for spy to reset the history of the spy instead of restoring it. It's called by the routerMock.reset() function.
Thanks a lot for the work in this!

So you added reset but now restore is not used right?

Yes, I guess I did it a bit too quickly 😅


CANVAS-90 - Video reserve analytics

@maxpluez Do we need to write any tests for this?

Just tested, looks good


MDL Icons not displaying properly in Android WebView

I tried to see if there may have been someone who posted something similar, but I couldn't find anything so I figured I would mention.
We have a client running a trial application, therefore I don't have direct access to test on the older versions of Android. However, in a WebView in Android 4.1 icons do not display. In Android 4.4, the icons display however some of them are incorrect. Not sure if this may have to do with CSS/HTML/JS support or not but I thought I would bring this issue to attention.
ANDROID 4.1

ANDROID 4.4

ANDROID 5.0 / iOS / Chrome (desktop) /Firefox (desktop) / How it's supposed to look

@Andy561 Thanks for the bug report. We’ll try to reproduce.
In the meantime: Would you mind adding screenshots to the issue itself (you can drag'n'drop into the textfield!)? I can’t open the links you have provided (access denied).

@surma Whoops, sorry about that. Fixed the images, sorry the top two are kinda bad, but its enough to see the issue.

Adding the 1.0.3 milestone to see if we can get a fix by then.

Hey @Andy561, I finally got all my emulators running :computer:
As it turns out, Android 4.1 WebView does not support ligatures at all. Android 4.4 does, but doesn’t know what to do if one ligature is a prefix of another, which is why your keyboard_backspace icon turns into a literal keyboard.
There’s nothing we can do about this, obviously, but there is a workaround: Code points :point_up:
Go to the official icon font website, lookup the icons you are using and use the code point instead of the ligatures, like  for keyboard_backspace.

Hope this helps :)

http://google.github.io/material-design-icons/ mentions support for ligatures on the Android browser from version 3, but as mentioned here it only works correctly on Android > 4.4, right?

Hm,... you are right. Material Design Icons is claiming that they do indeed support Android Browser 3. Maybe I did something wrong? According to caniuse.com, there’s a bug with all Android Browsers < 4.4 which they describe as

Partial support in Android browser versions is due to a serious bug where text-rendering: optimizeLegibility causes custom web fonts to not render.

Yes, I have looked into that. It causes problems rendering, but as far as I could tell it doesn't have to do with ligatures, which are just not supported.
I have spent a few hours trying to get it to work on Android < 4.4, but in the end I have rewritten all icons using html entities.

How am I supposed to replace the hamburger menu icon ligature by a code point when it is generated automatically with JS? This is the most important icon of all and now it looks like it is doomed to never work in Android browsers :(

It is already fixed for 1.1 @Zuurkern. We did that update internally.
The only way to fix in in 1.0.x is to run JS after-layout upgrade that changes the innerHTML of the icon's div.

Hi,
Thanks for the material design library, I am hitting similar issue where material switch is not showing properly in android API level 22. Please check image below:

@pathakNishant Please file a new issue specifically for that issue.

@Garbee Issue created: https://github.com/google/material-design-lite/issues/4512

This can help: https://github.com/google/material-design-icons/blob/master/iconfont/codepoints

Anyway, sure that such ligature coolness is the more performant way to implement material-icons even on modern browser, why not offering also some css helper classnames (like font-awesome) with content attribute? That may help for who wants to use an human-readable code but also ensure a better browser support...

@creativeprogramming This issue tracker is about Material Design Lite only. That icon customizer and what is provided are handled over in the Material Design Icons repository. Please file an issue there with your request for the proper team to triage and take any action if necessary.
Thank you.

@Garbee,  I reasoned a bit, had new issues, and anyway tought that's better to keep the request to you
I repeat my point: are you sure that such ligature technique is the most good way to implement your icons?
Even from semantic web point of view, having those 'keywords' as html 'content' and not a CSS class name is wrong and not convenient.
For instance one issue I'm having is that I'm having icon name treated as text by many html parsers for generating preview (even by Google sometimes)
Why reinventing the wheel? Why you don't use a css class for icons? You master this cool technique but something simpler is better,  please consider adding also some simple CSS classes for helping developers using your icons, like fa and other frameworks
Another point of that is that IDEs usually do autocompletion for CSS class names but not for html content


Passing large input affects performance forever

I have a plugin built with the c-pdk, that has one function that does nothing:
int32_t EXTISM_EXPORTED_FUNCTION(decoder_extism_nop)
{
  return 0;
}

and a host program using the cpp-sdk:
static void bench_extism_call(extism::Plugin &plugin)
{
    while (1)
    {
        const auto start{std::chrono::steady_clock::now()};
        plugin.call("decoder_extism_nop");
        const auto end{std::chrono::steady_clock::now()};
        const std::chrono::duration<double> elapsed_seconds{end - start};
        std::cerr << "took " << elapsed_seconds.count() << " seconds to do an extism call." << std::endl;
        return;
    }
}

int main(int argc, char *argv[])
{
    extism::Manifest manifest = extism::Manifest::wasmPath("wasm-src/plugin.wasm");
    extism::Plugin plugin(manifest, true);
    const uint32_t fifty_mebib = 50 * 1024 * 1024;
    void *temp = malloc(fifty_mebib);
    bench_extism_call(plugin);
    bench_extism_call(plugin);
    plugin.call("decoder_extism_nop", (const uint8_t *)temp, fifty_mebib);
    free(temp);
    bench_extism_call(plugin);
    bench_extism_call(plugin);
    bench_extism_call(plugin);
    bench_extism_call(plugin);
    bench_extism_call(plugin);
    bench_extism_call(plugin);
    bench_extism_call(plugin);
    bench_extism_call(plugin);
    bench_extism_call(plugin);
    return 0;

As you can see bench_extism_call and main both call the same plugin function, decoder_extism_nop .
bench_extism_call doesn't pass any input data to the plugin function. Before passing the large input, decoder_extism_nop is pretty fast:
took 0.000332847 seconds to do an extism call.
took 5.4292e-05 seconds to do an extism call.

after passing the large input, it takes tens of milliseconds:
took 0.0194691 seconds to do an extism call.
took 0.0219667 seconds to do an extism call.
took 0.0236935 seconds to do an extism call.
took 0.0153126 seconds to do an extism call.
took 0.0107325 seconds to do an extism call.
took 0.00980626 seconds to do an extism call.
took 0.0104758 seconds to do an extism call.
took 0.0098605 seconds to do an extism call.
took 0.00947281 seconds to do an extism call.

I believe I have a fix here: https://github.com/extism/extism/pull/627 just need to do a little more testing tomorrow.

The fix is a huge improvement! It fixes all "too slow" calls in my miniaudio integration except for the first call. I'm able to fix that by inserting a call a decoder_extism_nop after my call that passes a lot of input.
I'll look closer at this tomorrow.

Awesome! One thing I was considering was adding a extism_plugin_reset function to the SDK so users can control when that reset happens. It could be used instead of the call to decoder_extism_nop but that's only necessary if I can't find any additional improvements.

Fixed in https://github.com/extism/extism/pull/627 (for posterity!)


fix(schedules): search not working when assigning assistant

:tada: This PR is included in version 2.55.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


High CPU usage by rg bundled in VSCode

Does this issue occur when all extensions are disabled?: Yes/No

VS Code Version:

Version: 1.71.1
Commit: e7f30e38c5a4efafeec8ad52861eb772a9ee4dfb
Date: 2022-09-08T19:41:58.611Z (5 days ago)
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: <IP_ADDRESS>-electron.0
OS: Darwin arm64 21.6.0
Sandboxed: No

OS Version: macOS 12.6 (21G115)

Steps to Reproduce:

Do some search in a large git project
You may see high CPU usage of rg in the background, blocking other processes

I saw this issue extremely frequently while using both M1 Max MacBook Pro.

rg is the search tool that we use in vscode. When you search a large project, you will probably see it using high cpu. But there are some tips for search perf on this page: https://github.com/microsoft/vscode/wiki/Search-Issues

@roblourens Sorry, I should be clear:
Even if I'm not searching inside the project/workspace, there can be rg running in the background with high CPU usage.

Previously you said "step 1, do a search", if the search is not necessary, then what triggers it?
Something is doing a search. Maybe it's an extension. No way I can answer this without more detail. https://github.com/microsoft/vscode/wiki/Search-Issues might help


Add RI purchase takes 24 hours to be updated  in Azure Advisor

Hello,
Please add RI purchases takes 24 hours to be updated in Azure Advisor

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

ID: b703202c-7c7d-7177-6496-d1c61dacf22b
Version Independent ID: f9ee0bcc-f74a-dbba-c9b9-f84bf7b800a7
Content: Reduce service costs using Azure Advisor - Azure Advisor
Content Source: articles/advisor/advisor-cost-recommendations.md
Service: advisor
GitHub Login: @saket-ms
Microsoft Alias: sagupt

@shalosi Thank you for your feedback, we will further look into it and get back to you at the earliest.

Assigning this to @saket-ms our document author to further evaluate the feedback and update the document accordingly.

We appreciate your question. Sorry didn't fully answer in a timely manner. Since this question was created some time ago, we don't know if it still applies. We kindly ask you to create a new github issue if it's still important. We will engage with you on the new thread. Thank you for your understanding.
#please-close

#assign:rboucher

#please-close


Creating embeddings using the REST API is much slower than performing the same operation using Sentence Transformers

What is the issue?
I'm working on a RAG written in Python, and we're using ollama as the chatbot LLM provider. It's running in a Docker container and the Python app makes REST API calls to it. We have so far been using Sentence Transformers to create embeddings for documents that get ingested into the RAG and the user's query, however it would be great to ditch this dependency as it adds a bit of startup time and a lot of package dependencies that take up disk space.
Since the embed API now supports batching, I've run a test using the existing Sentence Transformers code, and equivalent code (same vectors, same model) using the embed route from the ollama Docker container and it's about 2x slower. Even though I guess making an HTTP request slows things down a little, I can't imagine the overhead should be that much?
Any way we can make it faster so we can get rid of other dependencies and use ollama for all our LLM related needs?
OS
Docker
GPU
Nvidia
CPU
Intel
Ollama version
0.3.14

Which model?  Server logs may give some insight in to why it's slower.  Would it be possible for you to provide a script that demonstrates the problem (ie, do both types of embedding)?

OK, this is performing worse than I expected:
from sentence_transformers import SentenceTransformer
import json
import requests
import os
import time

stransform = SentenceTransformer("paraphrase-MiniLM-L6-v2")
HOST = os.getenv("OLLAMA_HOST", "localhost")

def create_st_embeddings(text):
    return stransform.encode(text)

def load_model(model_name):
    def is_loaded():
        models = requests.get(f"http://{HOST}:11434/api/tags")
        model_list = json.loads(models.text)["models"]
        return next(
            filter(lambda x: x["name"].split(":")[0] == model_name, model_list), None
        )

    while not is_loaded():
        print(f"{model_name} model not found. Please wait while it loads.")
        request = requests.post(
            f"http://{HOST}:11434/api/pull",
            data=json.dumps({"name": model_name}),
            stream=True,
        )
        current = 0
        for item in request.iter_lines():
            if item:
                value = json.loads(item)
                # TODO: display statuses
                if "total" in value:
                    if "completed" in value:
                        current = value["completed"]
                    yield (current, value["total"])

def create_embeddings_ollama(text):
    data = {"model": "all-minilm", "input": text, "stream": False}
    response = requests.post(
        f"http://{HOST}:11434/api/embed", data=json.dumps(data)
    ).json()
    # if there was an error in the response, it may be because the model wasn't present
    # TODO: check the type of error
    if "error" in response:
        for _ in load_model("all-minilm"):
            # TODO: display progress
            pass
        response = requests.post(
            f"http://{HOST}:11434/api/embed", data=json.dumps(data)
        ).json()
        # if at this point it still didn't work we'll let it raise an exception
    return response["embeddings"]

def test_speed():
    inputs = ["Lorem ipsum", "dolor sit amet,", "consectetur adipiscing elit,", "sed do", "eiusmod tempor incididunt ut labore et dolore magna aliqua"]
    start = time.time()
    for i in range(100):
        create_st_embeddings(inputs)
    end = time.time()
    print(f"Sentence tranformer took {end - start}s")
    start = time.time()
    for i in range(100):
        create_embeddings_ollama(inputs)
    end = time.time()
    print(f"Ollama took {end - start}s")

if __name__ == "__main__":
    test_speed()

On my system I get the following output:
Sentence tranformer took 4.112587213516235s
Ollama took 72.928391456604s

I of course accounted for the model loading, the model was already loaded beforehand so it skipped the loading part. I ran twice and got almost the exact same timings, so it's consistent.
My server logs have a bunch of this:
2024-10-28 18:42:39 [GIN] 2024/10/28 - 17:42:39 | 200 |  704.642746ms |      <IP_ADDRESS> | POST     "/api/embed"
2024-10-28 18:42:40 [GIN] 2024/10/28 - 17:42:40 | 200 |  778.619764ms |      <IP_ADDRESS> | POST     "/api/embed"
2024-10-28 18:42:41 [GIN] 2024/10/28 - 17:42:41 | 200 |  743.552632ms |      <IP_ADDRESS> | POST     "/api/embed"
2024-10-28 18:42:41 [GIN] 2024/10/28 - 17:42:41 | 200 |  773.902971ms |      <IP_ADDRESS> | POST     "/api/embed"
2024-10-28 18:42:42 [GIN] 2024/10/28 - 17:42:42 | 200 |   717.96729ms |      <IP_ADDRESS> | POST     "/api/embed"

Thanks for the great test script. Testing locally:
$ python3 7400.py
Sentence tranformer took 0.6625242233276367s
Ollama took 3.005030870437622s

About 4.5x slower, nothing like the 17x you see. If I push the model onto CPU, it takes about twice as long, but best case ollama is still slower.  What's the output of ollama ps after the test?

My hardware is probably significantly worse than yours, I'm using a GTX 1070 and i7 6700.
This is what my ollama ps looks like:
NAME                 ID              SIZE      PROCESSOR    UNTIL
all-minilm:latest    1b226e2802db    528 MB    100% GPU     Forever

btw my host system is Windows, so Sentence Transformer is running natively in Windows with GPU acceleration, whereas Ollama is running in Docker, also with GPU acceleration.

I had a quick look at the internal traffic and ollama turns each of the items in the batch list into a separate API call to the ollama runner, so there's a fan-out effect which I'm guess is not a factor for SentenceTransformer.  This may improve with the move to go-based runners in the future, but I'm afraid that at the moment, ollama is just going to be a lot slower than SentenceTransformer.

Oh, that's a shame, I hope that future improvement happens, because it's currently not great.

Due to current limitations in the underlying c++ code embedding models have to process serially, so while our embedding API does processes batches, that gets processed in a single thread by the underlying hardware.  As we transition over to the Go server we'll be looking at this and other parts of the system to improve parallelism for better performance.

Due to current limitations in the underlying c++ code embedding models have to process serially, so while our embedding API does processes batches, that gets processed in a single thread by the underlying hardware. As we transition over to the Go server we'll be looking at this and other parts of the system to improve parallelism for better performance.

I checked the code, the performace problem is nothing with embedding processing, rather how embed endpoint is implemented. For the internal truncating logic, it loads kvData and do tokenzing and detokenizing for each string in the promt array, which is quite inefficient. I don't think it is necessary but underlying go runner does trancating the prompt if it exceeds context window.
The fix could be simple:

just removing trancating logic in embed handler and log warning about trancating if promt size > ctx window
Or a little bit more complex:
add a truncate flag in request for embedding handler, when psize > ctx window, return error rather than trancating prompt.

I'm going to cook a patch in 2). How do you think of it? @dhiltgen @rick-github

Oh, that's a shame, I hope that future improvement happens, because it's currently not great.

it is indeed VERY SLOW when do RAG stuf. The more docs in RAG, the slower. quit anoying but easy to fix. I'll go and handle it :)

Hi there, I've made a patch for it #7424 @dhiltgen @jessegross
just get token numbers in the runner instead of route.
Even on following simplest request, I got nearly 20x boost.
curl http://localhost:11434/api/embed -d '{
"model": "all-minilm",
"input": ["Why is the sky blue?", "Why is the grass green?"]
}'
new approach: "total_duration":14239148
old approach: "total_duration":240871657


Prompting options if certain flag is given

After googlen and stackoverflowing a lot, I couldn't find the solution for something I want to do. I wnat to write a program that only prompts options, if a certain flag is given. For example:
$ python program.py will not prompt
but
$ python program.py --add-user will prompt something like:
username:
email adress:
...

Is this possible with the current version of click?

Hi @yochem thanks for the question. Please use Stack Overflow for questions about your own code. This tracker is for issues related to the project itself. Be sure to include a minimal, complete, and verifiable example.

IMO, the command group might be what you're looking for. Instead of making --add-user an option, you can wrap the add-user command under a command group to hide the usage.
import click

@click.group()
def cli():
    pass

@cli.command()
@click.argument('username')
@click.argument('email')
def add_user(username, email):
    print(f'Add user: {username} - {email}')

if __name__ == '__main__':
    cli()

Usage becomes:
$ python cli.py --help
Usage: issue_956.py [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  add-user
$ python cli.py add-user --help
Usage: issue_956.py add-user [OPTIONS] USERNAME EMAIL

Options:
  --help  Show this message and exit.

Let us know if this solves your question. :)


upgrade eslint-plugin-html

This plugin depends on eslint-plugin-html@2. However, it does not support ESLint 4. I want to upgrade it to latest. But it's a breaking change because the latest eslint-plugin-html supports only<EMAIL_ADDRESS>Can we upgrade eslint-plugin-html to the latest?

Yeah, we can release a new major for this package.


average sfr over the correct timescales

The previous SFRs are essentially instantaneous SFRs, but the desired quantities are SFRs averaged over different timescales (e.g., 10, 30, 100 Myr), I think.... This PR fixes this issue.

@wangbingjie Can you provide a list of a few example transients we can process to compare with existing results? The more specific you can be about quantifying the difference we should see, the better.


Not work with live mode

The live mode is very convenient for me to add tests. If you know how to fix this feature with cucumber, please let me know. I can work on it.

My bad, it is the module cache issue that caused my steps were not loaded.


Updating pyWavelets

Pull Request Description
What issue does this change request address? (Use "#" before the issue to link it, i.e., #42.)
#2238
What are the significant changes in functionality due to this change request?
Updates the pyWavelets package (only installed as an optional dependency) from 1.1 to 1.2 to make use of the mra( ) function which will be of use in future updates to RAVEN and is of current use in RAVEN demonstrations.

For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.

[ ] 1. Review all computer code.
[ ] 2. If any changes occur to the input syntax, there must be an accompanying change to the user manual and xsd schema. If the input syntax change deprecates existing input files, a conversion script needs to be added (see Conversion Scripts).
[ ] 3. Make sure the Python code and commenting standards are respected (camelBack, etc.) - See on the wiki for details.
[ ] 4. Automated Tests should pass, including run_tests, pylint, manual building and xsd tests. If there are changes to Simulation.py or JobHandler.py the qsub tests must pass.
[ ] 5. If significant functionality is added, there must  be tests added to check this. Tests should cover all possible options.  Multiple short tests are preferred over one large test. If new development on the internal JobHandler parallel system is performed, a cluster test must be added setting, in  XML block, the node <internalParallel> to True.
[ ] 6. If the change modifies or adds a requirement or a requirement based test case, the Change Control Board's Chair or designee also needs to approve the change.  The requirements and the requirements test shall be in sync.
[ ] 7. The merge request must reference an issue.  If the issue is closed, the issue close checklist shall be done.
[ ] 8. If an analytic test is changed/added is the the analytic documentation updated/added?
[ ] 9. If any test used as a basis for documentation examples (currently found in raven/tests/framework/user_guide and raven/docs/workshop) have been changed, the associated documentation must be reviewed and assured the text matches the example.

Job Test Ubuntu 20-2 Optional on 6b1d02d : invalidated by @wangcj05


Autocomplete

Implemented #233.
Added autocomplete for foreign-key fields:

event create [site, organizer]
event update [site, organizer]
person update [airport]
instructor search [airport]
task create from event update [person]
task create [event, person]
task update [event, person]

I did not add autocomplete here:

The person create view; I'm having issues with the creation view using django 1.8; it may be good to revisit the single person-create view in a separate issue; there are potential security issues with creating unsalted passwords and setting group-permissions outside an admin view
The search-box on the main dashboard; this is more difficult to implement since it comes from 3 different model fields. It could probably be done by creating a custom search field, but perhaps that could be an additional issue to be opened since it is more involved than these changes

Since I was changing forms, I made a few extra form edits:

Removed workshops/static/combobox.js since the functionality has now been replaced by this library.
Added input-validation in the EventForm to Event.slug to ensure that it has the proper form of "YYYY-MM-*" which is required for Event.get_by_ident method
Restored the datepickers for the create and update event form

Hi @shapiromatron,
thanks a lot for this contribution! Highly appreciated :)
A quick note:

I did not add autocomplete here:

The person create view; I'm having issues with the creation view using django 1.8; it may be good to revisit the single person-create view in a separate issue; there are potential security issues with creating unsalted passwords and setting group-permissions outside an admin view

It's unfortunately not stated in the requirements.txt, but Amy is not supposed to work with Django 1.8 yet. The PR for upgrade to 1.8 (#243) is in progress, so for now you should downgrade to Django 1.7.

The search-box on the main dashboard; this is more difficult to implement since it comes from 3 different model fields. It could probably be done by creating a custom search field, but perhaps that could be an additional issue to be opened since it is more involved than these changes

I don't think we need the autocompletion on the search form.

Added input-validation in the EventForm to Event.slug to ensure that it has the proper form of "YYYY-MM-*" which is required for Event.get_by_ident method

I honestly lost track of the requirements for the event slug. Indeed, published events have slugs in YYYY-MM-DD-something format, but - I think - in case we don't know a formal starting date for an event, the slug looks different.
@wking, @gvwilson: what should the event's slug look like in case we don't know the starting date?
I'll add some inline comments now, but I want to once again thank you for your work.
Cheers,
Piotr

Hey @shapiromatron,
I left some inline comments. Most of the code looks good, my comments are really nitpicks.

Do you perhaps know if we could somehow indicate that:

Site and Organizer are autocompletable? (Previously these were <select>s, if someone forgot the options they could simply look for them). I'm thinking about something like a combobox.

Start and End pop up a calendar?

On Mon, Apr 20, 2015 at 11:35:27AM -0700, Piotr Banaszkiewicz wrote:

Added input-validation in the EventForm to Event.slug to ensure
that it has the proper form of "YYYY-MM-*" which is required for
Event.get_by_ident method

I honestly lost track of the requirements for the event
slug. Indeed, published events have slugs in
YYYY-MM-DD-something format, but - I think - in case we don't know
a formal starting date for an event, the slug looks different.
@wking, @gvwilson: what should the event's slug look like in case we
don't know the starting date?

As far as I'm concerned you're free to use any slug you like, but I'd
prefer if mutable slugs redirected to an immutable ID [1,2].  I
haven't checked if that's how we currently handle this or not.

@pbanaszkiewicz
I added help-text for the selectable fields, as well as the date-picker fields. I think the latest round of changes addresses your comments; let me know if I missed something or should make any other tweaks.

Hi @shapiromatron,
your PR looks solid, there's very few changes to make:

change widget type for some fields
fix datepicker by changing its format
rebase against master (there should not be many conflicts)

Thanks a lot for your work. Cheers,
Piotr

Hey @shapiromatron,
if you need any help with that PR, let me know, I'll gladly submit a PR against your PR.
Cheers,
Piotr

Thanks; I'm trying to fix the formatting of the auto select combo box which you requested and haven't had time to tweak it; I hope to submit a new PR soon!

@shapiromatron great! I think rebasing this PR against master could be easier than sending a new PR, but if the result is the same, I'm happy :) Cheers.

Superseded by #285.


[feature request] Auto dark mode for fluent theme on qbittorrent?

[feature request] Auto dark mode for fluent theme on qbittorrent?

done it using WDD
https://github.com/t1m0thyj/WDD-scripts/pull/31


Implement Moon Logic

To-Do here: implement mask count requirement for FD check.
(make enhancement to complete the trade sequence.)

Build Artifacts

2ship-linux.zip
2ship-windows.zip

The requirements I added here were to get the chest itself, since we aren't
shuffling starting form, we assume you will always have a sword?
On Mon, Dec 16, 2024, 3:26 AM sitton76 @.***> wrote:

@.**** commented on this pull request.
In mm/2s2h/Rando/Logic/Regions.cpp
https://github.com/garrettjoecox/2ship2harkinian/pull/67#discussion_r1886366179
:

       CHECK(RC_MOON_TRIAL_GORON_POT_3, CAN_BE_GORON && HAS_MAGIC),

       CHECK(RC_MOON_TRIAL_GORON_POT_4, CAN_BE_GORON && HAS_MAGIC),

       CHECK(RC_MOON_TRIAL_GORON_POT_5, CAN_BE_GORON && HAS_MAGIC),

       CHECK(RC_MOON_TRIAL_GORON_POT_6, CAN_BE_GORON && HAS_MAGIC),

       CHECK(RC_MOON_TRIAL_GORON_POT_7, CAN_BE_GORON && HAS_MAGIC),

       CHECK(RC_MOON_TRIAL_GORON_POT_8, CAN_BE_GORON && HAS_MAGIC),

       CHECK(RC_MOON_TRIAL_GORON_POT_9, CAN_BE_GORON && HAS_MAGIC),

   },

   .exits = { //     TO                                         FROM

       EXIT(ENTRANCE(THE_MOON, 0),                     ENTRANCE(MOON_GORON_TRIAL, 0), true),

       EXIT(ENTRANCE(THE_MOON, 0),                     ONE_WAY_EXIT, CAN_BE_GORON && HAS_MAGIC), // Exit from Mask NPC

   },

} },
{ RR_MOON_LINK_TRIAL, RandoRegion{ .sceneId = SCENE_LAST_LINK,

   .checks = {

       CHECK(RC_MOON_TRIAL_LINK_GARO_MASTER_CHEST, HAS_ITEM(ITEM_HOOKSHOT)),

Maybe we should use the CAN_KILL_GARO_MASTER requirement here since its
already defined. Same with CAN_KILL_IRONKNUCKLE in ln.892.
—
Reply to this email directly, view it on GitHub
https://github.com/garrettjoecox/2ship2harkinian/pull/67#pullrequestreview-2505455718,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB75K5MIPZXE7DHTULH7XDT2F2FBRAVCNFSM6AAAAABTU5UV36VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKMBVGQ2TKNZRHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

The requirements I added here were to get the chest itself, since we aren't shuffling starting form, we assume you will always have a sword?
Guess it really depends if we decide to shuffle the Sword or not, but if not your probably fine.

closing in lieu of https://github.com/garrettjoecox/2ship2harkinian/pull/80


Disable checkbox

You should have created a branch from the main branch, not the disable-radiobutton branch.


fix api error in dependent task

#6236

Codecov Report

Merging #6238 (9f691ab) into dev (a1e447d) will increase coverage by 0.03%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                dev    #6238      +/-   ##
============================================
+ Coverage     39.07%   39.10%   +0.03%
- Complexity     3250     3253       +3
============================================
  Files           638      638
  Lines         25266    25266
  Branches       2743     2743
============================================
+ Hits           9872     9880       +8
+ Misses        14516    14506      -10
- Partials        878      880       +2

Impacted Files
Coverage Δ

...r/plugin/registry/zookeeper/ZookeeperRegistry.java
44.68% <0.00%> (+5.67%)
:arrow_up:

Continue to review full report at Codecov.

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


Feature: choose entity type for commands (instead of just switches)

Firstly: thank you very much for this addon. I was looking something similiar for a while.
After maybe a week testing, two sensors not working for me: CPU Load and CurrentClockSpeed. Let me know, if you need more information. I am not expert, but I will do my best.
Another "issue". Auto-creating task in Task manager not worked for me. It asked me to fill the name and password. I do not have windows user account with password. I had to do it manually according this https://www.wintips.org/how-to-start-a-program-at-startup-with-task-scheduler/. Similiar link could be mentioned ;).
Question:
I know it is "beta". It is possible to make switch sensors (volume up, volume down, media mute, media play pause, restart, shutdown) not to be like switches. More logical could be slider and buttons or service. Thank you!

Thank you @GegoSK, glad you like it!
And thank you for being observant; the sensors were indeed broken. I've fixed them (hopefully) in the new version, let me know otherwise.
Good point regarding the task without-password. I'll be removing the scheduled task part in the next update, as I'll also be removing the administrator privileges so it won't be necessary anymore.
About your question; sounds good, I'll look into what's possible.

@LAB02-Admin - thanks, that was quick. Mentioned sensor now worked. I forgot NetworkSensor, I do not see it in MQTT HA.

I forgot NetworkSensor, I do not see it in MQTT HA.

Yep, both network- and storage sensor aren't getting added in HA. Scheduled for next version!

Released a new version that fixes this bug, could you please test it?

Looks like it works. So many sensors :) I will test it. Thank you very much.

Hi @GegoSK. I just published a release that removes the need for a scheduled task. During the update, it'll check if there's a task present, and if there is, it'll remove it and activate the new startup mechanism.
However, since you manually created the task: if the task isn't called HASS.Agent, it won't be deleted and the new startup mechanism won't be activated. In that case, please delete the task manually. Then in the Configuration window, go to the Startup page, and click enable start-on-login.

@LAB02-Admin HASS Agent was updated, before I read your message ;). Task name was the same and it was deleted automatically. :)


Add support for managing rate limiting by the API

BigCommerce's API returns a x-rate-limit-time-reset-ms header in the response if the rate limit is set.
We can use this to add support for managing requests that are hit by a rate limit.
rate limit headers example:
X-Rate-Limit-Requests-Left →6
X-Rate-Limit-Requests-Quota →25
X-Rate-Limit-Time-Reset-Ms →3000
X-Rate-Limit-Time-Window-Ms →5000

source

Closed as work has been carried out


Add module.exports.getLocale function in translations.js

Add module.exports.getLocale function to let modules get the current locale easily. Also fixed a typo.
I'll need this in the module I'm writing unless there's other, better way of getting current locale I don't know of.

Approved. Travis has no idea that this PR exists (go figure, its been having difficulties over the last few days though) so manual inspection suggests nothing will break.


Auto-rebase does not work

Hi,
I have dependabot enabled https://github.com/slsa-framework/slsa-github-generator/blob/main/.github/dependabot.yml
I have not declared rebase-strategy (https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#rebase-strategy), yet none of the PRs are rebased automatically.
I don't understand why, but it's making the experience pretty terrible :/
Could you tell me what I'm missing?
Thank you!

We pushed a fix for this yesterday and it looks like Dependabot force pushed to this PR: https://github.com/slsa-framework/slsa-github-generator/pull/173
So I'm going to call this fixed!
Reopen if it misbehaves again. Thanks for the report!

Can we please re-open this?
It is not working for us (we're using gradle: https://github.com/candlepin/candlepin/blob/master/.github/dependabot.yml)
Here is the latest PR with a merge conflict for at least 20 minutes, and it hasn't been automatically rebased: https://github.com/candlepin/candlepin/pull/3421

@nikosmoum maybe you need to open a new issue?

@angelod1as I have created https://github.com/dependabot/dependabot-core/issues/5317

Reopen this, please.


lxc: 4.0.5 -> 4.0.6

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109071 run on x86_64-linux 1

8 packages built:

anbox
haskellPackages.bindings-lxc
lxc
lxd
pipework
rubyPackages.ruby-lxc (rubyPackages_2_6.ruby-lxc)
rubyPackages_2_5.ruby-lxc
rubyPackages_2_7.ruby-lxc

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 109071 run on x86_64-linux 1

8 packages built:

anbox
haskellPackages.bindings-lxc
lxc
lxd
pipework
rubyPackages.ruby-lxc (rubyPackages_2_6.ruby-lxc)
rubyPackages_2_5.ruby-lxc
rubyPackages_2_7.ruby-lxc


Labels with slashes in their name cannot be edited

There is a label "KAW/SciLifeLab" in the Covid19 publications database which cannot be edited in the GUI. When clicking the edit button the user gets the following error

The problem seems to be that the render function here
https://github.com/ScilifelabDataCentre/Publications/blob/d975abf8872a00e259a9c8ae8e551d8938c79ad5/publications/label.py#L207
interprets the passed label argument as a path with a subfolder due to the slash and hence cannot find the correct object.
The solution might be to use https://www.tornadoweb.org/en/stable/escape.html#tornado.escape.url_escape on the label before passing it to the render function.

Fixed as of PR #597


Changed to new api method. Fixes RamblingCookieMonster/PSSlack#79

Description
Changed Get-SlackChannel to use the conversations.list and adds the new parameter "types"
Related Issue
#79
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Good catch!  Is the return object pretty similar (at least for the properties we care about)?  Will poke around with this sometime this week hopefully!

I can't see any significant changes in the return object.
https://api.slack.com/methods/channels.list
https://api.slack.com/methods/conversations.list

I can however see a typo in my code amendments. So as this is the first time I've attempted to contribute to someones project. Whats the best course of action?

Yep!  You can also make it a single commit - something like this should work to undo your last commit, let you make a change, and redo the commit.  You would just need to git push --force after this.
Cheers!

@RamblingCookieMonster @scrthq
Thank you both.
I have fixed my typo and learnt how to do it without adding in unnecessary commits.

Ping!
I'd love to get this merged so channel rules work properly in PoshBot!

Yikes, thanks for the reminder.  I'm going to bump major version in the off chance this sort of object is slightly different from what is returned by the previous method.  Merging now, will deploy tonight.  Thanks again @DWOF !  Sorry I'm so slow!

I need some sort of reminder system.  Finally remembered this.  @devblackops feel free to start using 1.0.0!  Thanks again @DWOF

Thanks @RamblingCookieMonster!


InitialBinding is cleared when using Get.off

I create a simple Login flow in Get for demo purpose.
https://gist.github.com/stefandevo/65f818d9cf748d4b9eb7aed1d439fb0c
This demo1 works but Splash > SignUp are still there when the user do a login and comes to the HomePage.
When I use Get.of in second demo:
https://gist.github.com/stefandevo/3e14e38c449da182d0b79e4551414b49
flutter: [GET] GetMaterialController has been initialized
flutter: [GOING TO ROUTE] /
flutter: [GET] ProfileController has been initialized
flutter: [GET] SignupController has been initialized
flutter: [REPLACE ROUTE] /
flutter: [NEW ROUTE] /signuppage
flutter: [GET] SharedPreferences deleted from memory
flutter: [GET] onClose of ProfileController called
flutter: [GET] ProfileController deleted from memory
flutter: [GET] onClose of SignupController called
flutter: [GET] SignupController deleted from memory

════════ Exception caught by widgets library ═══════════════════════════════════
The following message was thrown building SignupPage(dirty):
 SignupController not found. You need call put<SignupController>(SignupController()) before

It seems that the InitialBinding registrations are removed once the Get.off(SignupPage(), binding: SignupBinding());.
Furthermore, also the SignupController is deleted from memory?
I would think that InitialBinding is always keeping everything in the state manager.
Furthermore, can you comment on the used technique for this flow which is in ALL projects dealing with a logged in user. (startup flow).

Almost always using initialBinding will cause problems with smartManagements other than keepFactory.
I would do something like this:
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:shared_preferences/shared_preferences.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(DemoApp());
}

class DemoApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Demo',
      initialBinding: InitialBinding(),
      smartManagement: SmartManagement.keepFactory,
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: Splash(),
    );
  }
}

class InitialBinding extends Bindings {
  @override
  void dependencies() async {
    final prefs = await SharedPreferences.getInstance();
    Get.put<SharedPreferences>(prefs, permanent: true);
    Get.put<ProfileController>(ProfileController(), permanent: true);
  }
}

class Splash extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text("loading..."),
      ),
    );
  }
}

class ProfileController extends RxController {
  static const profileKey = 'profileId';

  var isLoggedIn = false.obs;
  var user = '';

  static ProfileController get to => Get.find();

  @override
  void onInit() {
    final prefs = Get.find<SharedPreferences>();
    user = prefs.getString(profileKey);
    isLoggedIn.value = (user != null);
    ever(isLoggedIn, checkLoggedInStatus);
    checkLoggedInStatus(null);
  }

  void checkLoggedInStatus(_) {
    if (isLoggedIn.value) {
      Get.offAll(HomePage());
    } else {
      Get.offAll(SignupPage(), binding: SignupBinding());
    }
  }

  void signup() {
    final prefs = Get.find<SharedPreferences>();
    user = 'John Doe';
    prefs.setString(profileKey, user);
    isLoggedIn.value = true;
  }

  void logout() {
    final prefs = Get.find<SharedPreferences>();
    prefs.remove(profileKey);
    isLoggedIn.value = false;
  }
}

class SignupBinding extends Bindings {
  @override
  void dependencies() {
    Get.put<SignupController>(SignupController());
  }
}

class SignupController extends RxController {
  void signup() {
    final profileController = Get.find<ProfileController>();
    profileController.signup();
  }
}

class SignupPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final controller = Get.find<SignupController>();
    return Scaffold(
      appBar: AppBar(
        title: Text('Signup'),
      ),
      body: Center(
        child: Column(
          children: <Widget>[
            RaisedButton(
              child: Text("Do Signup"),
              onPressed: () => controller.signup(),
            )
          ],
        ),
      ),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Home'),
      ),
      body: Center(
        child: Column(
          children: <Widget>[
            Container(
              child: Text('Welcome ' + ProfileController.to.user),
            ),
            RaisedButton(
              child: Text("Logout"),
              onPressed: () => ProfileController.to.logout(),
            )
          ],
        ),
      ),
    );
  }
}

What I change in the code?
1- SmartManagement.keepFactory
2- I made isLoggedIn observable with var isLoggedIn = false.obs;
3- Added ever(isLoggedIn, checkLoggedInStatus); and  checkLoggedInStatus(null);
The first is just an ever that will observe the change in the variable. The second is a check that receives null because callbacks are mandatory with ever, and we are taking advantage of the same method to make the first check.
Why are we giving a first check, if we are changing the value above?
Well, the first thing is that there may be problems with the login. I have already done tests on a virtual device with little ram to test behavior of state managers when the system has little or no ram and the application will crash. With that I was able to reproduce some unusual situations:
When the user presses a button, onPressed is expected to run immediately, and this will happen, however if the device receives a freeze at that time due to the transition animations that consume some ram (and will cause an immediate bottleneck) and the user you can click again during the freeze, and every time he touches the button, an onPressed will be scheduled to be called, and after stabilization we will have many onPresseds running.
Now imagine isLoggedIn being bombarded with bools, and you are listening for changes to it, this could have unwanted effects. Get luckily has flow control, so it definitely won't make any difference to Get. However, this brings us to an unusual situation, what to do with Booleans that only have a value of "true / false"? and if its default status is "false" and I add "false" again, it will never trigger ever (), because you haven't changed the state of that variable. So in this case, I manually checked the initial state change.
Is there a more elegant way of doing this? Of course, using Rx instead of extensions.
You can create an observable variable in 3 ways, the first is by adding an .obs, the second is by creating an Rx(), and the third is simply using the "X" classes that Get provides.
StringX, ListX, BoolX, IntX, MapX, and etc.
I rarely use them, but in situations where I need to initialize a value other than the initial value to fire an ever, they are useful and even more elegant. In the example, we would just put ever on top of isLoggedIn and everything would happen normally, without any problem:
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:shared_preferences/shared_preferences.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  runApp(DemoApp());
}

class DemoApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Demo',
      initialBinding: InitialBinding(),
      smartManagement: SmartManagement.keepFactory,
      theme: ThemeData(
        primarySwatch: Colors.blue,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      ),
      home: Splash(),
    );
  }
}

class InitialBinding extends Bindings {
  @override
  void dependencies() async {
    final prefs = await SharedPreferences.getInstance();
    Get.put<SharedPreferences>(prefs, permanent: true);
    Get.put<ProfileController>(ProfileController(), permanent: true);
  }
}

class Splash extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Text("loading..."),
      ),
    );
  }
}

class ProfileController extends RxController {
  static const profileKey = 'profileId';

  var isLoggedIn = BoolX(); // can be Rx<Bool>() too
  var user = '';

  static ProfileController get to => Get.find();

  @override
  void onInit() {
    final prefs = Get.find<SharedPreferences>();
    user = prefs.getString(profileKey);
    ever(isLoggedIn, checkLoggedInStatus);
    isLoggedIn.value = (user != null);
  }

  void checkLoggedInStatus(_) {
    if (isLoggedIn.value) {
      Get.offAll(HomePage());
    } else {
      Get.offAll(SignupPage(), binding: SignupBinding());
    }
  }

  void signup() {
    final prefs = Get.find<SharedPreferences>();
    user = 'John Doe';
    prefs.setString(profileKey, user);
    isLoggedIn.value = true;
  }

  void logout() {
    final prefs = Get.find<SharedPreferences>();
    prefs.remove(profileKey);
    isLoggedIn.value = false;
  }
}

class SignupBinding extends Bindings {
  @override
  void dependencies() {
    Get.put<SignupController>(SignupController());
  }
}

class SignupController extends RxController {
  void signup() {
    final profileController = Get.find<ProfileController>();
    profileController.signup();
  }
}

class SignupPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final controller = Get.find<SignupController>();
    return Scaffold(
      appBar: AppBar(
        title: Text('Signup'),
      ),
      body: Center(
        child: Column(
          children: <Widget>[
            RaisedButton(
              child: Text("Do Signup"),
              onPressed: () => controller.signup(),
            )
          ],
        ),
      ),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Home'),
      ),
      body: Center(
        child: Column(
          children: <Widget>[
            Container(
              child: Text('Welcome ' + ProfileController.to.user),
            ),
            RaisedButton(
              child: Text("Logout"),
              onPressed: () => ProfileController.to.logout(),
            )
          ],
        ),
      ),
    );
  }
}

However, I plan to create a more elegant solution for this in the future.

Just knew that we can declared like this
var isLoggedIn = BoolX(); // can be Rx<Bool>() too

Thanks

@jonataslaw thanks for the answer and sample code.

Is there a way without the use of the intermediate Splash screen in between? Being able to set the home page is one of these things that you use a lot based upon a setting.
Get.putAsync does not support the permanent property

Furthermore, if I used the sample from the ReadMe
    Get.putAsync<SharedPreferences>(() async {
      final prefs = await SharedPreferences.getInstance();
      return prefs;
    });

in the InitialBinding instead of the code you provided, I get following error:
flutter: [GET] GetMaterialController has been initialized
flutter: [GOING TO ROUTE] /
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception:  SharedPreferences not found. You need call put<SharedPreferences>(SharedPreferences()) before
#0      GetInstance.find
package:get/src/get_instance.dart:154
#1      Storage.find
package:get/src/extension_instance.dart:12
#2      ProfileController.onInit
package:hashting_mobile/demo2.dart:62
#3      DisposableInterface.onStart
package:get/…/rx/rx_interface.dart:43
#4      GetInstance.initController
package:get/src/get_instance.dart:123
#5      GetInstance.find
package:get/src/get_instance.dart:148
#6      GetInstance.put
package:get/src/get_instance.dart:48

So is this an issue with putAsync ?

I wouldn't use putAsync for your preferences. I just made a PreferencesController and gave it a async method called load which returns an instance of a PreferencesController. Then I put it with permanent to true. Works like a charm
void main() async {
WidgetsFlutterBinding.ensureInitialized();
final PreferencesController preferencesController = await PreferencesController.load();
Get.put(preferencesController, permanent: true);
runApp(App());
}

Wow, when you said on your readme that not even half of Get is documented i thought you were exaggerating, but man, i never heard in my life of these other two forms of declaring an obs. Nice one!
after 3.0 i want to talk with you about things that not has any documentation so we can add them. I can't recognize them in the code, so you would need to tell me 😅

@jonataslaw thanks for the answer and sample code.

Is there a way without the use of the intermediate Splash screen in between? Being able to set the home page is one of these things that you use a lot based upon a setting.
Get.putAsync does not support the permanent property

Furthermore, if I used the sample from the ReadMe
    Get.putAsync<SharedPreferences>(() async {
      final prefs = await SharedPreferences.getInstance();
      return prefs;
    });

in the InitialBinding instead of the code you provided, I get following error:
flutter: [GET] GetMaterialController has been initialized
flutter: [GOING TO ROUTE] /
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception:  SharedPreferences not found. You need call put<SharedPreferences>(SharedPreferences()) before
#0      GetInstance.find
package:get/src/get_instance.dart:154
#1      Storage.find
package:get/src/extension_instance.dart:12
#2      ProfileController.onInit
package:hashting_mobile/demo2.dart:62
#3      DisposableInterface.onStart
package:get/…/rx/rx_interface.dart:43
#4      GetInstance.initController
package:get/src/get_instance.dart:123
#5      GetInstance.find
package:get/src/get_instance.dart:148
#6      GetInstance.put
package:get/src/get_instance.dart:48

So is this an issue with putAsync ?

@jonataslaw can you have a look at my questions here pls? Thanks :-)

void main() async {
print(1);
Future.delayed(Duration.zero, ()=> print(2));
print(3);
print(4);
print(5);
print(6);
}

out:
1
3
4
5
6
2

Bindings are synchronous, and are called when a route is pushed, and before it is built.
The problem is that when we insert an asynchronous operation in a Binding, it will only be ready after the page's build method is called, because Dart only resolves an asynchronous operation after ALL synchronous operations are called. So both the animation of the routes, as the initState, as the onInit of the Controller, and the build method of the entire screen, will enter the "synchronous" queue and will break the time that should be allocated to the asynchronous operation.
If you enter 1 million synchronous events right after declaring an asynchronous operation. All synchronous events will be performed first.
I would like to do something like:
await bindings.dependencies;
buildTransitions.build();
But a lot of inconsistent things happen when I try to insert an asynchronous operation between the call event of calling a route and displaying it.
initialBinding in GetMaterialApp is called in GetMaterialApp's "initState", so any asynchronous operations it has on it will be triggered only after the entire MaterialApp is built.
So in version 2 I only have the option of preloading asynchronous services in the main method to be loaded before MaterialApp.
In version 3 there will be a "preload", where the MaterialApp will only be called after these services are loaded, and initialBinding will be called by default in this preload.

OK clear! Thanks.
I will close this issue!


Last-minute fixes and features for the French version

Includes a couple of system-wide features:

Aggregate choice prompt: final questions about all foods in the recall in a single prompt
Generalised associated foods prompts: same as the regular associated foods prompt, but with parameters defined at the prompt level rather than the individual food level
Drink scale v2 prompt now limits the aspect ratio of sliding scales to prevent excessive scrolling (should also be applied to legacy v1 sliding scales, but this is not included in this PR)
Package import tool now supports guide images (surprisingly wasn't implemented before)

The rest of the changes are minor fixes to the localisation and the French database builder

Could we add new prompts to the docs?


A button to load more?

Does this extension have a "Load more products" button? I don't want to load infinitely without the user clicking this button but I don't want pagination.
If not, can it be added?
Thank you.

By default automatically loads 3 (or 5, i'm not sure) next pages, then "Load more products" button appearing

You can also customize most things either via configuration options or with a little bit of code.

Got it to work.
Thanks for a good module!


Added command for install for Centos 6 or 7

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Congratulations on your first contribution to freeCodeCamp @zendmaster! We look forward to more!
Thanks, and happy coding!


Maximum numbers of connected ESCs in uORB and in UAVCAN expanded to 16.

Describe problem solved by the proposed pull request
At this time maximum number of supported ESC is 8.
This restriction does not meet modern requirements.
For example, some VTOLs could have 8 motors for MC mode and one or more push/pull motors for FW mode.
Test data / coverage
It was tested on real VTOL with 8 MC motors and one push FW motor (with Pixhawk 4 onboard).
The flying plan included MC mode and FW mode.
The flight went well, without any lags or problems.
Describe your preferred solution
Increase maximum number of connected ESC in uORB messages and in UAVCAN ESC driver.
Additional context
This PR also associated with this task as it allow to use VTOL copters with more than 8 motors in simulator.

One minor concern is the size of esc_status. We should probably restructure this at some point to publish the individual status messages with identifiable information.
I'd love to see a log if you're able to share it (logs.px4.io).

I'd love to see a log if you're able to share it (logs.px4.io).

Sure! Next week we will provide the logs.

@irsdkv Could you please share the logs?

@irsdkv Could you please share the logs?

Sorry for delay! Our pilot is on vacation now.  We will provide logs as fast as we can. I suppose that logs will be available at the beginning of July.


Test SPEC adoption

Things to fix.

[x] The Adopted By column should have a comma separated list of core projects that have adopted the SPEC appearing as links to their core-project pages:

[x] The  Adopted By field on SPEC pages should have the core-projects appear as links to their core-project pages:

[ ]  It would be nice for the core-projects to always appear in the same order loosely based on importance (rather than date or alphabetical order of something.  Here are three ideas about how to do that:

add a order field to each core-project and sort the list based on that field
prepend a number to each project page (ie., 10-numpy.md, 20-scipy.md, etc. and sort by filename.
add order.txt file and sort according to order in file

[x] Remove dead code from layouts/partials/post_meta/project_meta.html.  I think I copied-and-pasted this based on some other files and it looks like I don't know what I am doing.  For example, given that we removed the projects directory, I don't think this line is used:
a href="{{ relref . (printf "/projects/%s" $el) }}">{{ $el }}</a>

I suspect this file has more nonsense and needs to be revised.

The sorting is a bit invasive, so I'm going to skip that for now.

The sorting is a bit invasive, so I'm going to skip that for now.


Trying to build on osx fails with 'undefined: Stmt'

Hey,
I'm trying to build on OSX with the following command which fails with undefined: Stmt
GOOS=darwin  GOARCH=amd64 CGO_ENABLED=0 go build -o release/darwin/amd64/myapp  bitbucket.org/org/myapp/main
# bitbucket.org/indexia/crossid/vendor/gopkg.in/rana/ora.v3
vendor/gopkg.in/rana/ora.v3/drvStmt.go:18: undefined: Stmt

Any clue?
Thanks.

CGO_ENABLED=1
cgo is required, we have to link against Oracle's Instant Client libraries...

@tgulacsi oops, my bad,
So, due to native Ora libraries, I cannot use OSX and need some Linux image to run the go build command for GOOS=linux  GOARCH=amd64 ?
Thanks.

Probably yes.
You could try karalabe/xgo, but adding the Oracle libraries is not trivial...

Closing,
Thanks for the quick response @tgulacsi


openAppSettings implem on Android

I'm developing a proprietary plugin which has many BLE features and get some of the inspiration from this plugin.
I noticed openAppSettings method is not implemented on Android though it's possible
So, for the reference if you wish to implement the feature, here is the code if someone wish to prepare a PR
openAppSettings  implementation:
  @PluginMethod
  fun openAppSettings(call: PluginCall) {
    val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS) // App details
    intent.data = Uri.parse("package:" + getActivity().getPackageName());
    getActivity().startActivity(intent);
  }

Cheers!

Thank you very much. This has been added in #241.


Thermokon SR04

Manufacturer: Thermokron
Model: SR04
Production date/period: unknown
Link to product: https://www.thermokon.de/produkte/easysensr-sender/temperatur/sr04/

[ ] SR04
[ ] SR04 rH
[ ] SR04 P
[ ] SR04 S, FS5
[ ] SR04 T
[ ] SR04 PT
[ ] SR04 PS, FS5
[ ] SR04 PMS
[ ] SR04 PST, FS5
[ ] SR04 P rH
[ ] SR04 PT rH
[ ] SR04 PMS rH

[ ] SR04
[ ] SR04 rH
[ ] SR04 P
[ ] SR04 S, FS5
[ ] SR04 T
[ ] SR04 PT
[ ] SR04 PS, FS5
[ ] SR04 PMS
[ ] SR04 PST, FS5
[ ] SR04 P rH
[ ] SR04 PT rH
[ ] SR04 PMS rH

All variants in next version


(GH-1446) Use second positional argument of run_plan function to spec…

…ify $targets parameter
This adds support for using the second positional argument of the
run_plan plan function to specify a plan's TargetSpec $targets
parameter.
When a plan has both a $nodes and $targets parameter, the
run_plan plan function will do the following.

If future is set, the plan will fail when there is a $nodes
and $targets parameter and the second positional argument is used.
If future is unset, the second positional argument will specify
the $nodes parameter. A deprecation warning will also be logged.

When a plan has only one of $nodes or $targets as parameters, then
the second positional argument will specify that parameter. The plan
will also fail if the second positional argument is used to specify one
of these parameters and the arguments hash specifies the same
parameter.
Closes #1446

CLA signed by all contributors.

Rebased on master.

Rebased on master.


Add original exception when selected strategy could not be loaded

https://hibernate.atlassian.net/browse/HHH-12734
Add original exception when selected strategy could not be loaded (ClassLoadingException).

@f-lopes nice, looks good!
Could you open a JIRA on our tracker (https://hibernate.atlassian.net/) for the Hibernate ORM project? Then the JIRA issue number should be added at the beginning of your commit message.
Thanks!

Done: https://hibernate.atlassian.net/browse/HHH-12734
Thanks!

I rebased and force pushed as we had a checkstyle issue (I don't think it's related to your change but I prefer to relaunch the Travis build).
Will merge once the build is green.

Merged, thanks!


Feature request: Closing with one pane left should bring you back to Empty start page

Currently, when trying to close the last pane, it shows "Deletion is not allowed with only one pane left!!!". I think it would be better if it brings you back to the start page instead of doing nothing.

This feature is now available

I have closed this issue. If you have any further problems or requests, please create a new issue.


GH - You can't escape the select products in list screen with back gesture

What

Image

If you there use the back gesture you get poped back to the latest tab you were on but the selection mode is still on.
It should be possible to quit this mode using the back gesture using WillPopScope

Implemented the fix of this. Do we need to reset the state of select products after back button press? or keep the selected products as it is?

Implemented the fix of this. Do we need to reset the state of select products after back button press? or keep the selected products as it is? @M123-dev

okay, so I added the reset as well because it seems more practical.


Table: fix el-table-column 'hover-row' class error when expend column…

… embed el-table
Please make sure these boxes are checked before submitting your PR, thank you!

[x] Make sure you follow Element's contributing guide (中文 | English).
[x] Make sure you are merging your commits to dev branch.
[x] Add some descriptions and refer relative issues for you PR.

修复 el-table 中在有 fixed 和 expand 的列时，expand 内容里嵌套 el-table 时 tr 的 hover 状态错误作用在其他 tr 上。

This bug appeared in the version after 2.8.2 ...


Focus on text area after clicking the edit button

Steps to reproduce:

Create any note.
Click the edit button.

Actual result: textarea appeared but not focused.
Wanted result: textarea should be focused and the user should be able to start typing immediately.

The same for create space pop up


Build failure in absence of ronn despite --disable-ronn flag in configuration

Short version:  ronn isn't installed on Quartz.  Standard configuration doesn't catch this and the build eventually fails.  Configuring with --disable-ronn doesn't turn off all uses of ronn, and the build still fails.
Two issues here:  catch the absence of ronn in the configuration phase, and have --disable-ronn work across the entire project.
Long version:
Building from commit 771aae78....  (Fri Aug 14 2020).  Running on quartz.llnl.gov.
Configuring as:
../../repos/geopm/configure --prefix=${HOME}/v/install/geopm

results in
version            : 1.1.0+dev463g771aae7
...
debug              : 0
coverage           : 0
overhead           : 0
mpi                : 1
openmp             : 1
fortran            : 1
ronn               : 1
ompt               : 0
beta               : 0
bloat              : 0
nvml               : 0

But the subsequent build fails on missing ronn.
mkdir -p man
export GEM_PATH=`readlink -f ../../repos/geopm/ruby`:$GEM_PATH && \
cd ronn && \
../ruby/bin/ronn --date=`date "+%Y-%m-%d"` \
                 --organization="GEOPM 1.1.0+dev463g771aae7" \
                 `basename man/GEOPM_CXX_MAN_Agent.3`.ronn
/usr/share/rubygems/rubygems/dependency.rb:296:in `to_specs': Could not find 'ronn' (>= 0) among 0 total gem(s) (Gem::LoadError)
        from /usr/share/rubygems/rubygems/dependency.rb:307:in `to_spec'
        from /usr/share/rubygems/rubygems/core_ext/kernel_gem.rb:47:in `gem'
        from ../ruby/bin/ronn:22:in `<main>'
make[1]: *** [man/GEOPM_CXX_MAN_Agent.3] Error 1
make[1]: Leaving directory `/p/vast1/rountree/build/geopm'
make: *** [all] Error 2

After configuring with --disable-ronn the build fails as follows:
test -f man/GEOPM_CXX_MAN_EnergyEfficientRegion.3 || sed 's|^\[//\]: #|.\\\"|' ronn/`basename man/GEOPM_CXX_MAN_EnergyEfficientRegion.3`.ronn > man/GEOPM_CXX_MAN_EnergyEfficientRegion.3
sed: can't read ronn/GEOPM_CXX_MAN_EnergyEfficientRegion.3.ronn: No such file or directory
make[1]: *** [man/GEOPM_CXX_MAN_EnergyEfficientRegion.3] Error 2
make[1]: Leaving directory `/p/vast1/rountree/build/geopm'
make: *** [all] Error 2

@rountree You are building out of tree.  The error you are seeing looks like a duplicate of of you're previously reported error:
https://github.com/geopm/geopm/issues/820
@bakerbrandond is working on a fix:
https://github.com/geopm/geopm/pull/1257

@rountree #1257 was just merged to the dev branch.  Please let me know if this resolves your out of place build issues with the man pages (this issue and #820).  Thanks for your feedback.

I completely forgot about that error report (although it was back in November last year).  I thought it got fixed?
Anyway....
version            : 1.1.0+dev466gd9ec167

fails here:
test -f man/GEOPM_CXX_MAN_Agent.3 || sed 's|^\[//\]: #|.\\\"|' ronn/`basename man/GEOPM_CXX_MAN_Agent.3`.ronn > man/GEOPM_CXX_MAN_Agent.3
sed: can't read ronn/GEOPM_CXX_MAN_Agent.3.ronn: No such file or directory
make[1]: *** [man/GEOPM_CXX_MAN_Agent.3] Error 2
make[1]: Leaving directory `/p/vast1/rountree/build/geopm'
make: *** [all] Error 2

The ronn/GEOPM_CXX_MAN_Agent.3.ronn exists in the source tree, of course.  And manually copying all of the files from that source directory to the build directory allowed the build to complete without error.
Barry

I completely forgot about that error report (although it was back in November last year). I thought it got fixed?
Anyway....
version            : 1.1.0+dev466gd9ec167

fails here:
test -f man/GEOPM_CXX_MAN_Agent.3 || sed 's|^\[//\]: #|.\\\"|' ronn/`basename man/GEOPM_CXX_MAN_Agent.3`.ronn > man/GEOPM_CXX_MAN_Agent.3
sed: can't read ronn/GEOPM_CXX_MAN_Agent.3.ronn: No such file or directory
make[1]: *** [man/GEOPM_CXX_MAN_Agent.3] Error 2
make[1]: Leaving directory `/p/vast1/rountree/build/geopm'
make: *** [all] Error 2

The ronn/GEOPM_CXX_MAN_Agent.3.ronn exists in the source tree, of course. And manually copying all of the files from that source directory to the build directory allowed the build to complete without error.
Barry

Hey Barry,
We had the patch to fix this up merged yesterday, I don't recognize the commit hash listed in this issue but please make sure you pull the latest, need to have 6f8c9ed9757fe4af3695e2fe526489abb965c92e at least but dev is currently at d9ec16723d8db5a71a0c322ed3a0f754a5138ab7

I completely forgot about that error report (although it was back in November last year). I thought it got fixed?
Anyway....
version            : 1.1.0+dev466gd9ec167

fails here:
test -f man/GEOPM_CXX_MAN_Agent.3 || sed 's|^\[//\]: #|.\\\"|' ronn/`basename man/GEOPM_CXX_MAN_Agent.3`.ronn > man/GEOPM_CXX_MAN_Agent.3
sed: can't read ronn/GEOPM_CXX_MAN_Agent.3.ronn: No such file or directory
make[1]: *** [man/GEOPM_CXX_MAN_Agent.3] Error 2
make[1]: Leaving directory `/p/vast1/rountree/build/geopm'
make: *** [all] Error 2

The ronn/GEOPM_CXX_MAN_Agent.3.ronn exists in the source tree, of course. And manually copying all of the files from that source directory to the build directory allowed the build to complete without error.
Barry

Ok it seems that your hash does checkout.  Have you tried completely nuking your existing build dir?  If the repro steps have changed from your original issue please provide updated steps.
After checkout out geopm and cd'ing into the source dir, running autogen.sh from there, mkdir build; cd build; ../configure;
I am able to build and install with the current tip of dev.  Is there something different in your setup?

Hmmm.....
rountree@quartz764 ~/v/repos/geopm$ date
Thu Aug 27 11:30:42 PDT 2020
rountree@quartz764 ~/v/repos/geopm$ git pull upstream dev
X11 forwarding request failed
From github.com:geopm/geopm
 * branch            dev        -> FETCH_HEAD
Already up-to-date.
rountree@quartz764 ~/v/repos/geopm$ git rev-parse HEAD
d9ec16723d8db5a71a0c322ed3a0f754a5138ab7
rountree@quartz764 ~/v/repos/geopm$ ./autogen.sh
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
rountree@quartz764 ~/v/repos/geopm$ cd ../../buil
build/        build-lassen/
rountree@quartz764 ~/v/repos/geopm$ cd ../../build/geopm/
rountree@quartz764 ~/v/build/geopm$ ls
myconfigure.sh  mydistclean.sh
rountree@quartz764 ~/v/build/geopm$ cat ./myconfigure.sh
#!/bin/bash

../../repos/geopm/configure --disable-ronn --prefix=${HOME}/v/install/geopm

Parsing the output of that....
version            : 1.1.0+dev466gd9ec167

The build still fails:
1584 libtool: link: gfortran -fopenmp -msse4.2 -I/usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/include -I/usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/include -O3 -fopenmp -Wl,-rpath -Wl,/usr/tc     e/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib -o examples/fft/.libs/nas_ft examples/fft/examples_fft_nas_ft-ft.o examples/fft/examples_fft_nas_ft-print_results.o examples/fft/examples_fft_nas_ft-r     andi8.o examples/fft/examples_fft_nas_ft-timers.o  -L/usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib ./.libs/libgeopm.so -L/builddir/build/BUILD/mvapich2-2.3/src/mpl ./.libs/libgeopmfort.so /     g/g24/rountree/v/build/geopm/.libs/libgeopm.so /usr/tce/packages/gcc/gcc-8.1.0/lib64/../lib64/libgomp.so /usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib/libmpifort.so /usr/tce/packages/gcc/gc     c-8.1.0/lib64/../lib64/libgfortran.so -lz /usr/tce/packages/gcc/gcc-8.1.0/lib64/../lib64/libquadmath.so /usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib/libmpicxx.so /usr/tce/packages/gcc/gcc-     8.1.0/lib64/../lib64/libstdc++.so /usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib/libmpi.so -lm -lnuma -libverbs -lpsm2 -lpmi2 -lelf -lpthread -ldl -lrt -fopenmp -Wl,-rpath -Wl,/g/g24/rountre     e/v/install/geopm/lib -Wl,-rpath -Wl,/usr/tce/packages/gcc/gcc-8.1.0/lib64/../lib64 -Wl,-rpath -Wl,/usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib
1585 mkdir -p man
1586 test -f man/GEOPM_CXX_MAN_Agent.3 || sed 's|^\[//\]: #|.\\\"|' ronn/`basename man/GEOPM_CXX_MAN_Agent.3`.ronn > man/GEOPM_CXX_MAN_Agent.3
1587 sed: can't read ronn/GEOPM_CXX_MAN_Agent.3.ronn: No such file or directory
1588 make[1]: *** [man/GEOPM_CXX_MAN_Agent.3] Error 2
1589 make[1]: Leaving directory `/p/vast1/rountree/build/geopm'
1590 make: *** [all] Error 2

This might help:
rountree@quartz764 ~/v/build/geopm$ ls ronn
geopm.7.ronn

Can you point me at the code that should be copying the other ronn files into the build directory?  I'm guessing this is a software version problem.
Thanks!

Hmmm.....
rountree@quartz764 ~/v/repos/geopm$ date
Thu Aug 27 11:30:42 PDT 2020
rountree@quartz764 ~/v/repos/geopm$ git pull upstream dev
X11 forwarding request failed
From github.com:geopm/geopm
 * branch            dev        -> FETCH_HEAD
Already up-to-date.
rountree@quartz764 ~/v/repos/geopm$ git rev-parse HEAD
d9ec16723d8db5a71a0c322ed3a0f754a5138ab7
rountree@quartz764 ~/v/repos/geopm$ ./autogen.sh
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIR, `m4'.
libtoolize: copying file `m4/libtool.m4'
libtoolize: copying file `m4/ltoptions.m4'
libtoolize: copying file `m4/ltsugar.m4'
libtoolize: copying file `m4/ltversion.m4'
libtoolize: copying file `m4/lt~obsolete.m4'
rountree@quartz764 ~/v/repos/geopm$ cd ../../buil
build/        build-lassen/
rountree@quartz764 ~/v/repos/geopm$ cd ../../build/geopm/
rountree@quartz764 ~/v/build/geopm$ ls
myconfigure.sh  mydistclean.sh
rountree@quartz764 ~/v/build/geopm$ cat ./myconfigure.sh
#!/bin/bash

../../repos/geopm/configure --disable-ronn --prefix=${HOME}/v/install/geopm

Parsing the output of that....
version            : 1.1.0+dev466gd9ec167

The build still fails:
1584 libtool: link: gfortran -fopenmp -msse4.2 -I/usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/include -I/usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/include -O3 -fopenmp -Wl,-rpath -Wl,/usr/tc     e/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib -o examples/fft/.libs/nas_ft examples/fft/examples_fft_nas_ft-ft.o examples/fft/examples_fft_nas_ft-print_results.o examples/fft/examples_fft_nas_ft-r     andi8.o examples/fft/examples_fft_nas_ft-timers.o  -L/usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib ./.libs/libgeopm.so -L/builddir/build/BUILD/mvapich2-2.3/src/mpl ./.libs/libgeopmfort.so /     g/g24/rountree/v/build/geopm/.libs/libgeopm.so /usr/tce/packages/gcc/gcc-8.1.0/lib64/../lib64/libgomp.so /usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib/libmpifort.so /usr/tce/packages/gcc/gc     c-8.1.0/lib64/../lib64/libgfortran.so -lz /usr/tce/packages/gcc/gcc-8.1.0/lib64/../lib64/libquadmath.so /usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib/libmpicxx.so /usr/tce/packages/gcc/gcc-     8.1.0/lib64/../lib64/libstdc++.so /usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib/libmpi.so -lm -lnuma -libverbs -lpsm2 -lpmi2 -lelf -lpthread -ldl -lrt -fopenmp -Wl,-rpath -Wl,/g/g24/rountre     e/v/install/geopm/lib -Wl,-rpath -Wl,/usr/tce/packages/gcc/gcc-8.1.0/lib64/../lib64 -Wl,-rpath -Wl,/usr/tce/packages/mvapich2/mvapich2-2.3-gcc-8.1.0/lib
1585 mkdir -p man
1586 test -f man/GEOPM_CXX_MAN_Agent.3 || sed 's|^\[//\]: #|.\\\"|' ronn/`basename man/GEOPM_CXX_MAN_Agent.3`.ronn > man/GEOPM_CXX_MAN_Agent.3
1587 sed: can't read ronn/GEOPM_CXX_MAN_Agent.3.ronn: No such file or directory
1588 make[1]: *** [man/GEOPM_CXX_MAN_Agent.3] Error 2
1589 make[1]: Leaving directory `/p/vast1/rountree/build/geopm'
1590 make: *** [all] Error 2

This might help:
rountree@quartz764 ~/v/build/geopm$ ls ronn
geopm.7.ronn

Can you point me at the code that should be copying the other ronn files into the build directory? I'm guessing this is a software version problem.
Thanks!

The code of interest is here: https://github.com/geopm/geopm/blob/dev/Makefile.am#L831-L849
I am able to make and install with a build dir that is a subdir or geopm src, or completely out of the geopm src dir.  I am successful with full paths in configure as well as relative.  I haven't logged into quartz in a while, maybe I can try to repro in your environment.

I am working to resolve something I noticed in the log since you mentioned that this issue still persists
        TMP_SRC="/home/bbaker1/dev/geopm/ronn/$TARGET_DOC" ; \
else \
        TMP_SRC="$RONN_DIR/$TARGET_DOC" ; \
fi ; \
cat "./ronn/header.txt" "$TMP_SRC.ronn" | \
        sed -e 's/\(#include.*\) \\fIhttp.*/\1\\fR/g' > man/geopmlaunch.1
/bin/sh: line 0: [: !=: unary operator expected
cat: /.ronn: No such file or directory```

Working on a fix, maybe causing your issue?  Not sure why we are seeing differences in build result error codes.

That is a really cool thing you did there with the github lines-of-code link.  But....  shouldn't that stanza be disabled if configured with the --disable-ronn flag passed to the configure script (as I did above)?

That is a really cool thing you did there with the github lines-of-code link. But.... shouldn't that stanza be disabled if configured with the --disable-ronn flag passed to the configure script (as I did above)?

You are correct.  I am conflating 2 issues, first the issue with the out of source configuration build and failure to make and install due to ronn dir path differences (still needs work); the second issue [issue 1266] if --disable-ronn is presented this should all be a no-op.


make an area chart demo

This would be a great help. I'm struggling with how to pass in context to be able to lookup the x,y scale functions to d3-shape.area

Hi @mrosenberg I was just looking at this today. I can take a crack at it tomorrow unless @zigahertz  or @guozhaonan gets to it first.

@mrosenberg can you give me a link to a D3 demo that you're referencing?

@taras That would be appreciated by myself and I'm sure many others. I can't link to the app I'm working on but I may be able to post a pen later. Of course right after I wrote that post I thought of an idea that may work. I'm writing an area helper similar to the bar-height helper in the bar chart demo.

@mrosenberg the area helper is what I was thinking is necessary.

@taras As usual I think of something right after posting. If I get it working I'll write back here, maybe I can contribute it back to the demo.

@mrosenberg sounds great and we could pull your helper into ember-d3-helpers if you get it working

@taras Sounds like a plan.

@taras I have a basic area chart up and running. I'm going to fork ember-d3-helpers and write up a demo there then publish a PR if that is OK with you.

Sounds great to me

@mrosenberg just FYI, we have a change coming to ember-d3-helpers that'll split d3-join into 3 operations. Just wanted to let you know https://github.com/LocusEnergy/ember-d3-helpers/pull/13 cause it might overlap closely with this work.

@taras I read that yesterday. Any eta on the change? I'll merge from upstream after that lands and write the example then.

The PR is in the ember-d3-helpers repo. Have a look(sorry, can't link, on phone) we should be merging it soon.

@mrosenberg just merged the PR that @taras is talking about, and published a new version of ember-d3-helpers, v0.5.5, check it out! looking forward to seeing your area helper demo!

@mrosenberg I submitted a PR to your ember-d3-helpers PR. Would love to get this going.


treewide: move from 'with lib' to 'inherit (lib) ...'

Changes most modules, only ones remaining are lsp and languages (I hope). The opportunity is yours @NotAShelf.

nix flake check is also failing on the assert-assertions  branch because of the same reason.


virustotal 5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb352aa

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm asking a question and not reporting a bug or requesting a feature
[X] I've looked through the README
[X] I've verified that I'm running yt-dlp version 2023.07.06 (update instructions) or later (specify commit)
[X] I've searched known issues and the bugtracker for similar questions including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue

Please make sure the question is worded well enough to be understood
https://www.virustotal.com/gui/file/5ff3e702171a50175c34397494e2d18ce35d771c2110b1e59bd173ec2fb352aa
possible false true W32.AIDetectMalware.64
Provide verbose output that clearly demonstrates the problem

[ ] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[ ] If using API, add 'verbose': True to YoutubeDL params instead
[ ] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
No response

The source is open and it gets automatically bundled using pyinstaller. You can check for yourself using the action that everything went as expected. No need to worry.

Duplicate of #25 -- read for explanation/discussion


【Hackathon No.80】Xlnet在CMRC数据集上进行微调

PR types

【Hackathon No.80】
PR changes

为PaddleNLP增加Xlnet在CMRC数据集上进行微调的示例
Description

为PaddleNLP增加Xlnet在CMRC数据集上进行微调的示例，修改了部分xlnet预处理text的代码，模仿squad增加了cmrc的评估指标，examples中增加了CMRC

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.0 out of 2 committers have signed the CLA.:x: yoreG123:x: yingyibiaoYou have signed the CLA already but the status is still pending? Let us recheck it.


web service need modify registry service nodes while register interval

when I start web service,  host IP:<IP_ADDRESS>
then I switch network, host IP:<IP_ADDRESS>, but web service's nodes will not modify, it's always <IP_ADDRESS>

https://github.com/micro/go-micro/blob/bd1918900e8cf554f8a08777397ad237614bcd3b/web/service.go#L93
https://github.com/micro/go-micro/blob/bd1918900e8cf554f8a08777397ad237614bcd3b/web/service.go#L111

Are you suggesting the service should re-bind to a different IP address once you've changed the host network settings?

Yes, I have make a pull request for this.
https://github.com/micro/go-micro/pull/908


Infent securety scopes for environment variables

only trusted plugins should have access to netrc vars
inject different vars into pipeline should appen in a specific package (I propose "pipeline/frontend/environment")
dedup code ...

similar:  #1071

#1646 and  #1352 should address most of this