text:
Klaviyo API hangs once every 10-20 requests

Hi there,
I noticed that, starting about 1-2 weeks ago, about one every 10-20 requests (roughly 5-10% of calls) made using the Klaviyo API for Python hang and cause my containing Django app to timeout.
I'm using klaviyo-api==2.0.0 inside a Django 3.2.11 app, which runs on a python:3.8-slim-buster with no further modifications made.
This is an issue exclusive to calls made to Klaviyo and I've excluded any connectivity issues on my side.
Any ideas, fixes or workarounds would be highly appreciated. Let me know if there is any other information I can provide.
Below is a stack trace for calls made to Profiles.create_profile(), the program is stuck on return self._sslobj.read(len, buffer) until the gunicorn timeout is hit:
    profile_id = klaviyo_client.Profiles.create_profile(body)
  File "klaviyo_api/wrapper.py", line 330, in _wrapped_func
    return func(*args,**kwargs)
  File "__init__.py", line 324, in wrapped_f
    return self(f, *args, **kw)
  File "__init__.py", line 404, in __call__
    do = self.iter(retry_state=retry_state)
  File "__init__.py", line 349, in iter
    return fut.result()
  File "concurrent/futures/_base.py", line 432, in result
    return self.__get_result()
  File "concurrent/futures/_base.py", line 388, in __get_result
    raise self._exception
  File "__init__.py", line 407, in __call__
    result = fn(*args, **kwargs)
  File "openapi_client/api/profiles_api.py", line 1013, in create_profile
    return self.create_profile_endpoint.call_with_http_info(**kwargs)
  File "openapi_client/api_client.py", line 893, in call_with_http_info
    return self.api_client.call_api(
  File "openapi_client/api_client.py", line 422, in call_api
    return self.__call_api(resource_path, method,
  File "openapi_client/api_client.py", line 199, in __call_api
    response_data = self.request(
  File "openapi_client/api_client.py", line 468, in request
    return self.rest_client.POST(url,
  File "openapi_client/rest.py", line 271, in POST
    return self.request("POST", url,
  File "openapi_client/rest.py", line 157, in request
    r = self.pool_manager.request(
  File "urllib3/request.py", line 79, in request
    return self.request_encode_body(
  File "urllib3/request.py", line 171, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "urllib3/poolmanager.py", line 336, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "urllib3/connectionpool.py", line 670, in urlopen
    httplib_response = self._make_request(
  File "urllib3/connectionpool.py", line 426, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
    # Permission is hereby granted, free of charge, to any person obtaining a copy
  File "urllib3/connectionpool.py", line 421, in _make_request
    httplib_response = conn.getresponse()
  File "http/client.py", line 1347, in getresponse
    response.begin()
  File "http/client.py", line 307, in begin
    version, status, reason = self._read_status()
  File "http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
  File "gunicorn/workers/base.py", line 201, in handle_abort
    sys.exit(1)

Hey,
Thanks for reaching out, and apologies for the late response.
I'm wondering if this is due to our built-in retries.
Can you try altering the retry settings; that may lower the wait time that causes the gunicorn timeout.
For reference, the retry settings (with default values) at the client level are:
klaviyo = KlaviyoAPI("YOUR_API_KEY_HERE", max_delay=60, max_retries=3)

where max_delay is the total delay across all retry attempts.
If you'd like to turn off retries altogether and implement your own error handling, you can set:
klaviyo = KlaviyoAPI("YOUR_API_KEY_HERE", max_delay=0, max_retries=0)

hey @jon-batscha - qq regarding retries mechanism - on what status codes does the library makes retries?
we occasionally get 502 responses (like once a day, usually multiple of those at the same time) from the klaviyo api, and not sure if the client library makes a retry on those.
seems to us that it does not and wanted to double check that with you...
also, we would like to use the _request_timeout variable to use that and i'm not sure how does that combines with the max_delay and max_retry when setting the API class.
last time we saw this was around 23:00 UTC time Aug 28th..
example of error response we see in our logs (seems also something with cloudflare?)

Hi Oded,
Thanks for reaching out, great question!
I actually just updated the retry logic in today’s release (thanks to your feedback), so what I’ll describe below applies to versions 5.3.0 and later:

we retry on the following error codes:

    _STATUS_CODE_CONNECTION_RESET_BY_PEER = 104
_STATUS_CODE_TOO_MANY_REQUESTS = 429
_STATUS_CODE_SERVICE_UNAVAILABLE = 503
_STATUS_CODE_GATEWAY_TIMEOUT = 504
_STATUS_CODE_A_TIMEOUT_OCCURED = 524
NOTE: we do not retry on 502 errors, as those are not guaranteed to be transient, and so retrying on those could hold up jobs. That said, our API team is aware of the occasional 502s and is working to fix this on our end (at the API-level).
In terms of the retry logic: we currently take the following 2 params:

max_delay
max_retries

We retry up to max_retries, using the following algorithm: wait_random_exponential
The algorithm starts with a 1 second wait, and at each retry, doubles the wait time, up to max_delay
Given this updated logic, we now recommend the following default values (now reflected in our defaults/readme:

max_delay = 60
max_retries = 7

With this setting, the SDK will behave as follows:

First request, no delay
Second request, wait 1 second before retrying
… wait 2 seconds before retrying
… wait 4 seconds …
… 8 seconds …
… 16 seconds …
… 32 seconds …

At this point, if no success, we’ll stop retrying.
You can find the code that implements retry logic and sets retry codes here.
Hopefully this answers your question. Please do not hesitate to reach out if you run into any further issues.
(I also received your email yesterday, will follow up on the questions you sent over there in a bit)

closing this issue as it has been inactive for ~ 6 months

authors: controldev jon-batscha odedva sanfordj

repo: klaviyo/klaviyo-api-python


text:
GeoServer: Set Log level

Set the log level using a env var for only selected logging messages.
Will be possible after PR is merged: https://github.com/meggsimum/geoserver-docker/pull/14

moved to internal issue tracking

source: gharchive/issue

repo: klips-project/klips-sdi

license_type: permissive

license_source: github-api


text:
Login

User field prompt is an e-mail - tada@klp.org.in  . It's misleading because you are expecting the userid /username . Maybe just say 'User name not e-mail' in the place holder and 'Password' (instead of "Hint:..")

This is done. I'll merge it in and then close it.

authors: meghaklp subhaklp

repo: klpdotorg/tada-frontend

license: isc

license_source: bigquery


text:
Frozen & Lagging

@kmikiy I really love the app, but I am currently experiencing lagging between Spotify and SpotMenu, when I change a song it takes about 2 seconds to update on SpotMenu.  And it also shows the album cover as a blank person and takes another couple seconds to update.
In the notification centre is has frozen on a song and won't change to the correct song, despite me uninstalling the app and reinstalling it again. The same song is still frozen in the notification centre

Hey, is the lag similar to issue #47 or is it just a ~1.5 second delay between changing songs in spotify and the menubar to update? If its the latter than thats normal, because the current song playing is checked periodically and the app only checks the current song in 1.5 second intervals to save cpu usage.
The album cover is downloaded from the internet because it cant be retrieved from the Spotify AppleScript API. The delay can be due to connection issues. If you don't have an internet connection then the album art cant even be displayed sadly.
I'll see what I can do about the notification center widget, I havent experienced that, and to be honest I don't use the notification center widget.
Could you explain in more detail what happened precisely with the widget? Did it work then just stopped working? Etc

Hey, yes I think it was, everything is working fine now.
Regarding that issue the notification center widget;

I was changing songs and it seemed to freeze on a song the notification centre, but in the tool bar it was fine and changing to the correct song.
So I removed it from the notification centre and then put it back in , but still no change.
I then uninstalled the app and reinstalled it, but that same song was still frozen on the notification centre, the tool bar was fine and continued to change, when I skipped songs.
I then shutdown my laptop, turned it back on, got the app running again and the the notification centre widget was fine.

repo: kmikiy/SpotMenu

license: mit


text:
Too much icons on menu bar

Hello, I really liked your app, but can I give you a tip? In the title already says, in the menu bar has more icons, we have the icon of spotify and one that appears when the music is playing. I think only the name of the song would be great.

I'll try to add a settings view where these can customized, because everyone has different preferences

Yes!, your idea is even better!, customization is great! we love it

Just discovered this app and it's great, agree with the preference option though! First thing I looked for when I installed

Added preferences in Version 1.4. Please check it out and notify me of any issues 🙂

Very good! I really liked the customization options, I'm already using it and if I find something wrong I notice

That's great, thanks!

authors: jknlsn kmikiy maurojuniorr


text:
Timing tasks in the range of Microseconds, using QuarkTs with Omnetpp

Hi,
Recently I came across a scenario where I may need to time tasks below 1 Millisecond - mainly within a simulation framework like Omnetpp. I somehow like the idea of using QuarkTS with Omnet as it would allow me to reuse a lot of code I will write for the simulation than in the actual firmware.
The plan is to use Omnetpp Self-Messages to simulate the ticks for QuarkTs. As I won't use a custom IDLE function, I thought about executing the QuarkTs Run Function after every Tick call and/or events. This should then execute all timed and event-driven tasks when I remember the kernel code correctly.
Coming to my questions:

What is your opinion on using a non-preemptive OS for timing below a millisecond?
Do you think the simulation would work with the proposed solution?
Without deep-diving into the code: is scheduling below a millisecond even possible with the current implementation? I normally use Q_SETUP_TIME_CANONICAL

Thanks for your effort!

Hi @HpLightcorner,
I don't have much knowledge of Omnetpp, but basically what you need for QuarkTS to meet temporary specifications is that you have to feed its internal tick from a context running in the background by invoking the qOS_SysTick () function. In embedded systems this is accomplished with a timer interrupt. This tick can be less than 1mS, but keep in mind that the maximum times you can define will be less.
For example:

For 1mS tick, the maximum time you can define is 49.7 days.
for 1uS tick the maximum time you can define is 71.58 minutes.

you can also use different time bases, for example 50uS

for 50uS tick the maximum time you can define is 59.65 hours.

If you do this, all the specifications should be aligned to that base.
for example, if you want to create a task that runs every 2sec
/ * Im assuming that your are using Q_SETUP_TIME_CANONICAL * /
#define TICK_TIME (50uL) / * uS * /
#define DESIRED_TASK1_PERIOD ( 2uL ) / * Sec * /
#define TASK1_PERIOD_SPEC              ( (DESIRED_TASK1_PERIOD * 1e6) / TICK_TIME )
qOS_Add_Task (& Task1, Task1Callback, qMedium_Priority, TASK1_PERIOD_SPEC , qPeriodic, qEnabled, NULL );
and the qOS_Run() function must be executed in a base context without any type of time control, basically at the maximum of the CPU (at full speed) or at least at a time significantly faster than the Tick that you are using as time-base.
it would be impossible to ask a task for 1uS if the tick is also running at 1uS.
Even if we ask 5us to a task and the tick is 1uS it would also be difficult to achieve, we must bear in mind that there are also other tasks that must be verified and it is possible that the required time specification cannot be met.
I hope that in this last you have understood my point.
ok, so going to your questions:
What is your opinion on using a non-preemptive OS for timing below a millisecond? totally possible
Do you think the simulation would work with the proposed solution? its posible, but you also need to call both, the qOS_SysTick and the qOS_Run. Just keep in mind what I mentioned before.
Without deep-diving into the code: is scheduling below a millisecond even possible with the current implementation? I normally use Q_SETUP_TIME_CANONICAL . Yes, but the maximum times that you can define will be less
just to complement, I think this kind of discussions can be moved here  :) ,  https://github.com/kmilo17pet/QuarkTS/discussions
let me know if you need more info.
Best,

license: MIT


text:
Csv

Esse PR é relacionado com a task CSV https://trello.com/c/P4nx1a7f/4-csv
Somente fazer merge dessa branch quando a tarefa estiver completa

Criamos os templates csv das tabelas @viniciussousaazevedo @AlefAdonis

source: gharchive/pull-request

repo: kmmelcher/plp-sad


text:
LC-535: added ability to ignoreFields in SolrIndexer

added field uniqueKey for user to define if a different uniqueKey was used in Solr Schema
allows user to remove "id" field
SolrIndexer will now use uniqueKey if stated to add/update/delete documents

We already support an idOverrideField which allows the user to specify an alternate field like "myId" to use as the value of the "id" to be sent to Solr.
But what if the user has specified "myId" as the uniqueKey in their Solr schema and they don't want an "id" field to be included on documents in the index.
In this case we just want to allow them to specify "id" in the list of ignoreFields and make sure SolrIndexer removes "id" before sending the SolrDocument to solr.
I don't think there's a need for the user to have to specify the "uniqueKey" explicitly in the indexer config. In this use case, they would specify idOverrideField=myId and ignoreFields=["id"]. SolrIndexer doesn't need to know about the Solr schema and what uniqueKey is used there, it just needs to send documents with "myId" populated, which can be achieved via pipeline stages that set that field appropriately, and it needs to know not to send "id".

authors: Jozurf rseitz

repo: kmwtechnology/lucille


text:
最適化がかからないように書いたフィボナッチが正しくないコードに変換される

Summary / 概要
行列累乗に変換されないように書いたフィボナッチ数列の第 N 項を求めるコードが、C++ に変換された際にフィボナッチ数列の第 N 項を求めていない
Steps to reproduce / 再現方法

$ cat a.pyfrom typing import *

def solve(n: int) -> int:
    a = 0
    b = 1
    lis = []
    for i in range(n):
        lis.append(0)
    for i in lis:
        c = a + b + i
        a = b
        b = c
    return b

def main():
    n = int(input())
    ans = solve(n)
    print(ans)

if __name__ == "__main__":
    main()

$ stack run convert a.py > a.cpp
$ cat a.cpp// ...
int64_t solve(int64_t n_0) {
    std::vector<int64_t> x1;
    for (int32_t i2 = 0; i2 < int32_t(n_0); ++ i2) {
        x1.push_back(0);
    }
    int64_t x5_9 = 1;
    int64_t x5_10 = 0;
    for (int64_t x6 : x1) {
        x5_9 = x6 + x5_9 + x5_10;
        x5_10 = x5_9;
    }
    return x5_9;
}
// ...

$ echo "10" | python a.py89

$ g++ a.cpp && echo "10" | ./a.out512

environments:

version: (please write the versions of related things, e.g. $ stack run --version)
$ git log --oneline -1a7cafc0 (HEAD -> master, origin/master, origin/HEAD) Merge pull request #149 from kmyk/script-to-add-sample-cases

comment

core 言語ではノンブロッキング代入みたいな挙動をする書き方になっていたのが C++ に直すタイミングでそうでなくなった結果変なことになっているのかなと思ったりしましたが何もわかりませんでした 😢

「core 言語ではノンブロッキング代入みたいな挙動をする書き方になっていたのが C++ に直すタイミングでそうでなくなった結果変なことになっているのかな」という予想は正しそうで、バグってるのはたぶん src/Jikka/CPlusPlus/Convert/MoveSemantics.hs か src/Jikka/CPlusPlus/Convert/UnpackTuples.hs の中のどこかです。でも具体的にこの中のどこでどうなってるのかは書いた自分でもすぐには分からない

メモ: C++ に変換される直前の core 言語の式
fun (n$607: int) ->
    foldl((fun ($608: int * int) ($609: int) ->
        ($609 + $608.0 + $608.1, $608.0)
    ), (1, 0), iterate(n$607, (fun ($610: int list) ->
        snoc($610, 0)
    ), nil<int>)).0

@uta8a 同じバグで WA になってるものが #150 にもあるかも？

https://github.com/kmyk/Jikka/blob/a7cafc004079bfa42256544f5cf4f033b31f71ed/src/Jikka/CPlusPlus/Convert.hs#L24
この行をコメントアウトしたら正しいコードが出力されるようになった

MoveSemantics.hs が以下のような C++ について
int func(vector<int> a) {
    vector<int> b = a;
    b.push_back(10);
    vector<int> c = b;
    c.push_back(10);
    return b.size() + c.size();
}

これを間違えて
int func(vector<int> a) {
    a.push_back(10);
    a.push_back(10);
    return a.size() + a.size();
}

に変換してるぽい

いや、これは無関係な別のバグでは？

MoveSemantics をコメントアウトしてもコードがほぼ変わらないので、それは別のバグな気もしています 😇
(a, b) = (c, d)

を
a = c
b = d

に変換するのではなく状況に応じて
tmp_1 = c
tmp_2 = d
a = tmp_1
b = tmp_2

みたいにする、みたいなロジックってどこかに組み込まれていたりしますか？

core でも let (a, b) = (c, d) in ... のような書き方はできないようになってます。
C++ だと auto [a, b] = ...; は一応はあるが使われていないはず。
なので  std::pair<int, int> e = make_pair(c, d); から考えはじめてよいです。
まず
std::pair<int, int> e = make_pair(c, d);
f(get<0>(e));

を
std::pair<int, int> e0 = get<0>(make_pair(c, d));
std::pair<int, int> e1 = get<1>(make_pair(c, d));
f(e0);

にするような変換 (UnpackTuples.hs) があります。これをさらに
int e0 = c;
int e1 = d;
f(e0);

にするような変換 (同じく UnpackTuples.hs) があります。
これ以上のことはしていません。

ここまで展開されると
int e1 = d;
f(c);

という copy を move にする変換 (MoveSemantics.hs) が動くこともありますが、今回は関係なかったようです。

追加です。忘れてたのですが、
std::pair<int, int> e = make_pair(c, d);
f(get<0>(e));
e = make_pair(x, y);

みたいな状況だと
std::pair<int, int> e0 = get<0>(make_pair(c, d));
std::pair<int, int> e1 = get<1>(make_pair(c, d));
f(e0);
auto [e0, e1] = make_pair(x, y);

にするんでした。なんだかこれが悪い気がします

だから、問題の代入を
pair<int, int> tmp = make_pair(x, y);
e0 = get<0>(tmp);
e1 = get<0>(tmp);

にすればよいはず。
具体的なコードは以下のあたり
https://github.com/kmyk/Jikka/blob/41cc148426aa10eb770aaa08882d8b7268c45606/src/Jikka/CPlusPlus/Convert/UnpackTuples.hs#L164-L179

@riantkb かなり手伝ってもらったし、せっかくなので最後の部分やりませんか？ 一時変数を置く処理を足す修正と今回使った a.py をテストに追加する (#141) 作業です

haskell わからん〜〜〜、となっているんですが、せっかくなのでやりたい気持ちがあります

最初に示したコードが（N が小さい範囲では）正しく変換できることを確認し、またその過程で遭遇した問題をこちらのコメントに記したので、この issue は閉じようと思います。
https://github.com/kmyk/Jikka/issues/154#issuecomment-894334767

authors: kmyk riantkb

repo: kmyk/Jikka


text:
Failed Contour Gateway Test - GKE issue

I recreated the issue here - https://github.com/dprotaso/gke-l4-broken

I reached out to some Google folks
/assign @dprotaso

Public issue: https://issuetracker.google.com/350722362

repo: knative-extensions/net-gateway-api


text:
[Automated] Format markdown

Produced via:
prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github | grep -v docs/cmd/)

Cron. -vaikas
/cc knative-sandbox/channel-wg-leads
/assign knative-sandbox/channel-wg-leads

/retest

authors: aliok knative-automation

repo: knative-sandbox/eventing-kafka


text:
Upgrade Sarama To v0.30.0

In general we want to keep up with Sarama Kafka Client library dependencies.  Specifically not being up to date was causing problems for eventing e2e tests (see PR #972)

Proposed Changes

🎁 Move Sarama from v0.29.1 to v0.30.0
🧽 Add missing ClusterAdmin interface functions to mocks
🐛 Update common offset tests to return ApiVersionsRequest response

/test pull-knative-sandbox-eventing-kafka-upgrade-tests


text:
[master] Auto-update dependencies

Produced via:
./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh
/assign n3wscott shashwathi tanzeeb
/cc n3wscott shashwathi tanzeeb

/lgtm

authors: chizhg mattmoor

repo: knative-sandbox/net-contour


text:
cleanup: update istio deps, last one before 0.26.x

Signed-off-by: Kenny Leung kleung@chainguard.dev

Changes

🧹 update istio deps, last one before 0.26.x

/kind cleanup

Fixes #

Release Note

update istio deps, last one before 0.26.x

Docs

/retest

/retest

/retest

/lgtm
/approve

repo: knative-sandbox/net-istio


text:
Add ServiceAccountName to ContainerSource and KES

Fixes #49
Proposed Changes

Add ServiceAccountName to ContainerSource and pass it through to the Deployment.
Add ServiceAccountName to KES and pass it through to the ContainerSource.

Release Note

ContainerSource now supports ServiceAccountName for setting the service account of
created Pods.

KubernetesEventSource now supports ServiceAccountName for setting the service
account of created Pods.

/cc @vaikas-google @n3wscott

/lgtm
We should also add a doc with the 'standard' Source fields. I think so far they are:

serviceAccountName
sink

We should also add a doc with the 'standard' Source fields. I think so far they are:

Sure, where should this live? Is it part of this PR?

/retest

Oops, shouldn't have merged master - didn't mean to remove lgtm

/lgtm

/retest pull-knative-eventing-sources-go-coverage

/test pull-knative-eventing-sources-go-coverage

We should also add a doc with the 'standard' Source fields. I think so far they are:

Sure, where should this live? Is it part of this PR?

I'm not sure where in the repo it should live. But it should be linked from the 'make a new source' readme (which I assume is the main repo's readme for now).

authors: adamharwayne grantr n3wscott

repo: knative/eventing-sources


text:
Making network host not the default option for linux

Is there any reason why host is the default option for linux?
https://github.com/knative/func/blob/main/buildpacks/builder.go#L124-L126
Based on the docs (https://docs.docker.com/network/host/ ), this option is good for performance when the container is going to handle a large number of ports, but I don't think we have that scenario here.
By commenting out this check I managed to get func build containers on GitPod and avoid this issue:
https://github.com/gitpod-io/gitpod/issues/16022

@matejvasek thanks a lot for helping me to troubleshoot this, I wonder if you know who might know why we added that check in the first place.

@salaboy it is used so docker connection tcp socket on 127.0.0.1 works.
Most people use unix socket/winpipe still it is nice to make also tcp work by default.
AFAIK problem is user-namespace-enable + host-network, could you add check for user namespaces?

@salaboy could you modify condition so network=host is used only if user ns are not enabled?

@matejvasek is there any way to check for that?

I don't know.

Ok.. I am sure the answer is here.. so I will do my research: https://docs.docker.com/engine/security/userns-remap/#disable-namespace-remapping-for-a-container

@salaboy any chance to look into this?

authors: lance matejvasek salaboy

repo: knative/func


text:
[master] Auto-update dependencies

Produced via:
./hack/update-deps.sh --upgrade && ./hack/update-codegen.sh
/assign tcnghia
/cc tcnghia

/retest

I'm looking into this issue.

Build breakage is fixed and deps updated in https://github.com/knative/net-istio/pull/90 .
/close

authors: mattmoor tcnghia vagababov

repo: knative/net-istio


text:
Improve client error message when our webhook doesn't have a certificate

Changes

:broom:  Return tls: certificate not configured vs. the opaque tls: internal error when the webhook doesn't have a certificate to present

/kind cleanup

Release Note

NONE

Docs

NONE

/kind cleanup

/kind cleanup

/lgtm
/approve

/lgtm
/approve

authors: dprotaso vagababov

repo: knative/pkg


text:
Parse questions from Markdown files

Authors can add questions to their articles by using the following syntax in the front-matter of their Markdown files:
---
...
questions:
  - ['question tag', 'question text']
  - ['question tag', 'question text']
---

When a repository is pulled or cloned as part of the Build process, its content is parsed to identify questions within each Markdown files. The questions are saved in the database if they don't exit.
Other improvements

User or administrator authentication is required to access articles through the CollectionsController
Mentions of sign out was replaced by logout for consistency

https://github.com/state-machines/state_machines

State machines will be implemented in separate PR

repo: knewplay/knewhub


text:
add Emmental example

Add Emmental example
#1

Thanks!

authors: angyvolin uwx

license: unlicense


text:
修改配置文件中文产生乱码

以手动输入的方式配置文件，如果含有中文就会乱码。但是配置项包含中文就不存在乱码的情况

系统环境问题导致，已解决

repo: knightliao/disconf


text:
[Serum-Exchange] initial scaffold commit

This is some scaffolding and parts required for using Serum
I am currently in the process of translating typescript and JavaScript logic to be able to subscribe to Serum in Java. There are several parts to getting this working correctly but I think it makes sense to commit this in parts given it's a lot of logic.
I had to inevitably bring one dependency Java Binary Block Parser (JBBP) because without deserializing the raw bytes is a lot of code/hard to read.

@timmolter

Looks awesome except for the test failures!!

Should be good now

authors: earce timmolter

repo: knowm/XChange


text:
Add bybit full implementation of Order logic for interface version V3

Added logic for  limited order, trade histrory, cancel order , ....

Hello, can you please update these for V5 instead of V3. They will make it deprecated. Thank you

authors: makarid wesssup


text:
Brew formula

Hello!
Thanks for the tool. Are you planning to create homebrew formula to install it on mac?
If not really, would you mind if I add it mysqlf to my nettools repo ?

I'll try to make it available to all the various system repositories. I'm not familiar with what's needed for publishing a homebrew formula, but I'll look into it.

I plan to maintain Windows Chocolatey repositor package. I would need, however, Windows build that provides oracle support.

I was able to get to get out a homebrew formula, which you can now use with homebrew:
# add the xo tap
$ brew tap xo/xo

# install regular usql with "most" drivers (all drivers excluding oracle and odbc)
$ brew install usql

# install usql with odbc and oracle drivers
$ brew install usql --with-oracle --with-odbc

authors: ZloeSabo kenshaw majkinetor

repo: knq/usql


text:
Support energy sensors that resets at midnight

Since version 0.4.0 the score adds up constantly. It shows a value higher than 100%. This did not happen before this version.

The attributes show this:
state_class: measurement
energy_entity: sensor.zonneplan_p1_electricity_consumption_today
price_entity: sensor.zonneplan_current_electricity_tariff
quality: 1
total_energy:
2022-12-28T12:00:00+0100: 8.65
2022-12-28T13:00:00+0100: 9.1
2022-12-28T14:00:00+0100: 9.68
2022-12-28T15:00:00+0100: 10.2
2022-12-28T16:00:00+0100: 10.81
2022-12-28T17:00:00+0100: 11.52
2022-12-28T18:00:00+0100: 12.34
2022-12-28T19:00:00+0100: 13.08
2022-12-28T20:00:00+0100: 13.68
2022-12-28T21:00:00+0100: 14.12
2022-12-28T22:00:00+0100: 14.54
2022-12-28T23:00:00+0100: 14.95
2022-12-29T00:00:00+0100: 0.38
2022-12-29T01:00:00+0100: 0.8
2022-12-29T02:00:00+0100: 0.96
2022-12-29T03:00:00+0100: 1.63
2022-12-29T04:00:00+0100: 2.03
2022-12-29T05:00:00+0100: 2.45
2022-12-29T06:00:00+0100: 3.04
2022-12-29T07:00:00+0100: 3.47
2022-12-29T08:00:00+0100: 3.89
2022-12-29T09:00:00+0100: 4.54
2022-12-29T10:00:00+0100: 5.02
2022-12-29T11:00:00+0100: 5.34
price:
2022-12-28T12:00:00+0100: 0.21
2022-12-28T13:00:00+0100: 0.19
2022-12-28T14:00:00+0100: 0.16
2022-12-28T15:00:00+0100: 0.19
2022-12-28T16:00:00+0100: 0.2
2022-12-28T17:00:00+0100: 0.21
2022-12-28T18:00:00+0100: 0.21
2022-12-28T19:00:00+0100: 0.18
2022-12-28T20:00:00+0100: 0.18
2022-12-28T21:00:00+0100: 0.15
2022-12-28T22:00:00+0100: 0.12
2022-12-28T23:00:00+0100: 0.1
2022-12-29T00:00:00+0100: 0.08
2022-12-29T01:00:00+0100: 0.08
2022-12-29T02:00:00+0100: 0.07
2022-12-29T03:00:00+0100: 0.07
2022-12-29T04:00:00+0100: 0.07
2022-12-29T05:00:00+0100: 0.08
2022-12-29T06:00:00+0100: 0.08
2022-12-29T07:00:00+0100: 0.08
2022-12-29T08:00:00+0100: 0.12
2022-12-29T09:00:00+0100: 0.18
2022-12-29T10:00:00+0100: 0.2
2022-12-29T11:00:00+0100: 0.19
last_updated: '2022-12-29T11:59:46.345340+01:00'
unit_of_measurement: '%'
icon: mdi:speedometer
friendly_name: Total Energy Score

I guess you found a bug! Could you please attach a picture of the sensor attributes?

I updated the post with the attribute values. Is that what you need?

I think I understand the issue here.. You are using an energy sensor that resets every day, while the integration is currently is set up to handle sources that are constantly increasing (without resetting). I think I can add support for such sensors as you have quite quickly, but if you can't wait for it, you could change to a different type!

I think I understand the issue here.. You are using an energy sensor that resets every day, while the integration is currently is set up to handle sources that are constantly increasing (without resetting). I think I can add support for such sensors as you have quite quickly, but if you can't wait for it, you could change to a different type!

That's correct, my energy provider integration only sends the daily consumption (which I find odd). I do not have the total consumption in my system. I can add a P1 meter myself to get that info or create a custom template, but it would be great to work with daily consumption as well. Not sure if other users face the same issue that they do not get the total consumption from their provider's integration.

I think this could be a problem for many actually. If you have developer tools active for your installation, could you please attach the information on your energy sensor so I can have a look at it to understand how to implement this feature?

Here you go!

It might also be an idea to let people use the utility meter integration for this so that they can create their own sensor based on whatever input. And use that sensor in your configuration in the configuration.yaml. Just an idea. Not sure if it makes sense.

It might also be an idea to let people use the utility meter integration for this so that they can create their own sensor based on whatever input. And use that sensor in your configuration in the configuration.yaml. Just an idea. Not sure if it makes sense.

Should be possible already 😀

It might also be an idea to let people use the utility meter integration for this so that they can create their own sensor based on whatever input. And use that sensor in your configuration in the configuration.yaml. Just an idea. Not sure if it makes sense.

Should be possible already 😀

I'm a bit puzzled. The utility meter resets too (daily, weekly, monthly, yearly). Doesn't that mean that this results in the same issue that I currently have with the daily measurements?

Oh wait, I now see that cycle is optional. Never knew that. Let's try this...

I think most people's energy sensors are native, usually not resetting I would guess. Home Assistant docs recommends to treat totals like this (state class:total with no last reset), docs available here.
I have been meaning to dive into this, so thanks for reporting this and pushing me to understand this! I should have a fix for all state class types ready within the hour.

@smarthomejunkie That was way more complicated than I thought at first, especially testing all the edge cases. But I think I have a good solution for this now. This was released in version 0.4.1, should be available in HACS within the hour. Thanks for reporting!

Thank you so much for fixing this. Will download it as soon as it's available!

Seems to be fixed! Great job!

Hmmm,
I think it was an old value. I created a template and automation to calculate the total value and that worked today. After I installed the update, I guess that value was still shown. Now, after running it for about an hour with the old sensor reinstated, I get this value. Let's see tomorrow morning what the result is.

Wow, that seems like an odd number. To recreate that, I need to understand the data. Please paste the sensor attributes if the problem persists!

This morning the value is as follows:
These are the values of the sensor:
State: 453383
state_class: measurement
energy_entity: sensor.zonneplan_p1_electricity_consumption_today
price_entity: sensor.zonneplan_current_electricity_tariff
quality: 0.96
total_energy:
2022-12-30T09:00:00+0100: 6.42
2022-12-30T10:00:00+0100: 6.79
2022-12-30T11:00:00+0100: 7.13
2022-12-30T12:00:00+0100: 7.74
2022-12-30T13:00:00+0100: 14940
2022-12-30T14:00:00+0100: 15950
2022-12-30T15:00:00+0100: 16250
2022-12-30T16:00:00+0100: 16680
2022-12-30T17:00:00+0100: 16940
2022-12-30T18:00:00+0100: 20830
2022-12-30T19:00:00+0100: 21290
2022-12-30T20:00:00+0100: 21510
2022-12-30T21:00:00+0100: 14.31
2022-12-30T22:00:00+0100: 14.79
2022-12-30T23:00:00+0100: 15.11
2022-12-31T00:00:00+0100: 0.3
2022-12-31T01:00:00+0100: 0.63
2022-12-31T02:00:00+0100: 0.96
2022-12-31T03:00:00+0100: 1.27
2022-12-31T04:00:00+0100: 1.59
2022-12-31T05:00:00+0100: 1.93
2022-12-31T06:00:00+0100: 2.43
2022-12-31T07:00:00+0100: 2.81
2022-12-31T08:00:00+0100: 3.2
price:
2022-12-30T09:00:00+0100: 0.11
2022-12-30T10:00:00+0100: 0.1
2022-12-30T11:00:00+0100: 0.1
2022-12-30T12:00:00+0100: 0.1
2022-12-30T13:00:00+0100: 0.1
2022-12-30T14:00:00+0100: 0.1
2022-12-30T15:00:00+0100: 0.11
2022-12-30T16:00:00+0100: 0.1
2022-12-30T17:00:00+0100: 0.11
2022-12-30T18:00:00+0100: 0.1
2022-12-30T19:00:00+0100: 0.1
2022-12-30T20:00:00+0100: 0.11
2022-12-30T21:00:00+0100: 0.08
2022-12-30T22:00:00+0100: 0.08
2022-12-30T23:00:00+0100: 0.08
2022-12-31T00:00:00+0100: 0.08
2022-12-31T01:00:00+0100: 0.08
2022-12-31T02:00:00+0100: 0.08
2022-12-31T03:00:00+0100: 0.08
2022-12-31T04:00:00+0100: 0.08
2022-12-31T05:00:00+0100: 0.08
2022-12-31T06:00:00+0100: 0.08
2022-12-31T07:00:00+0100: 0.08
2022-12-31T08:00:00+0100: 0.08
last_updated: '2022-12-31T08:17:43.424392+01:00'
unit_of_measurement: '%'
icon: mdi:speedometer
friendly_name: Total Energy Score

Thanks, even though it should not behave like it does, it seems to me that there is something odd with your energy sensor, look at the values between 13:00 and 20:00!

Yes, this is probably because of the automation and custom template that I've created. Is there a possibility to delete these data?

Yes, there is something off with your energy values. They will go out of the data set within today, since EnergyScore only holds 24 hours of data. Not a way to purge the data, but good idea, think I will create a service for that!
I will try to replicate the score using your data, and see if there is something off here.

I do think those strange values are totally my fault for experimenting with creating a custom sensor to create the total energy consumption. I believe it will solve itself during the day. Thank you for your support! I think I will create a YouTube video of this integration. Love the idea!

@smarthomejunkie : With the help of your code, I found a serious bug in the code. Thanks for reporting again. Release v0.4.2 should be on its way to HACS within the hour with a fix!

You're welcome 😂

authors: knudsvik smarthomejunkie

repo: knudsvik/EnergyScore


text:
add all the links related to the ko to ko.build website

Many articles, videos, conference talks, presentations, etc., are available related to the ko project. These are super important for the new people who want to learn more about the ko project in addition to the getting-started documentation of the project.
So, I'm proposing that it'd be better to create another page to include all these notable links about ko.
I can take the responsibility of creating that page ☝

How would we organize and update this page? I don't want just a wall of undifferentiated links, and I don't want to get in the business of having to tell folks their link should go higher or lower than another, or isn't about ko "enough" to qualify.
I'm not saying no, I just wonder what would go on the page and how we can make sure it's useful.

I just thought it might be helpful to provide introductory blog posts, videos, workshops, etc. for people who might want to learn more about the use cases of ko in the ecosystem. I also do think that it might cause a positive impact on the community because people might want to be part of that "hall of fame", so they might start providing resources about ko.

authors: developer-guy imjasonh

repo: ko-build/ko


text:
Bug in Pagination component if count < 6

Hello! i use pagination component with fixedItems props. if count={} of total pages <= 6 i see this (on screen shot). can this be fixed?
Reproduce: https://stackblitz.com/edit/solidjs-templates-h6gz6h?file=src%2FApp.jsx

I can confirm the issue

@pgswow you didn't provide page={1} and defaultPage={1}, you can also remove the fixedItems items parameter.
Here's a fixed demo

@pgswow you didn't provide page={1} and defaultPage={1}, you can also remove the fixedItems items parameter.
Here's a fixed demo

Well, removing fixedItems is not a fix.
This is clearly a bug.
Imagine you fetch items from an api. You won't know how many items/pages will be there.
If you choose to have fixed items, the pagination component should not return invalid indexes.
I'll try to provide a PR, but this is very tricky for edge cases.

Please investigate another issue: when you delete last item on a page>=2, the pagination component will crash, showing some error RangeError: Invalid array length with these lines:
//
	return (
		<>
			<Show when={showFirst()}>{context.renderItem(1)}</Show>

			<Show when={showFirstEllipsis()}>{context.renderEllipsis()}</Show>

			<For each={[...Array(previousSiblingCount()).keys()].reverse()}>
				{(offset) => <>{context.renderItem(context.page() - (offset + 1))}</>}
			</For>

			{context.renderItem(context.page())}

                         {'RIGHT HERE'}
			<For each={[...Array(nextSiblingCount()).keys()]}>
				{(offset) => <>{context.renderItem(context.page() + (offset + 1))}</>}
			</For>
                         {'RIGHT HERE'}

			<Show when={showLastEllipsis()}>{context.renderEllipsis()}</Show>

			<Show when={showLast()}>{context.renderItem(context.count())}</Show>
		</>
	);

Please investigate another issue: when you delete last item on a page>=2, the pagination component will crash, showing some error RangeError: Invalid array length with these lines:
//
	return (
		<>
			<Show when={showFirst()}>{context.renderItem(1)}</Show>

			<Show when={showFirstEllipsis()}>{context.renderEllipsis()}</Show>

			<For each={[...Array(previousSiblingCount()).keys()].reverse()}>
				{(offset) => <>{context.renderItem(context.page() - (offset + 1))}</>}
			</For>

			{context.renderItem(context.page())}

                         {'RIGHT HERE'}
			<For each={[...Array(nextSiblingCount()).keys()]}>
				{(offset) => <>{context.renderItem(context.page() + (offset + 1))}</>}
			</For>
                         {'RIGHT HERE'}

			<Show when={showLastEllipsis()}>{context.renderEllipsis()}</Show>

			<Show when={showLast()}>{context.renderItem(context.count())}</Show>
		</>
	);

Well that's probably because you pass a page to the Pagination component which does not exist anymore after removing the item.
An example:
You have 11 items in an array.
You render 10 items per page.
currentPage=2
    count={ Math.ceil( items().length / 10 )}
    page={currentPage}
...

Now if you delete the last item you'll only have 1x page left but page still points to page 2 - thus the error.
--> you need to recalculate the page when deleting items, e.g. simple fix:
   count={ Math.ceil( items().length / 10 )}
    page={Math.min(currentPage, Math.ceil( items().length / 10 ))}
...

Now page can't be bigger than count.
I've added a fix for the internal page as well. So the PR will cover this as well.
PS: This was also an issue with more pages.

@madaxen86 I don't need to do anything, I already recoded the component set with ARK-UI and it works as I expected. I would suggest that you turn all incoming props to signals and the problem will solve itself. I had similar issues with other components of mine, signals fixes most of them.

Hello! in Ark-UI is your Select component working? it doesn't pass the hidden field to the form

Hello! in Ark-UI is your Select component working? it doesn't pass the hidden field to the form

I didn't test that yet.

Hello! in Ark-UI is your Select component working? it doesn't pass the hidden field to the form

I didn't test that yet.

Check it out, you might be surprised that it doesn’t work the way it should logically work =) the Ark-ui community neither on discord nor on github comments anything about this =(

authors: dannextlogic madaxen86 pgswow

repo: kobaltedev/kobalte


text:
Koda Profile Text

Text "not followed by anyone you're following" does not make sense in your own profile.
Related issue:

https://github.com/kodadot/ops-internal/issues/1819

I dont know which person is exactly responsible for this issue but i think one of you guys. @JustLuuuu @vikiival @exezbcz

@ThomasssArt and what should be the output there?

@vikiival no text on your own profile probably

@ThomasssArt and what should be the output there?

Exactly what @exezbcz wrote. Text in general is good just not on your own profile. Does this make sense for you?

authors: ThomasssArt exezbcz vikiival

repo: kodadot/nft-gallery


text:
optimize git tree & history pruning

If someone feels handsome on this task, let's try to optimize, 28M seems quite a lot for what we have tho
Cloning into 'nft-gallery'...
remote: Enumerating objects: 29504, done.
remote: Counting objects: 100% (4177/4177), done.
remote: Compressing objects: 100% (1258/1258), done.
remote: Total 29504 (delta 2950), reused 3908 (delta 2804), pack-reused 25327
Receiving objects: 100% (29504/29504), 28.83 MiB | 2.66 MiB/s, done.
Resolving deltas: 100% (22570/22570), done.

git clone --depth=1 git@github.com:kodadot/nft-gallery.git

authors: roiLeo yangwao


text:
Cosmetic adjustment pagination version

With merged #423 some issues arosed.
Make two major showing modes

[ ] When you are using 27" 4k, make sense to keep it like 3x4 tiles, together 12 so people can just tap next page easier and doesn't need to scroll down

[ ] When you are at 13", make it like for 3x2, together 6 tiles, similar scenario as above, people doesn't need to scroll down

~- [ ] Probably put prev and fwd button into search bar~

OK point is to keep set new max per page eg first

is this still relevent?
I think we can close this since we introduce new version with Layout & top pagination

We have infinite scroll meanwhile and changed a layout a lot since then

#2859
#2921
#1411
#1582

authors: roiLeo vikiival yangwao


text:
fix: Buy now filter not working

PR Type

[x] Bugfix
[ ] Feature
[ ] Refactoring

Context

[x] Closes #6865

[ ] Requires deployment <snek/rubick/worker>

Before submitting pull request, please make sure:

[x] My contribution builds clean without any errors or warnings
[x] I've merged recent default branch -- main and I've no conflicts
[x] I've tried to respect high code quality standards
[x] I've didn't break any original functionality

Optional

[ ] I've tested it at </ksm/collection>
[ ] I've tested PR on mobile
[ ] I've written unit tests 🧪
[ ] I've found edge cases

Did your issue had any of the "$" label on it?

[x] Fill up your DOT address: Payout

Community participation

[x] Are you at KodaDot Discord?

Screenshot 📸

[ ] My fix has changed something on UI; a screenshot is best to understand changes for others.

Copilot Summary

🤖 Generated by Copilot at 769abca
Refactored the code for opening the shopping cart modal from the navbar. Moved the logic and configuration from ShoppingCartModalConfig.ts and ShoppingCartButton.vue to Navbar.vue to improve code organization and performance.

🤖 Generated by Copilot at 769abca

ShoppingCartButton
Simpler, no more emit -
Autumn leaves falling

@daiagi Let me check this real quick.

I was informed that the breaking change was caused by the recent merges.
So that was what i fixed.
However, to address the additional concern that you saw.
I corrected the graphql query to only include greater than 0.
And only include gte when min is > 0.
Would you want to include the min if it is explicitly set to 0 or just when it's set above 0?
@daiagi please review thank you

Always return an array thus breaking this in useItemGrid

That was poorly written by me, parsrSearch should return undefined when no search prop is given
Also works roileo is correct and deny query should exist regardless of search prop supplied or not

what happens here:
https://github.com/kodadot/nft-gallery/assets/36627808/ed19c5c0-82db-4790-8bb1-e42afbeeaa28

@prury Sorry wasn't able to test my last commit. It should be fixed now together with the denyList that wasn't included by @daiagi .
Thanks so much guys

That was poorly written by me

That's alright bro. We all make bugs 🐞

parseSearch should return undefined when no search prop is given

Since search prop can be an empty object, it was safer to check the search?.length as this would be true on both cases (undefined or empty obj search prop)
i believe with this, we don't need to change it to return undefined but if we do change that will still work.
Bonus: it doesn't take up 1 line
@prury Sorry wasn't able to test my last commit. It should be fixed now together with the denyList that wasn't included. Thanks @roiLeo for pointing it out and @daiagi  for confirming.
I have referenced this https://github.com/kodadot/nft-gallery/pull/6868#pullrequestreview-1589351287 in a separate issue to limit the scope of this PR. already created pr #6894 for it.
Thanks so much guys

On https://deploy-preview-6868--koda-canary.netlify.app/ksm/explore/items?listed=true&page=2
still show

That's a different issue #6894 fixes it

Thank you @roiLeo ♥

close #6912

pay 70 usd
Extra effort!

😍 Perfect, I’ve sent the payout
💵 $70 @ 4.49 USD/DOT ~ 15.59 $DOT
🧗 16UcV9V6nVvPYdHz98ymUKmNLkzjCEU5sbKJMi7hxYyTHjzR
🔗 0xf65cd41acf5796ec8f11b6f2c7106d7b569dda67205c351d10b406867783dc58
🪅 Let’s grab another issue and get rewarded!
🪄 github.com/kodadot/nft-gallery/issues

Thank you @yangwao ♥

authors: daiagi prury roiLeo stephenjason89 yangwao


text:
🛑 clouflare ipfs is down

In 3bbf6a2, clouflare ipfs (https://cloudflare-ipfs.com/ipfs/bafybeidkhq7aynm2yuuvzimkqcabbqgg3w2uzvy2e7zq3vl5ojhf36kxea) was down:

HTTP code: 0
Response time: 0 ms

Resolved: clouflare ipfs is back up in 3942a9f.

repo: kodadot/uptime


text:
Added Colombia locale

These holidays correspond to Colombia.
Regards,
Hector F.

@kodie can you check this.

repo: kodie/moment-holiday


text:
[Feature Request] Multiplier-Based Image Selection Over Repeat Counts - Improved Subject Balancing

I'm used to EveryDream2 trainer, which gives users the option to select a portion of images from a folder using a multiplier instead of a repeat count. For instance, by applying a 0.5 multiplier to a folder, the trainer will randomly select half of the images for each epoch. This system isn't limited to fractions; users can set multipliers such as 1.6 or any other positive value. On the other hand, using a negative multiplier will exclude the folder.
This multiplier approach retains the repeat functionality users are accustomed to while offering a significant improvement in balancing training across different subjects without having to delete any images.
To illustrate, consider three subjects: A with 1000 images, B with 200 images, and C with 100 images. If the goal is to train on 25 images per epoch, we can set multipliers of 0.025 for A, 0.125 for B, and 0.25 for C. This eliminates the need to delete images or train on all 1000 images from subject A. This method effectively balances subjects, especially when the number of images in their datasets varies. As the number and diversity of subjects increase, this approach provides better control over training, avoiding the need to discard images.
I believe that adding this feature to Kohya is essential.

@kohya-ss
Thank you for your response.
In ED2 the feature is pseudo random and based on seed used for training.
I think it's good enough, and there is no need to force full rotation of images or sync between DataLoaders.
I'll be happy to implement this feature myself, but I couldn't figure out how and when exactly the system is handling repeats - to switch them to portion of files in a folder.
If you can point me to specific file or functions, I would appreciate it.

@kohya-ss There is a small misunderstanding that I want to clear up.
The multiplier is an extension of the current repeat method; it doesn't change how the system handles full repeats, and users will be able to use it in the same way they do now.
For example, with repeats of 2, the multiplier will be 2, and the system will add all images inside this folder for training exactly twice. There is no randomness in the integer part of the multiplier.
The difference occurs only in the fractional part of the multiplier. So, for a multiplier of 2.5 - the integer 2 will add all images from the folder twice, and 0.5 will add only 50% additional images from the folder.
The multiplier won't change system behavior or user experience for users who use repeats. But it will allow for much better subject balancing between multiple subjects in a way that's impossible now.

@kohya-ss
I added a few examples below with a python code.
The fraction part rotation is handled by a probabilistic selection of images every epoch, there is no need to enforce deterministic rotation.
I want to explain how I used this feature in ED2 with 25 subjects, each subject had a different number of images, between 50 and 300 images for each subject. I calculated (with a script, but it can be done manually) a multiplier for each folder, so each subject will use only 25 images per epoch. That way no images would be discarded, and they all can participate in the training, also the balance between subjects is always kept. Unfortunately, it's not something that can be done with the current implementation of repeats in kohya-ss/sd-scripts.
Here are the prints from the code:
- Example of two consecutive epochs with the same folder, with multiplier 2.5, epochs 1, 2:
**************************************************
Multiplier: 2.5, sources: ['A1', 'B1', 'C1', 'D1']
Total images added due to integer part: 8
Additional images added due to fractional part: 2
Total images for training: 10
Images for training: ['A1', 'B1', 'C1', 'D1', 'A1', 'B1', 'C1', 'D1', 'D1', 'C1']
**************************************************
Multiplier: 2.5, sources: ['A1', 'B1', 'C1', 'D1']
Total images added due to integer part: 8
Additional images added due to fractional part: 2
Total images for training: 10
Images for training: ['A1', 'B1', 'C1', 'D1', 'A1', 'B1', 'C1', 'D1', 'D1', 'B1']
- Different folder, epoch 3:
**************************************************
Multiplier: 1.33, sources: ['A2', 'B2', 'C2', 'D2', 'E2', 'F2', 'G2', 'H2']
Total images added due to integer part: 8
Additional images added due to fractional part: 3
Total images for training: 11
Images for training: ['A2', 'B2', 'C2', 'D2', 'E2', 'F2', 'G2', 'H2', 'E2', 'C2', 'H2']
- Another folder with fractions only, epoch 5:
**************************************************
Multiplier: 0.5, sources: ['A3', 'B3', 'C3', 'D3', 'E3', 'F3']
Total images added due to integer part: 0
Additional images added due to fractional part: 3
Total images for training: 3
Images for training: ['B3', 'A3', 'E3']
- Another folder with fractions only, epoch 10:
**************************************************
Multiplier: 0.33, sources: ['A4', 'B4', 'C4', 'D4', 'E4', 'F4', 'G4', 'H4']
Total images added due to integer part: 0
Additional images added due to fractional part: 3
Total images for training: 3
Images for training: ['C4', 'H4', 'G4']

Code:
import random

def choose_images_for_training_for_folder(files_list, multiplier, main_seed, epochs):
    # Create an isolated instance of random
    local_random = IsolatedRandom(main_seed + epochs)

    images_for_training = []

    # Split the multiplier into integer and fractional parts
    int_multiplier = int(multiplier)
    frac_multiplier = multiplier - int_multiplier

    # Add all images for the integer part of the multiplier
    for _ in range(int_multiplier):
        images_for_training.extend(files_list)

    # Randomly select a subset of images for the fractional part of the multiplier
    num_to_select = int(len(files_list) * frac_multiplier)
    additional_files = local_random.sample(files_list, num_to_select)

    # Probabilistically choose an extra image if the fractional multiplier results in a non-integer number of images
    if len(files_list) * frac_multiplier > num_to_select:
        additional_file = local_random.choice([file for file in files_list if file not in additional_files])
        additional_files.append(additional_file)

    images_for_training.extend(additional_files)

    # Print the results
    print("*" * 50)
    print(f"Multiplier: {multiplier}, sources: {files_list}")
    print(f"Total images added due to integer part: {len(files_list) * int_multiplier}")
    print(f"Additional images added due to fractional part: {len(additional_files)}")
    print(f"Total images for training: {len(images_for_training)}")
    print("Images for training:", images_for_training)

    return images_for_training

class IsolatedRandom:
    def __init__(self, seed=None):
        self._random = random.Random(seed)

    def seed(self, seed=None):
        self._random.seed(seed)

    def sample(self, population, k):
        return self._random.sample(population, k)

    def random(self):
        return self._random.random()

    def choice(self, seq):
        return self._random.choice(seq)

main_seed = 10

# Test with given examples and fixed seed and epoch
print("- Example of two consecutive epochs with the same folder, with multiplier 2.5, epochs 1, 2:")
choose_images_for_training_for_folder(["A1", "B1", "C1", "D1"], 2.5, main_seed, 1)
choose_images_for_training_for_folder(["A1", "B1", "C1", "D1"], 2.5, main_seed, 2)

print("- Different folder, epoch 3:")
choose_images_for_training_for_folder(["A2", "B2", "C2", "D2", "E2", "F2", "G2", "H2"], 1.33, main_seed, 3)

print("- Another folder with fractions only, epoch 5:")
choose_images_for_training_for_folder(["A3", "B3", "C3", "D3", "E3", "F3"], 0.5, main_seed, 5)

print("- Another folder with fractions only, epoch 10:")
choose_images_for_training_for_folder(["A4", "B4", "C4", "D4", "E4", "F4", "G4", "H4"], 0.33, main_seed, 10)

The chance that any particular image would not be trained at all with a multiplier as a fraction(only) is: (1-multiplier)^epochs.
It can happen in certain cases, but it doesn't really matter, the important part is that balancing between subjects is enforced, and all subjects utilize most of their images, and the user can achieve uniform training between subjects easily.
Using current repeats is not a very effective solution for subject balancing, because of a couple of reasons:

The pace of the learning per subject isn't controlled with a huge pool of repeats of different subjects pooled together. The distribution of subjects can be very uneven and chronic episodes of overtraining for certain subjects, undertraining for others, forgetting of a subject, and other edge cases, can occur when using a huge pool of unbalanced subjects. With a multiplier, it's easy to use 25 images per subject per epoch, and get even training for all subjects.
I gave an example of a model I actually trained with 25 subjects (link to model), also I've trained another model with 50 subjects  (link to model). In both of them, I used the multiplier to balance between subjects in a very precise way, which allowed me to use a subject with arbitrary amounts of images without the need to discard any image. In my second model, each subject had between 50 and 800 images, and with 50 subjects, I don't think there is an easy way to calculate the repeated subject, and a user still needs to go over all subjects and remove images to make it work with integer repeats. Using a multiplier, the calculation is very easy: multiplier=desired_images_per_epoch/images_per_subject.

@kohya-ss are subfolders with repeats supported?
@a-l-e-x-d-s-9 I like the concept. Would a solution like this work for you? It accomplishes the same outcome by reversing the multiplier using subfolder repeats.
1_person/
├─ 2_person_body/
│  ├─ B.png
├─ 2_person_behind/
│  ├─ C.png
├─ 3_person_face/
│  ├─ D.png
│  ├─ E.png
├─ A.png

repeat count 1, sources: ['A']
repeat count 2, sources: ['B', 'C']
repeat count 3, sources: ['D', 'E']

@chillpixelfun
You can achieve nested multiplier behavior by flattening the folder's hierarchy and multiplying the nested repeats - it's identical to the current system.
A repeat of subfolders doesn't address the issues I raised and it doesn't make it easier to balance between subjects.

@a-l-e-x-d-s-9 what issues did you raise that are not addressed? and how does it not make it easier to balance between subjects? The subjects are explicitly balanced using a base folder repeat of 1 and putting the desired multiplier on the subfolders. The subfolder repeat is the multiplier.

@kohya-ss
Yes, with the introduction of random images per epoch, the bucketing per epoch will require changes.
My idea of implementation consists of two stages:

The Initialization Stage: This is similar to the current bucketing. However, it only records to which bucket each image belongs and notes the multiplier of the image.
At the beginning of every epoch, images are added to buckets for training. Those with an integer multiplier part above 0 will always be added (according to number). The fractional part will be added based on a probabilistic decision.

To optimize the second step, we might use two lists: permanent and probabilistic. The permanent list is reserved for images with an integer part of the multiplier above 0. For example, images with a multiplier of 2.5 will always be trained twice per epoch, so we can keep them in the permanent list for each epoch's training. The probabilistic list will only contain images with a multiplier that has a fraction. So, if we only have images in the permanent list and none in the probabilistic list, the system will operate pretty much as it does now, with no runtime penalty for the user. However, if the user opts to use multipliers, the probabilistic list's images will be added to the training set based on the fraction of the multiplier at the start of an epoch, and comparison with a random value, if the random value is less than the multiplier's fraction - image will be added.
As far as I understand, the implementation of ED2 is doing something similar now, and people are using it with hundreds of thousands of images, so it's a valid solution. Regular users, with a few thousands of images, definitely wouldn't notice any changes in performance.

repo: kohya-ss/sd-scripts


text:
🔀 Feature-example-pr-7

🚀 Opening a pull request for this branch

CLA Assistant Lite bot ✍ All contributors have signed the CLA

repo: koj-co/template


text:
Encrypt/Encrypt instead of Encrypt/Decrypt in test.c

Hello
There is an error in test.c. Both functions test_encrypt_ctr and test_decrypt_ctr are calling test_xcrypt_ctr which executes the exact same code in both cases so it is encrypting two times instead of encrypting and decrypting. This causes confusion because it is not clear how to use the AES_CTR_xcrypt_buffer API.
If it is the same function for Encrypt/Decrypt as mentioned in the .h file, how come there is no input parameter indicating what is to be done? And the test is not exercising the decryption.

Hi. That’s how CTR works! Please see the Wikipedia page - this diagram is the epiphany :)
https://upload.wikimedia.org/wikipedia/commons/thumb/3/3c/CTR_decryption_2.svg/640px-CTR_decryption_2.svg.png
On 11 Jun 2019, at 20:14, Manuel Malagon <notifications@github.commailto:notifications@github.com> wrote:
Hello
There is an error in test.c. Both functions test_encrypt_ctr and test_decrypt_ctr are calling test_xcrypt_ctr which executes the exact same code in both cases so it is encrypting two times instead of encrypting and decrypting. This causes confusion because it is not clear how to use the AES_CTR_xcrypt_buffer API.
If it is the same function for Encrypt/Decrypt as mentioned in the .h file, how come there is no input parameter indicating what is to be done? And the test is not exercising the decryption.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/kokke/tiny-AES-c/issues/141?email_source=notifications&email_token=ABBU2HCNLM3PS5AOQACYVO3PZ72PNA5CNFSM4HXCRMB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GY4SY4Q, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABBU2HGUDDIW4WRS6FM53NDPZ72PNANCNFSM4HXCRMBQ.

@ifknot thanks for the tip. That explains how it works.
But that doesn't clarify why in both cases, encryption and decryption, in test.c this is being executed:
AES_CTR_xcrypt_buffer(&ctx, in, 64);
We can see that only in is used because the exact same function is being called for both test_encrypt_ctr and test_decrypt_ctr and since it is not global or static and there is nothing in the code indicating that for decryption out should be used, then both test_encrypt_ctr and test_decrypt_ctr are encrypting twice using in* and comparing it with out and never using out and comparing with in.

Hi @m4l490n and thanks for your interest in this project :)
See this old issue, asking somewhat the same question as you:
https://github.com/kokke/tiny-AES-c/issues/78
The short explanation: The reason for this odd test, is to reflect the test procedure described in the NIST-document used for verification, SP 800-38A. This is actually how they say the test should be done :D

Closing the issue as a duplicate of #78 - feel free to continue posting if you have questions or comments Manuel :)

authors: ifknot kokke m4l490n

repo: kokke/tiny-AES-c

license: Unlicense


text:
Feature: add flag to generate Authentication parameter into api interfaces

If I want to use micronaut-security's Authentication parameter, which is supported inside controller-level methods, it isn't clear how to do so with this generator.
For example, given I want to check the value of this using something like:
public reactor.core.publisher.Mono<io.micronaut.http.HttpResponse<MyObject>> mySpecialMethod(Authentication auth,
                                                          @PathVariable("someVariable") UUID someVariable,
                                                          @Body @Valid MyRequestBody request) {
        JwtUtils.mustBeProperlyDefined(auth);
        String username = auth.getAttributes().get("user_name").toString();
        <...Business logic here...>
}

None of the settings in the generator allow for adding the Authentication auth parameter (io.micronaut.security.authentication.Authentication) upon generation.
I've checked the documentation provided but this isn't clear at all.

Right now there is no flag for this.
To access the authentication you can use:
@Inject
SecurityService security;

private Authentication getAuthentication() {
	return security.getAuthentication().orElseThrow(() -> new HttpStatusException(HttpStatus.UNAUTHORIZED, null));
}

Or use:
private Authentication getAuthentication() {
	return ServerRequestContext.currentRequest()
			.flatMap(r -> r.getUserPrincipal(Authentication.class))
			.orElseThrow(() -> new HttpStatusException(HttpStatus.UNAUTHORIZED, null));
}

If this is not sufficient for you, how should the generator handle this authentication objects? My suggestion: add a flag and if flag is enabled and response code 401 exists add Authentication for controller interfaces. What do you think?

That's the workaround I'm using at the moment, it does work - it's just a bit verbose to have to add it into every controller, which adds up if there are multiple.
On another note - not sure if it's worth opening up a new issue - but how can I make sure from the API spec that a "number" input on an API Spec comes out as BigDecimal? I can see here we're explicitly mapping it to Double, but I don't see the reason for that https://github.com/kokuwaio/micronaut-openapi-codegen/blob/08793b1deda3826708c62f6a7b0225992a816efa/src/main/java/org/openapitools/codegen/languages/MicronautCodegen.java#L131

I'll add this flag, but not immediately because if other stuff todo before.
Regarding BigDecimal vs Double, you can override the default mapping using:
<typeMappings>
  <typeMapping>BigDecimal=java.math.BigDecimal</typeMapping>
</typeMappings>

The default with Double was chosen because for most users double precision is enough and BigDecimal handling is sometimes a pain. I won't change this now because a lot of users rely on Double.

Released with 3.3.0

repo: kokuwaio/micronaut-openapi-codegen


text:
Fix incorrect max-level for dataframe json-normalize

Linked issue(s):
What change does this PR introduce and why?
Please check if the PR fulfills these requirements

[ ] Include reference to internal ticket and/or GitHub issue "Fixes #NNNN" (if applicable)
[x] Relevant tests for the changes have been added
[ ] Relevant docs have been added / updated

Change looks reasonable -- what's an example of something that was being flattened when it shouldn't have been?

{
  "score": 1.5,
  "classification": {
    "label": "dog"
  }
}

becomes

score
classification.label

1.5
dog

with the fix, it has the right expection

score
classification

1.5
{"label": "dog"}

repo: kolenaIO/kolena


text:
More information about a selected file

Hi,
After selecting a file, could you add an option to get more information? (e.g patch, size, dimensions,...)
Thank you.

Do you want an option to get information on selected files (when you are selecting them in the Album view)?

Yes, something like this:

You can already get information about filepath, size, dimensions, ... , when you hit the info button in the image View.

My bad... I was searching from the 3 dots menu.
Thank you.

Could you move the information option on the actionbar or in the 3 dots menu?
I can't open this file so I can't know where it is stored.

I now made it possible to open broken files.

Would this fix your issue?

Yes. I keep the file until the next update.

Fixed now?

Oh yes, thanks.

authors: Primokorn kollerlukas

repo: kollerlukas/Camera-Roll-Android-App


text:
test-only require block should be added after the last require block

After merging https://github.com/komuw/ote/pull/37 ; if you have a modfile like;
module testdata/mod1

require (
	github.com/frankban/quicktest v1.12.1
	github.com/go-ole/go-ole v1.2.5 // indirect
	github.com/shirou/gopsutil v2.20.9+incompatible //PriorComment
	rsc.io/quote v1.5.2
)

exclude golang.org/x/net v1.2.3

retract (
	v1.0.1 // Contains retractions only.
	v1.0.0 // Published accidentally.
)

ote produces a modfile like;
module testdata/mod1

require (
	github.com/go-ole/go-ole v1.2.5 // indirect
	rsc.io/quote v1.5.2
)

exclude golang.org/x/net v1.2.3

retract (
	v1.0.1 // Contains retractions only.
	v1.0.0 // Published accidentally.
)

require (
	github.com/frankban/quicktest v1.12.1 // test
	github.com/shirou/gopsutil v2.20.9+incompatible // test; PriorComment
)

ie, the require block of test-only dependencies is last. Instead it should come immediately after the last require block, ie; before the exclude

see: https://github.com/golang/mod/blob/0f08993efd8a8ec67e75bcccf86b0e1569b0ab0a/modfile/rule.go#L965-L1000

note; we do not have to do this. Even gotip/go1.17 does not organise the require block of indirect dependencies to be immediately after the require block of direct dependencies

repo: komuw/ote


text:
onRestoreInstanceState() should be called before onResume()

Hey, thanks for the library.
Several times I caught the exception from here:
    /**
     * {@link android.app.Activity#onCreate(Bundle)}, {@link android.app.Fragment#onCreate(Bundle)}, {@link android.view.View#onRestoreInstanceState(Parcelable)}.
     */
    public void onRestoreInstanceState(Bundle presenterState) {
        if (presenter != null)
            throw new IllegalArgumentException("onRestoreInstanceState() should be called before onResume()");
        this.bundle = ParcelFn.unmarshall(ParcelFn.marshall(presenterState));
    }

The exception message seems too low-level for any library user. After some source code exploring, I found, that we can't call getPresenter() in any point before onResume(). Thus, for instance, method references like

private SomeView.ClickListener mViewClickListener = getPresenter()::viewClicked;

can crash the app, because getPresenter() is obviously called before onCreate.
Also I caught the crash several times in other callbacks, probably, in FragmentStatePagerAdapter (which can call onRestoreInstanceState before or even without onCreate, sorry, I don't remember a lot of details)
Is it reasonable to:

Replace throwing exception to some warning message, leaving developer's responsibility to save/restore state?
(more complex) to separate Presenter constructor and onCreate() methods, so that some time, before onCreate call, Presenter can exist without state restored?

You CAN call getPresenter() before onResume(). You can't call onRestoreInstanceState before onResume().
getPresenter() does not work before parent's onCreate call, this is obvious. Nothing in Android works before parent's onCreate.

I can't imagine a use case when such behaviour (restoration of presenter after view attachment) will be reasonable.
Are You asking to add another lifecycle? The purpose of all this stuff were to have less lifecycles. Try to manage using as less lifecycle events as possible, this makes reliable code. Lifecycles is one of the biggest mistakes in Android design.

Hi @konmik
I've been struggling with this exception for a while.  Here's a simple project that replicates the exception:  https://github.com/gautamjain/nucleus-test
The first fragment, AlphaFragment, has a child called SimpleCard.  These extend from NucleusSupportFragment and NucleusLayout respectively.  They both have their own presenters.
I then replace AlphaFragment with another fragment, BetaFragment (and add the transaction to the back stack).   Clicking the back button at this point throws the exception.
Here's a simplified log of what happens:
MainActivity: ⇢ onBackPressed()

AlphaFragment: ⇢ onCreateView()
    SimpleCard: ⇢ <init>()
    SimpleCard: ⇠ <init> [4ms]
AlphaFragment: ⇠ onCreateView [39ms] = android.widget.LinearLayout

SimpleCard: ⇢ onAttachedToWindow()
  SimpleCardPresenter: ⇢ onCreate(savedState=null)
  SimpleCardPresenter: ⇠ onCreate [0ms]
  SimpleCardPresenter: ⇢ onTakeView(view=com.example.nucleusstatetest.SimpleCard)
  SimpleCardPresenter: ⇠ onTakeView [0ms]
SimpleCard: ⇠ onAttachedToWindow [3ms]

SimpleCard: ⇢ onRestoreInstanceState(
                      state=Bundle[{presenter_state=Bundle[{presenter=Bundle[{nucleus.presenter.RxPresenter#requested=[]}], presenter_id=SimpleCardPresenter], parent_state=android.view.AbsSavedState}])

InputEventSender: Exception dispatching finished signal.
MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
MessageQueue-JNI: java.lang.IllegalArgumentException: onRestoreInstanceState() should be called before onResume()
                                                                                at nucleus.view.PresenterLifecycleDelegate.onRestoreInstanceState(PresenterLifecycleDelegate.java:84)

How could such a situation be avoided?  FragmentManager is responsible for initiating the state restoration of the fragment's child views.

Hi @gautamjain ,
I never worked with child fragments, but afaik, state restoration should be done before attachment to window. Is this a usual behavior for child fragments?

It's actually not a child fragment.  SimpleCard extends from NucleusLayout.   In this case, the child SimpleCard gets created, attached, and then view state restored.

I'm having the same issue here with onRestoreInstanceState() being called after onAttachedToWindow() for views.
I've been trying to avoid NuclearLayout in favor of nucleus fragments but it will be great to have Views with controllers as well

It looks to me that child fragments violate view lifecycle somehow.
Do you have any ideas how to handle it?
I do not see reliable solutions to overcome this.

Oops, I understood! Child fragments is another story, sorry!
Need some investigation.

I don't have a solution for this. Maybe we could defer the Presenter.onCreate() to be called afterthe state is restored, but we don't know if there's any state to restore.
We could try to go up the hierarchy to find the fragment containing the view, and then check if we have some state to restore.
Or maybe this is just a bug in the support library that we can report and wait for a fix

What if we will just ignore onRestoreInstanceState that are fired after onAttachedToWindow?

Ignoring the onRestoreInstanceState would make the saved state lost.
Also, we need the Bundle for creating the presenter, otherwise we will create a new presenter after rotation instead of reusing the old one. So we can't create the presenter without Bundle with the current architecture.

@sgc-code You're right, FragmentManager creates a new View instance, its state (including presenter) must be restored.
I can also try to delete the presenter that was initialized during onAttachedToWindow and create a new one from the saved state. This will introduce some redundancy in the case of the lifecycle bug, but will still work.

I think you can't do that because you will lose the state changes that happen between onAttachedToWindow and onRestoreInstanceState
What about delaying the creation of the presenter to the onRestoreInstanceState method?

@sgc-code normally onResoreInstanceState is called after onAttachedToWindow. If we will just wait for onRestoreInstanceState, most of the cases we will wait forever, because we can't know if we should wait for it or start working.

We can change a flag on the View so we know if onRestoreInstanceState was already called and we can proceed to presenter creation in that case.
The tricky part would be the first time the view is created in the nested fragment situation, because the onRestoreInstanceState won't be called as there's no state to restore. I think maybe  it's possible to workaround this problem by querying the container fragment for its state

My final recommendation on this topic will be to not use NucleusView inside of fragments. Fragments violate view lifecycle, so I see no way to implement stateful presenters reliably here.

authors: gautamjain konmik sgc-code yankeppey

repo: konmik/nucleus


text:
External links behavior with regards to SEO (target="_blank" and nofollow noopener noreferrer)

Hi!
I'm not an SEO expert so I might be missing something but I notice all external links (mainly social profiles and projects) have the following attribute settings:
target="_blank" rel="nofollow noopener noreferrer"
My understanding is that target="_blank" and noopener together are for UX (forcing a new tab) and security purposes. I know there's debate online whether to do this or not. Maybe a separate issue.
But I'm wondering if the choice to have nofollow and noreferrer is also intentional as I would imagine people linking to their own products and online profiles could prefer to not have these (for SEO and analytics purposes).

Hey @demondragong and thanks double checking that! It was certainly intentional for social profiles but I agree that it does not make sense to have nofollow as a default for project links.
Making it optional for everything besides social profiles sounds good to me 👍

Hey @demondragong !
I just published a new version that removes the nofollow attribute. I kept the noreferrer as it might be a security concern on older browser.

Thank you! I think it's time for me to update my portfolio then :)
On Fri, Mar 10, 2023 at 1:55 PM Konstantin Münster @.***>
wrote:

Hey @demondragong https://github.com/demondragong !
I just published a new version that removes the nofollow attribute. I
kept the noreferrer as it might be a security concern on older browser.
—
Reply to this email directly, view it on GitHub
https://github.com/konstantinmuenster/gatsby-theme-portfolio-minimal/issues/29#issuecomment-1463764473,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AF2GJEMXMWGYTRZQXFXBRLDW3MQCXANCNFSM6AAAAAATX7GVNQ
.
You are receiving this because you were mentioned.Message ID:
<konstantinmuenster/gatsby-theme-portfolio-minimal/issues/29/1463764473@
github.com>

authors: demondragong konstantinmuenster


text:
merge from template-esm-only

.github/workflows/update_readme_api.yml

chore: add 18.17.0 (jobs.update_readme_api.steps.with.node-version)

.github/workflows/ci.yml

chore: add 18.17.0 (jobs.release.steps.with.node-version)
chore: add 18.17.0 (jobs.test-browser.steps.with.node-version)

.github/workflows/codeql_analysis.yml

chore: add 18.17.0 (jobs.analyze.steps.with.node-version)

.github/workflows/update_package_lock.yml

chore: add 18.17.0 (jobs.update_package_lock.steps.with.node-version)

Pull Request Test Coverage Report for Build 5596369003

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 84.307%

Totals

Change from base Build 5574472339:
0.0%

Covered Lines:
1022

Relevant Lines:
1197

💛  - Coveralls

Pull Request Test Coverage Report for Build 5596369003
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 84.307%

Totals

Change from base Build 5574472339:
0.0%

Covered Lines:
1022

Relevant Lines:
1197

💛  - Coveralls

Pull Request Test Coverage Report for Build 5596369003
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 84.307%

Totals

Change from base Build 5574472339:
0.0%

Covered Lines:
1022

Relevant Lines:
1197

💛  - Coveralls

repo: konsumation/konsum-db


text:
Srini/gnu

uniform usage of _GNU_SOURCE.

with musl both SIGSTKSZ, MINSIGSTKSZ are -1 when compiled with _GNU_SOURCE
To get sigaltstack_test to pass added AT_MINSIGSTKSZ to auxv in km(which is missing from what kernel provides when starting new process)

I didn't understand what is going on here so I looked at the code for a while.
The real problem is the are 2 definitions of SIGSTKSZ and MINSIGSTKSZ.  Which definition you get depends on whether you define _GNU_SOURCE or not.
When we turned on _GNU_SOURCE you get the definition that calls sysconf (_SC_SIGSTKSZ) and the musl version of sysconf() does not support the conf type _SC_SIGSTKSZ so sysconf() fails and returns -1.
But no one apparent expects the SIGSTKSZ or MINSIGSTKSZ macro to fail.  :-)  Dontcha just love it.
So, to get around this problem we added the AT_MINSIGSTKSZ entry to the auxv that km builds for the payload.  Then we changed the sigaltstack test to call getauxval(AT_MINSIGSTKSZ) when the sysconf() call fails.
So that is how we now decide what size signal stack to use.
What a twisted web we weave.

repo: kontainapp/km


text:
Add host.ssh_port option and refactor gateway initialization

Fixes #1062
Fixes #1072
Fixes #1088
Replaces #1071
Adds ssh_port option to host options:
hosts:
  - address: 10.0.0.1
    ssh_port: 2022

And bastion options:
hosts:
  - address: 10.0.0.1
    ssh_port: 22
    bastion:
      address: 10.0.0.2
      ssh_port: 20202

Refactored the Net::SSH::Gateway from SSH::Client#gateway to Transport::Gateway for better control (should benefit the disconnecting in #1003) and because bastion.host.ssh.gateway opened extra SSH connections.
Also adds the missing ssh_proxy_command attribute to bastion.
All k8s-client traffic is now tunneled through ssh.
ConfigureClient phase is replaced with WarmUpClientCache phase.

PTAL

This probably still needs some way to track clients that are using the gateway, otherwise it will shutdown a gateway that is still used by some other client.
#1088 will likely need something from this.

Files changed: 28. Seems like this grew out of proportion.

E2e now uses bastion and proxy command

Conflict..

Unconflict..

#1191 fixes #1062
#1072 and #1088 can be fixed more simply separately now with #1185

authors: jakolehm kke

repo: kontena/pharos-cluster


text:
koordlet: add libpfm4&perf group

Ⅰ. Describe what this PR does
This pull request enhances the precision of CPI calculation through the utilization of the perf group. Additionally, it introduces the integration of libpfm4 as an event parser, thereby expanding the potential to incorporate additional TMA analyses in subsequent developments.

Ⅱ. Does this pull request fix one issue?
fixes #1476 #1470

Ⅲ. Describe how to verify it
Use Prometheus.
Ⅳ. Special notes for reviews
This pr uses unsafe.Pointer to mock syscall.Syscall6 in unit test, so I have to add unsafeptr tag for go vet tool and ignore github.com/koordinator-sh/koordinator/pkg/koordlet/util/perf package in test since it use -race tag.
Any comments is welcome.
V. Checklist

[x] I have written necessary docs and comments
[x] I have added necessary unit tests and integration tests
[x] All checks passed in make test

Make a A/B test for two method:
workload
100 nginx
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
  namespace: nginx
  labels:
    run: my-nginx
spec:
  replicas: 100
  selector:
    matchLabels:
      run: my-nginx
  template:
    metadata:
      labels:
        run: my-nginx
    spec:
      nodeName: inspur-icx-1
      containers:
        - name: my-nginx
          image: nginx:latest
          ports:
            - containerPort: 80
          resources:
            requests:
              cpu: "1"
              memory: 1Gi
            limits:
              cpu: "1"
              memory: 1Gi
---
apiVersion: v1
kind: Service
metadata:
  name: my-nginx
  namespace: nginx
  labels:
    run: my-nginx
spec:
  ports:
    - port: 80
      protocol: TCP
      targetPort: 80
  selector:
    run: my-nginx

environment
Ubuntu 22.04
containerd github.com/containerd/containerd v1.6.8 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
runc version 1.1.4
koordinator(based on v1.3.0)
kubernetes v1.27.2
libpfm4

perf-util

Any comments and questions is welcome! 😀 @zwzhang0107 @songtao98

Make a A/B test for two method:
workload
100 nginx
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
  namespace: nginx
  labels:
    run: my-nginx
spec:
  replicas: 100
  selector:
    matchLabels:
      run: my-nginx
  template:
    metadata:
      labels:
        run: my-nginx
    spec:
      nodeName: inspur-icx-1
      containers:
        - name: my-nginx
          image: nginx:latest
          ports:
            - containerPort: 80
          resources:
            requests:
              cpu: "1"
              memory: 1Gi
            limits:
              cpu: "1"
              memory: 1Gi
---
apiVersion: v1
kind: Service
metadata:
  name: my-nginx
  namespace: nginx
  labels:
    run: my-nginx
spec:
  ports:
    - port: 80
      protocol: TCP
      targetPort: 80
  selector:
    run: my-nginx

environment
CPU Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz Memory 186Gi Ubuntu 22.04 containerd github.com/containerd/containerd v1.6.8 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6 runc version 1.1.4 koordinator(based on v1.3.0) kubernetes v1.27.2
libpfm4

perf-util

this looks great!
it will be better if we have the comparison on accuracy between perf and libpfm4

Make a A/B test for two method:
workload
100 nginx
apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-nginx
  namespace: nginx
  labels:
    run: my-nginx
spec:
  replicas: 100
  selector:
    matchLabels:
      run: my-nginx
  template:
    metadata:
      labels:
        run: my-nginx
    spec:
      nodeName: inspur-icx-1
      containers:
        - name: my-nginx
          image: nginx:latest
          ports:
            - containerPort: 80
          resources:
            requests:
              cpu: "1"
              memory: 1Gi
            limits:
              cpu: "1"
              memory: 1Gi
---
apiVersion: v1
kind: Service
metadata:
  name: my-nginx
  namespace: nginx
  labels:
    run: my-nginx
spec:
  ports:
    - port: 80
      protocol: TCP
      targetPort: 80
  selector:
    run: my-nginx

environment
CPU Intel(R) Xeon(R) Gold 6240 CPU @ 2.60GHz Memory 186Gi Ubuntu 22.04 containerd github.com/containerd/containerd v1.6.8 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6 runc version 1.1.4 koordinator(based on v1.3.0) kubernetes v1.27.2
libpfm4

perf-util

this looks great!
it will be better if we have the comparison on accuracy between perf and libpfm4

libpfm4

cycles: 9694773088
instructions: 2817277063
perf
perf stat -e '{cycles,instructions}' -G xxx.scope -a sleep 10

/lgtm

repo: koordinator-sh/koordinator


text:
Multiple Devices PS4 & PS5, only 1 is responding.

Describe The Bug:

PS4 & PS5 Not showing up simultaneously since last update.
To Reproduce:

Update to latest version I think.
Expected behavior:

To have a PS4 & PS5 simultaneously.
Logs:
[11/15/2023, 3:40:33 PM] [homebridge-playstation] Unable to locate device: with id 00D9D13F3EFF
Error: from server 192.168.1.99:54586 Error: connect ECONNREFUSED 192.168.1.99:54586
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1595:16) {
  errno: -61,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '192.168.1.99',
  port: 54586
}

Plugin Config:
{
            "pollInterval": 10000,
            "_bridge": {
                "username": "0E:1A:0D:EA:5A:79",
                "port": 44176
            },
            "platform": "playstation"
},

Screenshots:

Plugin Version: 1.5.1

Plugin Version: 1.5.0 (After Downgrading)

Environment:

Plugin Version: 1.5.1
Homebridge Version: 1.7.0
Node.js Version: 20.9.0
NPM Version: 10.2.3
Operating System: MacOS 12.7.1

Hello, this issue has been solved in https://github.com/kopiro/homebridge-playstation/releases/tag/v1.6.0

authors: GiovanniDw kopiro

repo: kopiro/homebridge-playstation

license: ISC


text:
Cannot add PS5; HomeKit asking for input source?

Describe Your Problem:
I was able to see/add my PlayStation to HomeKit, but I cannot complete the setup process because it's asking me for an "input source," except none is provided. If I try to hit "continue" it just throws an error "cannot save name." Now I've got a banner at the top of my Home app asking me to finish setting up the set top box, but no way to complete the installation. Should I not be running this as a child bridge or something?
Logs:
N/A - Ask me if you need to see something specific. This problem seems plugin-specific to me.

Plugin Config:
{
    "pollInterval": 5000,
    "overrides": [
        {
            "name": "PlayStation5"
        }
    ],
    "platform": "playstation",
    "_bridge": {
        "username": "0E:8B:87:EA:95:6D",
        "port": 39344
    }
}

Screenshots:

Environment:

Plugin Version: v1.6.0
Homebridge Version: v1.7.0
Node.js Version: v20.11.0
NPM Version: N/A
Operating System: Docker

...sigh. I just went back to check on this again today, and now I see a text box there where I can enter a name. This might just be bad UI design on Apple's part. 🤦♂  After entering a name for the PS5 there, I was able to complete the setup. (iFail)


text:
first commit

Broken Version

Fixed Desktop Version

Fixed Mobile Version

I don't think this is good solution. You are just playing around with fixed padding values. But approving it for now- we don't have time lol

lol okayyy!

repo: koreancanadiansoccer/kcsaweb


text:
invalid PostScript font name

Hello,
I tried using bdf2ttf to transform the Tamzen font into TTF, but when I double-click on the resulting TTF file under Windows 7, an error dialog appears saying "Windows Font Viewer: The requested file ... is not a valid font file.".  Similarly, I'm getting an error message when opening the resulting TTF file in FontForge under Linux: :disappointed:

In the above screenshot, that "|0003|" Unicode glyph at the end of the font name is suspicious. :suspect:
Steps to reproduce the bug
$ mkdir -p ~/.fonts/tamzen-font

$ git clone https://github.com/sunaku/tamzen-font ~/.fonts/tamzen-font

$ cd ~/.fonts/tamzen-font

$ git checkout bdf2ttf

$ cat ttf/TamzenForPowerline.ini
Fontname = TamzenForPowerline
Version = 1.11.5
Copyright = Copyright
Trademark = Trademark

$ bdf2ttf ttf/TamzenForPowerline-regular.ttf ttf/TamzenForPowerline.ini bdf/TamzenForPowerline*r.bdf
Input files:
  bdf/TamzenForPowerline5x9r.bdf
  bdf/TamzenForPowerline6x12r.bdf
  bdf/TamzenForPowerline7x13r.bdf
  bdf/TamzenForPowerline7x14r.bdf
  bdf/TamzenForPowerline8x15r.bdf
  bdf/TamzenForPowerline8x16r.bdf
  bdf/TamzenForPowerline10x20r.bdf

$ bdf2ttf -b ttf/TamzenForPowerline-bold.ttf ttf/TamzenForPowerline.ini bdf/TamzenForPowerline*b.bdf
Input files:
  bdf/TamzenForPowerline5x9b.bdf
  bdf/TamzenForPowerline6x12b.bdf
  bdf/TamzenForPowerline7x13b.bdf
  bdf/TamzenForPowerline7x14b.bdf
  bdf/TamzenForPowerline8x15b.bdf
  bdf/TamzenForPowerline8x16b.bdf
  bdf/TamzenForPowerline10x20b.bdf

$ fontforge ttf/TamzenForPowerline-regular.ttf
... now observe the error shown in the screenshot above ...

Thanks for your consideration. :sweat_smile:

I can't reproduce your problem, but get font files attached.  Please check this.
TamzenForPowerline.zip
It seems correct font files for me.
I have compile bdf2ttf by MSVC10's 32bit compiler on WIndows 10,
run and check result TTF files on same machine.

Thanks! :+1: Your generated fonts worked successfully in Linux FontForge and Windows 7. :100:
I should have mentioned that I compiled and ran bdf2ttf under Linux, using make gcc target.
So there appears to be some functional difference between the results of MSVC and GCC. :bug:

For your reference, here is my GCC information and compilation output:
$ gcc --version
gcc (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ make gcc-clean
make -f compile/Make_gcc.mak clean
make[1]: Entering directory '/home/sunny/lab/bdf2ttf'
rm -f ./src/bdf.o ./src/bdf2ttf.o ./src/main.o ./src/rcfile.o ./src/table.o ./src/ucsconv.o
make[1]: Leaving directory '/home/sunny/lab/bdf2ttf'

$ make gcc
make -f compile/Make_gcc.mak
make[1]: Entering directory '/home/sunny/lab/bdf2ttf'
cc    -c -o src/bdf.o src/bdf.c
g++      -c -o src/bdf2ttf.o src/bdf2ttf.cpp
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 };
 ^
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:71:1: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
src/bdf2ttf.cpp:90:30: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 static char* STYLE_REGULAR = "Regular";
                              ^
src/bdf2ttf.cpp:91:28: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 static char* STYLE_BOLD  = "Bold";
                            ^
src/bdf2ttf.cpp:92:29: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 static char* STYLE_ITALIC = "Italic";
                             ^
src/bdf2ttf.cpp:93:33: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 static char* STYLE_BOLDITALIC = "Bold Italic";
                                 ^
In file included from src/bdf2ttf.cpp:11:0:
src/version.h:12:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 #define COPYRIGHT "(C) 2003 KaoriYa";
                   ^
src/bdf2ttf.cpp:95:21: note: in expansion of macro 'COPYRIGHT'
 char *g_copyright = COPYRIGHT;
                     ^
src/version.h:13:18: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 #define VERSION  "2.0"
                  ^
src/bdf2ttf.cpp:100:20: note: in expansion of macro 'VERSION'
 char *g_version  = VERSION;
                    ^
src/version.h:14:19: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
 #define TRADEMARK "KaoriYa"
                   ^
src/bdf2ttf.cpp:102:21: note: in expansion of macro 'TRADEMARK'
 char *g_trademark = TRADEMARK;
                     ^
src/bdf2ttf.cpp: In function 'void generate_OS2_PREP(bdf2_t*)':
src/bdf2ttf.cpp:831:35: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
     os2->array::addString(VENDORID); // achVendID
                                   ^
cc    -c -o src/main.o src/main.c
cc    -c -o src/rcfile.o src/rcfile.c
g++      -c -o src/table.o src/table.cpp
cc    -c -o src/ucsconv.o src/ucsconv.c
g++ -o bdf2ttf  src/bdf.o src/bdf2ttf.o src/main.o src/rcfile.o src/table.o src/ucsconv.o
make[1]: Leaving directory '/home/sunny/lab/bdf2ttf'

There seems be bad assumption of bdf2ttf.
bdf2ttf consider unsigned long is 32bit.  But most of gcc treat it as 64bit.
It will cause some problems.

It would be better that use size aware types uint32_t or so.
But I don't have time to do that.

I have fixed for gcc.
@sunaku please try again with recent version.

Thanks @koron! :bow:  I tried the fix but the problem still occurs. :disappointed: I will try to debug it further. :construction_worker:

I tried rebuilding bdf2ttf for 32-bit architecture (my system is 64-bit):
$ make gcc CFLAGS=-m32 LDFLAGS=-m32
make -f compile/Make_gcc.mak
make[1]: Entering directory '/home/sunny/lab/bdf2ttf'
cc -m32   -c -o src/bdf.o src/bdf.c
g++  -m32    -c -o src/bdf2ttf.o src/bdf2ttf.cpp
cc -m32   -c -o src/main.o src/main.c
cc -m32   -c -o src/rcfile.o src/rcfile.c
g++  -m32    -c -o src/table.o src/table.cpp
cc -m32   -c -o src/ucsconv.o src/ucsconv.c
g++ -o bdf2ttf  src/bdf.o src/bdf2ttf.o src/main.o src/rcfile.o src/table.o src/ucsconv.o -m32
make[1]: Leaving directory '/home/sunny/lab/bdf2ttf'

I still get the "Postscript font name" error in FontForge :disappointed: but at least the embedded bitmap fonts appear correctly now :relieved: (previously FontForge rendered them as empty, red boxes). :construction_worker: Next idea...

I still get the "Postscript font name" error in FontForge

I won'f fix about this.
Because it is not in bdf2ttf scope.
But welcome to receive patches.

:sweat_smile: Fair enough, thanks for your help! :bow:

authors: koron sunaku


text:
versionUp androidxNavigation

ref: https://x.com/ksnd_dev/status/1779067405572219374

Close because the data linkage is not working and it's an alpha version.

repo: kosenda/hiragana-converter


text:
Add OBS source management functions

To really be able to do something meaningful with OBS I believe the two most important areas are source manipulation and the frontend API. This issue is regarding the first.
What we would need is the typical

functions to retrieve data on sources, e.g.: obs_source_active(), obs_source_get_name(), obs_source_get_volume(), obs_source_get_width(), obs_source_get_height(), obs_source_get_settings()...
functions to manipulate sources, e.g.: obs_source_set_name(), obs_source_set_volume(), obs_source_set_muted()...

So basically everything listed here for the generic overview or see here for the actual implementation.
I would expect this should also be in ObsSource, which currently (in 0.0.1.17-alpha) provides only one function call:

functions to retrieve data on sources, e.g.: obs_source_active(), obs_source_get_name(), obs_source_get_volume(), obs_source_get_width(), obs_source_get_height(), obs_source_get_settings()
functions to manipulate sources, e.g.: obs_source_set_name(), obs_source_set_volume(), obs_source_set_muted().

You can find these functions in the Obs class.
I am basically following the convention of 1 class per header file. not sure that is the best way tbh...

OK makes sense, thanks!