text:
Mobile wallet - Creating wallet (Unsafe saving)

On the mobile wallet, i was creating a wallet and needed to copy back the seed phrase, and then switching between my apps running for whatever reasons, when i goes to my wallet to recopy all the next seed phrase, it appears that the mwc wallet saved my wallet without recopying the word.

It's seems quite hard to reproduce this issue.

It is known issue and we can't fix that nicely. If you close app during creation that phase, the wallet will be created.
I don't want to add additional logic that will delete such accidentally created wallet because of such feature destructive nature .  Postponing wallet seed file creation is not good solution as well.  So far we don't have much complains about that, let's keep it as it is.

authors: bayk vek-kal

repo: mwcproject/mwc-qt-wallet


text:
Slice args to iterators

Completes https://github.com/mweidner037/list-formatting/issues/3
Completes https://github.com/mweidner037/list-formatting/issues/5

Also adds Anchors.compare function

source: gharchive/pull-request

license: MIT

license_type: permissive

license_source: github-api


text:
env.will_win_in_two_steps has logical error

In the function will win in two steps it shows AI right + 2xOpponent Right == 5. Should that be % 5? If I am understanding correctly, AI right = 4, Opponent right = 3 would result in 10 (4 + 3 +3).
if state_copy[Players.agent][Hands.left] == 0 == state_copy[Players.opponent][Hands.left]:
if state_copy[Players.agent][Hands.right] + (2 * state_copy[Players.opponent][Hands.right]) % 5:
return True

Fixed
https://github.com/mweltin/sticks/commit/f6ef21952dbba769c492617faeb1b3abdab83503

source: gharchive/issue

repo: mweltin/sticks


text:
网易云目前无法通过手机账号密码登录，需要安全验证

Describe the bug
https://github.com/Binaryify/NeteaseCloudMusicApi/issues/1687

Reproduction
"blockText": "验证成功后，可进行下一步操作哦~\t",
System Info
"blockText": "验证成功后，可进行下一步操作哦~\t",

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guide.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
[X] The provided reproduction is a minimal reproducible of the bug.

网易云坏事做绝。

authors: Innei wittytang

repo: mx-space/netease-blil-api


text:
FAQ spelling and grammar corrections

I read your tweet today and noticed a few opportunities to improve the FAQ.

Thanks!

authors: mxcl waynehartman

repo: mxcl/PromiseKit

license: mit

license_source: bigquery


text:
Clean up redis configuration

put redis configs into their own struct
put a redisConf struct into the default config so that envstruct
will populate it
allow tweaking of retry, db index and read/write timeout settings
update example config.yaml

This is potentially a breaking change for anyone who's been using
the redis backend already, but maybe that's just me? :)

Pull Request Test Coverage Report for Build 367

0 of 21 (0.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.4%) to 37.51%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

stores/store.go
0
4
0.0%

stores/redis/redis.go
0
17
0.0%

Totals

Change from base Build 366:
-0.4%

Covered Lines:
461

Relevant Lines:
1229

💛  - Coveralls

