text:
Chafa support in image.nvim

Hey,
I will be implementing different engine support in my 'image.nvim' plugin soon. Would you be interested in submitting a PR for 'chafa' support?
Also please look at the MIT license compliance, as this is a fork of my plugin. Thanks.

Will look into it, thanks!

I'm adding more QoL features in the next Chafa release with an eye towards easier integration. If there's anything you need in particular, let me know!

source: gharchive/issue

authors: hpjansson princejoogie samodostal

license: MIT

license_type: permissive

license_source: github-api


text:
Implement associative embedding loss without C.

Can we implement associative embedding loss in python based on pytorch?

@anewell  Looking forward to that too!

repo: princeton-vl/pose-ae-train


text:
React Playground incompatbiel with react-redux v6+

This issue pertains to the following package(s):

[ ] GraphQL Playground - Electron App
[ ] GraphQL Playground HTML
[x] GraphQL Playground
[ ] GraphQL Playground Express Middleware
[ ] GraphQL Playground Hapi Middleware
[ ] GraphQL Playground Koa Middleware
[ ] GraphQL Playground Lambda Middleware

When using React Playground v1.7.20 (also tried 22-test) with react-redux v6+, the following error is given

Uncaught Invariant Violation: Could not find "store" in either the context or props of "Connect(PlaygroundWrapper)". Either wrap the root component in a , or explicitly pass "store" as a prop to "Connect(PlaygroundWrapper)".

Playground is used as
import { Playground, store } from 'graphql-playground-react';
import React from 'react';
import { Provider } from 'react-redux';
import { graphQLUri, graphQLWsUri } from '../../GraphQL/endpoints';

export const GraphQLPlayground: React.FC = () => (
  <Provider store={store}>
    <Playground
      endpoint={graphQLUri}
      settings={{ 'request.credentials': 'same-origin' }}
      subscriptionEndpoint={graphQLWsUri}
    />
  </Provider>
);

Experiencing the same issue.
Currently works with react-redux@previous-5.x, which resolves to version 5.1.2.

authors: JeffJankowski simPod

repo: prisma-labs/graphql-playground


text:
Schema tab not working

This issue pertains to the following package(s):

[ ] GraphQL Playground - Electron App
[x] GraphQL Playground HTML
[x] GraphQL Playground React
[ ] GraphQL Playground Express Middleware
[ ] GraphQL Playground Hapi Middleware
[ ] GraphQL Playground Koa Middleware
[ ] GraphQL Playground Lambda Middleware

What OS and OS version are you experiencing the issue(s) on?
MacOS
What version of graphql-playground(-electron/-middleware) are you experiencing the issue(s) on?
1.7.23 , latest
What is the expected behavior?
Schema tab shows blank screen
What is the actual behavior?
It should show the schema

I'm seeing this too with the graphql-playground-middleware-express. It looks it may be a problem with prettier.

Same problem here. A workaround is to set schema.disableComments to false in the settings (cog in the top-right hand corner).
I think it may be linked to this issue:
https://github.com/prisma-labs/graphql-playground/issues/1115

I'm also seeing this behavior, and the workaround @joffrey-bion mentions fixes it for me.
Here's the syntax error it's throwing:
Uncaught SyntaxError: Syntax Error: Unexpected Name "now" (5:3)
  3 |
  4 |
> 5 |   now: DateTime
    |   ^
  6 |
  7 |
  8 |   me: User!
    at n (parser-graphql.js:1)
    at Object.parse (parser-graphql.js:1)
    at Object.parse (standalone.js:13721)
    at coreFormat (standalone.js:17145)
    at format (standalone.js:17381)
    at formatWithCursor (standalone.js:17397)
    at standalone.js:32917
    at Object.format (standalone.js:32926)
    at Object.prettify (utils.js:184)
    at Object.getSDL (createSDL.js:105)

Here's the part of my schema that is failing inside prettier-graphql.js:
#
directive @cacheControl(
  maxAge: Int
  scope: CacheControlScope
) on FIELD_DEFINITION | OBJECT | INTERFACE
#
type Query {
  # Retrieve the current server time in UTC.
  now: DateTime
}

dupe, fixed in last release

authors: EthanSK acao benkimball brandondoran joffrey-bion


text:
Schema Parsing/Validation error should include CLI version

It would be helpful if the default schema validation/parsing output would include the CLI version so users posting the error message for help automatically include the CLI version as well.
Example: https://github.com/prisma/prisma/discussions/11894#discussion-3885241

Another example: https://github.com/prisma/prisma/issues/11771#issuecomment-1111490243

Note: CLI adds additional line under error with CLI version (and maybe engine hash)

Note: CLI adds additional line under error with CLI version (and maybe engine hash)