Ugh, teach me to get cocky.  This doesn't work:
time="2018-05-25T19:45:55Z" level=info msg="Loaded configuration: %v{:8080 https://go.test.example.com/ ./data redis proxy true true false false 4 { } { } { } {true x-goog-authenticated-user-id x-goog-authenticated-user-email} {localhost:6379 0 3 10s 10s}}"
...despite having the following environment set in the k8s spec:
      containers:
      - env:
        - name: GUS_BASE_URL
          value: https://go.test.example.com/
        - name: GUS_BACKEND
          value: redis
        - name: GUS_REDIS_HOST
          value: 10.0.0.3:6379```

Do I need to do some additional magic here to make envstruct recurse over the redisConf{} that's inside Config?

(Feel free to revert this PR in the meantime)

@memory fixed in https://github.com/mxschmitt/golang-url-shortener/commit/918d28695f3ccc349205ff6ce434478a9b204f56

authors: coveralls memory mxschmitt

repo: mxschmitt/golang-url-shortener


text:
Zombie App

I tested this boilerplate out and subsequently moved on to test out other boilerplates (which also run on localhost:3000). The other apps are not able to be served on localhost:3000 and instead this same app is constantly being served. I could try deleting my browser cache I suppose but have yet to try that. The chrome://appcache-internals doesn't list this app.
Just as surprising is that http://localhost:3000/d37380ea6ac9abdb6c8fd3c00fbaf410.png is still being served (which loads the mxstbr image). This could be a Chrome issue (47.0.2526.106 (64-bit)), I am not sure, I haven't used AppCache before. In Incognito mode, things work as expected -- the image fails to load and if I server something else on 3000 that loads as expected.

The JS console is constantly looping over the following errors,
GET http://localhost:3000/sockjs-node/info?t=1451979320567 net::ERR_CONNECTION_REFUSED
The FetchEvent for "http://localhost:3000/sockjs-node/info?t=1451979320567" resulted in a network error response: the promise was rejected.
(program):1 Uncaught (in promise) TypeError: Failed to fetch(…)
bundle.js:4130 GET http://localhost:3000/sockjs-node/info?t=1451979320567 net::ERR_FAILEDAbstractXHRObject._start @ bundle.js:4130(anonymous function) @ bundle.js:4023
bundle.js:626 [WDS] Disconnected!sock.onclose @ bundle.js:626EventTarget.dispatchEvent @ bundle.js:3565(anonymous function) @ bundle.js:6715
:3000/sockjs-node/info?t=1451979322586:1 GET http://localhost:3000/sockjs-node/info?t=1451979322586 net::ERR_CONNECTION_REFUSED
The FetchEvent for "http://localhost:3000/sockjs-node/info?t=1451979322586" resulted in a network error response: the promise was rejected.
(program):1 Uncaught (in promise) TypeError: Failed to fetch(…)
bundle.js:4130 GET http://localhost:3000/sockjs-node/info?t=1451979322586 net::ERR_FAILEDAbstractXHRObject._start @ bundle.js:4130(anonymous function) @ bundle.js:4023
bundle.js:626 [WDS] Disconnected!

See this comment: https://github.com/mxstbr/react-boilerplate/issues/70#issuecomment-168791025
I'll be removing AppCache from the dev environment as soon as I figure out how to add the manifest attribute to the HTML tag in the index.html file with HTMLWebpackPlugin.
If you have any ideas, feel free to comment this issue or join the Gitter channel.
Thanks for reporting this!

authors: aleemb mxstbr

repo: mxstbr/react-boilerplate


text:
Update README.md

Added my details in the list.
:warning: This is a Pull Request Template :warning:

Checkout all the things you've done by placing an x within the square braces below.

Proposed Changes

[] I've read the CODE OF CONDUCT and abide to it.
[] I've read the CONTRIBUTING.md
[] I've forked the repository.
[] I've created a branch and made my changes in it.
[] I understand opening a PULL REQUEST doesn't mean it will be merged for sure.

Please merge it.


text:
Update team page with my bio that got tossed away and not included or…

…iginally
:(

:+1: this is a must have feature :smiley:
All joking aside, we'll get this in the next release scheduled next week! (Either 7.4.1 or 7.5.0)

The commit is now pulled into 7-5-stable, thanks!

authors: mrueschman remomueller


text:
🛑 Video CDN is down

In 5bb65ac, Video CDN ($VOD_SERVER) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Video CDN is back up in dda7b3f after 44 minutes.

repo: myavsuper/upptime


text:
🛑 BRICKS Bank is down

In 7032aec, BRICKS Bank (https://bank.bricks.tw/update) was down:

HTTP code: 0
Response time: 0 ms

Resolved: BRICKS Bank is back up in 72283e0.

Resolved: BRICKS Bank is back up in 72283e0.

repo: mybigday/service-uptime


text:
🛑 BRICKS is down

In 0f54050, BRICKS (https://display.bricks.tools/api/workspace-public-health-check) was down:

HTTP code: 500
Response time: 649 ms

Resolved: BRICKS is back up in a8df41f after 7 minutes.


text:
Fix warnings generated by compiler

This is to fix the unsafe var warnings generated on compile time, also tested with Elixir 1.3.0 rc!

Thanks!

authors: cbarratt myfreeweb

repo: myfreeweb/httpotion

license: unlicense


text:
[FR]:  Get corner coordinate of current screen

Is there an existing issue for this?

[X] I have searched the existing issues

Describe the problem
안녕하세요.
혹시 onCameraChanged 또는 NaverMapViewRef 로 (혹은 다른 기능으로) 현재 화면의 코너 좌표값을 얻는 기능을 추가해주실 수 있으실까요?
마치 getContentRegion 처럼 화면의 코너 좌표값을 얻고 싶습니다.
Describe the solution
현재 onCameraChanged 에서 내려오는 lat, lng, zoom 값을 사용하여, 화면상 존재하는 코너 값의 좌표를 수학적으로 구현을 하긴 했습니다.
혹시 라이브러리 쪽에서 더 효율적으로 지원 가능한 부분인지 요청드립니다.
함수 부분
export interface Pixel {
  x: number;
  y: number;
}
export interface GetCornerCoordinateParams {
  latitude: number;
  longitude: number;
  zoom: number;
  deviceWidth: number;
  deviceHeight: number;
}
export interface GetCornerCoordinateResult {
  topLeft: Coord;
  topRight: Coord;
  bottomLeft: Coord;
  bottomRight: Coord;
}

/**
 * Coordinate 값을 x, y Pixel 값으로 변환합니다.
 */
export const getPixelByCoordinate = (params: Coord): Pixel => {
  const { latitude, longitude } = params;
  const sinY = Math.sin((latitude * Math.PI) / 180);
  const y = 256 / 2 - (256 * Math.log((1 + sinY) / (1 - sinY))) / (4 * Math.PI);
  const x = (longitude + 180) * (256 / 360);
  return { x, y };
};

/**
 * x, y Pixel 값을 Coordinate 값으로 변환합니다.
 */
export const getCoordinateByPixel = (params: Pixel): Coord => {
  const { x, y } = params;
  const longitude = (x / 256) * 360 - 180;
  const n = Math.PI - (2 * Math.PI * y) / 256;
  const latitude = (180 / Math.PI) * Math.atan(0.5 * (Math.exp(n) - Math.exp(-n)));
  return { latitude, longitude };
};

/**
 * 지도의 중심점, zoom 값을 토대로 화면상 지도 꼭짓점 좌표를 추출합니다.
 * - latitude: number
 * - longitude: number
 * - zoom: number
 * - deviceWidth: number
 * - deviceHeight: number
 */
export const getCornerCoordinates = (params: GetCornerCoordinateParams): GetCornerCoordinateResult => {
  const { latitude, longitude, zoom, deviceWidth, deviceHeight } = params;

  const scale = 2 ** zoom;
  const pixelCenter = getPixelByCoordinate({ latitude, longitude });
  const scaleWidth = (deviceWidth / 2 / scale) * 0.45; // 55% 마진 (화면에 꽉차게 하기 위해서)
  const scaleHeight = (deviceHeight / 2 / scale) * 0.45;

  const topLeftPixel: Pixel = {
    x: pixelCenter.x - scaleWidth,
    y: pixelCenter.y - scaleHeight,
  };
  const topRightPixel: Pixel = {
    x: pixelCenter.x + scaleWidth,
    y: pixelCenter.y - scaleHeight,
  };
  const bottomLeftPixel: Pixel = {
    x: pixelCenter.x - scaleWidth,
    y: pixelCenter.y + scaleHeight,
  };
  const bottomRightPixel: Pixel = {
    x: pixelCenter.x + scaleWidth,
    y: pixelCenter.y + scaleHeight,
  };

  const topLeft: Coord = getCoordinateByPixel(topLeftPixel);
  const topRight: Coord = getCoordinateByPixel(topRightPixel);
  const bottomLeft: Coord = getCoordinateByPixel(bottomLeftPixel);
  const bottomRight: Coord = getCoordinateByPixel(bottomRightPixel);

  return { topLeft, topRight, bottomLeft, bottomRight };
};

뷰 부분
  const [cornerCoordinate, setCornerCoordinate] = useState<GetCornerCoordinateResult>();

  // 카메라 이동시 호출
  const _onChangeCamera = (
    event: Camera & {
      reason: CameraChangeReason;
    },
  ) => {
    const _zoom = Math.round((event.zoom || 15) * 1000) / 1000;
    const params: GetCornerCoordinateParams = {
      latitude: event.latitude,
      longitude: event.longitude,
      zoom: _zoom,
      deviceWidth: width, // 화면의 너비, 넓이를 넣으시면 됩니다.
      deviceHeight: height,
    };
    const cornerCoords = getCornerCoordinates(params);
    setCornerCoordinate(cornerCoords);
  };

출력예시

Additional context
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct

화면의 코너의 좌표를 얻는 과정은 필수적으로 지도뷰의 픽셀 크기와 aspect ratio가 수식의 input으로 들어가기때문에 구현하신대로 하는게 맞는것같습니다.
https://navermaps.github.io/android-map-sdk/guide-ko/1.html
제가 독스를 보며 대부분의 기능은 옮긴것같은데 그런 기능은 못본거같은데 혹시 저기서 확인해보실 수 있을까요?

화면의 코너의 좌표를 얻는 과정은 필수적으로 지도뷰의 픽셀 크기와 aspect ratio가 수식의 input으로 들어가기때문에 구현하신대로 하는게 맞는것같습니다.
https://navermaps.github.io/android-map-sdk/guide-ko/1.html
제가 독스를 보며 대부분의 기능은 옮긴것같은데 그런 기능은 못본거같은데 혹시 저기서 확인해보실 수 있을까요?

아 제가 해당 독스의 API 레퍼런스를 뒤적거리다가 발견한 것입니다.

API 레퍼런스
https://navermaps.github.io/android-map-sdk/reference/com/naver/maps/map/NaverMap.html
getContentRegion, getContentRegion 이런 함수들이 화면의 모서리 좌표들을 응답해주는 것 같기에 한번 요청 드렸던 것입니다!
생각해보니 화면의 크기를 계산해야 하니 구현한 대로 해야하는 게 맞는듯 싶기도 합니다.
확인해주셔서 감사합니다 :)

그런 함수가 native sdk에 있다면 포팅하면 될 것 같습니다. 일단은 기능이 개발되기 전에 사용하시던 방법으로 사용하고 계시면 될 것 같습니다.

그런 함수가 native sdk에 있다면 포팅하면 될 것 같습니다. 일단은 기능이 개발되기 전에 사용하시던 방법으로 사용하고 계시면 될 것 같습니다.

감사합니다.


text:
fields added to package.json

I've added/modified a few fields in the package.json file: repository, keywords and bugs, so they validate with http://package-json-validator.com.
Let me know if these changes are ok and if you would like anything modified with them.

Thanks for the effort, but unfortunately unnecessary. Npm automatically populates the github info from the short string field, which is nicer and the new npm search no longer uses the keywords array in the search.
You may want to report the issues to the validator tool.

Ok, I will check with them.  Thanks.

Awesome! Npm itself uses https://npmjs.org/package/read-package-json to read the file, so that would probably be a good reference implementation. Npm itself will throw errors for invalid fields, warnings for missing / wrong fields on publish or package read and this module is currently clean for that as well, so I don't understand what the validator is validating against, as I would assume it should work like npm.

Looking through the GitHub repo for that validator tool, there at lots of open issues regarding the issues I noted above regarding incorrect validation for npm packages like https://github.com/gorillamania/package.json-validator/issues/29 and https://github.com/gorillamania/package.json-validator/issues/44

I should note that the only non-valid field was the repository url.  keywords and bugs were only at warning level.  There is also a recommendation for the 'homepage' field, which I left alone.
package-json-validator
Results:
{
  "valid": false,
  "errors": [
    "Url not valid for repository: mysqljs/mysql"
  ],
  "warnings": [
    "Missing recommended field: keywords",
    "Missing recommended field: bugs"
  ],
  "recommendations": [
    "Missing optional field: homepage"
  ]
}

Looking at the open issues you provided, it seems that the normalization rules are different between https://www.npmjs.com/package/normalize-package-data and https://www.npmjs.com/package/read-package-json

The repository field in our repo is definitely valid. I liked you to the issue reporting that the validator is incorrectly thinking it is invalid. Also the bugs and homepage URLs are auto populated from the repository short string to their GitHub addresses, which is why we don't need to specify them yet they show up on the npmjs.com site and in the npm repository just fine, so there is nothing to change here, I think you just accidentally stumbled across some bugs in that validator tools, which is why I suggested to file issues there and hopefully they'll get it fixed.

Yes it's valid, it's the validator that is a bit outdated. I hope to get a weekend to give it some love soon :)

authors: LinusU dougwilson lkisac

repo: mysqljs/mysql


text:
constructor should take a single array of strings

Specifically, in the case form the README:
class Foo extends EventTarget("message", "error") {
}

This is a problem because what if I have a large number of strings to pass in?  I'm probably going to put them in an array in a previous statement, then pass that array in.  I'll have to use Function.prototype.apply in es5, which will break a constructor function! ex:
var events = [
  'negotiationneeded',
  'icecandidate',
  'icecandidateerror',
  'signalingstatechange',
  'iceconnectionstatechange',
  'icegatheringstatechange',
  'connectionstatechange'
];
// oops! this subtly breaks the prototype chain!
RTCPeerConnection.prototype = new EventTarget.apply({}, events);

A simple forward compatible change would be to first check if the constructor's if (arguments.length === 1 && Array.isArray(arguments[0]) { // don't construct a new array.

so I would imagine then I could do:
var events = [
  'negotiationneeded',
  'icecandidate',
  'icecandidateerror',
  'signalingstatechange',
  'iceconnectionstatechange',
  'icegatheringstatechange',
  'connectionstatechange'
];
RTCPeerConnection.prototype = new EventTarget(events);

Thank you for the issue.
OK, it sounds reasonable.
I will do it this evening (JST).

Ah, if there are arguments, a call of EventTarget(events) defines new constructor.
So how to use event-target-shim in ES5 is below:
//-----------------------------------------------------------------------------
// No attribute listeners.
function Foo() {
    EventTarget.call(this);
}
Foo.prototype = Object.create(EventTarget.prototype, {
    constructor: {
        value: Foo,
        configurable: true,
        writable: true
    },

    //....
});

//-----------------------------------------------------------------------------
// With attribute listeners.
function Foo() {
    EventTarget.call(this);
}
Foo.prototype = Object.create(EventTarget("message", "error").prototype, {
    constructor: {
        value: Foo,
        configurable: true,
        writable: true
    },

    //....
});

//-----------------------------------------------------------------------------
// With attribute listeners as an array.
function Foo() {
    EventTarget.call(this);
}
Foo.prototype = Object.create(EventTarget.apply(null, events).prototype, {
    constructor: {
        value: Foo,
        configurable: true,
        writable: true
    },

    //....
});

Now, I'm not sure this enhancement has a value.
I will add documents for ES5.

That's still not correct.  The use of call/apply on a constructor messes up this in the constructor function.
function Foo () { console.log(this) }
new Foo // Object { }
Foo.apply(null, []) // Window

No, EventTarget(...types) is a function, not a constructor.
Please see again, class Foo extends EventTarget("message") is not class Foo extends new EventTarget("message")
Also, I conformed to work my all example codes.

wrote a patch for this

authors: mysticatea nickdesaulniers

repo: mysticatea/event-target-shim


text:
Interaction with iperf3

iperf3 almost always causes a Broken pipe (os error 32) or a Socket is not connected (os error 57)
Upon exit, it causes an excessive amount of Rst server -> client.
Occasionally tokio-console displays a tasks have lost their waker from one of
src/client/handle_remote/tcp.rs:81:9
src/client/handle_remote/socks/mod.rs:72:28

depending on if I ran iperf3 on a direct remote or proxychains4 iperf3 on a socks remote.
Most likely due to AtomicWaker being overwritten.
None of these happen when forwarding regular traffic like HTTP(S) and SSH.

Okay #31 is probably not the cause. New observation: the tasks get orphaned only when iperf3 closes the connection, so the two problems mentioned here might be the same one.

This specific bug is because the server iperf3 I am using does not support --bidir. It still reveals some problems about our implementation of Rst (it does not seem to propagate properly. Probably the cause.

2024-03-24T20:21:22.976479Z ERROR process_message:close_port: penguin_mux::inner: Waking writer at port 35708
2024-03-24T20:21:22.976556Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:22.976621Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:22.976675Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:22.976727Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:22.976779Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:22.976830Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:22.976879Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055157Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055298Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055344Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055458Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055510Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055554Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055595Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055634Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055674Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055779Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055824Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055863Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.055944Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.056009Z DEBUG process_message:close_port: penguin_mux::inner: freed connection 35708 -> 556
2024-03-24T20:21:23.056596Z ERROR close_port: penguin_mux::inner: Waking writer at port 46119
2024-03-24T20:21:23.056643Z DEBUG close_port: penguin_mux::inner: freed connection 46119 -> 61240
2024-03-24T20:21:23.056688Z ERROR close_port: penguin_mux::inner: Waking writer at port 19549
2024-03-24T20:21:23.056702Z DEBUG close_port: penguin_mux::inner: freed connection 19549 -> 60458

I'm starting to think that using LockedWebSocket itself is wrong. When multiple tasks poll AsyncRW and get proxied to poll_x of the web socket, only the last one will be woken if the result is Pending. I'll need to restructure it to use message passing to/from a dedicated task for correct behaviour.


text:
Spectral/Molecular Networking

Operating system and version: Windows 11
Mzmine version 4.2.0
In previous versions of MZmine, the function I am trying to use was called MS/MS Spectral Networking. When attempting to use the current Spectral/Molecular Networking function in MZmine 4.2.0, I configured the parameters as usual. However, the generated MGF file does not contain the MS2 spectra. In earlier versions, the MGF file was correctly generated with MS2 data after running the MS/MS Spectral Networking function, but in this version, those data are not included.

The spectral networking does not export any data, it applies the networking in mzmine. you can open the visualiser afterwards.
Are you perhaps looking for the export of the molecular networking files for gnps?

Hello Steffen:
I’ve tried generating the file in two different ways. The first was using the MGF file (ADAP), and for example, for a mass of 449, it should generate something like this (I worked on it in version 3.9):
BEGIN IONS
FEATURE_ID=276
PEPMASS=449.1948
SCANS=276
RTINSECONDS=348.664
CHARGE=2+
MSLEVEL=2
190.8687 1.5E1
194.2043 1.2E1
220.9096 2.4E1
229.1782 1.9E1
231.2761 3.0E1
247.1863 2.6E1
259.0072 1.2E1
287.0939 7.9E4
288.1028 4.7E2
289.3258 1.1E1
303.0471 2.4E1
305.2939 5.7E1
317.5382 3.3E1
335.0506 3.0E1
345.1160 2.8E1
347.6058 2.7E1
348.3102 1.4E1
349.1333 2.4E1
353.0164 2.1E1
359.3038 1.3E2
367.1231 2.2E1
367.7833 9.0E1
387.2751 9.9E1
389.1180 3.3E1
401.3255 3.0E1
403.3250 2.2E1
413.2874 2.6E1
414.5962 2.3E1
421.0225 1.7E1
431.2268 1.3E2
431.8600 1.3E1
449.3686 2.9E1
END IONS
In version 4.2, I get this:
BEGIN IONS
FEATURE_ID=103
PEPMASS=449
RTINSECONDS=242.973
SCANS=103
MSLEVEL=2
CHARGE=1+
449 2.9E4
450 5.1E3
451 4.4E3
452 4.3E3
453 2.8E3
455 8.5E3
END IONS
(I’m using a different chromatographic method, so the retention times change)
Morover, when I try to generate the file for GNPS, it comes out empty.

Can you please explain what you try to achieve and what steps/modules you have run? Ideally share some raw data and your batch file.

authors: SteffenHeu ansgarkorf dianacelit

repo: mzmine/mzmine


text:
Any way to monitor orders?

Hi there,
Love this library, really makes stuff straight forward.
Is there any way to retrieve or get notified when an order of mine was filled?
Can't find anything anywhere!
Thanks

getopenorders({ market: code }, (err, response) => { });
getorderhistory({ market: code }, (err, response) => { });
documentation https://bittrex.com/Home/Api

Thanks @dparlevliet but that would mean I have to query them manually, right? Does that mean the websocket API does not support it?

Correct, the Bittrex API is still new and they do not yet support Authentication via the Websockets in-order to receive events, but they are working on it. So, for now you will have to query it. Personally, I query every 15s.

One more question here:
The Bittrex API docs say the market is optional. But not providing it always provides null, while e.g. BTC-ETH works. I can only assume this is a bug or am I doing something wrong?

All of the above return null for me

The params you send to getorderhistory() are passed directly to Bittrex without intervention from the library so if you want to have no market then you would need to do
bittrex.getorderhistory({}, (data) => {
  console.log(data);
});

The only one I see the ability to compensate for is
bittrex.getorderhistory(null, (data) => {
  console.log(data);
});

The library could provide {} as a default param if null/false/undefined is passed as a parameter. The other two examples are legitimate URL requests.

Hi,
I've managed to put buy limit order from API, but It's not listed together with the other orders in the account. How can I see orders made trough API?
Note: Using getorderhistory API the order is not listed again, but using the getorder API the order is returned.

Have you guys figured out GetOrderHistory in v2.0?

@dparlevliet One more question about order monitoring with websockets... What if to get connectionToken from /signalr/negotiate and then use it with options? Could it works?

authors: DWboutin devboxr dparlevliet maxkudla mirrorps skyl


text:
"Link text" Feature

Hello
I have write a new feature : "text link".
The feature adds a new selector preconize in webdriver protocols.
SelfTests OK.
Documentations updated.
I'm a newbee in github . when I use the command : "git push origin linkText" - it is forbidden
remote: Permission to n1k0/casperjs.git denied to jefleponot.
fatal: unable to access 'https://github.com/n1k0/casperjs.git/': The requested URL returned error: 403
So I send it to my clone repository. Is it the correct way ?
Please Help me.

Can you please create another pull request in which you have the TrifleJS related changes?

There is no TrifleJS changes in my PR. It was a mistake in my first push name.

Umm... have you taken a look at the "Files changed" tab?

I made a new fix for tabs :-)

Hi.
I don't realy understand what is the purpose of this contribution. Can you explain me ?
Regards,

Hi Mickael,
Casper is a great tools for scripting but it miss features.
Css and xpath selector are usefuls but not very user-friendly so anothers shortcuts selectors have been inserted in all web testing frameworks :

Hi, can you please squash your commits? I Will make a review on monday /c @paazmaya

Thank you,
I'll try to do it.
my first squash commits

There is too much things unrelated to your feature, you need to remove this stuff and rebase from master branch.

"Houston, we got a problem".
This is not good, you need to rebase master branch of casperjs official repository.
Assuming you are working on your fork, this is a common way to do:
// add a remote for n1k0/casperjs repository
git remote add upstream https://github.com/n1k0/casperjs.git

// then update your "local" master branch

git checkout master
git fetch -a
git rebase -i upstream/master (you will probably need to fix some bugs)
git push origin master

// then go on the "feature" branch
git checkout origin linkText
git rebase -i origin/master (you will probably need to fix some bugs)

// so at this point, your master branch is the same as our master branch and only the feature should be in your commits

git push -f origin linkText

from Syncing a fork
Let me know when it's done (and don't give up, I want linkText() to be part of casperjs API :+1:  )

Hi Mickael,
Your are totaly right.
I will be my best today to do all you said.
Best Regards
JEF

Must I do merge with upstream/master to test rebase (integration) ?

squash with visible test done.
selftest ok
jshint ok
push done
another note ?

Yes, mono seems unreachable... I relaunch the build.
ping @n1k0 @paazmaya : can you take a look to this pull request ? for me it's :+1:

:+1:  French : C'est ma première INTÉGRATION!!! Hourra
English: It's my first iNSERT Pull Request!!! hurray

TBH I don't clearly see the added value of having this while we could simply rely on some simple xpath expression; that's what we do with clickLabel, and //a[text()="blah" seems to work just fine…

Hi nicolas,
Adding this feature is a quite important thing beacause :

In html tags, texts are always written differently, using xpath pattern to match text is not obviusly, example :
Hello
  Hello
                Hello
Hello
  Hello

witch pattern do you need : //a[text()="Hello"] OR //a[normalize-text(text())="Hello"] OR //a[contains(text(),"Hello")] OR //a[string()="Hello"] ... or a mixture ...
AND no one in all of them will works if css style is applied like "text-transform: Capitalize"
So an help is required : link text
Please just have a look to previous links.
Ps: why do you need a "ClickLabel" Method ? we have yet a click method with selector or xpath arg.

2 votes for "link_text" (paazmaya+mickaelandrieu)
1 vote for "link text"
0 vote for "linkText"
:+1:

thank you @paazmaya

Great that you fixed many of the linting errors.
There seems to be plenty of whitespace inconsistencies, mainly between the next word and comma.
Can you please fix those?

Also the "versionadded" in all of the new methods

ok

Yes, in the documentation

done

COUCOU

@jefleponot you need to rebase it.
@n1k0 so ... do you (finaly) agree on this or not ? If not, it's better to close this one instead of ask to  @jefleponot to work more on it...

Hi Mickael, what does that means  [HOLD ] ?
jef

this means I need a decision from @n1k0.

While I could see how this feature could be interested for, say, 1% of the population of casperjs users, I'm definitely uncomfortable landing this in its current shape.
The patch does far too much, misses tests and docs. Most importantly, as I can't really project myself into maintaining all this when you possibly leave, so I'm not gonna land it.

ok, bye

ok, bye

Sounds like I took the right decision.

FYI, the "link Text" feature via Casper (hacked) is used by more than 54 people in my team to oversee the government's web applications

How does this decision prevent you to keep using this feature within your team? You can always extend the casper prototype and keep using it, right?

@jefleponot you can extends CasperJS without any hack: http://casperjs.readthedocs.org/en/latest/extending.html
I consider this topic closed.
Regards,

Thanks Mickael for all.
To N1ko:
Hi Nicolas,
I'm pretty disappointed, on the one hand I have my government that refuses any contribution of its officials to the community as it gets the job full contributor like yours. On the other hand, contributors themselves who do not even realize how their work is used in all their possibilities.
Your project has been corrected, adapted and merged with several others to create a very complex tool used for behavioral tests, the SLA, the défacing, supervision, transfer auditors ...
Your programmer vision like mine does not cover the full extent of the mink writers and that's why I do not insist.
Take Care,

authors: jefleponot mickaelandrieu n1k0 paazmaya


text:
Intuitive picking

Click: Pick
Alt+Click: Rotate
Shift+Click: Zoom
Cursor changes to tell us if we are in pick, rotate, or zoom mode.

I added an instruction drop down, re-enabled right click/middle click.


text:
Load original routes files?

In the company where I work, we are creating the Laravel application with modules to be able to create microservices afterwards.
We use routes for each module (which works great), but we would like to get some routes in original /routes folder at the root level.
I have made some tests and if I put a post route there it does not get called, whereas inside a module it does.
Is there a way to load them or should I create like a common module?
Thanks!

You can use the usual route indeed. Make sure they are loaded in the laravel service provider. https://github.com/laravel/laravel/blob/master/app/Providers/RouteServiceProvider.php

Yes, I have it like this.
But nevertheless something seems wrong.
But I don't think it has anything to do with your package, so closing the issue.
Thanks!
Jaume

Indeed, this doesn't interfere with the usual laravel way of loading routes. Feel free to let others know what the issue was/is when you figured it out. 👍

authors: jaumeavila nWidart

repo: nWidart/laravel-modules


text:
convert relative links to absolute

Hi, thanks for the project.
Wdyt to accept an optional url param that when present would allow to convert links to absolute when a link starts with /

@dkuku
Hi, thank you for the message 😊

convert links to absolute when a link starts with /

Could I have more description about the use case ?

"A link starts with /" seems absolute one.
The issue title "convert relative links to absolute" seems to mean ../some/path conversion to /home/someone/some/path.
In addition, relative paths work in Markdown as well as HTML.

I was thinking for example with parsed wikipedia page - the links point to other pages but I don't have it all locally.
So converting the /wiki/article to https://wikipedia.org/wiki/article

@dkuku
Thank you for the easy-to-understand example.
It seems possible with the parameter passed to tell where you are. (In your example, the Wikipedia article URL.)
I will try to implement it as the htmlproc-rs's preprocessor function.
Besides, web scraping have possibility to solve it in more flexible way. This crate adopts text processing now, and will not possibly solve complicated situations.

https://github.com/nabbisen/htmlproc-rs/issues/7

@dkuku
I released new feature of htmlproc-rs: path_to_url.
You can preprocess your HTML before calling mdka. First, install it:
cargo add htmlproc --features path_to_url

Then:
use htmlproc::path_to_url::{convert, ConvertOptions};

let result: String = convert("link", ConvertOptions::new("target.domain"));

cool, thanks. I will ad this to https://github.com/dkuku/mdka_ex/

@dkuku
Wow, pretty nice project on Elixir !!

authors: dkuku nabbisen

repo: nabbisen/mdka-rs


text:
Laravel9 | Pirep Finance Service > Undefined Method

https://github.com/nabeelio/phpvms/blob/9622657336dd95cc92276863731c2580fccbfae8/app/Services/Finance/PirepFinanceService.php#L243
->value() causes an exception of production.ERROR: Call to undefined method App\Support\Units\Fuel::value()
->internal() would be nice there ;)

Just add these issues to the PR

authors: FatihKoz nabeelio

repo: nabeelio/phpvms


text:
training error

Noise training throws an error. Seems to be line 113 in lib/pairwise_transform.lua:
113. x:samplingFactors({1.0, 1.0, 1.0})
Currently found no use for this line - commenting it out allowed for a successful train.

Please update the graphicsmagick package.
sudo luarocks install graphicsmagick

authors: ao-dexter nagadomi


text:
gpio/pin-mode does not work inside loops

Using this:
(def start-low (list 3 6 12 23 16 17))

Both of these forms fail with the same error:
(map (fn [p] (gpio/pin-mode p :output)) start-low)

(doseq [p start-low]
  (do
    (gpio/pin-mode p :output)
    (gpio/digital-write p :low)))

Here is the error:
error: 'p__13889' was not declared in this scope
                   ::pinMode(number::to<number_t>(p__13889), OUTPUT);;
                                                  ^

Note that the gpio/digital-write inside the loop does not throw an error.

4bf3af959a2d8bab5d2968e926d9d265704e6b9e fixes this issue.

repo: nakkaya/ferret


text:
🛑 improcastel.ch is down

In df5a16e, improcastel.ch (https://improcastel.ch) was down:

HTTP code: 0
Response time: 0 ms

Resolved: improcastel.ch is back up in 8544bb0 after 9 minutes.

repo: nanhosting/monitoring


text:
Update configs via scripts.

#14

As noted in the related issue - #14 - I'm closing this PR as we're not using Parcel any more.

authors: cunguyendev mgreasly

repo: nano-react-app/template-js


text:
support SSH certificate authentication

Some little refactoring and code to support SSH certificates authentication. Besides, the caller can now pass any ssh.AuthMethod for more flexibility.

@stephane-martin this looks great! Thank you so much for the work here. I'll need to spend just a bit of time ensuring this change doesn't break backwards compatibility for the components that are currently depending on this. I intend to merge this as soon as I have confidence that we'll be good here.
Thank you so much!

authors: stephane-martin tylerflint

repo: nanobox-io/golang-ssh


text:
Fix reference to nbgv

Description
Motivation and Context

The build was failing for these libs

How Has This Been Tested?

Screenshots
Types of changes

[ ] Improvement (non-breaking change that improves a feature, code or algorithm)
[ ] Bug fix (non-breaking change which fixes an issue with code or algorithm)
[ ] New feature (non-breaking change which adds functionality to code)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[x] Config and build (change in the configuration and build system, has no impact on code or features)
[ ] Dependencies (update dependencies and changes associated, has no impact on code or features)
[ ] Unit Tests (add new Unit Test(s) or improved existing one(s), has no impact on code or features)
[ ] Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist:

[ ] My code follows the code style of this project (only if there are changes in source code).
[ ] My changes require an update to the documentation (there are changes that require the docs website to be updated).
[ ] I have updated the documentation accordingly (the changes require an update on the docs in this repo).
[ ] I have read the CONTRIBUTING document.
[ ] I have tested everything locally and all new and existing tests passed (only if there are changes in source code).
[ ] I have added new tests to cover my changes.

Pipeline failing because of issue with resources.

@nfbot updatedependencies


text:
Do not understand how to run this file

I tried to run this repository via Visual Studio Code but i can not achieve

Which file?

repo: nanowell/OpenAI-GPT-Code-Automation


text:
ENH: Matplotlib viewer intensity selector

Requires https://github.com/nanshe-org/nanshe/pull/305

Provides a selection range on the intensity colorbar.
Selection range restricts intensities shown to that range. All others are clipped.
Clicking on the colorbar returns to the unselected range.
Rescales values within the range to take up the whole spectrum.
Updates the colorbar to reflect the selected intensity range.
Allows making any number of subselections after a selection was already made.

Ignore coveralls at present. Will go back and visit testing for this module. Ready to merge once requirements are in.

Took a bit of cleaning up to get right, but now it looks very nice. Ready once tests (ignoring coveralls) pass.

LGTM. Merging...

repo: nanshe-org/nanshe


text:
Deserialize

A Pull Request just to sharpen a bit the Deserialize trait, and make from_str be able to resolve for any type which implements it.

By the way, this is the default deserialization for primitive types that I was doing:
macro_rules! impl_deserialize_float {
    ( $( $name:ty ),+ ) => {
        $(
            impl Deserialize for $name
            {
                fn deserialize(edn: &Edn) -> Result<Self, Error> {
                    edn
                        .to_float()
                        .ok_or_else(|| build_deserialize_error(edn.clone(), "float"))
                        .map(|u| u as $name)
                }
            }
        )+
    };
}

impl_deserialize_float!(f32, f64);

macro_rules! impl_deserialize_int {
    ( $( $name:ty ),+ ) => {
        $(
            impl Deserialize for $name
            {
                fn deserialize(edn: &Edn) -> Result<Self, Error> {
                    edn
                        .to_int()
                        .ok_or_else(|| build_deserialize_error(edn.clone(), "int"))
                        .map(|u| u as $name)
                }
            }
        )+
    };
}

impl_deserialize_int!(isize, i8, i16, i32, i64);

macro_rules! impl_deserialize_uint {
    ( $( $name:ty ),+ ) => {
        $(
            impl Deserialize for $name
            {
                fn deserialize(edn: &Edn) -> Result<Self, Error> {
                    edn
                        .to_uint()
                        .ok_or_else(|| build_deserialize_error(edn.clone(), "uint"))
                        .map(|u| u as $name)
                }
            }
        )+
    };
}

impl_deserialize_uint!(usize, u8, u16, u32, u64);

impl Deserialize for bool {
    fn deserialize(edn: &Edn) -> Result<Self, Error> {
        edn.to_bool()
            .ok_or_else(|| build_deserialize_error(edn.clone(), "bool"))
    }
}

impl Deserialize for String {
    fn deserialize(edn: &Edn) -> Result<Self, Error> {
        Ok(edn.to_string())
    }
}

Bump version! 0.11.4

Honestly I was thinking of bumping to 0.12.0 since it breaks the Deserialize interface, and documents how you should do deserialization using the trait. What do you think?

authors: naomijub otaviopace

repo: naomijub/edn-rs


text:
Implement xt/tx-time support

Implement https://docs.xtdb.com/clients/1.23.2/clojure/#_transaction_time

define protobuf structure
Implement server side query (clojure plugin)
Implement client side query (Rust client)

Similar to https://github.com/naomijub/gXTDB/issues/40

repo: naomijub/gXTDB


text:
Please explicitly specify the coordinate system.

📚 Documentation
I find it is really frustrating working with coordinates in Napari. I don't see any explicit information on the coordinate system and coordinate order that napari used. Is it always in TZYX, or ZYX, or YX format across different layers? Could this info be added to the documentation and tutorial? Every time I write coordinates (like creating points, specifying Scale), I need to confirm I write them in the correct way, as my data are usually in another format. Please clarify this. Thanks!

HI @pmcesky sorry you find working with coordinates so frustrating. By default coordinates are rendered from in reserve order, so a convention like TZYX for all layers. We'll make that more explicit in the documentation.
Are things working for you now, or are you still running into problems? I'd be happy to try and help if the later.

I this moment there is no glue between TZYX mnemonics and coordinate system. Napari does not standardize the order of the axis. And different file formats have different orders (even inside tiff there could different orders of axis storage).
No @sofroniewn. There is no place to provide data axis order. Also, default, napari readers, as I know, does not standardized axis order.
The most common is TZYX, but three is no guarantee. Ant there is a big problem with C Axes. Because the file could have TZYXC (ome-tiff), TZCYX (ImageJ tiff). Other orders are also available.
This is a much bigger problem and partially connected with units problem #1701.

Hi @sofroniewn
Thanks very much for this clarification!
Now I'm much more confident to use this great app.

Don't hesitate to reach out again if you have questions, or spot places where our documentation or tutorials can be improved. We're still a work in progress, but glad you're trying napari out!!

Don't hesitate to reach out again if you have questions, or spot places where our documentation or tutorials can be improved. We're still a work in progress, but glad you're trying napari out!!

Yes! I recognize napari as my No.1 image viewer currently. Though sometimes things may be confusing, but I'd like to see it goes forward and improves. I'm glad if I could help some.

The xarray solution to this is to use named axes everywhere. It adds overhead when specifying a transform (you have to provide a dict instead of and array, e.g. translation = {'x' : 0, 'y': 0, 'z': 0} instead of translation = [0,0,0]) but it completely eliminates the ambiguity described in this issue.

Also, default, napari readers, as I know, does not standardized axis order.
The most common is TZYX, but three is no guarantee. And there is a big problem with C Axes. Because the file could have TZYXC (ome-tiff), TZCYX (ImageJ tiff). Other orders are also available.

This is correct: we don't have any axis order. We display arrays in the order they are given, with the last few dimensions being displayed.
At the risk of being unpopular :joy:, I would go further, though: I want by design to never have standardised axis ordering. If you want to use data in TZCYX, napari will do it, if you want to do XYZ, napari will also do it. We will always want to work with bare NumPy arrays, which precludes named axes everywhere — even if we give defaults of {0, 1, 2, ...}, this will break NumPy broadcasting if applied uniformly. (NumPy broadcasting rules right-align array dimensions.) @sofroniewn ran into this and at one point gave default axis names of {..., -3, -2, -1}. That works with NumPy broadcasting but is entirely unintuitive, although that might be the best solution — happy to revisit.
We could definitely build something that would transpose datasets by default if they are already annotated with axis names and the viewer itself is also annotated. I think that would satisfy most use cases while keeping the viewer general enough for bare NumPy arrays. How does that sound @d-v-b @pmcesky @Czaki?

This is correct: we don't have any axis order. We display arrays in the order they are given, with the last few dimensions being displayed.

Yes, well put, but see below

No @sofroniewn. There is no place to provide data axis order. Also, default, napari readers, as I know, does not standardized axis order.

You can use the viewer.dims.order to determine which axes are displayed, but that isn't settable via reader plugins yet as it still needs to be worked on see #1077.

You can use the viewer.dims.order to determine which axes are displayed, but that isn't settable via reader plugins yet as it still needs to be worked on see #1077.

But it is still connected with the internal axis order. Not with mnemonic names. If you have two tiff files. One with order TZCYX and the second one with TZYXC. Then the current loading method will create confusion. Setting viewer.dims.order does not will solve this.
Also, tifffile package by default squash empty axes. So if you have two files one with data on TYX axes and the second with data on ZYX axes then they will be represented identically. Even when loaded simultaneously.  And if napari takes care of axis order from the file metadata it should cause showing two sliders (one for time and one for z stack), not one as it is currently.
@jni But I agree with @jni that there should be no strong glue to axes mnemonics. Nice will be such support from default readers. Maybe possibility to set names for axes in viewer.dims and pass it to layers which should allow getting common experience.

At the risk of being unpopular 😂, I would go further, though: I want by design to never have standardised axis ordering. If you want to use data in TZCYX

I agree, and I would be even more unpopular and say that 90% of the time "C" should not be an axis, but rather the number of elements returned when sampling from a point in space :)

We could definitely build something that would transpose datasets by default if they are already annotated with axis names and the viewer itself is also annotated.

I like this idea!

In the docs wg meeting we talked about adding a docs page on "spatial coordinates and dimensions in napari", not to be prescriptive but to explain what we have as built-in settings and how people can explore the gui to change them.

My current issue is #4633 and the fact that we actually want to swap the default handedness of the space. There is of course value in documenting that it's currently left-handed, but I think I would prefer spending effort on flipping the leading axis so that we are right-handed by default, then documenting things.

@jni totally see what you're saying, but will note that #4633 has been open already for more than two years, and this request is almost four years old.
Even if we do end up changing things to address #4633, lots of users might be on older versions and have questions about the way things used to work. I don't think we should hold off on documenting how these things currently work just because we'll eventually change it. I'd much rather go to an existing document and edit/add to it, than write up a document from scratch.
It'd be different if there was a PR waiting to be merged. I think this information is too critical to not have documented somewhere...

Is this connected to https://github.com/napari/docs/issues/529?

It can be, but not necessarily, since napari/docs#529 can be done exclusively in 2D space (and would probably benefit from that, to keep complexity down). Having said that, even in that case, we probably do want to specify that the origin is at the top left and the axes point down, and then right, in that order. And that pixel centers are at integer coordinates. (see e.g. the second screenshot in #1660.)

authors: Czaki DragaDoncila d-v-b jni melissawm pmcesky sofroniewn

repo: napari/napari


text:
Add documentation in the napari repo about the GitHub actions workflows and templates

📚 Documentation
When debugging action workflow results, having some contributor/maintainer documentation in the .github directory is helpful.
Document the actionlint checks, constraints workflows, and info about automation to reduce manual toil.

We should also point to that documentation from the Core developer guide

After #7365 lands, I will loop back and add a mention in the the docs @melissawm. :sunny:

authors: melissawm willingc


text:
Async rendering part 2

Description
New NAPARI_ASYNC env var to toggle on async loading via a thread pool.

[x] New feature (non-breaking change which adds functionality)

References

Async Part 1: #1565
Full async PR: #1510

How has this been tested?

[x] Manual testing

Final checklist:

[x] My PR is the minimum possible work for the desired functionality
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] I have added tests that prove my fix is effective or that my feature works

This is ready to review. This is a smaller step that outlined in #1510 but I think it's needed. I left out the Cache and all the statistics which seemed like they could go in as separate steps.

Still ready for review. I just did some clean and tried to anticipate some objections.

tried to anticipate some objections.

Nobody expects the Spanish Inquisition!!!
(Couldn't resist, I mean, it's friggin Python code...)

The visibility (render to black) gets added in async-3 which you can see here until we make a Napari PR for it:

authors: jni pwinston


text:
fixed breaking changes in react router migration and minor tweaks

commit ee7a41a
Author: Narayan soni narayansoni854@gmail.com
Date:   Wed Feb 15 00:55:30 2023 +0530
update dependencies using ncu

commit bbdc4cd
Merge: 93a7f0b 29f1472
Author: Narayan soni narayansoni854@gmail.com
Date:   Wed Feb 15 00:50:23 2023 +0530
Merge pull request #162 from narayan954/deepsource-transform-749baf1a

commit 29f1472
Author: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date:   Tue Feb 14 19:18:36 2023 +0000
Format code with prettier

This commit fixes the style issues introduced in 93a7f0b according to the output
from prettier.

Details: https://deepsource.io/gh/narayan954/dummygram/transform/3d05dcf5-af9b-44e2-bdc0-6f568250e0db/

commit 93a7f0b
Merge: 0711181 a531d72
Author: Narayan soni narayansoni854@gmail.com
Date:   Wed Feb 15 00:48:24 2023 +0530
Merge pull request #159 from TheXro/darkmode

fixed: Post background changes color on switching to dark mode #118

commit 0711181
Merge: 247a1da 9e1abd2
Author: Narayan soni narayansoni854@gmail.com
Date:   Wed Feb 15 00:31:53 2023 +0530
Merge pull request #161 from A91y/master

Updated CONTRIBUTING.md and README.md

commit 9e1abd2
Author: A91y ayush.agr254@gmail.com
Date:   Wed Feb 15 00:22:15 2023 +0530
Updated CONTRIBUTING.md and README.md

commit a531d72
Author: TheXro ravyyadav97@gmail.com
Date:   Tue Feb 14 21:24:01 2023 +0530
fixed issue #118

commit 247a1da
Merge: f3214fb fcd0865
Author: Narayan soni narayansoni854@gmail.com
Date:   Tue Feb 14 01:32:25 2023 +0530
Merge pull request #157 from narayan954/deepsource-transform-015baf48

commit fcd0865
Author: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date:   Mon Feb 13 20:00:26 2023 +0000
Format code with prettier

This commit fixes the style issues introduced in f3214fb according to the output
from prettier.

Details: https://deepsource.io/gh/narayan954/dummygram/transform/014a0045-5ff3-455b-a465-ae9e4d965d28/

commit f3214fb
Merge: ab136eb 533cdbe
Author: Narayan soni narayansoni854@gmail.com
Date:   Tue Feb 14 01:30:13 2023 +0530
Merge pull request #156 from TheXro/TheXro

fixed: fix white space on mobile view and z axis of theme switcher #146

commit 533cdbe
Author: TheXro ravyyadav97@gmail.com
Date:   Mon Feb 13 19:08:40 2023 +0530
fixed issue #146

commit ab136eb
Merge: b4939e4 5485504
Author: Narayan soni narayansoni854@gmail.com
Date:   Sun Feb 5 18:13:01 2023 +0530
Merge pull request #139 from narayan954/deepsource-fix-9bbfc17a

Remove `true` from boolean attribute

commit 5485504
Merge: 9331c9b 63dd7f1
Author: Narayan soni narayansoni854@gmail.com
Date:   Sat Dec 24 23:07:28 2022 +0530
Merge branch 'master' into deepsource-fix-9bbfc17a

commit 9331c9b
Author: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date:   Tue Dec 20 16:43:32 2022 +0000
Remove `true` from boolean attribute

creating separate branch to process this


text:
proper way to specify return type

Making return type of match and matchOn stay tagged union is not straightforward a bit.
They seems to require as const or return type declaration for each case.
https://github.com/naruaway/ts-union-tools/blob/eb01cf1b814214597eca163c5339f8137461dd57/src/index.test.ts#L42-L53
I wonder if I could specify return type at once like following.
const createSimplePerson = (type: 'dev' | 'ui/ux') =>
  match<SimplePerson | 'SalesPerson' | 'Artist'>(type, {
    dev: () =>
      ({
        kind: 'Developer',
        name: 'John Smith',
        programmingLanguage: 'TypeScript',
      }),
    'ui/ux': () =>
      ({
        kind: 'Designer',
        name: 'Lorem Ipsum',
        favoriteTool: 'React',
      }),
  });

(Though the API that I truly want is inferring automatically, it seems nearly impossible.)

The API I wrote also seems impossible...
Available approaches I found were
match(type, {
  dev: () =>
    ({
      kind: 'Developer',       name: 'John Smith',
      programmingLanguage: 'TypeScript',
    }),
  'ui/ux': () =>
    ({
      kind: 'Designer',
      name: 'Lorem Ipsum',
      favoriteTool: 'React',
    }),
  <SimplePerson | 'SalesPerson' | 'Artist'>typeHint,
});

matchWithHint<SimplePerson | 'SalesPerson' | 'Artist'>()(type, {
  dev: () =>
    ({
      kind: 'Developer',       name: 'John Smith',
      programmingLanguage: 'TypeScript',
    }),
  'ui/ux': () =>
    ({
      kind: 'Designer',
      name: 'Lorem Ipsum',
      favoriteTool: 'React',
    }),
});

I found even both approaches are difficult.
A simpler approach exists.
<SimplePerson | 'SalesPerson' | 'Artist'>match(type, {
  dev: () =>
    ({
      kind: 'Developer',       name: 'John Smith',
      programmingLanguage: 'TypeScript',
    }),
  'ui/ux': () =>
    ({
      kind: 'Designer',
      name: 'Lorem Ipsum',
      favoriteTool: 'React',
    }),
});

repo: naruaway/ts-union-tools

license: ISC


text:
bench: implement TPC-H queries using Narwhals

In https://github.com/narwhals-dev/narwhals/tree/main/tpch/notebooks, we implement several TPC-H queries, and run them via Narwhals
We currently have the first 7 there, and should work on adding more
To track progress:

[ ] Q8: blocked by #47 . Skip this one for now
[x] Q9
[x] Q10
[x] Q11
[ ] Q12
[ ] Q13
[ ] Q14
[x] Q15
[ ] Q16
[ ] Q17
[ ] Q18
[x] Q19
[x] Q20
[x] Q21
[ ] Q22

You can find reference implementations for these queries here: https://github.com/pola-rs/tpch/tree/main/queries/polars
The task here is:

Make an account on kaggle.com
choose one of the above queries (e.g. Q9 - don't
Make a fork of https://www.kaggle.com/code/marcogorelli/narwhals-tpch-q5-s2 (you should see a "copy and edit" button on Kaggle)
Remove q5_pandas_native. We don't currently have reference implementations for them https://github.com/pola-rs/tpch/tree/main/queries/pandas, so we skip them
replace def q5 with something like the query you find in https://github.com/pola-rs/tpch/tree/main/queries/polars . You will need to modify it a bit, check the current notebooks and try to follow how they do it. You'll also need to get it to work for Narwhals, so that means:

using nw.col instead of pl.col
using nw.from_native at the start of the function for each input, and nw.to_native at the end

Once you have a notebook which executes, please share it here!

Note: if you see q5_pandas or q5_ibis, you can ignore them for the purpose of this issue, no need to copy them. Let's only focus on making sure that the Narwhals API is extensive enough for these queries

I'll implement Q9 and Q10

@MarcoGorelli I noticed that Narwhals doesn't yet have 'contains' in the ExprStringNamespace, which is used in query 9.

ah, thanks @ugohuche ! looks like we've found the next issue :) would you like to work on implementing str.contains? If you look at str.ends_with, I think it might be kind of similar, feel free to ask if you get stuck
once that's done, we can get back to this

Yeah, I'd love to give it a try

Just for context: the idea of implementing these queries is both for performance benchmarking and features availability. Meaning that if we are able to run all (most) of them, then that is a proxy for a large enough feature set we support. Is this the case @MarcoGorelli ?

yes, exactly!

thanks for reporting these! I think we can live with the userwarning for now and not worry about it, as long as it executes
fancy opening a separate issue about how='cross' and round? they definitely seem generically useful enough that we should implement them

Findings from Q21:

DataFrame.join doesn't have on keyword (I believe by design), I replaced it with left_on=key, right_on=key. Annoying but doable 😂
Expr does not support .len() (opened a feature request already #322): while nw.len() can work in some situations, there is a broad spectrum which does not cover.

Findings from Q20

There is a group by expression which is tagged as "complex", while in reality is a simple expression multiplied by a constant, namely .agg((nw.col("l_quantity").sum() * 0.5).alias("sum_quantity")). Therefore the apply step is fired (which takes long long time - total query time 15+ mins). Breaking it down in two steps:.agg((nw.col("l_quantity").sum()).alias("sum_quantity"))
.with_columns(sum_quantity = nw.col("sum_quantity") * 0.5)

brings the total time down to ~3-4.5 secs. Maybe we can add examples of how rewrite your query such that group-by aggregations are simple (e.g. mean, std, min, max, ...). can be done. Also, related to #299.
If using date instead of datetime, pandas backend ends up with an error when filtering on a datetime column.

Maybe we can add examples of how rewrite your query such that group-by aggregations are simple (e.g. mean, std, min, max, ...). can be done

yeah, great idea!

If using date instead of datetime object, pandas backend ends up with an error when filtering on a datetime column. Polars has no issues

does this also happen for pyarrow-backed pandas?

does this also happen for pyarrow-backed pandas?

pyarrow backend has no issues!

Hi @MarcoGorelli, query 13 has a method "not_" which isn't implemented in Narwhals yet.
Is it something we can add ?

I think we might as well just use ~ for that (e.g.. , instead of nw.col('a').not_(), use (~nw.col('a')))

I think we might as well just use ~ for that (e.g.. , instead of nw.col('a').not_(), use (~nw.col('a')))

I think we might as well just use ~ for that (e.g.. , instead of nw.col('a').not_(), use (~nw.col('a')))

I think we might as well just use ~ for that (e.g.. , instead of nw.col('a').not_(), use (~nw.col('a')))

I'll use that instead.
Should I open a new issue for the when.then.otherwise() methods

Thanks! I think there's already one open for that

Hello guys, so i've been working on Q22, when i run this query:
`from typing import Any
import narwhals as nw
def q22(
customer_ds_raw: Any,
orders_ds_raw: Any,
) -> Any:
customer_ds = nw.from_native(customer_ds_raw)
orders_ds = nw.from_native(orders_ds_raw)

q1 = (
    customer_ds.with_columns(nw.col("c_phone").str.slice(0, 2).alias("cntrycode"))
    .filter(nw.col("cntrycode").str.contains("13|31|23|29|30|18|17"))
    .select("c_acctbal", "c_custkey", "cntrycode")
)

q2 = q1.filter(nw.col("c_acctbal") > 0.0).select(
    nw.col("c_acctbal").mean().alias("avg_acctbal")
)

q3 = orders_ds.select(nw.col("o_custkey").unique()).with_columns(
    nw.col("o_custkey").alias("c_custkey")
)

result = (
   q1.join(q3, left_on="c_custkey", right_on="c_custkey")
    .filter(nw.col("o_custkey").is_null())
    .join(q2, how="cross")
    .filter(nw.col("c_acctbal") > nw.col("avg_acctbal"))
    .group_by("cntrycode")
    .agg(
        nw.col("c_acctbal").count().alias("numcust"),
        nw.col("c_acctbal").sum().round(2).alias("totacctbal"),
    )
    .sort("cntrycode")
)

return nw.to_native(result)`

tool = 'pandas' fn = IO_FUNCS[tool] timings = %timeit -o q22(fn(customer), fn(orders)) results[tool] = timings.all_runs
i get an error: AttributeError: 'Expr' object has no attribute 'count'
But when i change .count() to .len() its giving another errror:
`C:\Users\Abano\anaconda3\Lib\site-packages\narwhals_pandas_like\group_by.py:61: UserWarning: Found complex group-by expression, which can't be expressed efficiently with the pandas API. If you can, please rewrite your query such that group-by aggregations are simple (e.g. mean, std, min, max, ...).
return agg_pandas(
KeyError                                  Traceback (most recent call last)
Cell In[124], line 3
1 tool = 'pandas'
2 fn = IO_FUNCS[tool]
----> 3 timings = get_ipython().run_line_magic('timeit', '-o q22(fn(customer), fn(orders))')
4 results[tool] = timings.all_runs
File ~\anaconda3\Lib\site-packages\IPython\core\interactiveshell.py:2456, in InteractiveShell.run_line_magic(self, magic_name, line, _stack_depth)
2454     kwargs['local_ns'] = self.get_local_scope(stack_depth)
2455 with self.builtin_trap:
-> 2456     result = fn(*args, **kwargs)
2458 # The code below prevents the output from being displayed
2459 # when using magics with decorator @output_can_be_silenced
2460 # when the last Python token in the expression is a ';'.
2461 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~\anaconda3\Lib\site-packages\IPython\core\magics\execution.py:1185, in ExecutionMagics.timeit(self, line, cell, local_ns)
1183 for index in range(0, 10):
1184     number = 10 ** index
-> 1185     time_number = timer.timeit(number)
1186     if time_number >= 0.2:
1187         break
File ~\anaconda3\Lib\site-packages\IPython\core\magics\execution.py:173, in Timer.timeit(self, number)
171 gc.disable()
172 try:
--> 173     timing = self.inner(it, self.timer)
174 finally:
175     if gcold:
File :1, in inner(_it, _timer)
Cell In[114], line 33, in q22(customer_ds_raw, orders_ds_raw)
19 q2 = q1.filter(nw.col("c_acctbal") > 0.0).select(
20     nw.col("c_acctbal").mean().alias("avg_acctbal")
21 )
23 q3 = orders_ds.select(nw.col("o_custkey").unique()).with_columns(
24     nw.col("o_custkey").alias("c_custkey")
25 )
27 result = (
28    q1.join(q3, left_on="c_custkey", right_on="c_custkey")
29     .filter(nw.col("o_custkey").is_null())
30     .join(q2, how="cross")
31     .filter(nw.col("c_acctbal") > nw.col("avg_acctbal"))
32     .group_by("cntrycode")
---> 33     .agg(
34         nw.col("c_acctbal").len().alias("numcust"),
35         nw.col("c_acctbal").sum().round(2).alias("totacctbal"),
36     )
37     .sort("cntrycode")
38 )
40 return nw.to_native(result)
File ~\anaconda3\Lib\site-packages\narwhals\group_by.py:108, in GroupBy.agg(self, *aggs, **named_aggs)
26 """
27 Compute aggregations for each group of a group by operation.
28
(...)
104     └─────┴─────┴─────┘
105 """
106 aggs, named_aggs = self._df._flatten_and_extract(*aggs, **named_aggs)
107 return self._df.class(
--> 108     self._grouped.agg(*aggs, **named_aggs),
109 )
File ~\anaconda3\Lib\site-packages\narwhals_pandas_like\group_by.py:61, in PandasGroupBy.agg(self, *aggs, **named_aggs)
58         raise ValueError(msg)
59     output_names.extend(expr._output_names)
---> 61 return agg_pandas(
62     self._grouped,
63     exprs,
64     self._keys,
65     output_names,
66     self._from_dataframe,
67     implementation,
68 )
File ~\anaconda3\Lib\site-packages\narwhals_pandas_like\group_by.py:174, in agg_pandas(grouped, exprs, keys, output_names, from_dataframe, implementation)
171     result_complex = grouped.apply(func)
173 result = result_complex.reset_index()
--> 174 return from_dataframe(result.loc[:, output_names])
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1184, in _LocationIndexer.getitem(self, key)
1182     if self._is_scalar_access(key):
1183         return self.obj._get_value(*key, takeable=self._takeable)
-> 1184     return self._getitem_tuple(key)
1185 else:
1186     # we by definition only have the 0th axis
1187     axis = self.axis or 0
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1377, in _LocIndexer._getitem_tuple(self, tup)
1374 if self._multi_take_opportunity(tup):
1375     return self._multi_take(tup)
-> 1377 return self._getitem_tuple_same_dim(tup)
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1020, in _LocationIndexer._getitem_tuple_same_dim(self, tup)
1017 if com.is_null_slice(key):
1018     continue
-> 1020 retval = getattr(retval, self.name)._getitem_axis(key, axis=i)
1021 # We should never have retval.ndim < self.ndim, as that should
1022 #  be handled by the _getitem_lowerdim call above.
1023 assert retval.ndim == self.ndim
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1420, in _LocIndexer._getitem_axis(self, key, axis)
1417     if hasattr(key, "ndim") and key.ndim > 1:
1418         raise ValueError("Cannot index with multidimensional key")
-> 1420     return self._getitem_iterable(key, axis=axis)
1422 # nested tuple slicing
1423 if is_nested_tuple(key, labels):
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1360, in _LocIndexer._getitem_iterable(self, key, axis)
1357 self._validate_key(key, axis)
1359 # A collection of keys
-> 1360 keyarr, indexer = self._get_listlike_indexer(key, axis)
1361 return self.obj._reindex_with_indexers(
1362     {axis: [keyarr, indexer]}, copy=True, allow_dups=True
1363 )
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1558, in _LocIndexer._get_listlike_indexer(self, key, axis)
1555 ax = self.obj._get_axis(axis)
1556 axis_name = self.obj._get_axis_name(axis)
-> 1558 keyarr, indexer = ax._get_indexer_strict(key, axis_name)
1560 return keyarr, indexer
File ~\anaconda3\Lib\site-packages\pandas\core\indexes\base.py:6200, in Index._get_indexer_strict(self, key, axis_name)
6197 else:
6198     keyarr, indexer, new_indexer = self._reindex_non_unique(keyarr)
-> 6200 self._raise_if_missing(keyarr, indexer, axis_name)
6202 keyarr = self.take(indexer)
6203 if isinstance(key, Index):
6204     # GH 42790 - Preserve name from an Index
File ~\anaconda3\Lib\site-packages\pandas\core\indexes\base.py:6252, in Index._raise_if_missing(self, key, indexer, axis_name)
6249     raise KeyError(f"None of [{key}] are in the [{axis_name}]")
6251 not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique())
-> 6252 raise KeyError(f"{not_found} not in index")
KeyError: "['numcust', 'totacctbal'] not in index"`
What's the best way to resolve this?

Hello guys, so i've been working on Q22, when i run this query:
from typing import Any
import narwhals as nw
def q22(
customer_ds_raw: Any,
orders_ds_raw: Any,
) -> Any:
customer_ds = nw.from_native(customer_ds_raw)
orders_ds = nw.from_native(orders_ds_raw)

q1 = (
    customer_ds.with_columns(nw.col("c_phone").str.slice(0, 2).alias("cntrycode"))
    .filter(nw.col("cntrycode").str.contains("13|31|23|29|30|18|17"))
    .select("c_acctbal", "c_custkey", "cntrycode")
)

q2 = q1.filter(nw.col("c_acctbal") > 0.0).select(
    nw.col("c_acctbal").mean().alias("avg_acctbal")
)

q3 = orders_ds.select(nw.col("o_custkey").unique()).with_columns(
    nw.col("o_custkey").alias("c_custkey")
)

result = (
   q1.join(q3, left_on="c_custkey", right_on="c_custkey")
    .filter(nw.col("o_custkey").is_null())
    .join(q2, how="cross")
    .filter(nw.col("c_acctbal") > nw.col("avg_acctbal"))
    .group_by("cntrycode")
    .agg(
        nw.col("c_acctbal").len().alias("numcust"),
        nw.col("c_acctbal").sum().round(2).alias("totacctbal"),
    )
    .sort("cntrycode")
)

return nw.to_native(result)`