@janpio do we want to extract the engine hash from import { enginesVersion } from '@prisma/engines', or by extracting the hash values from the actual detected binaries (or libraries), like prisma --version does?
Example output from prisma --version:
prisma                  : 0.0.0
@prisma/client          : 0.0.0
Current platform        : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 0c364ac42b7e78faad00640efb007598192fa511 (at ../../node_modules/.pnpm/@prisma+engines@3.15.0-9.0c364ac42b7e78faad00640efb007598192fa511/node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine        : migration-engine-cli 0c364ac42b7e78faad00640efb007598192fa511 (at ../../node_modules/.pnpm/@prisma+engines@3.15.0-9.0c364ac42b7e78faad00640efb007598192fa511/node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine    : introspection-core 0c364ac42b7e78faad00640efb007598192fa511 (at ../../node_modules/.pnpm/@prisma+engines@3.15.0-9.0c364ac42b7e78faad00640efb007598192fa511/node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary           : prisma-fmt 0c364ac42b7e78faad00640efb007598192fa511 (at ../../node_modules/.pnpm/@prisma+engines@3.15.0-9.0c364ac42b7e78faad00640efb007598192fa511/node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash    : 0c364ac42b7e78faad00640efb007598192fa511
Studio                  : 0.460.0

I'm currently imagining an augmented error like the following:
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db"
Error: P1012

error: Error parsing attribute "@default": The function `auto` is not a known function. You can read about the available functions here: https://pris.ly/d/attribute-functions.
  -->  schema.prisma:14
   |
13 | model Url {
14 |   id          String   @id @default(auto()) @map("_id") @db.ObjectId
   |

Versions:
prisma               : 0.0.0
Default Engines Hash : 0c364ac42b7e78faad00640efb007598192fa511

Noting down discussion we had via call:

Engine hash does not really add value (and might become obsolete when we move to Wasm module), so Prisma CLI version only
That also allows to make the output much smaller at the end of the validation message

authors: janpio jkomyno

repo: prisma/prisma


text:
@unique directive not working on mongo db datamodel

Prisma is connected to MongoDb and everything is working good but when I add @unique directive to field and redeploy prisma, then I still can create more than one user with same email.
DataModel:
type User {
id: ID! @id
name: String!
email: String @unique
}

Hi @bacharSalleh,
I believe this feature is currently in the beta image of prisma. Please try that using this with the beta image of prisma.


text:
Support Cloudflare Workers deployments of Prisma Client

Problem
It is not possible today to use Prisma Client from Cloudflare Workers.
Solution
We could explore splitting the Query Engine binary from the generated JS client.
Alternative
We could eventually compile to WASM for support on Cloudflare.

Doesn't look like it is a use-case yet.
But maybe in future.

This is a favor thing that I looking for.
I have tried to implement and upload photonJS to cf-worker manually (without query engine binary). Separate the photonJS on worker & the engine on my server.
In Most cases, it works. But The challenge parts to deal are:

Cloudflare workers limit startup-time 200 ms for uploading script. I failed to upload on sometimes with 2 mini generated data-models and a little third party npm. We must to keep it minimal.

Cloudflare workers limit 1 MB per script. After I install apollo-server-cloudflare, it takes ~450 kB. And if you prefer to use nexus (code-first implementation style) you have to set 2 schema files for development environment (that use nexus) and production environment (for uploading to worker). Because in nexus package, it contains a huge package like prettier that will make your script size over the quota.

I hope this tier 2 come soon. : )

@matthewmueller Assigned because you would leave a comment was the outcome of retriaging meeting 🙏

Not sure if this eases some concerns above, but they announced new upgrade "Workers Unbound" https://www.cloudflare.com/workers-unbound-beta

For those following this issue, some days ago an upstream issue got an update about this:
https://github.com/cloudflare/db-connect/issues/10#issuecomment-785386626
TL;DR, at the moment TCP support is not yet supported by Cloudflare.

Not looking too good: https://github.com/cloudflare/db-connect is deprecated: https://github.com/cloudflare/db-connect/issues/10#issuecomment-785386626 The description makes it pretty clear, this is not a current priority 😭
Unless someone builds a HTTP Data API for Prisma of course... but that only makes it work, not necessarily make it work great.

I tried following that guide but using PostgreSQL instead and I can't get it to work.
❯ npx wrangler dev
Error: Something went wrong with the request to Cloudflare...
Script startup timed out.
 [API code: 10021]
❯ npx wrangler publish
✨  Built successfully, built project size is 366 KiB.
Error: Something went wrong with the request to Cloudflare...
Script startup timed out.
 [API code: 10021]

At first I thought it was this issue https://github.com/cloudflare/wrangler/issues/1129 because:
❯ npx wrangler secret put DATABASE_URL
Enter the secret text you'd like assigned to the variable DATABASE_URL on the script named prisma-pg-cloudflare:
****
🌀  Creating the secret for script name prisma-pg-cloudflare
🌀  Worker prisma-pg-cloudflare doesn't exist in the API yet. Creating a draft Worker so we can create new secret.
Error: Something went wrong with the request to Cloudflare...
Script startup timed out.
 [API code: 10021]

Then I created the project using the web console and I was able to set the secret:
❯ npx wrangler secret put DATABASE_URL
Enter the secret text you'd like assigned to the variable DATABASE_URL on the script named prisma-pg-cloudflare:
****
🌀  Creating the secret for script name prisma-pg-cloudflare
✨  Success! Uploaded secret DATABASE_URL.

The project still fails to dev/publish.
I thought it could be because the project has 0.3MB but both free & plan have the same 1MB limits:
https://developers.cloudflare.com/workers/platform/limits#account-plan-limits
The dist and worker scripts are correctly generated, they just seen to hang when booting up which causes the time out, no idea what is causing the hang.

Thanks for the write-up @cabello!
As @2color mentioned, we've written a guide on how to get this working. We also have a video presentation that we gave on Cloudflare TV.

On "@prisma/client": "^3.9.1" it's no longer possible to follow the mentioned guide. I'm getting the following error on wranger dev:
10021: Uncaught TypeError: Global addEventListener() cannot be used in modules. Instead, event handlers should be declared as exports on the root module.
  at line 0

    at throwFetchError (/my-project/node_modules/wrangler/wrangler-dist/cli.js:109771:17)
    at fetchResult (/my-project/node_modules/wrangler/wrangler-dist/cli.js:109742:5)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async previewToken (/my-project/node_modules/wrangler/wrangler-dist/cli.js:112163:29)
    at async createWorker (/my-project/node_modules/wrangler/wrangler-dist/cli.js:112180:17)
    at async start (/my-project/node_modules/wrangler/wrangler-dist/cli.js:113358:16) {
  code: 10021
}

This happens because importing @prisma/client in the worker source code somehow forces the entire bundle to be treated as a module:
// node_modules/@miniflare/core/dist/src/index.js
  addEventListener = (type, listener, options) => {
    console.warn('debug:', this.#modules)

    if (this.#modules) {
      throw new TypeError("Global addEventListener() cannot be used in modules. Instead, event handlers should be declared as exports on the root module.");
    }

The CodePlugin from @miniflare gets instantiated with modules: true. Respectively, it throws a runtime exception stating you can't use worker global scope with modules (although nothing is marking my worker as a module).
It'd be really great to have a working repo rather than a guideline page. I'd be thankful for any help with this.

Can you open this as a new bug issue @kettanaito? Then we can put this into our normal process and make sure this is fixed or properly documented.

authors: Cerberus IljaDaderko Siilwyn cabello divyenduz janpio kettanaito matthewmueller


text:
Preview017 error on "prisma2 dev" or "generate" - 'C:/Program' not a windows command

Hi! I got this error while running Preview017 on windows.
C:\projetob\quoro\backend>prisma2 generate
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Error:
    Error: Generator at C:/projetob/quoro/backend/node_modules/@prisma/photon/generator-build/index.js could not start:
    'C:/Program' is not recognized as an internal or external command,
    operable program or batch file.
        at Timeout.setTimeout [as _onTimeout] (C:/Users/RaffaelCampos/AppData/Roaming/npm/node_modules/prisma2/build/index.js:231413:28)

My node_modules global folder isn't on Programs and files folder.
I also tested the @alpha.353 release, same error

and also prisma2\query-engine-windows.exe is not compatible with current version of Windows

Might be related to https://github.com/prisma/prisma2/issues/985
I can confirm this.

Thanks for reporting! Fixed in latest alpha.
You can try it out with npm i -g prisma2@alpha.

authors: outerlook pantharshit00 smartnet-club timsuchanek


text:
Custom props on the final component

Hi there,
Maybe I didn't saw the option to give props (like className) to the the final component. My use case is styling components with styled-jsx, I need to set the className prop on the final component that will be styled.
Have a nice day.

Hey @Simounet,
you should now be able to pass a className prop (and more) on the final component.
See https://github.com/prismicio/prismic-reactjs/pull/41
Note that if you need to do this on children components, you will need to rely on htmlSerializer prop. See this: https://prismic.io/docs/javascript/beyond-the-api/html-serializer
Let me know if I can help further,
Hugo

authors: Simounet hypervillain

repo: prismicio/prismic-reactjs


text:
2D arrays

Is there a Vector 2D class or some doc about an Array[Array[T]] somewhere?
Anyway, I'm converting this from Haxe to nit, if anybody wants it I'll paste it here

I don't remember something like this in the stdlib. You should make a pull request with it!

I see what you're doing, and this feels close to what was achieved with MultiHashMap
Maybe we should consider adding something like this to more_collections, or not since we can always do a new Array[Array[E]].
For your question, a 2D array is declared in Nit much like in other languages, using Array[Array[E]], and for each row of your Matrix, you have to manually instantiate a new Array[E] before adding something to it.
What bothers me though is that if we choose to support some kind of 2DArray or 2DVector or 2DMatrix, whatever the name, then we should propose 3D, 4D and so on for cohesiveness.
I think this will pollute lib more than anything, but I guess this is a common problem and maybe it should be addressed within the lib.
@Morriar seems to agree to see such a collection in lib, I don't know what the others think of it ?

Weel, at least I''l do it on local, we can talk about it next time.
BTW, is there an equivalent for fflush(stdout) and usleep for nit? Both of the functions are from the C stdlib

For usleep => nanosleep
For fflush => I guess it's missing ! Though it could be a welcome addition on streams, i'll see to it

I'm trying to do a Conway's Game of Life, but it's gonna be hard.

I would not bet on that !
By design, a \n character should provoke a flush, in this regard it would be flushed accordingly when an iteration is done, i'd think you would not have issues with that

Can somebody help me with the declaration of a class?
I don't understand how to declare a var private or public, and how to declare a constructor.
ATM I got this, but it gaves me a stacktrace at the grid loop.
class Vector2D[E]
   var width:Int
   var height:Int
   var grid:Array[E] is noinit

   init
   do
        for i in [0..width*height] do
            grid[i] = 0
        end
   end
end

At the begin of the init
grid = new Array[E].with_capacity(width*height)

often, it is better to instantiate object before trying to use them. :)
with_capacity is optional but here will prepare the memory (thus avoid reallocation in the future additions).
But, since you want to fill with 0 I propose that you replace the full init body with the single following line
grid = new Array[E].filled_with(0, width*height)

Works perfectly, thanks a lot

I kinda finished it for now
class Vector2D[E]
    var width:Int
    var height:Int

    var grid:Array[E] is noinit

    init do
        grid = new Array[E].filled_with(0, width*height)
    end

    fun get(x:Int, y:Int):E do
        return grid[y * width + x]
    end

    fun set(x:Int, y:Int, value:E) do
        grid[y * width + x] = value
    end

    fun display do
        for i in [0..height-1] do
            var out = new Buffer
            for j in [0..width-1] do
                out.append(get(i, j).to_s)
                out.add(' ')
            end
            print out.write_to_string
        end
    end
end

Also, I didn't found a int to bool function in the standard library, so I made one

redef class Int
    fun to_bool:Bool do
        if self == 0 then return false
        return true
    end
end

You can simplify your to_bool method :)
redef class Int
    fun to_bool do return self != 0
end

There you have it !
For the to_bool method, it can be useful to have it in the standard library, I'd suggest you make a PR with this addition

I'll do this this afternoon.
What do I need to make a good PR?

You can take at look at our guidelines for contributing
Long story short:

Make sure to have clean, independant and self-documenting commits
Document your PR with a short cover letter when you push it on Github
Sign-off your commits, and make your your code does not contain superfluous whitespaces (git can help you for that)

repo: privat/nit

license_source: bigquery


text:
Add Job Platform Feature

We aim to add a job platform feature to our app, similar to LinkedIn, where users can search for job opportunities, connect with employers, and manage their job applications.

interested


text:
Data: project addition by govardhan-26

Add a new project to the list
I want to add a new project - Disney+ Hotstar Clone

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSoC'23 contributor
[X] I want to work on this issue

Completed. Thanks for your contributions 🎉 ❤

repo: priyankarpal/ProjectsHut


text:
Add CDF for UnconstrainedDiagonalBivariateNormal

Another quick fix for UnconstrainedDiagonalBivariateNormal - I think we need the CDF for #806 to evaluate the probability that a source is within the interior region,
$$q_\phi(z^{(i)}) = \mathbb{I}[z^{(i)} = \varnothing](1 - q_{\phi_i}(y_i = 1)\mathbf{q_{\phi_i}(\ell_i \in R_i)}) + \mathbb{I}[z^{(i)} \neq \varnothing]q_{\phi_i}(z^{(i)})$$
In code this first term would translate to
loss += (true_cat.n_sources == 0) * (1 - on_prob * (pred["loc"].cdf([0.95, 0.95]) - pred["loc"].cdf([0.05, 0.05]))

Will merge this once CI server is back up and tests are confirmed to be passing

source: gharchive/pull-request

repo: prob-ml/bliss


text:
implement explicit MVN

Reference #229
Implemented large MVN and added test comparing to Kalman smoother.
Feedback welcome!

Thanks for contributing this! I'll do a code review asap, but at first glance this looks like exactly what we need!

Thanks for getting involved!
It might be useful to separate this test from the tfp-based tests (to give e.g. test_kalman_tfp() and test_kalman_vs_joint()) so that we get the results from the joint test even if the tfp test fails.
If you're up for it the ideal thing might be to refactor the tests to use the class-based approach as in e.g. info_infererence_test.py and parallel_inference_test.py (described here). No worries at all if that's not possible, I'm very happy to do it after this gets merged.

+1 to splitting the test into 2 - one for TFF, one for your code.

Cool! I'm on it!

I have done the refactor, following the pattern used in info_inference_tests.py. Let me know how it looks!

LGTM.

I will merge despite the failing test, which is unrelated to this PR (has something to do with tqdm).

authors: gileshd kostastsa murphyk slinderman

repo: probml/dynamax


text:
Add history

Notifies contributors when a change in history has occurred.

Repository link

Hi @nickgarlis, thanks for the pull request!
I’m afraid we can’t add the robot as is due to the risk that it could be creating too much noise for people.
But there is a similar use case that people asked for in the past. Sometimes people depend on forks because of a change they need but that won’t be merged to upstream. At the same time they want to benefit from all bug fixes and new features from the upstream repository. A bot could help by rebasing the fork and if it can’t do that automatically it could maybe create an issue?

Hi @gr2m, thanks for reviewing my app.
That's a great idea !
How often do you think the app should fetch from upstream ? I suppose it wouldn't be possible for it to listen to any events on upstream.

How often do you think the app should fetch from upstream ? I suppose it wouldn't be possible for it to listen to any events on upstream.

I’d say the app would be installed on the upstream repository so it can receive webhooks each time a commit is pushed to the main branch :) I think when people for a repository then the app is not installed on it automatically, but maybe it’s not necessary, maybe the app has access to it. At least if the fork is public?


text:
Fix and Add more screenshots for Boring Cyborg App

Checklist

[ ] If you're adding a listing for your app, be sure your app is in the /_apps/ folder before opening this Pull Request.
[x] All comments in frontmatter need to be removed.
[x] Performs a useful action through the GitHub API that solves an existing problem for developers: {explain the action here}

View rendered _apps/boring-cyborg.md

cc @gr2m


text:
Add a get bot name API

Feature Request
Is your feature request related to a problem? Please describe.
I want get my bot name.
Describe the solution you'd like
Maybe we can add a API for context to get bot name.
Describe alternatives you've considered
None
Teachability, Documentation, Adoption, Migration Strategy
None

With the latest Probot version (v10), you can do
// https://docs.github.com/en/free-pro-team@latest/rest/reference/apps#get-the-authenticated-app
const { name, slug } = context.github.apps.getAuthenticated()

Does that work for you

With the latest Probot version (v10), you can do
// https://docs.github.com/en/free-pro-team@latest/rest/reference/apps#get-the-authenticated-app
const { name, slug } = context.github.apps.getAuthenticated()

Does that work for you

I will check it tomorrow. Thanks for your reply.

@gr2m maybe this can help me with me contributing correctly

Hi @lostnco1 are you looking for an issue that you can contribute to? We don't currently have any simple issues, but a good place to find some on GitHub is https://github.com/issues?q=is%3Aopen+is%3Aissue+label%3Afirst-timers-only

@gr2m cool thanks for the heads up

It's work for me. Thanks!

repo: probot/probot

license: ISC


text:
Header column totals: Feedback

Brief description of your issue
I assume this is this feature?
https://github.com/processhacker/processhacker/commit/d13da3a1740f29c83b0945cccae9d9e0d972137e

If so:

Allow us to change the font? (i.e. make it smaller?)
Auto-scale values-to-fit by raising their order of magnitude? i.e. 17.224.655 handles --> 17.22K handles?

Steps to reproduce (optional)
No response
Expected behavior (optional)
No response
Actual behavior (optional)
No response
Environment (optional)
Process Hacker
Version: 3.0.4527 (30015af)

OBJECT INFORMATION
PhObjectTypeObject: 15 objects
PhStringType: 8765 objects
PhBytesType: 2316 objects
PhListType: 428 objects
PhPointerListType: 115 objects
PhHashtableType: 24 objects
PhFileStreamType: 0 objects
PhSymbolProviderType: 0 objects
PhProcessItemType: 374 objects
PhServiceItemType: 744 objects
PhNetworkItemType: 0 objects
PhModuleProviderType: 0 objects
PhModuleItemType: 0 objects
PhThreadProviderType: 0 objects
PhThreadItemType: 0 objects
PhHandleProviderType: 0 objects
PhHandleItemType: 0 objects
PhMemoryItemType: 0 objects
PhImageListItemType: 407 objects

Bug solved somewhere:

The "disable" option does not work

It is enabled, yet it doesn't show it, yet yet it's not toggleable

repo: processhacker/processhacker


text:
Feature: Support for RTSS/MSI Afterburner OSD overlay

Hello
I was wondering one day would it be cool to support Rivatuner Statistics Server and also MSI Afterburned I believe because I'm not sure if RTSS can be used by it self or I never figured out how to do so.
Particularly interested in showing Thread activity for a specific process for OSD, so that it's visible in a fullscreen application.
However in MSI Afterburner when trying to add Data Providers it seems like there's no way to add a custom one, only the ones MSI has to support, so this may need some back-and-forth with them perhaps?
Much appreciated, but I understand this may not be small amount of work.

https://forums.guru3d.com/threads/msi-afterburner-net-class-library.339656/

Support for the xbox game bar would be better since it's included with Win10 by default:
https://docs.microsoft.com/en-us/gaming/game-bar/overview

Support for the xbox game bar would be better since it's included with Win10 by default:
https://docs.microsoft.com/en-us/gaming/game-bar/overview

authors: altimumdelta dmex


text:
add nightly on scoop

can u add processhacker nightly to scoop extra

They already have it I think?
https://github.com/lukesampson/scoop-extras/blob/master/bucket/processhacker.json

I wouldn't add the nightly builds because they're unstable. The next stable release will include scoop support: #415

I wouldn't add the nightly builds because they're unstable. The next stable release will include scoop support: #415


text:
Adding travis config

Fixes #343

If anyone connects this repository to Travis. I can see if this configuration is working fine or not?

@therewasaguy can you review this?

thank you, @iFlameing, this'll be great!
I don't have owner permissions for Processing or for this repo, so I can't add it to travis-ci.org. @lmccart are you able to grant me permission or help with this?

this is great. I need to do some work to look into our travis status, right now it's spread across https://travis-ci.com and https://travis-ci.org and I need to sort and consolidate that. so it may be a while, but once I've got that set I will add in p5.js-sound and see if I can also give you access @therewasaguy. thanks for your patience :)

sounds good, thanks @lmccart ! This'll be good to set up when you get a chance, no rush.

closed with https://github.com/processing/p5.js-sound/pull/355

authors: iFlameing lmccart therewasaguy

license: mit


text:
Add the tests_run_on value to the custom test environment as os_value

Change-type: minor
See: https://github.com/balena-io/balena-sdk/pull/1272

@balena-ci rebase

authors: klutchell thgreasi

repo: product-os/flowzone


text:
Remove remaining $ref statements

Change-type: patch
Signed-off-by: Lucian Buzzo lucian.buzzo@gmail.com

@balena-ci I self-certify!

repo: product-os/jellyfish-plugin-base


text:
Speed up translate test runner

Change-type: patch
Signed-off-by: Josh Bowling josh@balena.io

Speed up translate tests by executing flush() instead of flushAll() when processing requests. The original test-harness used flush() so I must have made a mistake when copying the logic/code over into worker. My bad.

@balena-ci I self certify!

repo: product-os/jellyfish-worker


text:
Usage of taskkill.exe on linux

https://github.com/profesorfalken/jPowerShell/blob/fe785459bca019e6d0dd2dda7cc7ee4074219592/src/main/java/com/profesorfalken/jpowershell/PowerShell.java#L407
The lib is not completely converted to work in linux. When closing the powershell there is still hardcoded the call to taskkill.exe, which triggers an exception.

Yes, one could implement the unix part: like "OSDetector" ... then for unix "kill -9 pid".

authors: davy-engie jenskreidler

repo: profesorfalken/jPowerShell


text:
Make SDK runnable in python 3.x

This PR applies PEP 3114 which makes is runnable on python 3.x. The syntax change is backward compatible from version 2.6

Should handle #2

repo: profitbricks/profitbricks-sdk-python


text:
🛑 Multi Hardware is down

In c2d1ca6, Multi Hardware (https://www.multi-hardware.com/retrogami) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Multi Hardware is back up in 06eb65d after 4 minutes.

repo: proger-su/upptime


text:
feat: restore ability to control HTTP config and set TCP_NODELAY

Add a NoDelayAcceptor that can be used to set the TCP_NODELAY flag on accepted streams. Also exposes a Builder from hyper-util to allow for a user to configure the HTTP options they previously did.
Unfortunately, the hyper-util builder is not Clone or Debug, even though the field types are, so I needed to manually derive Debug for Server and used an Arc to reuse the Builder in the various accept tasks. Those workarounds can be removed if hyperium/hyper-util#72 is accepted.

Thanks ❤


text:
Add the ability to configure a blocklist or allowlist on the card policy

Managed to configure this repo as a remote url on Replit to merge the changes back in.

Looking good. Well done! 🥳


text:
建议加入物理学方面的书籍

兼听则明，我佩服这位仁兄的藏书，我不赞同仁兄的政治观点，当然我尊重你表达的权利。不过我想说的是，我看了你博客上说你是fanzf，不知道你看那些评论国人是支那猪的，你作何感想。你可以有不同的见解，但不应该侮辱你是中华后裔的身份。我们都是中华后裔，我们的祖先都是从黄河长江流域走来的不是吗，你可能是台湾人，大陆人，美国华人，但是你父母，你父母的父母，以上数辈他们当是中国人吧。总之，对于辱骂侮辱中华民族人格的人，我无法接受。
另，这是我个人之见。书是不错，可以加入些物理方面的书籍，方便更加了解我们所处的世界。谢谢你的分享。

请区分反政府反党和反中反华

请区分反政府反党和反中反华

你个支那人，这句话是反什么？

你这句话又是反什么？

总之，对于辱骂侮辱中华民族人格的人，我无法接受。

但是我可以说别人是支那人。

repo: programthink/books


text:
Projects using unicode_names2 as a dependency mark it as dirty and repeatedly rebuild it.

Ref. https://github.com/progval/unicode_names2/issues/26#issuecomment-1987099164
build.rs says:
    println!("cargo:rerun-if-changed=generator/");

But https://crates.io/api/v1/crates/unicode_names2/1.1.0/download https://crates.io/api/v1/crates/unicode_names2/1.2.1/download etc. doesn't contain that directory.
       Dirty unicode_names2 v1.2.1: the file `/var/tmp/portage/dev-util/ruff-0.3.0/work/cargo_home/gentoo/unicode_names2-1.2.1/generator/` is missing

Resolved in v1.2.2, thanks for the report

authors: eli-schwartz progval


text:
[pre-sve] [TC-DRLK-2.6] set-holiday-schedule results in failure

Problem
When trying to set a holiday schedule, the return response is FAILURE.
Command
Commands used
./chip-tool doorlock read number-of-holiday-schedules-supported 1 1
./chip-tool doorlock set-holiday-schedule 1 20 30 0 1 1
./chip-tool doorlock get-holiday-schedule 1 1 1

expected behavior : Success response. Return the holiday schedule with the localStarttime and localEndTime as well as operating mode.
actual behavior: command gives FAILURE. the get command has missing information

Commit
commit id: 1e3f12041013dd71a53d035dbf2f6d142fc06c4e
Platform: EFR32
Network: Thread
TC_DRLK_2.6_.txt

Platform: EFR32

@mamayorg What is the server app being used?

@Morozov-5F

Platform: EFR32

@mamayorg What is the server app being used?

I'm using lock-app

@bzbarsky-apple I dont see this issue with RPI

Commit used : 81c7f2aacebbe5bb304a62ecdbeaff9220d72c69
Chip-tool : RPI
DUT : Door lock app
Network : IP (ethernet)

Full execution log of TC-DRLK-2.6
TC-DRLK-2.6 LOG

Cert Blocker Review: @Morozov-5F , can you also take a look at this lock issue? Thanks!

@Survensa which "Door lock app" are you using for DUT?  That is, which platform?

@Survensa which "Door lock app" are you using for DUT?  That is, which platform?

Used RPI for both Chip-tool and DUT with lock app.

OK, so that's the Linux lock app.  The original issue is reported with the efr32 lock app, which may have quite different behavior here; a lot of the logic in the lock apps is not shared.

@mykrupp If this is EFR32-specific, could you take a look, please?

The commit hash tested initially is likely missing parts from EFR32 side and door-lock-server side. I believe the door-lock-server holiday is working now.
This open PR contains schedules implementation on the EFR32 side.  I am hoping to get this PR merged before an SVE hash is cut today: https://github.com/project-chip/connectedhomeip/pull/20044

Seems like this was fixed in the #20044 as it was EFR32-specific. Holiday schedules seem to be working in the lock-app under Linux, can't confirm for EFR32 as I lack the required hardware.

Cert Blocker Review: @mamayorg can you please re-verify this, as we believe this is resolved.

authors: Morozov-5F Survensa bzbarsky-apple mamayorg mykrupp woody-apple

repo: project-chip/connectedhomeip


text:
Rendezvous over BLE in android app not working

Problem
Android App is not doing pairing over BLE for esp32 target.
It is supposed to be working as this  project is closed.
@vidhis88 can you give more information on this?
Proposed Solution
Add new PR to add this feature in android app.

Not yet. Only part 1 of that effort has landed. There are more changes required in the BLE layer to make it work. It is currently in progress.


text:
[Darwin] Figure out a better fix for the writability of the ApplicationLauncher cluster's CurrentApp attribute

Reproduction steps
https://github.com/project-chip/connectedhomeip/pull/30174 added a backwards compat shim, but it might be better if we can either remove this (needs some checking to see whether we can) or just move it into the compat shims bits (and presumably just make the write attempts fail client-side if we do that, and deprecate the API).
Platform
darwin
Platform Version(s)
No response
Type
Manually tested with SDK
(Optional) If manually tested please explain why this is only manually tested
No response
Anything else?
No response

At a minimum this API should now be marked "deprecated" already so it is not used by clients. As it stands right now after that PR, the API shows up as if it is a totally normal write.


text:
[CERT-TEST-FAILURE] - TC-PS-1.1 - Test failed

Feature Area
Other
Test Case
TC-PS-1.1
Reproduction steps

Bring up the DUT with All-clusters-app.
Pair the DUT using chip-tool through "Onnetwork" transport.
Run the command ./chip-tool powersource read cluster-revision 1 1

Expected Outcome:

[1707904188.094897][29654:29656] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 1545690984
[1707904188.094996][29654:29656] CHIP:TOO:   ClusterRevision: 3

Actual Outcome:

[1707904188.094897][29654:29656] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_002F Attribute 0x0000_FFFD DataVersion: 1545690984
[1707904188.094996][29654:29656] CHIP:TOO:   ClusterRevision: 2

Mandatory Attribute BatChargePermissions has to be added in AttributeList as per spec.

Bug prevalence
Whenever I try to read ClusterRevision and AttributeList.
GitHub hash of the SDK that was being used
67f2ae564d6a90232d689dc0daf455947e47681d
Platform
raspi
Anything else?
In SPEC, the ClusterRevision value has been updated to 3. As per spec changes, SDK has to update the ClusterRevision value from 2 to 3. And BatChargePermissions attribute has to be added in AttributeList as it is mandatory attribute.
Specification References:

For Attribute,

Battery management things has been removed from spec in PowerSourceCluster


text:
[TE2]  [ICMPv6]Destination Unreachable    when joined CHIP/thread network

ICMP-Destination-Unreachable.zip
question
When pairing Lock device of  nordic into a thread network according to TE2  Instructions .
After deice atteched to BR, there is an " ICMPv6  package " , I just wonder  why .

Here is my LOCK  and BR addrs:
fda9:e910:c470:fd94:8d4:458c:c9bf:a6f4
fdea:de07:60c6:2120:0:ff:fe00:3401
fdea:de07:60c6:2120:f637:4165:73d5:dac0
fe80:0:0:0:c85e:67c6:2012:71f0

wpan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1280
        inet6 fdea:de07:60c6:2120:0:ff:fe00:3400  prefixlen 64  scopeid 0x0<global>
        inet6 fdea:de07:60c6:2120:0:ff:fe00:fc10  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::3c32:e907:44e8:7ce0  prefixlen 64  scopeid 0x20<link>
        inet6 fdea:de07:60c6:2120::fc38  prefixlen 64  scopeid 0x0<global>
        inet6 fda9:e910:c470:fd94:afd6:fa69:9799:1335  prefixlen 64  scopeid 0x0<global>
        inet6 fdea:de07:60c6:2120:0:ff:fe00:fc11  prefixlen 64  scopeid 0x0<global>
        inet6 fdea:de07:60c6:2120:0:ff:fe00:fc00  prefixlen 64  scopeid 0x0<global>
        inet6 fdea:de07:60c6:2120:2ed1:5544:974:6734  prefixlen 64  scopeid 0x0<global>

We're in progress of reviewing older issues. Is this still an issue given how old the SDK this was tested against? Please re-open if so. Thanks!


text:
partial overlap fix between subscribed path and setDirty path

Problem
We cannot handle the partial overlap between subscribed path and setDirty path, for example, subscribe path (E1, C1, wildcard), setDirty with (wildcard, C1, A1).
Change overview
Update SetDirty function via using IsAttributePathOverlapped, remove duplicate functionality IsOverlappedAttributePath in InteracitonModelEngine.
Testing
Add the test where we subscribe path (E1, C1, wildcard), setDirty with (wildcard, C1, A1), we expected to receive the one attribute E1,C1,A1

/rebase


text:
[privacy] Drop privacy enabled messages until support is implemented.

Given proper privacy parsing (#22783) is taking awhile to pass review and merge, this PR will drop any privacy enabled messages.
This PR is not needed if proper privacy parsing support as posted in #22783 is merged.

Closing this workaround in favor of waiting for #22783 completion.


text:
[icd] Introduced gn flags to allow conditional code compilation

The ICD implementation is compiled with a full set of features, even if the device uses SIT configuration. It results in a big flash memory waste on a functionalities that cannot be used by certain configuration.
Introduced new gn flags corresponding to the ICD features - LIT, CIP and UAT. Modified the ICD Manager implementation and icd-management-server code to use created defines and cut off unused code by the preprocessor.
Before this change the flash and RAM size added by the SIT configuration for nrf platform was 7204 B flash, 1664 B RAM (for LIT it is over ~9k, because code size depends also on configuration selected in .zap).
After optimization it is 2416 B of flash and 128 B of RAM. The gain is 4788 B of flash and 1536 B of RAM.
Fixes: #29131

@kkasperczyk-no From i can see from the failures and some tests with your branch with the crique commands, the new gni flags are not beeing set correctly which ends causing the new defines to be =0.
The cause seems to be that some CIs don't use the examples/lit-icd-app/linux/.../args.gni while others do.
Cirque never includes the args.gni in the examples with the correct arguments and as such the build fails.

The cause seems to be that some CIs don't use the examples/lit-icd-app/linux/.../args.gni while others do.

Would you recommend setting the flag in the lit-icd-app common BUILD.gn then? Or trying to inject the chip_enable_icd_lit=true argument to the build commands?

@kkasperczyk-no From what i can see from other examples, the easiest approach would be doing a toolchain config that imports the examples config which then includes the standalone config for the lit-icd-app.
In config/standalone/toolchain/BUILD.gn, do something like
gcc_toolchain("lit-icd") {
  toolchain_args = {
    current_os = host_os
    current_cpu = host_cpu
    is_clang = false
    import("${chip_root}/<example_path>/args.gni")
  }
}

and use that in the root/BUILD.gn for the lit-icd-app.

authors: kkasperczyk-no mkardous-silabs


text:
Revert "Darwin: Prohibit static initializers in Matter.framework"

Reverts project-chip/connectedhomeip#34168
This is causing crashes at mDNS discovery time for some reason.

Apple QA just verified this revert fixes the crash.


text:
Simplify telink build

Problem
Previous vscode images were missing required build environment variables so build script hardcoded zephyr SDK paths
Change overview
After #9535 we can use environment variables.
Testing
Local build, CI build.

Can you please add this as an argument to the script not as an environment variable?

@mspang - I do not think I can - this is zephyr build environment which is cmake based. I am just following what the rest of the build scrips do (or at least used to do).

Can you please add this as an argument to the script not as an environment variable?

@mspang - I do not think I can - this is zephyr build environment which is cmake based. I am just following what the rest of the build scrips do (or at least used to do).

west uses ZEPHYR_BASE not TELINK_ZEPHYR_BASE. I'd rather not add new environment variables. These environment variables will be set in builds other than the telink build which we don't want.

I believe to really fix this, we would need to make all platforms the same. There is an imbalance here: nrf was the first platform and took over setting ZEPHYR_BASE and similar environment variables globally.
Telink is the 2nd zephyr platform, so it uses separate env variables.  It seems we want to make nrf not set globals, however that seems to be a larger change.

I believe to really fix this, we would need to make all platforms the same. There is an imbalance here: nrf was the first platform and took over setting ZEPHYR_BASE and similar environment variables globally.
Telink is the 2nd zephyr platform, so it uses separate env variables. It seems we want to make nrf not set globals, however that seems to be a larger change.

There could be --nrfconnect-sdk and --telink-zephyr-sdk options to the build script (and eventually --[upstream-]zephyr-sdk ) ?


text:
[WIP] Add Mtls patch to Mutating Webhook

Issue link

What changes have been made

Verification steps

Checks

[ ] I've made sure the tests are passing.
Testing Strategy

[ ] Unit tests
[ ] Manual tests
[ ] Testing is not required for this change

not sure which one need review either #507 or #508 ? or none :scream:
better remove [WIP] / "draft" and have the other one closed.

repo: project-codeflare/codeflare-operator


text:
[resource accounting] update cache error handling and retry

In file https://github.com/project-codeflare/multi-cluster-app-dispatcher/blob/433d1cbadfe7807a22f79f292f8caec897def519/pkg/controller/clusterstate/cache/cache.go#L379
When updating the cache fails we log the error and sleep for a second. does it make sense?

looking down the chain, saveState() always returns nil, so updateCache() will never error out ?
https://github.com/project-codeflare/multi-cluster-app-dispatcher/blob/433d1cbadfe7807a22f79f292f8caec897def519/pkg/controller/clusterstate/cache/cache.go#L240


text:
Mock ansible invocation in unit test

At the moment ansible must be installed to successfully run unit tests of package ansible because they rely on real invocations of ansible-playbook command (via go-ansible library).
Unit-test shouldn't depend on external resources.
We need to mock them or to present an API that will encapsulate the actual call to the external service.

Are tests in ansible_manager_test.go really unit tests and not integrations tests?
The unit test would be to check if we go inside the HandlePlaybook() and ExecutePendingPlaybooks() that are supposed to execute the ansible playbook.
By checking the output of the execution of the playbook, it looks like an integration test
One easy way would be to run tests in docker container in which all external dependencies are installed for integrations tests:

So in the Makefile add a target to run integration tests that will executes the ginkgo in the docker.
The target should be able to take specific folders to run tests on in case the user does not want to run all tests but only a subset

What do you think?

You're right: they are integration tests. The goals of the issue is to move them in the integration test section (maybe we can reword the issue description).
Regarding implementation I think @machacekondra can help :)

Ok so the goal of this issue is to create a new folder test/integration and to move the ansible tests in it, correct?
Then  add a target in the makefile to run those tests (see my above comment about how I would do it), @machacekondra any advices?

The test/e2e folder already exists.
For this issue we should mock ansible invocation and refactor the current unit tests to be "proper" unit test (https://issues.redhat.com/browse/ECOPROJECT-691).
We also planned to add e2e CI test but, I think, It can be another issue/PR .

There is no e2e folder in the device-worker project in the main branch at least and the JIRA ticket has "flotta operator" as component :)
The current e2e tests are not executed in the CI currently? Because I see a target in the Makefile
So I am a little confused to what should be done here: move the tests to correct folder and maybe create a Maefile target to run tests in docker container (at least for ansible tests) to avoid being dependent of the platform, or move the test and then create unit tests?

There is no e2e folder in the device-worker project

AFAIK, the e2e test should be part of the operator. The folder test\e2e is there.

the JIRA ticket has "flotta operator" as component :)

Fixed! Thanks :)

So I am a little confused to what should be done here

Actual test needs to be part of e2e: I've no good suggestion on the implementation for you but I think they should be part of the operator, so we need to wait for the implementation step (we are still defining the CRDs).
IMO, for this specific issue the goal is to mock ansible invocation in the current available tests. This step it's necessary to make unit test independent from the availability of ansible command and to ease the writing of proper unit test.
Having said that, if anyone has different opinions on this issue I'd like to hear them! :)

Yes, integrations tests should be in e2e folder, I agree. But in the device-worker project, such folder does not exists that why I suggested to create one in the project to put the current ansible tests that are integration tests in it.
As for mocking the AnsiblePlaybookCmd (as , from my understanding this is the playbookCmd that is used to used to execute the ansible playbook) in the dispatcher I agree that mocking it would be useful
Maybe we could discuss this at tomorrow team meeting if that is fine with you and if it fits in the agenda

authors: gabriel-farache gciavarrini

repo: project-flotta/flotta-device-worker


text:
Update react-charts package

Updated react-charts package to get latest fixes for the legend tooltip.
See https://github.com/patternfly/patternfly-react/pull/4419

Codecov Report

Merging #1583 into master will increase coverage by 0.00%.
The diff coverage is 75.00%.

@@           Coverage Diff           @@
##           master    #1583   +/-   ##
=======================================
  Coverage   78.41%   78.42%
=======================================
  Files         235      235
  Lines        3860     3861    +1
  Branches      702      703    +1
=======================================
+ Hits         3027     3028    +1
  Misses        739      739
  Partials       94       94

Impacted Files
Coverage Δ

src/components/charts/common/chartUtils.ts
72.53% <75.00%> (+0.19%)
:arrow_up:

Continue to review full report at Codecov.

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

authors: codecov-commenter dlabrecq

repo: project-koku/koku-ui


text:
Download english dataset fails on HF datasets

Hi, I am trying to download the en dataset from huggingface datasets but it fails (I checked and the ar works fine).
I tried forcing re-download, but it still fails.
lang = 'en'

dataset = load_dataset("miracl/miracl", lang,
                       use_auth_token=True
                       cache_dir=hf_cache_dir,
                       download_mode=datasets.DownloadMode.FORCE_REDOWNLOAD
                      )

---------------------------------------------------------------------------
JSONDecodeError                           Traceback (most recent call last)
/tmp/ipykernel_3671/720883363.py in <cell line: 3>()
      1 lang = 'en'
      2
----> 3 dataset = load_dataset("miracl/miracl", lang,
      4                        use_auth_token='lookelsewhereformypasswordortoken'
      5                        cache_dir=hf_cache_dir,
~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
   1740
   1741     # Download and prepare data
-> 1742     builder_instance.download_and_prepare(
   1743         download_config=download_config,
   1744         download_mode=download_mode,

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/builder.py in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, storage_options, **download_and_prepare_kwargs)
    812                             **download_and_prepare_kwargs,
    813                         }
--> 814                         self._download_and_prepare(
    815                             dl_manager=dl_manager,
    816                             verify_infos=verify_infos,

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs)
   1421
   1422     def _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs):
-> 1423         super()._download_and_prepare(
   1424             dl_manager, verify_infos, check_duplicate_keys=verify_infos, **prepare_splits_kwargs
   1425         )

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
    903             try:
    904                 # Prepare split will record examples associated to the split
--> 905                 self._prepare_split(split_generator, **prepare_split_kwargs)
    906             except OSError as e:
    907                 raise OSError(

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys, file_format, max_shard_size)
   1372         total_num_examples, total_num_bytes = 0, 0
   1373         try:
-> 1374             for key, record in logging.tqdm(
   1375                 generator,
   1376                 unit=" examples",

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/tqdm/notebook.py in __iter__(self)
    255     def __iter__(self):
    256         try:
--> 257             for obj in super(tqdm_notebook, self).__iter__():
    258                 # return super(tqdm...) will not catch exception
    259                 yield obj

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/tqdm/std.py in __iter__(self)
   1178
   1179         try:
-> 1180             for obj in iterable:
   1181                 yield obj
   1182                 # Update and possibly print the progressbar.

~/.cache/huggingface/modules/datasets_modules/datasets/miracl--miracl/a78629f6c11f81700042592fd4e766a579684922ecb9555300632f78bc7cc850/miracl.py in _generate_examples(self, filepaths)
    135     def _generate_examples(self, filepaths):
    136         lang = self.config.name
--> 137         miracl_corpus = datasets.load_dataset('miracl/miracl-corpus', lang)['train']
    138         docid2doc = {doc['docid']: (doc['title'], doc['text']) for doc in miracl_corpus}
    139

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/load.py in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, ignore_verifications, keep_in_memory, save_infos, revision, use_auth_token, task, streaming, **config_kwargs)
   1740
   1741     # Download and prepare data
-> 1742     builder_instance.download_and_prepare(
   1743         download_config=download_config,
   1744         download_mode=download_mode,

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/builder.py in download_and_prepare(self, output_dir, download_config, download_mode, ignore_verifications, try_from_hf_gcs, dl_manager, base_path, use_auth_token, file_format, max_shard_size, storage_options, **download_and_prepare_kwargs)
    812                             **download_and_prepare_kwargs,
    813                         }
--> 814                         self._download_and_prepare(
    815                             dl_manager=dl_manager,
    816                             verify_infos=verify_infos,

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs)
   1421
   1422     def _download_and_prepare(self, dl_manager, verify_infos, **prepare_splits_kwargs):
-> 1423         super()._download_and_prepare(
   1424             dl_manager, verify_infos, check_duplicate_keys=verify_infos, **prepare_splits_kwargs
   1425         )

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/builder.py in _download_and_prepare(self, dl_manager, verify_infos, **prepare_split_kwargs)
    903             try:
    904                 # Prepare split will record examples associated to the split
--> 905                 self._prepare_split(split_generator, **prepare_split_kwargs)
    906             except OSError as e:
    907                 raise OSError(

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/datasets/builder.py in _prepare_split(self, split_generator, check_duplicate_keys, file_format, max_shard_size)
   1372         total_num_examples, total_num_bytes = 0, 0
   1373         try:
-> 1374             for key, record in logging.tqdm(
   1375                 generator,
   1376                 unit=" examples",

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/tqdm/notebook.py in __iter__(self)
    255     def __iter__(self):
    256         try:
--> 257             for obj in super(tqdm_notebook, self).__iter__():
    258                 # return super(tqdm...) will not catch exception
    259                 yield obj

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/site-packages/tqdm/std.py in __iter__(self)
   1178
   1179         try:
-> 1180             for obj in iterable:
   1181                 yield obj
   1182                 # Update and possibly print the progressbar.

~/.cache/huggingface/modules/datasets_modules/datasets/miracl--miracl-corpus/e3bbdc5df5b903d345f80c47adca4b6392473b564204d9181b6827df9017828a/miracl-corpus.py in _generate_examples(self, filepaths)
    102             with open(filepath, encoding="utf-8") as f:
    103                 for line in f:
--> 104                     data = json.loads(line)
    105                     yield data['docid'], data

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/json/__init__.py in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
    355             parse_int is None and parse_float is None and
    356             parse_constant is None and object_pairs_hook is None and not kw):
--> 357         return _default_decoder.decode(s)
    358     if cls is None:
    359         cls = JSONDecoder

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/json/decoder.py in decode(self, s, _w)
    335
    336         """
--> 337         obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    338         end = _w(s, end).end()
    339         if end != len(s):

~/SageMaker/.persisted_conda/pytorch/lib/python3.8/json/decoder.py in raw_decode(self, s, idx)
    351         """
    352         try:
--> 353             obj, end = self.scan_once(s, idx)
    354         except StopIteration as err:
    355             raise JSONDecodeError("Expecting value", s, err.value) from None

JSONDecodeError: Unterminated string starting at: line 1 column 78 (char 77)

Hi @littlewine, I think it has to do with caching, You probably need to clear the cache and redownload
Reference:

https://github.com/huggingface/datasets/issues/751
https://github.com/huggingface/datasets/issues/4306

let me know if that works for you

Hi @ToluClassics and thanks for the response.
I a;lready download it using the HGF git.
I'll try to check if the issue still appears and whether the code above resolves it, just to close the issue

authors: ToluClassics littlewine

repo: project-miracl/miracl


text:
TicTacToe example: trying to use ctx inside Game

Following the TicTacToe example, I'm trying to pass ctx to a public method flip of Game:
// instructions/play.rs
pub fn play(ctx: Context<Play>, data: FlipArgs) -> Result<()> {
    ctx.accounts.game.flip(&ctx, data)
}

pub fn flip(&mut self, ctx: Context<Play>, data: FlipArgs) -> Result<()> {
    self.charge_fee(ctx);

    match data.heads_or_tails {
        true => self.play_heads(ctx),
        false => self.play_tails(ctx),
    }
}

fn charge_fee(&self, ctx: Context<Play>) -> Result<()> {
    let player = &ctx.accounts.player;

    if **player.try_borrow_lamports()? < self.static_amount {
        return Err(CoinflipError::InsufficientFunds.into());
    }

    let fee = self.calculate_fee();

    **player.try_borrow_mut_lamports()? -= fee as u64;

    Ok(())
}

However, this results in an error:
anchor_lang::context::Context<instructions::play::Play>
ctx: Context<Play>
anchor_lang::context::Context<instructions::play::Play>
ctx: Context<Play>
mismatched types

expected struct `anchor_lang::context::Context`, found reference

So, how to make ctx work from inside Game in order to access the ctx.accounts.player?

pls use discord for support

authors: netpoe paul-schaaf

repo: project-serum/anchor-book


text:
Dont load items by default in real time locator #404

Fixes #404 .

Why didn't the build start??

Travis seems to be down right now. https://www.traviscistatus.com

repo: project-travel-mate/Travel-Mate


text:
added mgmt documentation

What type of PR is this?

Which issue does this PR fix:
What does this PR do / Why do we need it:
If an issue # is not available please add repro steps and logs showing the issue:
Testing done on this change:

Automation added to e2e:

Will this break upgrades or downgrades?
Does this PR introduce any user-facing change?:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

To pass the spellcheck action, need to add Mgmt, mgmt, and ldap to spellcheck.yaml

fixed, thank you!

This dev-submitted PR is superseded by PR #107

authors: mbshields peusebiu


text:
cmd/skopeo: refactor layers command

Signed-off-by: Antonio Murdaca runcom@redhat.com

@mtrmac PTAL

this is basically the same as before but this is now using primitives from containers/image instead of having LayersCommand in the containers/image API (which was ugly)

so this patch should not break atomic based on https://github.com/projectatomic/skopeo/pull/127#discussion_r68758886

(the other notable change is that the manifest does not go through fixManifestDigests.)
Looks fine (and it’s great to get rid of LayersCommand), only blocked on containers/image update and replacing the vendoring commit.

done the vendoring, I'll merge after tests finish

LGTM pending tests.

authors: mtrmac runcom

repo: projectatomic/skopeo


text:
Calico pods in calico pools outside of podCIDR in Kubernetes cannot access clusterIP services when networkpolicy is applied

Calico pods in calico pools outside of podCIDR in Kubernetes cannot services when Kubernetes network policy is applied. It is observed that when calico pods which are outside of podCIDR subnet cannot access pods back ending a cluster IP service which are present on the other host. We are using Calico version v3.11.1. When pods are present within the podCIDR subnet; they can access pods behind services on another host.
Expected Behavior
It is expected that pods created in any Calico IP pools must be able to access service pods across hosts when K8S ingress/egress network policies are configured which allow traffic.
Current Behavior
Current behaviour is that Calico pods in ip-pool subnet same as the podCIDR can communicate with services across hosts. When we create additional IP pools which do not overlap with the podCIDR configured in K8S cluster; packets start getting dropped when trying to access the service when network policies are present. This is an example of the K8S network policy present on the cluster
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: test-network-policy
  namespace: my-ns
spec:
  podSelector:
    matchLabels:
      app: test-app
  policyTypes:
  - Ingress
  ingress:
  - from:
    - namespaceSelector:
        matchLabels:
          allow: yes

Possible Solution
Calico network policy enforcement must not drop packets which are not originating from the ip pool subnet same as podCIDR. Calico pods in subnets other than podCIDR must also be allowed to access the service when appropriate network policies are present.
Steps to Reproduce (for bugs)

Create a calico IP pool which is outside of podCIDR subnet
Now create a pod in this new Calico ip pool say on host A
Create a nginx cluster IP service and the pod back-ending this service must be present only on host B (non local host)
Also, configure a Kubernetes network policy on the K8S cluster as listed above which only has ingress namespace selector
Now perform a curl -v <cluster ip>:80 to the nginx clusterIP and see that the curl fails.
Also, if possible use the following IP pool configuration spec for the IP pool

spec:
  blockSize: 26
  cidr: <non pod CIDR overlapping subnet>/16
  ipipMode: Always
  natOutgoing: true
  nodeSelector: all()
  vxlanMode: Never

Context
With this issue; calico pods in subnets or ip pools outside of podCIDR cannot access services across hosts when K8S network policies are configured on the host.
Your Environment

Calico version: v3.11.1
Orchestrator version (e.g. kubernetes, mesos, rkt): Kubernetes
Operating System and version: Centos 7 3.10.0-1062.18.1.el7.x86_64

kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:58:53Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:51:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

calicoctl version
Client Version:    v3.11.1
Git commit:        6c04a83
Cluster Version:   v3.11.1
Cluster Type:      k8s,bgp,kubeadm,kdd

This is expected, your calico pool needs to align with your kube-proxy cluster CIDR or kube-proxy will SNAT traffic and break policy.

@fasaxc Does this mean all Calico ip-pools that get created on K8S clusters need to lie within the podCIDR subnet ? Will this not cause restrictions in large clusters ?

Yes, this is a restriction of kube-proxy, not calico.  I think they may now allow multiple CIDRs to be listed to address that.

authors: fasaxc rsparulek

repo: projectcalico/calico


text:
Automated cherry pick of #4066: Fix mixed policy example diagram

Cherry pick of #4066 on release-v3.16.
#4066: Fix mixed policy example diagram

Deploy preview for calico ready!
Built with commit 7aa50c2a100e73d848c4e1899aa022f177586fa9
https://deploy-preview-4067--calico.netlify.app

authors: caseydavenport lxpollitt


text:
Sepolicy for NN-HAL with OPENVINO

verified with OPENVINO MKLDNN Plugin .

@arun1778 @sgnanase  @zhenlong.z.ji@intel.com

repo: projectceladon/device-intel-sepolicy


text:
Implement the dropdown with type and select plus dropdown capability instead of just dropdown

In the current portal, settings with dropdown cannot be optional.It has to have a none setting that maps to an empty string to make it an optional value. If we have a dropdown that has a dropdown button and text typing capability, user can either select from dropdown or type and select. This way if user does not type or select anything we have the portal not set it for portal. This removes a lot of portal complexities and currently there is a control that supports functionality. We would need to switch the control type to make this change.

@soninaren Let's revisit this per our conversation the other day

@soninaren - Is this still needed?

we can close this. At the moment we don't have any bindings that require this now.

authors: mattchenderson soninaren

repo: projectkudu/AzureFunctionsPortal


text:
Rake task to convert measures; initial work for frontend development

Pull requests into Bonnie require the following. Submitter and reviewer should :white_check_mark: when done. For items that are not-applicable, note it's not-applicable ("N/A") and :white_check_mark:.
Submitter:

[x] This pull request describes why these changes were made.
[x] This PR is into the correct branch.
[x] JIRA ticket for this PR: https://jira.mitre.org/browse/BONNIE-1952
[x] JIRA ticket links to this PR
[x] Code diff has been done and been reviewed (it does not contain: additional white space, not applicable code changes, debug statements, etc.)
[x] If UI changes have been made, google WAVE plug-in has been executed to ensure no 508 issues were introduced. N/A
[x] Tests are included and test edge cases
[x] Tests have been run locally and pass (remember to update Gemfile when applicable) N/A
[x] Test fixtures updated and documented as necessary ( see internal wiki ) N/A
[ ] Code coverage has not gone down and all code touched or added is covered.

In rare situations, this may not be possible or applicable to a PR. In those situations:

Note why this could not be done or is not applicable here:
Add TODOs in the code noting that it requires a test
Add a JIRA task to add the test and link it here:

[x] Automated regression test(s) pass N/A

Reviewer 1:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

Zach - there may be an issue with the previously created test "export single patient from account" in the 'export_fixtures_test.rb' file. After running that test file, please comment on whether or not you notice the following: (1) a large number of fixtures were deleted and created & (2) a directory named 'patient.back' is now located in 'test/fixtures/patients' and 'spec/javascripts/fixtures/json/patients'

repo: projecttacoma/bonnie


text:
When a code uses the code system 'NA_VALUESET', negate an entire valu…

…eset
Does the same thing as https://github.com/projecttacoma/cqm-reports/commit/3c129483203ac311d3c5f7ffa3d74da79c2d3633
Pull requests into cqm-parsers require the following. Submitter and reviewer should :white_check_mark: when done. For items that are not-applicable, note it's not-applicable ("N/A") and :white_check_mark:.
Submitter:

[ ] This pull request describes why these changes were made.
[ ] Internal ticket for this PR:
[ ] Internal ticket links to this PR
[ ] Code diff has been done and been reviewed
[ ] Tests are included and test edge cases
[ ] Tests have been run locally and pass

Reviewer 1:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

Reviewer 2:
Name:

[ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
[ ] The tests appropriately test the new code, including edge cases
[ ] You have tried to break the code

Codecov Report

Merging #38 into v0.2.x will decrease coverage by 0.03%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           v0.2.x      #38      +/-   ##
==========================================
- Coverage   83.31%   83.28%   -0.04%
==========================================
  Files          99       99
  Lines        4754     4756       +2
==========================================
  Hits         3961     3961
- Misses        793      795       +2

Impacted Files
Coverage Δ

lib/qrda-export/helper/cat_1_view_helper.rb
69.62% <0%> (-1.81%)
:arrow_down:

Continue to review full report at Codecov.

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

authors: codecov-io dczulada

repo: projecttacoma/cqm-parsers


text:
Bulk import

Summary
Added a test group for the bulk import support
New behavior
In the test group menu there is now the option to run a test for bulk import support
Code changes
Added two new files :
bulk_import.rb - this file contains the bulk of the changes to support a bulk data test  on the deqm test server
bulk_import_utils.rb - this file contains the back off loop logic (It was largely grabbed from the old deqm-test-client work done for the ATL connectathon in 2019)
Modified the deqm-test-kit.rb file to now include the bulk_import group of tests
Testing guidance
Pull, and build.
Launched inferno, it is import to execute the measure availability test first. (the bulk_import test is similar to submit data in that it won't work without that test having been run)
Once the measure availablity test has been run against deqm-test-server, select bulk import.
When the menu comes up the measure should be populated and then you just need to set the server to deqm-test-server and the test should run and complete without issue.

Also recommend adding some spec tests in spec/deqm_test_kit

I did get an issue when testing:
"Error: no block given
/opt/inferno/vendor/bundle/ruby/2.7.0/gems/inferno_core-0.0.7/lib/inferno/dsl/fhir_client_builder.rb:12:in `instance_exec'"
Does this look familiar?

repo: projecttacoma/deqm-test-kit


text:
Chef de projet

Bonsoir, c'est quoi les tâches d'un sous chef de projet?
Comme vous êtes le vrai chef de projet
Il doit aussi participer à la programmation
Je voulais bien savoir tout ce que à faire
Merci

On l'appelera "coordinateur"  c'est mieux que sous chef
pour commencer -->suivre le travail, motiver les membres et être l'interface avec moi...

on va commencer le travail, on va faire le backlog avec l'étude.
on est entrain d'ajouter les collaborateurs du projet en Github.
on est 10 personnes.

on a fini le backlog, je le met dans wiki, ou bien dans le site web

Avez vous fait un fork du projet vc?
Celui qui a fait le fork aurA UN PROJET QUI DEMARRE COMME COPIE DE CELUI CI...
Ajouter moi comme collaborateur et je vous dis quoi faire dans les issues de votre propre projet..

Bonsoir Dr. Pascal, j'ai déjà fait le travail demandé.
Je vous ai envoyé un issue du fork que j'ai fait.
On a mis le backlog comme un new file et un uploaded file

Bonjour Dr. Pascal
A propos du coordinateur
C'est quoi mon travail exactement?
Je travaille sur la base de données, ou bien sur toutes les tâches du projet??
Après la fin du backlog
On a fait une réunion pour discuter les tâches
Chacun entre nous acommencé à apprendre les technologies nécessaires comme firebase or autres

authors: ChirazeHaidar pascalfares


text:
Implemented generic error type

By adding a generic error type that also conforms to the Equatable protocol, we can make sure the validation result can be correctly tested if the validation returns errors.
Before, we couldn't test if the returned errors where matching the expected ones.

I think what this is achieving is great but find it rather odd that so much emphasis is being given to the error. It makes using the framework a little too verbose than I would like since I have to specify the error type whenever I want to use ValidationResult.
When default generic arguments become a thing, this won't be an issue. But, for now if it is possible to achieve the same thing by using a typealias, I would make that trade-off.

@htinlinn I agree with you that the notation can be verbose, but I don't think the framework should provide a typealias necessarily. It should be up to the developer using the framework to decide wether to use a typealias or not.
I updated the tests to reflect this, I will also update the README accordingly.
Default generic arguments would be a nice addition indeed when Swift 4 comes out!

One last plea: just so we are on the same page, here is what I was imagining when I mentioned typealias.
public enum ValidationResult {
  typealias ErrorType = Error & Equatable

  case valid
  case invalid([ErrorType])
}

IMO, this gives you the best of both world. You are still able to use Equatable for your tests and create custom ErrorType types if you need to. At the same time, it is less verbose because you don't need specify what ErrorType is. Unless I am missing something, this gives you all the upsides of going the generic approach, right?

@htinlinn unfortunately this is not possible, because Equatable is a generic type. You need to use generics or associated types (not available for enum) in order to have an Equatable conformance.
Xcode:
ValidationResult.swift:15:35: Protocol 'Equatable' can only be used as a generic constraint because it has Self or associated type requirements

Agree with you regarding the verbosity, although I don't think it's that much of a problem since it brings clarity on what you manipulate. And defining your typealias at the application level can mitigate the problem.
What do you think?

@ThibaultKlein oh! I did not think that was gonna be a problem. Okay then!

authors: ThibaultKlein htinlinn

repo: prolificinteractive/GenericValidator


text:
Please Add Bind Skill On Specific Weapons?

Is there any way to bind skills to specific weapons?
/class bind can only be bound to the hand-held item.
Although Skill-GUI is the only way, I want the player to trigger skills based on combos on specific weapons.
I hope to add /class bind   because if it is the item ID, I can't make all RPG swords/custom weapons have different skills.

So, are you wanting weapons to trigger skills? like custom enchantments?

This was added a while ago through ProRPGItems

authors: Hoshino2001 Travja goflishMC

repo: promcteam/proskillapi


text:
Update alerts argument order, rename expired to inhibited

rename expired to inhibited
order for silenced and inhibited was reversed (cf. https://github.com/prometheus/alertmanager/blob/master/client/client.go#L155-L160)

the API is not properly filtering responses, but that's for a different PR.
@simonpasquier

:+1:

repo: prometheus/alertmanager


text:
Transfer template functions into types+methods

Thinking a bit, having type specific functions might not be the easiest to understand for users. This is another approach using dedicated types (based on strings only).
I expect the case of excluding certain labels etc. to be frequent enough to add a Without method and strings.Join. For the default subject this simplifies the previous conditional with scoping issues into
{{ with .CommonLabels.Without .GroupLabels.Names }}{{ join .Values " " }}{{ end }}
Also reduces the need for another conditional to remove the trailing space.
@brian-brazil

I like the general idea, the Without function should probably remain separate though.

:+1:
I'm not quite happy with the function being a method, but we can try it and see how it goes. The templates up to now have avoided any OOP.

Since they depend on certain non-primitive input types, I think it's better to attach them directly to those types rather than having different functions with generic names that take different, possibly non-obvious, types.
Especially Names and Values are now easy to use on Pairs and KV with the same result without any runtime magic. From the user end I find it more intuitive.

authors: brian-brazil fabxc


text:
Address already in use

Hello!
Im pretty new and hopefully its a newbie question. I have been trying to work with Prometheus and Python where I am trying to use multiple python instance to connect and "push" to promethetus. What I did was:
sydsvenskan.py
    import time

    import requests
    from prometheus_client import Counter, start_http_server

    REQUEST_COUNT = Counter(
        namespace="scraper",
        name="request_count",
        documentation="Count the total requests",
        labelnames=['http_status']
    )

    def monitor_feed():
        while True:
            with requests.get("https://sydsvenskan.se") as rep:
                print("Request made!")
                REQUEST_COUNT.labels(http_status=rep.status_code).inc()

            time.sleep(10)

    if __name__ == '__main__':
        start_http_server(8000)
        monitor_feed()

BBC.py
    import time

    import requests
    from prometheus_client import Counter

    REQUEST_COUNT = Counter(
        namespace="scraper",
        name="request_count",
        documentation="Count the total requests",
        labelnames=['http_status']
    )

    def monitor_feed():
        while True:
            with requests.get("https://bbc.com") as rep:
                print("Request made!")
                REQUEST_COUNT.labels(http_status=rep.status_code).inc()

            time.sleep(10)

    if __name__ == '__main__':
        start_http_server(8000)
        monitor_feed()

Whenever I run the first script it works fine but as soon as I am starting to run the second script it returns:
OSError: [Errno 98] Address already in use
What am I doing wrong?

Hello, it looks like both of your services are trying to start on port 8000, you will need to change the port on one of those services if running on the same instance.
Also, note that Prometheus will pull metrics from your services, not push metrics from your application to Prometheus, unless you are using something such as the PushGateway.

Hello, it looks like both of your services are trying to start on port 8000, you will need to change the port on one of those services if running on the same instance.
Also, note that Prometheus will pull metrics from your services, not push metrics from your application to Prometheus, unless you are using something such as the PushGateway.

Oh I see... so if I created each port for each file then that should be fine I guess? if I understood it correctly.

Yep, so use 8000 in one file and 8001 in the other (or something like that).
I am going to close this issue as I don't think there is anything wrong with this library.

authors: BarryThrill csmarchbanks


text:
Update CONTRIBUTING.md for DCO, test, and lint

Mention the DCO signing requirement and link wiki page with details.
Add section on testing requirements and tools.
Add section on code style and lint details.

Thanks!


text:
Add acurite_exporter and smartthings_exporter

Addition of links to acurite_exporter and smartthings_exporter

Also, the energy/power units are defined in the smartthings spec backwards. Should the exporter correct them?
See “Energy Meter” and “Power Meter” on
https://docs.smartthings.com/en/latest/capabilities-reference.html

The secret is only needed for the first call. Once it is done, you don’t need to do it again because the oauth token is cached in a file.

The key thing is that secrets shouldn't be on the command line. Beyond that how you handle it is largely up to you.

I’ll fix up the units, but when they aren’t provided by the underlying system in base units should the exporter concert them to the base unit?

Yes, where possible.

Also, the energy/power units are defined in the smartthings spec backwards. Should the exporter correct them?

Those look right to me in that spec.

Regarding the spec, I see now.  I just left the hour off the unit.  Should it be watt_hour or watthour?

What suffix would your recommend for metrics that simply indicate state.  For example, motion and presence are 1 when they are detected and 0 otherwise.

There's no specific suffix. Here I'd use something like _detected.

@brian-brazil I've seen that you don't recommend the constant metrics with timestamp approach, except in certain circumstances.  It feels like with acurite, that is the correct circumstance.  The acurite  access or smarthub device will post metrics to atlasapi.myacurite.com every 5 minutes.  On the local network atlasapi.myacurite.com resolves to the server running acurite_exporter.  So, seems like the acurite_exporter needs to keep the samples around for eventual scraping from prometheus.  Does this seem right?

Seem good now?
...
# HELP smartthings_alarm_cleared 0 if the alarm is clear.
# TYPE smartthings_alarm_cleared gauge
smartthings_alarm_cleared{id="",name="Workshop Smoke Detector"} 0
# HELP smartthings_battery_percentage Percentage of battery remaining.
# TYPE smartthings_battery_percentage gauge
smartthings_battery_percentage{id="",name="Workshop Smoke Detector"} 94
# HELP smartthings_contact_closed 1 if the contact is closed.
# TYPE smartthings_contact_closed gauge
smartthings_contact_closed{id="",name="Workshop Smoke Detector"} 0
# HELP smartthings_energy_usage_joules Energy usage in joules.
# TYPE smartthings_energy_usage_joules gauge
smartthings_energy_usage_joules{id="",name="Heater, Workshop"} 3.532301728438278e+08
# HELP smartthings_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which smartthings_exporter was built.
# TYPE smartthings_exporter_build_info gauge
smartthings_exporter_build_info{branch="",goversion="go1.11.2",revision="",version=""} 1
# HELP smartthings_invalid_metric Total number of metrics that were invalid.
# TYPE smartthings_invalid_metric counter
smartthings_invalid_metric 0
# HELP smartthings_power_usage_watts Current power usage in watts.
# TYPE smartthings_power_usage_watts gauge
smartthings_power_usage_watts{id="",name="Heater, Workshop"} 1350.7
# HELP smartthings_presence_detected 1 if presence is detected.
# TYPE smartthings_presence_detected gauge
smartthings_presence_detected{id="",name="iPhone"} 0
# HELP smartthings_smoke_detected 1 if smoke is detected.
# TYPE smartthings_smoke_detected gauge
smartthings_smoke_detected{id="",name="Workshop Smoke Detector"} 0
# HELP smartthings_switch_enabled 1 if the switch is on.
# TYPE smartthings_switch_enabled gauge
smartthings_switch_enabled{id="",name="Heater, Workshop"} 1

Made all the changes you suggested and released v0.0.1 of both.

So, seems like the acurite_exporter needs to keep the samples around for eventual scraping from prometheus. Does this seem right?

This is a case where timestamps may make sense, however as the data is more than 5 minutes old it'd cause staleness issues for most users. I'd not use timestamps in this case.
You're still taking a password on the command line.

Yes, that password is part of a registration step needed to complete OAuth.  I guess we could prompt for the password (maybe using something like (Terminal.ReadPassword)[https://godoc.org/golang.org/x/crypto/ssh/terminal#Terminal.ReadPassword]), but it would need to be cross platform.  During the normal execution of the exporter, there is no password
Acurite SmartHub/Access only posts data every 5 minutes.  Can you explain how the data will cause staleness.  Also, what are the issues?

For timestamps data, I tend to expose those directly as a metric. For example if you have the timestamp of of the last alarm event, you could expose this:
smarthings_last_alarm_seconds X

This way you can do things like time() - smarthings_last_alarm_seconds for the time since last alarm. Or changes(smarthings_last_alarm_seconds[28d]) to find out how many alarms have happened in the last 4 weeks.
One other suggestion is to make the alarm state a "positive" bool. smartthings_alarm_cleared -> smartthings_alarm_present.
As for the password, the recommended method is to read it from a file.

Acurite SmartHub/Access only posts data every 5 minutes. Can you explain how the data will cause staleness. Also, what are the issues?

If you exposed the true timestamp, once the data was 5 minutes old then it'd no longer be returned by instant queries.

Thanks for the feedback. Unfortunately I thjnk I only have whether it is alarmed or not, not when it happened.
I like the idea of using _present. How would you do it if there are 3+ states (smoke detector can be clear, detected, or tested).
My thinking is that at exporter config time the password would be prompted for. The config is interactive. The resultant token needs to be provided to the exporter during its standard run as a file.

@brian-brazil. Got it. So with the acurite posted time stamp there may be an edge case where there are no instant metrics. In stat case, it will probably be fine to have the exported remove the time stamp from the metric, but keep it for ageist off the sample.

I like the idea of using _present. How would you do it if there are 3+ states (smoke detector can be clear, detected, or tested).

Depends on those states, can it be both "clear" and "tested" simultaneously?
If it comes back as one of 3, I would probabl make an ENUM.
smarthings_smoke_detector_status{state="clear"} 1
smarthings_smoke_detector_status{state="detected"} 0
smarthings_smoke_detector_status{state="tested"} 0

If we're following openmetrics, that'd be:
smarthings_smoke_detector_status{smarthings_smoke_detector_status="clear"} 1
smarthings_smoke_detector_status{smarthings_smoke_detector_status="detected"} 0
smarthings_smoke_detector_status{smarthings_smoke_detector_status="tested"} 0

That’s great!
—
Joel Baranick
jbaranick@gmail.com

From: Brian Brazil notifications@github.com
Sent: Wednesday, December 5, 2018 3:41 AM
To: prometheus/docs
Cc: Joel Baranick; Author
Subject: Re: [prometheus/docs] Add acurite_exporter and smartthings_exporter (#1231)
If we're following openmetrics, that'd be:
smarthings_smoke_detector_status{smarthings_smoke_detector_status="clear"} 1
smarthings_smoke_detector_status{smarthings_smoke_detector_status="detected"} 0
smarthings_smoke_detector_status{smarthings_smoke_detector_status="tested"} 0
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/prometheus/docs/pull/1231#issuecomment-444456523, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB0RAu-pUn95jF5USougNBBJx_LznLS9ks5u17DogaJpZM4Y_TDi.

@brian-brazil Does the exporter need to know about all the status values for the smarthings_smoke_detector_status metrics  and when it pulls the value clear from Smartthings then explicitly set the smarthings_smoke_detector_status{status="clear"}==1 and the others to 0?
What if you don't know all the status values up front, or don't want to require them to be coded into the exporter?

Does the exporter need to know about all the status values

It should.

What if you don't know all the status values up front, or don't want to require them to be coded into the exporter?

Then you're best leaving it as an integer. I imagine this list won't change though.

@brian-brazil/@superQ as far as I can see the token is being read from a file now.
There is a step to generate the secrets file which requires a different secret to be passed in the CLI. As it is just the generation step and not involved in the actual running of the exporter, can we merge this in?

Passing secrets on the command line is passing secrets on the command line. The code shouldn't allow it, and the docs shouldn't mention it.
The entries also need to be sorted.

authors: SuperQ brian-brazil gouthamve kadaan

repo: prometheus/docs


text:
strings.TrimRight is used instead of TrimSuffix

This line aims to remove " kB" suffix, but instead removes all characters from " kB" cutset.
https://github.com/prometheus/procfs/blob/cdc45126aef95c2e741f1d56ded3d24fdcd3d167/proc_smaps.go#L130
Similar fix as was done in this commit is required - https://github.com/prometheus/procfs/commit/b3d77ecba8e7aeb7b4ff946644b1013199656c42 .

Oops, thanks! Wanna submit a quick PR to fix this?

authors: GrosQuildu discordianfish

repo: prometheus/procfs


text:
Cannot see alert if it's value is below threshold

Proposal
Imagine a situation where we have an alert and 2 set of metrics labels. Imagine also that the alert is firing on one set of labels (so the value exceeds the threshold) and is okay on the other one.
With that, I am only able to see (in Prometheus ui or Grafana) that only one alert is firing, and the metrics sets where the value doesn't exceed a threshold are not displayed at all, so I have no idea about the second one if it actually exist and it's state.
In Grafana 8, with new ngalert system, you can set a metric to watch, and in a different step set a threshold, so for all labels set an alert is created, and then it's assigned a state (firing/pending/okay). That way, with the situation described above, there are 2 alerts displayed, one is OK and the other one is firing, while same in Prometheus will produce only one firing alert.
It'd be awesome if that behaviour can be implemented in Prometheus. Do you think it's possible to implement?

What would be your exact proposal here? Do you have anything concrete you can think of?

@roidelapluie  One way I see as a solution is splitting expr into two fields, one would be the metric itself without any thresholds, and the other would be a threshold itself. So, combined they would provide the same info that expr provides, but the API then can be updated to return all metric sets, even those where the value does not exceeds the threshold.
That's almost the same as Grafana alerts work.

I think the problem is that Prometheus alerts aren't just limited to comparing a metric to a threshold. Arbitrary PromQL expressions can be used as an alert, and that alert is considered firing if the expression yields a non-empty result.
Determining what time series that were evaluated for an alerting expression actually contributed to the elements in the output vector and which didn't is really hard in the general case, if not even plainly impossible in some cases.

@beorn7 agree, one of the options to get over it would be to make the older approach work, and add a new one (with two separate fields). do you think it's manageable?

But that assumes that every alert has a threshold. However, that's not the case. And even if there is a threshold, the operator between the threshold and the remaining expression can be vastly different. It feels to me as complicating the interface with a questionable benefit.

Hello from the bug-scrub! With no agreement over the proposal and no activity for two years, we will close this.

repo: prometheus/prometheus


text:
include_scrape_configs

What did you do?
Well, none of the templates really apply to this kind of thing.
include_scrape_configs here does not exist anywhere. In the documentation it is referred to as scrape_config_files.
You might also fix the release notes and the blog article.
What did you expect to see?
No response
What did you see instead? Under which circumstances?
yada
System information
No response
Prometheus version
No response
Prometheus configuration file
No response
Alertmanager version
No response
Alertmanager configuration file
No response
Logs
No response

https://github.com/prometheus/prometheus/pull/12178

Sorry about this! I based the changelog on the pull request name, which was a temporary name

We have fixed this.

authors: datamuc roidelapluie


text:
Shoud OpenMetrics be compatible with or consider dropwizard metrics?

Dropwizard metrics format is diffrent from prometheus metrics. And now, dropwizard metrics is widely used in in the field of big data, like Hadoop，Kafka，Spark，JStorm.Shoud OpenMetrics be compatible with or consider dropwizard metrics?

Wrong repo, answered elsewhere.

authors: TsingLiang brian-brazil


text:
Fuzz test Prometheus

Just found this new tool for Go: https://github.com/dvyukov/go-fuzz
Given that it found quite a few bugs in the standard library, we will certainly find some stuff in Prometheus. Especially as we are now using two text/template style parsers ourselves that might suffer from very similar bugs as the ones found in the stdlib.

Arguably, this is more a client_golang issue (or the upcoming expfmt), but let's leave it here for now.

The query language could use a run as well ;)
On Wed, Jul 15, 2015 at 1:35 PM Björn Rabenstein notifications@github.com
wrote:

Arguably, this is more a client_golang issue (or the upcoming expfmt),
but let's leave it here for now.
—
Reply to this email directly or view it on GitHub
https://github.com/prometheus/prometheus/issues/667#issuecomment-121587617
.

Played a bit with the go-fuzz, first implementing promql/fuzz.go, by testing all the Parser*()-functions:
package promql
// +build gofuzz

const (
	fuzz_interesting = 1
	fuzz_meh         = 0
	fuzz_discard     = -1
)

// Fuzz the promql parser
func Fuzz(input []byte) int {
	str := string(input)

	// Parse as metric
	_, err := ParseMetric(str)
	if err == nil {
		return fuzz_interesting
	}

	// What about a selector
	_, err = ParseMetricSelector(str)
	if err == nil {
		return fuzz_interesting
	}

	_, err = ParseExpr(str)
	if err == nil {
		return fuzz_interesting
	}

	_, err = ParseStmts(str)
	if err == nil {
		return fuzz_interesting
	}

	return fuzz_discard
}

I then gave it a small input corpus in ./corpus/with individual files containing name{} 42, a{b="c"} 1.0 456, metric_name and avg(metric_name{}[5m]) by (key1, key2). (I'm not certain what the parser(s) are for, so I conjured some simple inputs from memory...)
Then I ran godep restore to set the current $GOPATH up with all the right versions of relevant packages. Finally, go-fuzz-build github.com/prometheus/prometheus/promql instruments the code and go-fuzz -bin=./promql-fuzz.zip -workdir=fuzz-workdir to test it out. It crashes a lot in the beginning, but restarting it a few times seem to improve things dramatically.
I got a few hundred crashing examples from running it in half an hour or so, but it looks like the stack traces are all over the place, so I'm a bit hesitant to begin opening bug-reports left and right. Also, this doesn't keep track of which parser crashes, making triage more difficult.
Right now I'm trying to do quick runs of the fuzzer with one function at a time and see what I get.

Hit in ParseMetricSelector(); it crashes on inputs .٩, G.٩ and .٩٩٩٩٩٩٩٩٩٩٩٩٩٩٩٩٩...

Reported the first cases as separate bugs. One noteworthy find was that no crashes was found in ParseMetric()...

@msiebuhr This is brilliant, thanks so much! This is exactly what we were hoping for (well, uh, not the crashes, they are bad, but that uncovering them works so well like this). @fabxc is on vacation this week and back on Monday, so it might take us a bit to get to them all, but we'll definitely address all of these soon!
Fuzzing results are scary...

I'd be happy to make a pull-request w. some tidying up, documentation &c, if you're interested.
Also, go-fuzz mentions that "thousand[s] of inputs is fine", while I started out with the five above; I have a hunch that more variety would be nice.

Fantastic!
This is basically what I expected would happen as parser and lexer are
tested against valid input and common mistakes or typos - not against the
whole variety of possible Unicode strings. I hope we can isolate a few
common root causes to fix the majority.
Definitely great work. A pull request would, of course, be awesome.
On Wed, Jul 29, 2015, 8:20 AM Morten Siebuhr notifications@github.com
wrote:

I'd be happy to make a pull-request w. some tidying up, documentation &c,
if you're interested.
Also, go-fuzz mentions that "thousand[s] of inputs is fine", while I
started out with the five above; I have a hunch that more variety would be
nice.
—
Reply to this email directly or view it on GitHub
https://github.com/prometheus/prometheus/issues/667#issuecomment-125854018
.

I've put my work in a branch, https://github.com/msiebuhr/prometheus/tree/fuzz/promql, with a fuzzer-function and corpus for each parser:
go-fuzz-build -func FuzzParseExpr -o FuzzParseExpr.zip github.com/prometheus/prometheus/promql
go-fuzz -bin FuzzParseExpr.zip -workdir fuzz-data/ParseExpr

From experience so far, the fuzzer really improves with larger corpuses. So far I've manually copy-pasted from the test-suites. I thought about just writing out the files directly from the test-suite, but I'm getting a bit too tired to hammer that out.
I also poked a bit at setting up the Makefile, but I screwed something up somewhere and thought it would be better to polish the working parts a bit more and get it out.

I've created an in-progress pullrequest over at #945.

I believe we still need to make this vaguely automatic.

Things left to fuzz:
HTTP API
Remote read

authors: beorn7 brian-brazil fabxc juliusv msiebuhr