tool = 'pandas'
fn = IO_FUNCS[tool]
timings = %timeit -o q22(fn(customer), fn(orders))
results[tool] = timings.all_runs
i get an error: AttributeError: 'Expr' object has no attribute 'count'
But when i change .count() to .len(), i get another error.
C:\Users\Abano\anaconda3\Lib\site-packages\narwhals\_pandas_like\group_by.py:61: UserWarning: Found complex group-by expression, which can't be expressed efficiently with the pandas API. If you can, please rewrite your query such that group-by aggregations are simple (e.g. mean, std, min, max, ...).   return agg_pandas(
KeyError                                  Traceback (most recent call last) Cell In[156], line 3       1 tool = 'pandas'       2 fn = IO_FUNCS[tool] ----> 3 timings = get_ipython().run_line_magic('timeit', '-o q22(fn(customer), fn(orders))')       4 results[tool] = timings.all_runs
File ~\anaconda3\Lib\site-packages\IPython\core\interactiveshell.py:2456, in InteractiveShell.run_line_magic(self, magic_name, line, _stack_depth)    2454     kwargs['local_ns'] = self.get_local_scope(stack_depth)    2455 with self.builtin_trap: -> 2456     result = fn(*args, **kwargs)    2458 # The code below prevents the output from being displayed    2459 # when using magics with decorator @output_can_be_silenced    2460 # when the last Python token in the expression is a ';'.    2461 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~\anaconda3\Lib\site-packages\IPython\core\magics\execution.py:1185, in ExecutionMagics.timeit(self, line, cell, local_ns)    1183 for index in range(0, 10):    1184     number = 10 ** index -> 1185     time_number = timer.timeit(number)    1186     if time_number >= 0.2:    1187         break
File ~\anaconda3\Lib\site-packages\IPython\core\magics\execution.py:173, in Timer.timeit(self, number)     171 gc.disable()     172 try: --> 173     timing = self.inner(it, self.timer)     174 finally:     175     if gcold:
File <magic-timeit>:1, in inner(_it, _timer)
Cell In[146], line 33, in q22(customer_ds_raw, orders_ds_raw)      19 q2 = q1.filter(nw.col("c_acctbal") > 0.0).select(      20     nw.col("c_acctbal").mean().alias("avg_acctbal")      21 )      23 q3 = orders_ds.select(nw.col("o_custkey").unique()).with_columns(      24     nw.col("o_custkey").alias("c_custkey")      25 )      27 result = (      28    q1.join(q3, left_on="c_custkey", right_on="c_custkey")      29     .filter(nw.col("o_custkey").is_null())      30     .join(q2, how="cross")      31     .filter(nw.col("c_acctbal") > nw.col("avg_acctbal"))      32     .group_by("cntrycode") ---> 33     .agg(      34         nw.col("c_acctbal").len().alias("numcust"),      35         nw.col("c_acctbal").sum().round(2).alias("totacctbal"),      36     )      37     .sort("cntrycode")      38 )      40 return nw.to_native(result)
File ~\anaconda3\Lib\site-packages\narwhals\group_by.py:108, in GroupBy.agg(self, *aggs, **named_aggs)      26 """      27 Compute aggregations for each group of a group by operation.      28     (...)     104     └─────┴─────┴─────┘     105 """     106 aggs, named_aggs = self._df._flatten_and_extract(*aggs, **named_aggs)     107 return self._df.__class__( --> 108     self._grouped.agg(*aggs, **named_aggs),     109 )
File ~\anaconda3\Lib\site-packages\narwhals\_pandas_like\group_by.py:61, in PandasGroupBy.agg(self, *aggs, **named_aggs)      58         raise ValueError(msg)      59     output_names.extend(expr._output_names) ---> 61 return agg_pandas(      62     self._grouped,      63     exprs,      64     self._keys,      65     output_names,      66     self._from_dataframe,      67     implementation,      68 )
File ~\anaconda3\Lib\site-packages\narwhals\_pandas_like\group_by.py:174, in agg_pandas(grouped, exprs, keys, output_names, from_dataframe, implementation)     171     result_complex = grouped.apply(func)     173 result = result_complex.reset_index() --> 174 return from_dataframe(result.loc[:, output_names])
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1184, in _LocationIndexer.__getitem__(self, key)    1182     if self._is_scalar_access(key):    1183         return self.obj._get_value(*key, takeable=self._takeable) -> 1184     return self._getitem_tuple(key)    1185 else:    1186     # we by definition only have the 0th axis    1187     axis = self.axis or 0
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1377, in _LocIndexer._getitem_tuple(self, tup)    1374 if self._multi_take_opportunity(tup):    1375     return self._multi_take(tup) -> 1377 return self._getitem_tuple_same_dim(tup)
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1020, in _LocationIndexer._getitem_tuple_same_dim(self, tup)    1017 if com.is_null_slice(key):    1018     continue -> 1020 retval = getattr(retval, self.name)._getitem_axis(key, axis=i)    1021 # We should never have retval.ndim < self.ndim, as that should    1022 #  be handled by the _getitem_lowerdim call above.    1023 assert retval.ndim == self.ndim
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1420, in _LocIndexer._getitem_axis(self, key, axis)    1417     if hasattr(key, "ndim") and key.ndim > 1:    1418         raise ValueError("Cannot index with multidimensional key") -> 1420     return self._getitem_iterable(key, axis=axis)    1422 # nested tuple slicing    1423 if is_nested_tuple(key, labels):
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1360, in _LocIndexer._getitem_iterable(self, key, axis)    1357 self._validate_key(key, axis)    1359 # A collection of keys -> 1360 keyarr, indexer = self._get_listlike_indexer(key, axis)    1361 return self.obj._reindex_with_indexers(    1362     {axis: [keyarr, indexer]}, copy=True, allow_dups=True    1363 )
File ~\anaconda3\Lib\site-packages\pandas\core\indexing.py:1558, in _LocIndexer._get_listlike_indexer(self, key, axis)    1555 ax = self.obj._get_axis(axis)    1556 axis_name = self.obj._get_axis_name(axis) -> 1558 keyarr, indexer = ax._get_indexer_strict(key, axis_name)    1560 return keyarr, indexer
File ~\anaconda3\Lib\site-packages\pandas\core\indexes\base.py:6200, in Index._get_indexer_strict(self, key, axis_name)    6197 else:    6198     keyarr, indexer, new_indexer = self._reindex_non_unique(keyarr) -> 6200 self._raise_if_missing(keyarr, indexer, axis_name)    6202 keyarr = self.take(indexer)    6203 if isinstance(key, Index):    6204     # GH 42790 - Preserve name from an Index
File ~\anaconda3\Lib\site-packages\pandas\core\indexes\base.py:6252, in Index._raise_if_missing(self, key, indexer, axis_name)    6249     raise KeyError(f"None of [{key}] are in the [{axis_name}]")    6251 not_found = list(ensure_index(key)[missing_mask.nonzero()[0]].unique()) -> 6252 raise KeyError(f"{not_found} not in index")
KeyError: "['numcust', 'totacctbal'] not in index"
Whats the best way to resolve this?
I hope my explanation is clear enough?

thanks @brentomagic for reporting - your comment is very hard to read, I'd suggest using triple-backticks to format code https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks

here's a simpler reproducer for the issue:
def func(df_any):
    df = nw.from_native(df_any, eager_only=True)
    df = df.filter(nw.col('a')<1).group_by('a').agg(nw.col('b').sum().round(2).alias('c'))
    return nw.to_native(df)

print(func(pd.DataFrame({'a': [1,2,3], 'b': [4,3,2]})))

I'll implement Q18 now that the blockers are resolved

I'll look at Q22

Closing in favor of #863

authors: FBruzzesi MarcoGorelli brentomagic mistShard ugohuche

repo: narwhals-dev/narwhals


text:
feat: implementing pyarrow round test

What type of PR is this? (check all applicable)

[ ] 💾 Refactor
[ ] ✨ Feature
[ ] 🐛 Bug Fix
[ ] 🔧 Optimization
[ ] 📝 Documentation
[ ] ✅ Test
[ ] 🐳 Other

Related issues

Related issue #
Closes #

Checklist

[ ] Code follows style guide (ruff)
[ ] Tests added
[ ] Documented the changes

If you have comments or can explain your changes, please do so below.

@brentomagic if the title of the PR begins with any of this: (build|chore|ci|depr|docs|feat|fix|perf|refactor|release|test), the PR goes to the right place on the release document.
I'll correct your title so you see what I mean. 🙂

I am closing this in favor of #696

authors: DeaMariaLeon FBruzzesi brentomagic


text:
Fix #489, Add usersguide/osalguide to local targets

Describe the contribution
Added userguide and osalguide to the local target list to avoid makefile warning
Fix #489
Testing performed
Steps taken to test the contribution:

Ran make userguide and osalguide and confirmed no longer outputs warnings

Expected behavior changes
Passes enhanced CI
System(s) tested on

Hardware: cFS Dev Server 2
OS: Ubuntu 18.04
Versions: Master bundle with this change

Additional context
N/A
Third party code
N/A
Contributor Info - All information REQUIRED for consideration of pull request
Jacob Hageman - NASA/GSFC

@jphickey or @acudmore can you all take a look at this? I'd like to fast track it to close out the last integration candidate.

CCB Fast Tracked 20200214

authors: astrogeco skliper

repo: nasa/cFE


text:
license?

Hi,
Thank you for the cool re-implementation! May I ask you about the license on your code?
I would like to port to to the kornia local features https://kornia.readthedocs.io/en/latest/feature.html
--
Best, Dmytro

Hi,
My code has no licence and you are free to go ;)

Hi,
My code has no licence and you are free to go ;)

Hi,
Unfortunately, no licence in some countries means "no use is allowed" :(
See here https://www.gnu.org/licenses/license-list.html#NoLicense

No license (#NoLicense)
If source code does not carry a license to give users the four essential freedoms, then unless it has been explicitly and validly placed in the public domain, it is not free software.
Some developers think that code with no license is automatically in the public domain. That is not true under today's copyright law; rather, all copyrightable works are copyrighted by default. This includes programs. Absent a license to grant users freedom, they don't have any. In some countries, users that download code with no license may infringe copyright merely by compiling it or running it.
In order for a program to be free, its copyright holders must explicitly grant users the four essential freedoms. The document with which they do so is called a free software license. This is what free software licenses are for.

So if you is OK with anyone using your code, could you please put the MIT or Apache license? Thank you a lot :)

Hi,
Unfortunately, no licence in some countries means "no use is allowed" :(
See here https://www.gnu.org/licenses/license-list.html#NoLicense

No license (#NoLicense)
If source code does not carry a license to give users the four essential freedoms, then unless it has been explicitly and validly placed in the public domain, it is not free software.
Some developers think that code with no license is automatically in the public domain. That is not true under today's copyright law; rather, all copyrightable works are copyrighted by default. This includes programs. Absent a license to grant users freedom, they don't have any. In some countries, users that download code with no license may infringe copyright merely by compiling it or running it.
In order for a program to be free, its copyright holders must explicitly grant users the four essential freedoms. The document with which they do so is called a free software license. This is what free software licenses are for.

So if you is OK with anyone using your code, could you please put the MIT or Apache license? Thank you a lot :)

I added LICENSE :)

Thank you a lot!

authors: ducha-aiki nashory

repo: nashory/DeLF-pytorch


text:
Pager two-ways?

From what I can understand the docs, the pager would fire when you reach the bottom. Can I have it fire when it reaches top as well, and if I can, how?
Thanks in advance for your assistance!

You can choose when to trigger new pages by passing in a Pager (look at the implementations that are already available to see how it works!).
However, Pagers request new pages at the end of the current dataset - we don't support the concept of "page -1" (before page 0). You might be able to achieve what you want anyway but it will require some workarounds in your source implementation.

Well, it's also the end if you go to the beginning - just a different end. I'll take a look, thank you.

I would assume you don't plan on implementing something like this either?

I have no time for it, sorry! It would also require significant changes, both internally and in the API surface, which would complicate the concepts (page numbers for instance...) only for the benefit of this use case.
But I would welcome a solution that does not mess with the current state too much. Maybe using negative page numbers? If you want to take a look yourself and need help, feel free to comment here.

I'll try to take a look in the coming days/months as I'd like to use what you have here. Thanks for your offer to help :)


text:
Roads v6

[x] Can't change selection using numbers or buttons
[x] Buttons don't work (arrow keys?)
[x] Bit slow
[x] Cars and trains only move one tile, then stop
[x] Occasionally hangs or puts cars off of their tracks
[ ] Loading text persists

http://scratch.mit.edu/projects/10086980/
http://phosphorus.herokuapp.com/#10086980

Loading text persists

Why does this happen?

The event on green flag clicked in tile sprite runs before the green flag clicked in loading msg sprite.
If you put a small delay after green flag clicked in tile sprite (say 1 sec) it clears the loading text on phosphorus. I suppose when using two+ green flag click events you cannot predict the order (maybe?)

Why does this happen?

This is because phosphorus never forces a yield during atomic blocks.
A sprite broadcasts Tiles Created after an atomic block in the first frame of a green flag hat. The Stage broadcasts Loading in the first frame of a green flag hat. The normal behavior here is that Tiles Created is broadcast first, and then Loading is broadcast (since sprite green flag hats run before Stage green flag hats). However, the atomic block runs for so long that Scratch forces it to yield, which means that Loading gets broadcast first, and then in the next frame (or one of the next several frames) Tiles Created gets broadcast.
This is technically a problem with the original project, since if I had a really fast computer—fast enough that Scratch could run the entire atomic block within a half second—the loading text would persist in the Flash project player too.

All of the issues I mentioned other than the loading text persisting seem to have been fixed, so I'm closing this. Feel free to comment if I missed something.

@nathan Thanks so much for this explanation. I've fixed the bug in the original project; it works great now! :-)

authors: htmlgames nathan tjvr

repo: nathan/phosphorus


text:
Godot crashes when a dilog resource file is saved

Hello,
Everytime I save a dialog file Godot crashes. When I reopen the project the file was saved correctly wich makes me think it happens after the save process.
The setup:
Godot 4.3.stable
Manjaro Linux
The terminal shows me the following:

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.stable.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /usr/lib/libc.so.6(+0x3d1d0) [0x7e2458e3f1d0] (??:0)
[2] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x42da916] (??:0)
[3] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x2fac0bb] (??:0)
[4] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x2fb06cb] (??:0)
[5] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x14159f7] (??:0)
[6] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x1416efe] (??:0)
[7] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x141e2c6] (??:0)
[8] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x4318cf1] (??:0)
[9] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x2636647] (??:0)
[10] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x26381b9] (??:0)
[11] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x26382dc] (??:0)
[12] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x2365860] (??:0)
[13] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x2366556] (??:0)
[14] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x23bb7c9] (??:0)
[15] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x23d3899] (??:0)
[16] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x4a1affe] (??:0)
[17] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x4ba0bf] (??:0)
[18] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x405c047] (??:0)
[19] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x405d97f] (??:0)
[20] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x4c112d] (??:0)
[21] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x420290] (??:0)
[22] /usr/lib/libc.so.6(+0x25e08) [0x7e2458e27e08] (??:0)
[23] /usr/lib/libc.so.6(__libc_start_main+0x8c) [0x7e2458e27ecc] (??:0)
[24] /home/anthony/Godot/Godot_v4.3-stable_linux.x86_64() [0x43d44a] (??:0)
-- END OF BACKTRACE --
================================================================

Any suggestions on how to proceed ?

Can you attach a tiny project that demonstrates the issue?

It seems the problem if not coming from the addon but from Godot on linux, it has happened again without the addon.
Sorry

authors: Anthony-CamembearGames nathanhoad


text:
Stop throwing errors.

It looks like that some of our error handling is causing the javascript
to throw an error when there is a temporary failure of the upload which
is corrected by the SDK so we shouldn't be throwing an error.
We're using thrown errors for normal validation which is not what
they're for really, they should be for exceptional failures.
The reason we did this originally is that we would end up with a load of
branching if/else for the errors if we didn't throw Errors for validation.
Now that throwing errors is causing problems, we're going to have to
live with the branching if/else statements until Typescript sorts out a
decent function style of error handling like Scala's Either.

I've tried monet.js. The problem is most things return promises which can be converted to Promise<Either<Error,T>> which can be awaited to give Either<Error,T>
This then needs to be flatMapped with another Promise which needs to be awaited again but it can't be because the type signature of flatMap doesn't allow a promise return type.
I also tried https://github.com/fluture-js/Fluture This is better but there's quite a large number of changes, some examples are here https://github.com/nationalarchives/tdr-transfer-frontend/blob/use-either-for-errors/npm/src/clientfilemetadataupload/index.ts.
It seems like a lot of changes to fix something we're not even sure is a problem so I think the if statements are the lesser of two evils.

repo: nationalarchives/tdr-transfer-frontend


text:
TabbedPage

Hi, first, i have to say that this is a great project :).
I am wondering that tabbedPage is acting kind of weird.
TabbedPage is looking normal at portrait mode

But in landscape mode, tabs should be under the NavBar(Toolbar, or ActionBar) right?

That's definitely a bug. I hadn't tested with changing orientation. I'll take a look this weekend.

Can you describe how you have your pages laid out? I'm assuming it's the following?
MasterDetailPage

Detail = TabbedPage
Master = Menu

So I looked into this further and it appears to be correct in how it's working now. If you disable the AppCompat package and return to normal Xamarin.Forms implementations, you get the same behavior.
The issue is that AppCompat activities (and this goes for any activity that uses the SupportActionBar) behave the way they do pre-21. Since tab management from ActionBar has been deprecated, what you're seeing is the old behavior.
If you want the new tab behavior in 21+, you'll have to use the TabLayout control which means creating your own renderer and not using the default TabbedPage.
Since this deviates from the normal Xamarin.Forms abstraction, I'm sorry to say this won't be fixed. The project goal is to maintain the same behaviors for Xamarin.Forms while providing as much Material Design as possible. Please see the Project Goals on the wiki.

repo: nativecode-dev/oss-xamarin


text:
(docs) chore: improve readme

Small improvements fixes to the docs.
Added:

topDrawer property
bottomDrawer property
open event
close event

Fixed:

import in Vue code

awesome thank you @tralves . didn't think much people were using it ;)

authors: farfromrefug tralves

repo: nativescript-community/ui-drawer


text:
Can't change placeholderColor on MDTextField in Android

Which platform(s) does your issue occur on?
Android 10
Xiaomi Redmi Note 8

CLI: 7.0.8
Cross-platform modules: 7.0.3
Runtime(s): 7.0.0
Plugin(s):
  "dependencies": {
    "@mdi/font": "^5.6.55",
    "@nativescript-community/ui-material-activityindicator": "^5.0.6",
    "@nativescript-community/ui-material-bottomnavigationbar": "^5.0.6",
    "@nativescript-community/ui-material-bottomsheet": "^5.0.6",
    "@nativescript-community/ui-material-button": "^5.0.6",
    "@nativescript-community/ui-material-cardview": "^5.0.6",
    "@nativescript-community/ui-material-core": "^5.0.6",
    "@nativescript-community/ui-material-floatingactionbutton": "^5.0.6",
    "@nativescript-community/ui-material-progress": "^5.0.6",
    "@nativescript-community/ui-material-ripple": "^5.0.6",
    "@nativescript-community/ui-material-slider": "^5.0.6",
    "@nativescript-community/ui-material-tabs": "^5.0.6",
    "@nativescript-community/ui-material-textfield": "^5.0.6",
    "@nativescript-community/ui-material-textview": "^5.0.6",
    "@nativescript/firebase": "11.0.0",
    "@nativescript/core": "7.0.7",
    "@nativescript/theme": "3.0.0",
    "nativescript": "7.0.8",
    "nativescript-vue": "latest",
    "nativescript-vue-navigator": "^1.2.0",
    "vuex": "^3.5.1"
  },
  "devDependencies": {
    "@babel/core": "~7.11.6",
    "@babel/preset-env": "~7.11.5",
    "@nativescript/android": "7.0.0",
    "@nativescript/ios": "7.0.0",
    "@nativescript/webpack": "~3.0.5",
    "babel-loader": "~8.1.0",
    "nativescript-vue-template-compiler": "~2.8.1",
    "node-sass": "^4.7.1",
    "scss-symbols-parser": "^2.0.1",
    "string-replace-loader": "^2.3.0",
    "vue-loader": "~15.9.3",
    "vue-property-decorator": "^9.0.0"
  }

Can't seem to be able to change the placeholderColor color of MDTextField. When I set any value, it seems like the placeholder color is transparent or not visible at all.
Works fine on iOS.

@butaminas thanks fixed in 5b0f8ca070501b45e99f581151a2c6394eea33c2

@butaminas released 5.0.11

Seems to work fine now.

authors: butaminas farfromrefug


text:
TabContentItem on MDTabs error setAttribute

Which platform(s) does your issue occur on?

Android only test
Android 10 (only test)
emulator/device. Both

Please, provide the following version numbers that your issue occurs with:

CLI:  8.0.0
√ Component nativescript has 8.0.0 version and is up to date.
√ Component @nativescript/core has 8.0.0 version and is up to date.
√ Component @nativescript/ios has 8.0.0 version and is up to date.
√ Component @nativescript/android has 8.0.0 version and is up to date.

I have migrated my application vue to NS 8 (I don't know if it has something to do with it) the question is that if I change Tabs to MDTabs and keep TabContentItem as stated in the plugin documents I have the error:
System.err: An uncaught Exception occurred on "main" thread.
System.err: Unable to start activity ComponentInfo{com.vallemar.checkpointcurly/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: TypeError: Cannot read property 'setAttribute' of undefined
System.err:
System.err: StackTrace:
System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vallemar.checkpointcurly/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: TypeError: Cannot read property 'setAttribute' of undefined
System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
System.err:     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
System.err:     at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
System.err:     at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
System.err:     at android.os.Looper.loop(Looper.java:223)
System.err:     at android.app.ActivityThread.main(ActivityThread.java:7656)
System.err:     at java.lang.reflect.Method.invoke(Native Method)
System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
System.err: Caused by: com.tns.NativeScriptException: Calling js method onCreate failed
System.err: TypeError: Cannot read property 'setAttribute' of undefined
System.err:     at com.tns.Runtime.callJSMethodNative(Native Method)
System.err:     at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1302)
System.err:     at com.tns.Runtime.callJSMethodImpl(Runtime.java:1188)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1175)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1153)
System.err:     at com.tns.Runtime.callJSMethod(Runtime.java:1149)
System.err:     at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:29)
System.err:     at android.app.Activity.performCreate(Activity.java:8000)
System.err:     at android.app.Activity.performCreate(Activity.java:7984)
System.err:     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
System.err:     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
System.err:     ... 11 more

When I change TabContentItem to MDTabContentItem everything works fine

@vallemar always use MDTabContentItem  if using MDTabs

@farfromrefug  here it says the opposite  https://github.com/nativescript-community/ui-material-components/blob/master/packages/tabs/README.md

@vallemar then the doc is not up to date.

authors: farfromrefug vallemar


text:
Markdown - adding classname to elements

I recently started playing with some markdown converters (nodejs) as I'm working on a GMing tool. To clean up the css and such I wanted to add class styles to blockquotes, specifically so I can create GM Note boxes and Description boxes easily.
Markdown Extra allows you to add "Id's" to elements and PHP markdown allows you to add classes.  I grabbed the "Showdown.js" converter and with some simple reg-ex was able to add classnames to block quotes using the below syntax.
Just thought I would share as it may make it easier for your project to customize the markdown css as I know you are/were having problems with it.
I am looking to modify it a bit more to allow classes to be added to other elements as well.
Additional Details
Classname Appended to the first line of the start of a blockquote,
> some blockquote text {: classname}

As you can see by the screenshot below I can easily nest the boxes and other elements.

I believe this is added to v3 with custom syntax.  Particularly PR #1476 and curly injection.

Curly-injection works to apply the {curly-items} into the preceding adjacent sibling element, not into the containing element.
Thus, an author could brew Hello **world**{color:red} and the <strong/> element gets injected.
That said, there is a suggested variation to {curly-inject} to target the containing element, specifically the <div class="page"> element that is wrapped around each page of content. #1489. Using a leading : or other symbol could be used to say "target containing element instead of preceding element.

Added to the V3 changelog finally. Closing.

authors: Gazook89 calculuschild ericscheid vlos

repo: naturalcrit/homebrewery