text:
task/install: str.replace() does not keyword args

In [8]: ?s.replace
Docstring:
S.replace(old, new[, count]) -> str
Signed-off-by: Kefu Chai kchai@redhat.com

this change should address failures like http://pulpito.ceph.com/kchai-2018-08-03_12:32:11-fs-master-distro-basic-mira/2858335/

$ git grep pluggy
requirements.txt:pluggy==0.6.0             # via tox

Using /home/jenkins-build/build/workspace/teuthology-pull-requests/virtualenv/lib/python2.7/site-packages
Searching for pluggy==0.6.0
Best match: pluggy 0.6.0
Adding pluggy 0.6.0 to easy-install.pth file
...
Collecting pluggy<1,>=0.3.0 (from tox)
  Downloading https://files.pythonhosted.org/packages/f5/f1/5a93c118663896d83f7bcbfb7f657ce1d0c0d617e6b4a443a53abcc658ca/pluggy-0.7.1-py2.py3-none-any.whl
  Saved /home/jenkins-build/.cache/pip/pluggy-0.7.1-py2.py3-none-any.whl
...
docs installed: alabaster==0.7.11,ansible==2.4.3.0,apache-libcloud==1.5.0,appdirs==1.4.3,asn1crypto==0.22.0,atomicwrites==1.1.5,attrs==18.1.0,Babel==2.4.0,backports.ssl-match-hostname==3.5.0.1,beanstalkc==0.4.0,boto==2.46.1,bunch==1.0.1,cffi==1.10.0,click==6.7,cliff==2.5.0,cmd2==0.7.0,configobj==5.0.6,configparser==3.5.0,contextlib2==0.5.4,cryptography==2.1.4,debtcollector==1.13.0,deprecation==1.0,docopt==0.6.2,docutils==0.14,enum34==1.1.6,first==2.0.1,funcsigs==1.0.2,functools32==3.2.3.post2,gevent==1.2.1,greenlet==0.4.12,httplib2==0.10.3,idna==2.5,imagesize==1.0.0,ipaddress==1.0.18,iso8601==0.1.11,Jinja2==2.9.6,jsonpatch==1.15,jsonpointer==1.10,jsonschema==2.6.0,keystoneauth1==2.19.0,libvirt-python==4.4.0,manhole==1.3.0,MarkupSafe==1.0,mock==2.0.0,monotonic==1.3,more-itertools==4.3.0,msgpack-python==0.4.8,MySQL-python==1.2.3,ndg-httpsclient==0.4.2,netaddr==0.7.19,netifaces==0.10.5,nose==1.3.7,openstacksdk==0.9.15,os-client-config==1.26.0,osc-lib==1.3.0,oslo.config==3.24.0,oslo.i18n==3.15.0,oslo.serialization==2.18.0,oslo.utils==3.25.0,packaging==17.1,paramiko==2.1.2,pathlib2==2.3.2,pbr==2.0.0,pexpect==4.2.1,pip-tools==1.10.1,pluggy==0.6.0,positional==1.1.1,prettytable==0.7.2,psutil==5.2.2,ptyprocess==0.5.1,py==1.5.3,pyasn1==0.2.3,pycparser==2.17,Pygments==2.2.0,pyOpenSSL==16.2.0,pyparsing==2.2.0,pytest==3.7.1,python-cinderclient==2.0.1,python-dateutil==2.6.0,python-glanceclient==2.6.0,python-keystoneclient==3.10.0,python-neutronclient==6.2.0,python-novaclient==8.0.0,python-openstackclient==3.9.0,pytz==2017.2,PyYAML==3.12,raven==6.0.0,requests==2.12.5,requestsexceptions==1.2.0,rfc3986==0.4.1,scandir==1.8,simplejson==3.10.0,six==1.10.0,snowballstemmer==1.2.1,Sphinx==1.7.6,sphinxcontrib-websupport==1.1.0,stevedore==1.21.0,teuthology==1.0.0,tox==3.0.0,typing==3.6.4,unicodecsv==0.14.1,virtualenv==15.1.0,warlock==1.2.0,web.py==0.38,wrapt==1.10.10

so we are using pluggy 0.6.0 against pytest's will. hence the test failure is not relevant .

fix posted at #1199

repo: ceph/teuthology


text:
Fix issues in CI pipeline

This PR resolves outstanding issues with the CI pipeline.  This includes both issues with the CI configuration itself, and also build problems encountered with Scala 3 (#36, #37, #38).

I believe the CI pipeline is now working correctly, but there seems to be a legitimate problem compiling for Scala 3.2.2- see #38.  Fixes # 34, fixes #35, fixes #36 and fixes #37.

Fixes #38

Due to configuring and running Scalafix and Scalafmt on the entire code base there are too many conflicts to resolve. Could you perhaps extract only the relevant parts - i.e. changes in build.sbtand continuous-integration.yml? I can do it as well.

All the relevant parts are now in the master branch. Thanks @phelps-sg !

source: gharchive/pull-request

authors: peterbanda phelps-sg

repo: cequence-io/openai-scala-client

license: MIT

license_type: permissive

license_source: github-api


text:
fix: Implement a workaround to cel-go v.0.15.0 pruner update

Fixes #1562

I'll close this for now.

repo: cerbos/cerbos


text:
JSONAPI::ResourceSerializer does not follow config.route_format

render json: JSONAPI::ResourceSerializer
  .new(
    Api::V1::SessionsResource,
    include: ['country', 'state', 'city', 'phone-numbers']
  ).serialize_to_hash(Api::V1::SessionsResource.new(@resource, nil))

This way i cant get my phone numbers, but when i change phone-numbers to phone_numbers it works. However my JSONAPI.configure { config.route_format = :dasherized_route } and everywhere else i may use only relationships/attributes only in that format.
So i just guess JSONAPI::ResourceSerializer does not follow config.route_format

The serializer expects fields and includes to be in the normal underscored format. The formatters are applied before ResourceSerializer is called in the normal workflow. Since you are manually calling the Serializer you will need to handle that step.

source: gharchive/issue

authors: Fedcomp lgebhardt

repo: cerebris/jsonapi-resources

license: mit

license_source: bigquery


text:
Upgrade: Greenkeeper/html webpack plugin 4.2.0

What is the purpose of this pull request? (Check any that's applicable)

[ ] Feature
[ ] Bug fix
[x] Dependency updates
[ ] Documentation updates
[ ] Build related changes
[ ] Changes an existing functionality
[ ] Other, please explain:

Does this introduce a breaking change?

[ ] Yes
[x] No

What changes did you make? (Give an overview)
Upgraded html webpack plugin version to 4.2.0
Add any screenshots

To avoid multiple release's, closing manually created PR's.

repo: cerner/carbon-graphs


text:
[spike] Explore ways to enable live-reload of components in non-prodcution environment

Issue Description
We switched our example code from referencing src files in https://github.com/cerner/terra-core/pull/165 to resolve https://github.com/cerner/terra-core/issues/98
The benefit of this was it allowed us to test the examples in the same format a consumer would use them, (CJS module), which is good. With the change though, we lost the ability to live reload. This makes developing more cumbersome, (need to compile code manually to see changes), and its proven confusing to new contributors.
Issue Type

[ ] New Feature
[x] Enhancement
[ ] Bug
[ ] Other

Expected Behavior
Document and explore options to keep testing the commonJS distributed code, while enabling live reload of ES6+ code in the local development environment.

Possible option
Using webpack -p will automatically invoke setting process.env.NODE_ENV="'production'". We can use the absence of this to detect that we are in a development environment. Webpack also includes a resolve matcher for a package.json's main field. It uses this to determine which "main" fields to resolve. By default, resolve.mainFields is equal to ["browser", "module", "main"].
If a package.json includes a browser or module key, webpack will resolve that instead of the main key.
For example. With the following import code:
import Button from 'terra-button';

And the following properties in the terra-button package.json
{
  ...
  main: 'lib/Button.js',
  module: 'src/Button.jsx',
  ...
}

This will resolve to the file in the module property. The module property takes precedence here because it comes before main in webpack's default resolve.mainFields.
For our case of wanting to test the commonJS distributed code, while enabling live reload of ES6+ code in the local development environment, I think we can use a combination of these.
In our PR deployments and code that is run in tests / CI, we run webpack with the -p flag. For local development, we run wepack without the -p flag.
Using that we can add a check like:
mainFields: process.env.NODE_ENV === 'production' ? [ 'browser', 'module', 'main'] : ['terraSrc', 'browser', 'module', 'main'],

This would use the default array webpack uses to resolve mainFields in production, and if we are running our webpack config in non-production, we'd add a custom entry which would resolve a custom property added to our package.json's terraSrc.
This requires adding the following to all package.json files
{
  ...
  main: 'lib/Button.js',
  "terraSrc": 'src/Button.jsx',
  ...
}

Possible Option
Another possible solution I'm looking into is using babel-plugin-module-resolver
It looks like you can set babel-env similar to webpack so we could use the module resolver only in a development env. Example of development and production configs for babel: https://gist.github.com/rmoorman/94eeed830942758e218d92f15ce58d88
Here's an example of what this might look like for the .babelrc file.
{
  "presets": ["es2015", "react"],
  "plugins": ["transform-object-assign", "transform-object-rest-spread"],
  "env": {
    "development": {
      "plugins": [
        ["module-resolver", {
          "alias": {
            "terra-button": "./packages/terra-button/src/Button.jsx",
          }
        }]
      ]
    }
  }
}

We would need an entry for every terra package.

An option would be to offload webpack aliasing to the terra-dev-site. Here we could simply iterate through a repositories 'packages' if the directory exists and add an alias for each component(s). Then, we could add a process env to our test scripts to indicate when want to reference src vs lib.

terra-dev-site provides live-reload. If need to explore additional live-reloading, we can come back and revisit this issue.

authors: bjankord emilyrohrbough

repo: cerner/terra-core


text:
Update Node to use LTS, update engine requirement in package.json

Feature Request
Description

It is proposed that instead of locking down to a specific Node version in the .nvmrc, we should be pointing to use the LTS.
As of nvm v0.33.6 nvm supports the use of lts/* for long term support in the .nvmrc config file.

You can reference LTS versions in aliases and .nvmrc files with the notation lts/* for the latest LTS

This way we don't have to worry about manually updating the Node version and we will always target LTS Node.
# .nvmrc
lts/*

It is proposed to update the engine requirement to use both Node v8.x and v10.x.
The new Node LTS version is 10.x which causes issues with Terra since it's still on 8.x (now in maintenance).
# package.json
"engines": {
  "node": "^8 || ^10"
}

Additional Context / Screenshots

This update sounds good to me, we'll want to update the engine key in our package.json files across various projects we've defined that key.
cc/ @ryanthemanuel @mjhenkes

I like this idea but a concern I have is that lts/* is not explicit enough, you may end up with 8.x or 10.x, for now you'll get 10.x, but you can imagine at some point, you'll get 12.x likely without being aware that your project is starting to use a new lts version.
I do like the idea of loosening the range on engines, we can update it to "node" : ">=8.9.2".
Would this resolve the issue you're running into @dev-cprice?

@bjankord I believe that will solve the engine problem, at least. yarn will error out based on the engine reqs, but npm won't.
As for the .nvmrc.. I know that this is a component library and it shouldn't push too many opinions onto its consumers, but I feel like requiring users to at least be on the LTS node isn't too much of an ask. It's not the EDGE version, but rather the currently supported version.

the .nvmrc only affects building this project itself and doesn't push any opinions on consumers.

"node" : ">=8.9.2" should match node 8.9.2 or above, so node 9.x, node 10.x would be valid. Does yarn not handle node engine ranges specified this way?

How about instead of lts/*, we lock it down to 8.x at least? If we do lts/carbon it will pull in all minor & patch versions of 8.x carbon

lts/carbon sounds fine to me. Does setting ^8.9.2 in the .nvmrc file do the same thing? That caret syntax may be an npm only thing that nvm doesn't parse.

authors: bjankord dev-cprice mjhenkes


text:
Screen Readers tab to the second displayed panel instead of the main content.

Bug Report
Description
When using the Slide Panel, the first content that gets accessed when browsing with the arrow keys is the panel content instead of the main content. Most likely, it should be the main content that is accessed first.

Resolved in https://github.com/cerner/terra-framework/pull/289

authors: JakeLaCombe bjankord

repo: cerner/terra-framework


text:
[terra-date-input] Adding initial hot keys

Summary
 Adding 'T', '-', and '+' hot keys to set date on an empty date input or to increment or decrement the date by a day.

Closes #
Deployment Link

https://terra-framework-deployed-pr-#.herokuapp.com/
Testing

Additional Details

Thank you for contributing to Terra.
@cerner/terra

What about spec tests for pressing the keys in a Month input? I see day and year but I didn't see month tests.

What about spec tests for pressing the keys in a Month input? Seems like those would be good to have.
@elliott-hoffman-cerner
Due to innate browser handling of key presses in  tags, we held off implementing the hot keys for the month select option. The specfic issue was our select has a default option that is "- Select -" so when we would press the "-" key it would automatically move the month select to that option before doing our hotkey logic. When that happens we never get a valid date so we would always use today. Similar issue with the "T" key. There was general concerns about later hotkeys depending on what they were.

Will the dev site doc to describe the hotkey behavior be part of this PR?

I think we should have some documentation describing what hotkeys are supported, their behaviors, and call out that hotkeys is not supported for the month select. We can update the documentation as we add more key sequences in the future.

Added an initial doc site here: https://github.com/cerner/terra-framework/pull/1483/commits/dd3e6dc41a56878639934809718021976e808f6e Can change it if we need to.

General comment: it would be even better if you could keep state from becoming invalid. As written, you're waiting until the key press handler to check state validity - but what if the state is invalid yet the user never presses these keys? Would the state keep being invalid and isn't that dangerous? Assuming the answer is yes - the refactor would be to place the validation before the state is updated.
(state) Garbage in -> Garbage out, you know?

General comment: it would be even better if you could keep state from becoming invalid. As written, you're waiting until the key press handler to check state validity - but what if the state is invalid yet the user never presses these keys? Would the state keep being invalid and isn't that dangerous? Assuming the answer is yes - the refactor would be to place the validation before the state is updated.
(state) Garbage in -> Garbage out, you know?
Now, if the answer is "no it's fine to let the state be garbage" then I argue we don't need this state at all: instead just pull the values from the input within your event hander.

I think for the most part we already have code that does this. I know you can't type in 1800 as a date for instance cuz when you try to put in the last 0 it won't let you, same with trying to type 33 for a day. The validation is for "unfinished" dates that have been put in.

authors: BenBoersma elliott-hoffman-cerner


text:
🛑 Pirani Freemium - WEBSITE is down

In 35a65ac, Pirani Freemium - WEBSITE (https://www.piranirisk.com) was down:

HTTP code: 403
Response time: 123 ms

Resolved: Pirani Freemium - WEBSITE is back up in 7f3415a.

repo: cero-pirani/Pirani-status-upptime


text:
[Feature Request]: Ability to set PathLength for Sub CA certificates

Describe why this change is needed
With this PR https://github.com/cert-manager/aws-privateca-issuer/pull/55 we are introducing the ability to issue subCA certificate when the isCA flag is toggled. This is a feature request to add the ability to modify the subCA template ARN to use something besides a path length of zero.
Describe solutions and alternatives considered (optional)
This could possibly be done as a flag set on the issuer, that when set, is evaluated and used to set the appropriate template arn when issuing the subCA certificate.
Is there anything else you would like to add?
No response

We opened this issue to gauge interest from users of this plugin. There hasn't been any feedback but please re-open and comment if you need this feature.

authors: anbaig divyansh-gupta

repo: cert-manager/aws-privateca-issuer


text:
Changed Renovate Schedule to Wednesday, fixed commit message suffix/prefix

Since oncall switches on Tuesday, it makes more sense for dep updates
to be Wednesday, so it's once per oncall rotation
Commit message suffix is set to '[SECURITY]' by default, so we want to
switch that to nothing so it's only prefixed by '[SECURITY]'
Commit message suffix/prefix is string typed, so removed the
surrounding brackets of prefix

Signed-off-by: Brady Siegel brsiegel@amazon.com

/approve

authors: Hamidhasan bmsiegel


text:
Detecting Gateway hostnames based on attached HTTPRoutes

Is your feature request related to a problem? Please describe.
The Listener.hostname field is optional. The field HTTPRouteSpec.hostnames is normally used to match "virtual" hostnames to backends. If hostnames are not specified in the listener, they may still be known by routes that support hostname matching (which I think is only HTTPRoute and GRPCRoute right now.)
It would be practical if I didn't have to duplicate listeners for cert-manager, when the Gateway API (using Envoy in my case) supports not doing it.
Describe the solution you'd like
Checking supporting routes for additional hostnames, and matching the routes to gateway listeners would be the obvious solution.
This also means that a single listener in a Gateway may serve multiple hostnames, which AFAICT, cert-manager does not currently support. (?)
Describe alternatives you've considered
It is possible that GatewayStatus.addresses contains hostnames that could be used instead. I have yet to investigate that.
Edit: No, it doesn't look like it is populated with information from routes by Envoy.
Almost-duplicating listeners doesn't feel as nice as just adding a route resource. Coming from Traefik using route discovery with Docker labels, this is more tedious.
/kind feature

Some more research... Since routes link to one or more Gateways using a parentRefsarray, I think the way to implement this is

Copying what the Certificate event handler does to listen to HTTPRoute et al., but queueing the parent refs.
The gateway lookup is augmented to also list routes with matching parent ref. I don't think there's an efficient way of doing that, but hopefully the cache makes that a non-issue.
A list of hostnames is built by combining these resources. Then the hostname check looks at the union.
The assignment of hostnames to certs must also use that list. If a Listener has a list of hostnames, the route hostnames should be ignored for that listener's certificate. (Gateway API says that the intersection of routes and listener hostnames decides routes.)

This seems doable without that much change.

... and here is an untested PoC: https://github.com/cert-manager/cert-manager/compare/master...tommie:cert-manager:httproute?expand=1

Not just HTTPRoute, but also GRPCRoute and TLSRoute. Anyt spec that has a list of hostnames.

Ok.

This could perhaps be left open? Seems like a very valid use-case.

Another use case: apart from hostnames with domains, currently we use short names without domain part for many services in Ingress. Ingresses contain two host sections: t-foobar.test.local.net and t-foobar. Cert manager generates a certificate with SANs to support both hosts. It is currently impossible to cover such usecase with a wildcard certificate on the Gateway resource.

/reopen
/remove-lifecycle rotten

Still relevant, hey @tommie can you reopen this one ?

Unfortunately, it looks lke I can't re-open if it was closed by someone else: https://stackoverflow.com/questions/61015516/how-do-i-re-open-an-issue-in-github-if-its-closed-by-a-stale-bot

Feels like it'll need a new issue then, this is quite an important design and implementation point, if you can provision httpRoutes with hostnames, and those hostnames aren't necessarily a subdomain or the same as the gateway level resource, you'll quickly run into some problems right?

We managed to circumvent this issue by creating separate listeners within the same Gateway for different hostnames.

Testing this.
/reopen

We managed to circumvent this issue by creating separate listeners within the same Gateway for different hostnames.

Yeah this is just simply unworkable in complex environments, my gateway object would end up with dozens and dozens of listeners for all the various subdomains.
This is one area where the Ingress style certificate provisioning was more flexible, because I could have a wildcard and default certificate on the ingress controller level but I could also put any domain at all in an ingress object and cert-manager could provision it assuming I passed the DN01 challenge - this was useful if not a little esoteric.

Depending on implementation, you could create separate gateways for your listeners, e.g. gateway per namespace and then routes in that namespace could use that gateway. Envoy Gateway has an option of merging gateways (mergeGateways) whereby all Gateways referring to the same GatewayClass are merged and served by the same set of Envoy Proxies. This way you'd only have a single IP address serving all configured Gateways/Routes.
Then each of these Gateways can provision TLS certs with cert manager.

Yeah good call though it's still under proposal if you're using a Gateway API implementing solution like I am.
https://github.com/kubernetes-sigs/gateway-api/issues/1863
So maybe if this gets approved I can roll with that solution longer term.

Just as an update for the thread, the mismatch between External-DNS (which looks for HTTPRoute hostnames) and Cert-manager which works on the Gateway objects has become quite the pain.
The only solution was using wildcard certificates with DNS01 challenges, which means I'm creating a wildcard DNS route, which I don't want.
I understand why this is so difficult, the TLS certificates are attached on the Gateway, so Cert-Manager can only really rely on that as the source of truth but it's really a wholly inferior experience to Ingress objects of yesteryear - DNS/Certificate all just worked.

There's the PoC I wrote last year, but never tested beyond unit tests. Perhaps we could set up some GitHub Action to build a patched cert-manager?
https://github.com/cert-manager/cert-manager/compare/master...tommie:cert-manager:httproute

authors: arkodg danielloader oivindoh sy-be sy-bee tommie uberspot

repo: cert-manager/cert-manager


text:
Adding retries when hitting 429 errors

Pull Request Motivation
Trying to solve by adding an exponential backoff when calling zerrossl acme endpoints https://github.com/cert-manager/cert-manager/issues/5867
Kind

Release Note

NONE Adding exponential backoff when getting 429s from zerossl acme endpoints

Thank you for the PR @og3og
We are always trying to be extra careful with the amount of calls made to an external ACME server due to the nature of Kubernetes and the potential size of cert-manager installation- we have had cases in past where our clients were DDoS-ing public ACME servers when retrying too diligently on 4xx errors.
So, I think we cannot accept this PR- 6 extra calls would be potentially a huge extra load to an ACME server if made by a number of clients with installations where a large number of certs are being renewed at once (as an example).
We are thinking about changing the behaviour for 429 errors- the solution there could be to look at the Retry-After header, however we need to think about how that will fit into the existing backoff structure.

@irbekrm Thanks a lot for the comment makes sense.
I was thinking of looking into pkg/acme/util/util.go to see how the current RetryBackoff is working.

@irbekrm Sounds good, thanks for taking the time to look at this!


text:
Upgrade oci-image module

https://github.com/cert-manager/makefile-modules/pull/47 needs some manual upgrade steps

/approve
/lgtm

/retest

repo: cert-manager/istio-csr


text:
Minor restructure for ko compatibility

Move cmd/main.go to cmd/trust-manager/main.go so that ko correctly builds as a trust-manager binary. This brings it into line with other go project structures.
This is a noop as far as the current build mechanism is concerned - it should generate the same thing in the same way, but this restructure facilitates an easier development/test cycle.

/ok-to-test

authors: SgtCoDFish aidy

repo: cert-manager/trust-manager


text:
Add some questions about http/php

Here some questions about http to complete this category. Some other complementary quetions may be submitted in near future ;-)

@20uf Is it possible to use some piece of code well formatted in questions ? If yes, could you give an example ?

@alxvgt If I understand correctly, you can do it as shown here.

@alxvgt If I understand correctly, you can do it as shown here.

@lex111 Thank you for your example, it will be useful in future ;-)

@alxvgt thank you!

repo: certificationy/symfony-pack


text:
add topics

I suggesting adding the topics matrix-multiplication, benchmark in the About section at https://github.com/certik/matmul

Thanks @Beliavsky. Let me know if the tags look good now.

They do -- closing this issue.

authors: Beliavsky certik

repo: certik/matmul


text:
correct ave to avg in WorldClim

cherry pick commit #97ec54f439 of @jamesmaino

Codecov Report

Merging #8 (47292f0) into master (cbb62d5) will increase coverage by 0.36%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master       #8      +/-   ##
==========================================
+ Coverage   73.89%   74.25%   +0.36%
==========================================
  Files          13       13
  Lines         203      202       -1
==========================================
  Hits          150      150
+ Misses         53       52       -1

Impacted Files
Coverage Δ

src/worldclim/climate.jl
84.00% <100.00%> (ø)

src/awap/awap.jl
100.00% <0.00%> (+4.00%)
: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 cbb62d5...47292f0. Read the comment docs.

authors: codecov-io virgile-baudrot


text:
🛑 echo-server.madacluster.tech is down

In 1d007b6, echo-server.madacluster.tech (https://echo-server.madacluster.tech) was down:

HTTP code: 0
Response time: 0 ms

Resolved: echo-server.madacluster.tech is back up in ce972dd after 15 minutes.

repo: cesarempathy/upptime


text:
Why Ruby on Rails

Leave a comment below answering -> Why did you want to learn Ruby or Rails?
Please also leave your twitter username in your comment for applaud

Rails was the first framework to get the  Model View Controller  pattern  right, and like it was in 2005 anyone, even those without any technical background can go through the rails getting started documentation and get an app running in under one hour. Ruby is a fun and beginner friendly language, with Rails you can get to love and always work with Ruby.

authors: cesswairimu ogudah

repo: cesswairimu/GirlsGetGeeky


text:
Zip

Removed .idea files

Thanks!

authors: mgoeminne terence-bigtt

repo: cetic/TSimulus


text:
README autocreation

README autocreation for every folder
As part of technical documentation, every folder has to include a README file explaning data/function of this folder.

Every folder, what's the reasoning?

If you can't explain me now every function and the meaning of every file and it's variables, then we do not need that. But I doubt it as during many discussion I've found there was a bunch of important things people dont know. One of them is their own coding (in this case ours).
Without documenting and understanding full code, there is no sense for us to develop it. And if we dont know it, who would you suppose will know it if nothing is documented.
Look up in contrib folder, there are several tools which were not really used. What do you think is the reason? I think either people did not know how to use it or it simply did not work. In both cases missing documentation would be a solution.

authors: cevap mitchellcash

repo: cevap/ion


text:
javaClass() function broken for Object, Exception, Throwable, etc

Currently:

javaClass<Object>() gives me a Class object for ceylon.language.Object
javaClass<Exception>() gives me a Class object for ceylon.language.Exception
javaClass<Throwable>() gives me a Class object for ceylon.language.Throwable

And similar problems also affect other "erased" types Basic and Identifiable.
I think this is incorrect and the correct results should be:

javaClass<Object>() gives me a Class object for java.lang.Object
javaClass<Exception>() gives me a Class object for java.lang.Exception
javaClass<Throwable>() gives me a Class object for java.lang.Throwable

This would be easy enough to fix inside the javaClass() function itself, but I wonder if the more correct place to fix it is actually in TypeDescriptor.getKlass() in the language module. WDYT, @FroMage?

Didn't you already fix this? Ah no it was javaAnnotationClass but I remember similar issues there…

No, sorry, it was unrelated.

I wonder if the more correct place to fix it is actually in TypeDescriptor.getKlass() in the language module

Well, the backend generates unerased class literals in type descriptors and does erasure somewhere else. Who knows what it would break to change this.

Well, the backend generates unerased class literals in type descriptors and does erasure somewhere else. Who knows what it would break to change this.

I don't understand.
FTR, I suspect that it would be much more correct. I don't think it's ever correct to see ceylon.language.Object anywhere at runtime.

Well no that's not true for every erased type, because we need to differenciate ceylon.language.Object, ceylon.language.Basic and ceylon.language.Identifiable and they all erase to the same java.lang.Object so we can't use erased types in TypeDescriptor.Klass.klass

OK. Well, still, perhaps what we need is a TypeDescriptor.Klass.javaClass attribute.

FTR, I suspect that it would be much more correct.

Yeah, with Class being invariant, I would expect this to always pass:
shared void check<T>(Class<T> clazz, T&Object instance) {
    assert (clazz.isInstance(instance));
}

I'm now using TypeDescriptor.getJavaArrayClass() which does deal with erasure.

authors: FroMage gavinking jvasileff

repo: ceylon/ceylon-sdk


text:
No runtime type argument for Element type of stream for iterable argument

Noticed by @Zambonifofex on gitter, LazyIterables created for iterable arguments are missing type arguments on JS.
import ceylon.language.meta { type }

shared void checkArg<Element>({Element*} elements) {
    print(type(elements)); // ceylon.language::LazyIterable (no element type!)
    assert (is {Element*} elements); // this should fail given the bad type of elements, no???
    assert (elements.sequence() is Element[]); // assertion fails
}

shared void run() {
    checkArg { 1, 2, 3 };
}

ceylon.language::LazyIterable
/Users/jvasileff/opt/ceylon-1.3.2/repo/ceylon/language/1.3.2/ceylon.language-1.3.2.js:290
if (!cond)throw wrapexc(AssertionError(msg),loc,file);
          ^

Error: Assertion failed:
        violated elements.sequence() is Element[]
        at run.ceylon (18:11-18:44)
    at AssertionError (/Users/jvasileff/opt/ceylon-1.3.2/repo/ceylon/language/1.3.2/ceylon.language-1.3.2.js:4112:6)
    at Object.asrt$ (/Users/jvasileff/opt/ceylon-1.3.2/repo/ceylon/language/1.3.2/ceylon.language-1.3.2.js:290:25)
    at checkArg (/private/var/folders/cw/vkgzjns15b14q4r5g992gwdw0000gn/T/tmp.PWKau83x/modules/simple/1.0.0/simple-1.0.0.js:14
:5)
    at run (/private/var/folders/cw/vkgzjns15b14q4r5g992gwdw0000gn/T/tmp.PWKau83x/modules/simple/1.0.0/simple-1.0.0.js:20:126)
    at [eval]:1:456
    at ContextifyScript.Script.runInThisContext (vm.js:25:33)
    at Object.exports.runInThisContext (vm.js:77:17)
    at Object.<anonymous> ([eval]-wrapper:6:22)
    at Module._compile (module.js:570:32)
    at bootstrap_node.js:357:29
ceylon run-js: Node process exited with non-zero exit code: 1

Yeah, you seem to be right about the lack of types. I thought the type of .sequence() (or .sort() in my case) was ArraySequence<Comparable<Integer>> because I had tested the type against ArraySequence<Comparable<Integer>> using .exactly, and that seems to always return true for any ArraySequence type since the ArraySequence doesn’t have type arguments.

The problem here is that the argument LazyIterable.Element is a reference to checkArg.Element and is not being resolved.

authors: Zambonifofex chochos jvasileff

repo: ceylon/ceylon


text:
Log to console that unzip is needed for theme install

theme-install.sh needs unzip on server and if there is no unzip, theme cannot be installed but there is no way to know why. Maybe log message to console, like echo 'You need unzip'... or add extract-zip with npm and use that.

Yeap, I use docker image with all requirements

It's good idea to add this log message.

In future I think we'll replace zip and unzip with native Node modules.

authors: ceracera restmount

repo: cezerin/cezerin


text:
Exception report

Any exception in dashboard show window with:

Exception title
Exception description
send report to developers (JSON to Email or API)

token revoked
no internet
no connection with API
no connection with MonoDB


text:
Refactor upload function and improve file handling

Solve issue: #178 #180 #182
Use tg channel/chat for storage
How to use?
First, you need to create a new telegram bot to obtain the token and a telegram channel to obtain Chat_ID
How to Obtain Bot_Token and Chat_ID for Telegram
If you don't have a Telegram account yet, please create one first. Then, follow these steps to get the Bot_Token and Chat_ID:

Get the Bot_Token

In Telegram, send the command /newbot to @BotFather, and follow the prompts to input your bot's name and username. Once successfully created, you will receive a Bot_Token, which is used to interact with the Telegram API.

Set the bot as a channel administrator

Create a new channel and, after entering the channel, go to channel settings. Add the bot you just created as a channel administrator, so it can send messages.

Get the Chat_ID

Use @GetTheirIDBot to get your channel ID. Send a message to this bot and follow the instructions to receive your Chat_ID (the ID of your channel).

[!IMPORTANT]
由于原有的Telegraph API接口被官方关闭，需要将上传渠道切换至Telegram Channel，请按照文档中的部署要求设置TG_Bot_Token和TG_Chat_ID，否则将无法正常使用上传功能。

如何获取Telegram的Bot_Token和Chat_ID
如果您还没有Telegram账户，请先创建一个。接着，按照以下步骤操作以获取BOT_TOKEN和CHAT_ID：

获取Bot_Token

在Telegram中，向@BotFather发送命令/newbot，根据提示依次输入您的机器人名称和用户名。成功创建机器人后，您将会收到一个BOT_TOKEN，用于与Telegram API进行交互。

设置机器人为频道管理员

创建一个新的频道（Channel），进入该频道后，选择频道设置。将刚刚创建的机器人添加为频道管理员，这样机器人才能发送消息。

获取Chat_ID

通过@VersaToolsBot获取您的频道ID。向该机器人发送消息，按照指示操作，最后您将得到CHAT_ID（即频道的ID）。
或者通过@GetTheirIDBot获取您的频道ID。向该机器人发送消息，按照指示操作，最后您将得到CHAT_ID（即频道的ID）。

最后去Cloudflare Pages后台设置相关的环境变量（注：修改环境变量后，需要重新部署才能生效）

环境变量
示例值
说明

TG_Bot_Token
123468:AAxxxGKrn5
从@BotFather获取的Telegram Bot Token。

TG_Chat_ID
-1234567
频道的ID，确保TG Bot是该频道或群组的管理员。

本地运行命令，需先按照Cloudflare官方文档安装wrangler
npx wrangler pages dev ./ --kv "img_url" --port 8080 --binding BASIC_USER=admin --binding BASIC_PASS=123 --binding TG_Chat_ID=[Your Chat ID] --binding TG_Bot_Token=[Your Telegram Bot token] --persist-to ./data
Reference:
@x-dr/telegraph-Image
@MarSeventh/CloudFlare-ImgBed

I tried, it workds. Thank u a lot!!!

您好，所以现在是要拉取这个分支重新部署吗？

Still buggy for upload video, it will changed to images mimetype

repo: cf-pages/Telegraph-Image


text:
Add 'Paste while reconstructing path' script?

Hello. I have another suggested script that, I think, would be useful for you to consider implementing.
Nautilus has no graphical way, that I'm aware of, to generate multiple folders nested in a path. What I mean by that is if you were in ~ and you needed to create ./some/large/number/of/nesting/folders/potentially/a/very/large/number/of/folders you would have to do this manually in multiple clicks, or you'd have to resort to mkdir -p if you wanted to do this in any sort of efficient manner.
(KDE's Dolphin can do something similar, but to my knowledge, Nautilus cannot)
A real, practical use case I face for this is moving files between Wine prefixes, where a receiving Wine prefix expects the file in a specific folder structure. If a file is in ~/.local/share/Steam/steamapps/compatdata/1111111/pfx/drive_c/users/steamuser/AppData/Roaming/tracking/userFiles/settings/profile/settings.xml and I want to move it to the same location in another Wine prefix, such as ~/.local/share/Steam/steamapps/compatdata/222222/pfx/drive_c/ I have to reconstruct the /users/steamuser/AppData/Roaming/tracking/userFiles/settings/profile/ by hand (or via mkdir -p), which is also error-prone in case of capitals and other complexity.
The solution to this would be a script that can paste while reconstructing the origin path. The logic would be thus:

User would copy source files as normal.
Upon invoking the script, the logic would look at the name of the folder where it is being pasted.  If the folder name is the same as one of the folders in the path of the copied content, it would create any path found after the matched folder name, and paste the file(s) in the same location as the original path.

So, to use the above example, if I copied ~/.local/share/Steam/steamapps/compatdata/1111111/pfx/drive_c/users/steamuser/AppData/Roaming/tracking/userFiles/settings/profile/settings.xml and pasted it into ~/.local/share/Steam/steamapps/compatdata/222222/pfx/drive_c/, the script would identify that drive_c is present in the source path, and would create /users/steamuser/AppData/Roaming/tracking/userFiles/settings/profile/ (perhaps using mkdir -p?) and put settings.xml into it.
Please let me know if you need any clarification. I know this is not exactly an everyday operation, but I have personally found myself needing to resort to mkdir -p often enough that having a graphical way to do this would be helpful.
Thank you for all your efforts so far.

Hi @ak-42 ! Thanks for the feature request!
I understood the idea of the script. In fact, this new script can be useful when you have similar folders structures along the disk.
I will think about the logic of the script. I think it is not difficult.
The problem is just finding a combination of shortcuts to trigger this new script. Because Nautilus does not show the script menu if no file or directory has been selected...

Hi again! After a long time thinking, while I understand the convenience such a feature would offer, I'm afraid that implementing a solution as specific as the one you've described will not be useful for many other users... As you mentioned, this operation might not be an everyday task for most users, and it could potentially add complexity to the interface for those who don't require such a feature.
For these reasons, I think that the implementation of this script will not be good.
Thank you again for your contribution, and I hope you continue to find the scripts useful for your file management needs. If you have any further questions or concerns, don't hesitate to reach out.
Best regards,

repo: cfgnunes/nautilus-scripts


text:
Delete cf-colors?

cf-core makes it obsolete so I think we should say bye to it, but let's wait until others have migrated to using cf-core.

Let's delete these deprecated repos as part of the 1.0 milestone.

I recently discovered hmda-explorer is still using cf-colors. Because that project is retired, I don't think it's a good use of our time to transition the codebase. Let's just not delete our deprecated our repos.

authors: contolini himedlooff

repo: cfpb/capital-framework


text:
Header: CFPB name overlaps search button on iOS

Short description explaining the high-level reason for the new issue.
Current behavior

CFPB name in logo overlaps with search button on iOS.

Expected behavior

CFPB name in logo should not overlap with search button on iOS.

Steps to replicate behavior

View homepage on iOS.

Screenshots
Current

Fixed

repo: cfpb/cfgov-refresh


text:
Remove popular posts for now

Just get rid of Popular posts for now, since it's causing problems.
@kave
@richaagarwal

let it go! :+1:

authors: kave kurtw


text:
Adds REFRESH_DB param and updates refresh-data script to add conditional

cfgov-refresh's docker-stack.yml currently runs the refresh-data.sh every time. This is unnecessary considering the postgres service does not redeploy when just app code changes.
This causes a couple issues:
Data modifications are lost between deploys
It makes the deploys slow. It is an expensive operation to refresh the database, pulling down the big DB archive and applying it to the running container.
Additions

REFRESH_DB parameter in the Jenkinsfile that defaults to false
Conditional logic added to the refresh-data.sh script

Removals

Changes

Testing
Run an adhoc deploy with refresh db = true
Check for django wagtail table in postgres (wagtailcore_page suggested)
Run an adhoc deploy with refresh db = false
Check for django wagtail table in postgres (wagtailcore_page suggested)
Screenshots
Notes

Todos

Checklist

[ ] PR has an informative and human-readable title
[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows the standards laid out in the CFPB development guidelines
[ ] Passes all existing automated tests
[ ] Any change in functionality is tested
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged / future todos are captured in comments
[ ] Visually tested in supported browsers and devices (see checklist below :point_down:)
[ ] Project documentation has been updated
[ ] Reviewers requested with the Reviewers tool :arrow_right:

Testing checklist
Browsers

[ ] Chrome on desktop
[ ] Firefox
[ ] Safari on macOS
[ ] Edge
[ ] Internet Explorer 9, 10, and 11
[ ] Safari on iOS
[ ] Chrome on Android

Accessibility

[ ] Keyboard friendly
[ ] Screen reader friendly

Other

[ ] Is useable without CSS
[ ] Is useable without JS
[ ] Flexible from small to large screens
[ ] No linting errors or warnings
[ ] JavaScript tests are passing

s> This is unnecessary considering the postgres service does not redeploy when just app code changes.
I have one other thought — it might be worth having the ./refresh-data.sh script run migrations even if set not to refresh the database. I think there are pros and cons to doing that automatically though. I'd be curious what @chosak thinks.

@willbarton it seems like your comment is out of date since the changes to refresh-data.sh were removed in the latest commits here? Regardless, I vote that a script named refresh-data.sh should, indeed, refresh data. 😄

authors: chosak thephillipsequation willbarton


text:
Breaks apart macros.html

Breaks apart macros.html into macros in /macros/ and /macros/util/.
Additions

Adds notification.html, subscribe.html, youtube.html, util/format.html, util/is-mobile.html, util/share.html.

Removals

Removes macros.html.

Testing

Site should function the same.

Review

@KimberlyMunoz
@jimmynotjim
@sebworks

Notes

Part of https://github.com/cfpb/cfgov-refresh/issues/597

Looks good to me. None of this touches the macro tests, but it would probably make sense to add some there in a future PR.

authors: KimberlyMunoz anselmbradford


text:
Use "clipboard" selection when copying new passwords

#1 updates calls to xclip so that existing passwords, when accessed, are copied to the "clipboard" X11 selection.
This task is for updating calls for newly-generated passwords in identical fashion.

Resolved with de2ea2209e0a4a408b111d373dd63078ba11d198.

Commit bd1ad55ccf3bd0078515eba954c29719a78e76d0 accidentally referenced this PR. Did a quick force push to fix it.


text:
Is there any way to clear the queue?

I want my crawler to iterate a number of times and clear the queue for each iteration. Can you show me an example on how to do that?

What do you want to iterate over? A set of pages or an entire site? And is it necessary to clear the queue, or do you just need to re-queue a set of URL's?

Clearing the queue completely is the best option for my use case

There's no inbuilt method to clear the queue, but you can easily assign a fresh queue (and allow the old one to be garbage collected) like this:
// When resetting
mycrawler.queue = new Crawler.queue()

Let me know if that satisfies your use case!
As an aside — and in the interests of understanding what features we should prioritise, if you wouldn't mind sharing why you want to clear the queue, it'd be much appreciated! I'm very curious. :)

Hey, just closing this issue. If my comment above didn't help, and you're still in need of something different, feel free to reopen the issue with a bit more detail. :)

About to open feature request issue and found this.. IT works. Many Thanks

@cgiffard
My previous comment might be wrong or I miss something when I refactor the code.
I try to reuse the module, give a new path and craw.
var crawler = new Crawler("http://www.example.com/");
// repeat this
function craw(path) {
crawler.initialPath = path;
crawler.queue = new Crawler.queue();
crawler.start();
}
//
craw('/Category.aspx?category=abc');
craw('/Category.aspx?category=xyz');
It does not grab different url. It only pull the first URL.

@mike-aungsan You might be better off making a new crawler for each crawl, if you're trashing the queue each time.

@cgiffard  Many Thanks.

authors: ahansson89 cgiffard fredrikekelund mike-aungsan

repo: cgiffard/node-simplecrawler


text:
dirty hack for shake_ios integration

NOT A REAL PR!
This is only to demonstrate what I found while trying to integrate shake_ios. See https://github.com/cgrindel/rules_swift_package_manager/issues/615
Please advise a better way of fixing this!
Unlike Lottie, Shake is not packaged as a zip but directly as a xcframework directory.

The fix for this is in #615.

authors: cgrindel joune


text:
🛑 Personal is down

In 253502c, Personal (https://chadburrus.com) was down:

HTTP code: 403
Response time: 67 ms

Resolved: Personal is back up in a027e6f after 150 days, 5 hours, 11 minutes.

repo: chadburrus/upptime


text:
Is it possible to include review.id in app.reviews?

To be able to compare reviews, it would be nice to receive the Review.id (app.reviews). Is that possible?

Not sure if it’s possible as the original review code was a contribution via pull request and I’m not familiar with what data google publishes for reviews. It sounds like a useful feature though. Do you have time to investigate and add it? Let me know if you have any questions on the codebase.
Alternatively, you could look into building a review fingerprint that acts like an id in your app. Perhaps something like concatenate some is the review data (review text, author name, time stamp, app id) and then md5 it. I suspect this hack would work reasonably well for a lot of use cases.
-Chad

On Sep 23, 2017, at 4:06 AM, Tom Wolters notifications@github.com wrote:
To be able to compare reviews, it would be nice to receive the Review.id (app.reviews). Is that possible?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I think it's possible as the reviewId is in the permalink class of the HTML page. I am unable to test my contribution easily. Perhaps I can make a PR, but are you able to see if the review_id is added to a review?

That should be possible. There's an reviewId in the permalinks class. I'll create a pull request.

authors: chadrem tom-wolters


text:
Misc improvements

See commits
Sorry that this isn't the cleanest PR: probably should be a couple of separate ones. Also I'm not sure to what extent I'm adhering to your code style (probably not) and if I should add some examples/documentation to the stuff.
Let me know either way and I will fix!

Hey Erik, thanks for the PR! I've looked over it once already, but need some more time to finish reviewing.
I do have some questions in the meantime, though. What is your use-case for needing a different promise library? I'm not married to 'es6-promise' if you needed some functionality of Q or bluebird instead.
Also, do you have some sample code we could use as an example of how to use the new getPartData method? Maybe an example of how you are using it?
I have a few other comments but i'll have to post them later.

We are using Bluebird all over our code base so I didn't want to mix es6-promise and bluebird. Not sure how it's usually accomplished.
Yes I can add an example of getPartData.
Be as blunt as you want about the PR – happy to fix any issues/concerns!

RE: passing in the promise- I think you could still leverage bluebird just fine without needing to alter the promise that this library uses. For example:
'use strict';
var Bluebird = require('bluebird');
var ES6Promise = require('es6-promise').Promise;

function retrieveArray() {
  return ES6Promise.resolve(['foo', 'bar', 'baz']);
}

Bluebird.resolve()
  .then(retrieveArray)
  .spread(function (foo, bar, baz) {
    // es6-promise does not have a .spread method, but this works because of the bluebird chain
    console.log(foo, bar, baz);
    // => foo bar baz
  });

I'd rather not allow passing in a promise library because the Promises/A+ spec does not define that a promise must have the new Promise(function resolve, reject) { ... }); api, which is what is used inside the library. I realize that bluebird also has this API and that's why this works seamlessly for you, but I'd rather avoid any potential issues with someone passing in an incompatible promise.

On your note about Promise – it's fine, I can remove that commit and verify that it works when mixing Promise types. The only thing that would be mildly inconvenient for us is we use a lot of Bluebird's functionality internally so we would have to do some wrapping. No biggie though

lib/helpers/getMessage.js contains a lot of the same logic as getPartData, minus the decoding of the body. What would you think about us making /lib/helpers/getMessage.js do the decoding, and making getPartData use that? That way results from search() as well as results from getPartData() will have the decoded bodies.

thanks for working with me on this! Exposing a sane "fetch" public method is a great addition to the library.

Yeah that makes a lot of sense actually. I can try to make that work

Latest set of commits features everything you mentioned except merging getPartData and getMessage

looking good so far

I merged getPartData and getMessage now.
Maybe getPartData is unnecessary

Let me know if this is ever getting exhausting going back and forth. I have some more feedback, but I'm willing to contribute code to this PR too if you don't wanna have to do everything.

Will fix the remaining things.
I can do some more back and forth, not a problem. Would be nice to merge this PR by EOD though!
I have some other things separately, like putting labels on emails, but will put that in a separate PR

So, I'm not entirely sure that we're doing the decoding right. Correct me if I'm wrong, because you have probably worked with this part of node-imap more than I have. It is my understanding that struct indicates the structure of the "TEXT" body of the message. If the message is a multi-part message, then the part.body will be emitted as a string with boundaries denoting the different parts of the message, i.e. "_----------=_MCPart_1535811677". So in order to decode a single "part" of the body, we would need to break the body at the boundary and feed only that single part to the decoder. However, what we are doing here is just taking a single encoding type and decoding the entire retrieved body as that type, even if it is a multi-part body.
I'm guessing this is an artifact from moving the parsing logic from getPartData to getMessage. In getPartData, you are saying "get the data for only this part of the message" so it makes sense that you wouldn't be worried about multi-part bodies.
I'm thinking that if we don't wanna try to deal with multi-part bodies in getMessage at this time (i.e. it's not worth it to you to spend time on it) then the parsing logic is probably best kept in getPartData for now.
Sorry for reverting my stance on this. Just learned more about the process and how it all works as I was reviewing.

That's more than I knew :) I didn't know anything about IMAP until last week.
Isn't there some JS library to do multipart decoding though?
Either way I'm happy to move the decoding back

If you can move the decoding back, but use getMessage in getPartData, I think I'll call it good enough for now.

Sounds good to me

OK see if this one is cool

LGTM

nice!

i'm cleaning it up a bit then i'll release a new minor version to npm

ok cool – just sent you another PR with two minor additions

v1.4.0 published to npm

authors: chadxz erikbern

repo: chadxz/imap-simple


text:
4.0.4 contains breaking change to ES6 modules

type-detect@4.0.4 uses ES6 modules in it's main which causes it to throw the following error when run in node:
export default function typeDetect(obj) {
^^^^^^
SyntaxError: Unexpected token export

I assume this was accidental, since it's a massive breaking change in a patch release making chai unusable. You may wish to unpublish 4.0.4.

We'll get this fixed ASAP.

4.0.5 will be released in the next few minutes, which should fix this.

authors: keithamus lennym

repo: chaijs/type-detect


text:
考虑支持全文搜索功能吗？

RT.

全文搜索可以考虑用elasticsearch 以前支持过 但是部署的时候会很麻烦 不利于新手使用 所以又把它删除了

非常感谢～ 那就自己实现吧 ：）

authors: chaijunit lifedim

repo: chaijunit/beibq


text:
Clarify color order of arguments in ImageNets documentation

I suffered from RGB-BGR order difference between __call__ and predict in chainer.links.model.vison.XXX since it's not well documented (actually it is not impossible to understand from prepare and __call__ document but for beginners it's quite difficult).
Ref. https://github.com/chainer/chainer/issues/3756#issuecomment-341027872
This PR updates document just to clarify that predict requires RGB order and __call__ supposes the input is converted to BGR by prepare.
I also wanted to put a link to prepare document (here) in __call__ document, but I'm sorry I don't know how.

Thanks so much for your review!
I updated the commit.

Oh sorry. Please use backquotes. github may removed my backquotes

:class:`numpy.ndarray`

done!
sorry for the lack of knowledge about sphinx..

Check flake8 result in Travis.

Sorry for replying you late! corrected flake8 violation.

jenkins test this please

authors: belltailjp unnonouno

repo: chainer/chainer


text:
Better login + auto-login

Hide username/password when the network does not have auth + auto-login when there's one network without auth

With the power to edit source code. We can:

add chainstack logo to it
change color schema
add logout button
and many more

With the power to edit source code. We can:

add chainstack logo to it
change color schema
add logout button
and many more

It's open source block explorer. We don't want to fork it and maintain our own copy, but to propose improvements to the original repo to contribute back to the community.

authors: ThomasRalee easeev gcoupelant

repo: chainstack/hlf-explorer


text:
Add WriteJson and writeGeojson fuction to OsmOverpassDownloader

The writeXml was added in a previous commit. WriteJson re-use the same logic, but write geojson is more complexe as it needs to parse and convert the input file.
Fixes: #412

@tahini Still need to rename the functions, I'll add an extra commit for that, but to avoid working on a stack of commit, wanted to have this part checked first.

repo: chairemobilite/transition


text:
路由拦截添加interceptor拦截出错

我使用的是1.1.3的mp版本。
当我对拦截规则添加interceptor，他后面的所有拦截都会失效。当满足interceptor拦截要求的时候可以正常进入interceptor对应的handler方法中，当interceptor对象复写的方法返回false时，则后面所有的拦截不会执行。比如在下面例子中兜底拦截就无效了。
wxMpMessageRouter
//interceptor测试拦截
.rule()
.interceptor(new CommentInterceptor())
.handler(new  ReceiveErroHandle())
.end()
//兜底拦截
.rule()
.async(false)
.handler(new ReceiveErroHandle())
.end();
CommentInterceptor类代码如下：
public class CommentInterceptor implements WxMpMessageInterceptor {
@Override
public boolean intercept(WxMpXmlMessage wxMessage,
		Map<String, Object> context, WxMpService wxMpService,
		WxSessionManager sessionManager) throws WxErrorException {
	return false;
}

}
ReceiveErroHandle类代码如下：
public class ReceiveErroHandle implements WxMpMessageHandler{
@Override
public WxMpXmlOutMessage handle(WxMpXmlMessage wxMessage,
		Map<String, Object> context, WxMpService wxMpService,
		WxSessionManager sessionManager) throws WxErrorException {

		WxMpXmlOutTextMessage m = WxMpXmlOutMessage
				.TEXT()
				.content("您输入的信息非法，您输入的是："+wxMessage.getMsgType())
				.fromUser(wxMessage.getToUserName())
				.toUser(wxMessage.getFromUserName())
				.build();
		return m;
}

}

或者能提过给我一个完整一些的interceptor的用法的例子也可以。QQQ

你第一个rule没有设置任何匹配条件，那这个rule就已经是兜底规则了。

我尝试在第一个rule添加一些规则，也是不行。
rule()
.async(false)
.msgType(WxConsts.XML_MSG_TEXT)
.content("aaa")
.interceptor(new CommentInterceptor())
.handler(new  ReceiveCommentHandle())
.end()
我只要添加interceptor。wxMpMessageRouter.route方法返回的就是空，只要把interceptor去掉就没事。你可以在右面的版本中添加一个interceptor的示例吗？我看到新版代码中interceptor的示例被取消了

消息规则匹配的逻辑是这样的：

先看你的消息有没有匹配到某个rule
如果匹配到了，执行这个rule的interceptor
如果Interceptor返回false，规则不继续执行，自然就返回null
如果interceptor返回true，继续执行handler
如果rule是异步的，返回null
如果rule是同步的，返回handler的返回值

你的这个Interceptor返回的是false，自然就返回null了

首先感谢您的回答。
那如果我希望当Interceptor返回fasle 时，则执行下面的rule。
如果当Interceptor返回true时,则rule不继续执行,返回handler的返回值.
这个可以办到吗。
因为我想做一个问反馈功能，当用户点击问题反馈菜单(微信)时，我在WxSession做一个标志，用以说明该用户现在正在输入意见。所以我这里用到interceptor来判断WxSession中是否存在标志位。存在则进入意见的拦截，不存在继续其他拦截。因为用户的意见也许和某个文本拦截匹配，所以要先进行反馈的拦截，其他拦截都是反馈之后。
您帮我看下，像这种情况我应该怎样写。

写一个Wx*MessageMatcher，在里面放一个sessionManager，然后你就能在这里里面去判断是否在session里存在标志位了。

在 2015年4月7日，16:42，akrio714 notifications@github.com 写道：
首先感谢您的回答。
那如果我希望当Interceptor返回fasle 时，则执行下面的rule。
如果当Interceptor返回true时,则rule不继续执行,返回handler的返回值.
这个可以办到吗。
因为我想做一个问反馈功能，当用户点击问题反馈菜单(微信)时，我在WxSession做一个标志，用以说明该用户现在正在输入意见。所以我这里用到interceptor来判断WxSession中是否存在标志位。存在则进入意见的拦截，不存在继续其他拦截。因为用户的意见也许和某个文本拦截匹配，所以要先进行反馈的拦截，其他拦截都是反馈之后。
您帮我看下，像这种情况我应该怎样写。
—
Reply to this email directly or view it on GitHub https://github.com/chanjarster/weixin-java-tools/issues/121#issuecomment-90465640.

您是指 WxMpMessageMatcher的实现类吗。我看到Override方法 public boolean match(WxMpXmlMessage message) 这里拿不到sessionManager.
还是说可以通过静态方法拿到sessionManager?

你new一个WxMpMessageMatcher，里面放个sessionManager就行了。

在 2015年4月8日，16:26，akrio714 <notifications@github.com mailto:notifications@github.com> 写道：
您是指 WxMpMessageMatcher的实现类吗。我看到Override方法 public boolean match(WxMpXmlMessage message) 这里拿不到sessionManager.
还是说可以通过静态方法拿到sessionManager?
—
Reply to this email directly or view it on GitHub https://github.com/chanjarster/weixin-java-tools/issues/121#issuecomment-90840239.

repo: chanjarster/weixin-java-tools


text:
Update style checking to handle workflow directories

Description
mypy struggles when dealing with top-level scripts that don't belong in packages, so for each workflow directory needs to be checked in a separate mypy execution.  This adapts our workflow to invoke style checking on each directory that containes unmodularized python code separately.
Depends on #211
Test plan
make -j style

The alternative is to migrate all the scripts inside the aspen package, but it makes it harder to find the relevant code.

repo: chanzuckerberg/aspen


text:
How to save a selected subset of cells?

Hello I really like your tool, but I cannot figure out how to save a selected subset of cells (or if this has been implemented). I have used the lasso tool to select a subset. I have figured out how to do differential expression, and I see that saves to a csv, but I was wondering if I could get a new subset matrix that only contained my one selected portion?
Thank you in advance

Hello, I have a follow-up question related to this issue: is there a way to extract the cell IDs for a selected subset of cells?
Thank you!

repo: chanzuckerberg/cellxgene-documentation


text:
Instrument and report on Key Performance Indicators for Datasets published

Key Performance Indicators
Publication & Data Volume:
2. Datasets published. We will track how many datasets are published on Corpora

For now, this can be generated by querying the Datasets table instead of using Google Analytics right away since scientist-driven submission of projects is still a ways away. The task here will be to set up a period report to be generated by executing a set of queries against the database that will provide information about the number of datasets published.

Sounds good to me. I don't think all analytics need to be collected in GA,
but we should have a consolidated dashboard or report somewhere so the
metrics are easily accessible.
On Fri, Jun 5, 2020 at 9:04 AM maniarathi notifications@github.com wrote:

For now, this can be generated by querying the Datasets table instead of
using Google Analytics right away since scientist-driven submission of
projects is still a ways away. The task here will be to set up a period
report to be generated by executing a set of queries against the database
that will provide information about the number of datasets published.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/chanzuckerberg/corpora-data-portal/issues/341#issuecomment-639597559,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEDOWFT5VLECEXASQSYV2LRVEJRJANCNFSM4NS3IJPQ
.

--
Matt Weiden
Engineering Manager
https://chanzuckerberg.com/?email
c: +1 650-8 <+16509477330>85-0025
mweiden@chanzuckerberg.com PGP: 7BD5 4CCE DA03 FE89 6B0E  E793 C18D 65CF
D8A1 0DCC https://keys.openpgp.org/search?q=mweiden%40chanzuckerberg.com
http://chanzuckerberg.com http://chanzuckerberg.com/?email

In preparation for this work, Jessica helped create a new IAM role that will be assigned with a lambda to run period queries on the dataset to pull dataset information.
arn:aws:iam::699936264352:role/corpora-reporting-lambda

Questions:

How frequently should we run the queries?
Who will run the queries?
Is it gonna be automated, say, through Airflow or manually?

Thank you!

I think I recall @brianraymor saying they were refining the exact KPIs and how often the were need. Brian am I hallucinating that?

Closing per PM triage.

authors: brianraymor maniarathi mckinsel mweiden tihuan

repo: chanzuckerberg/corpora-data-portal


text:
Reporting a vulnerability

Hello!
I hope you are doing well!
We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.
Can you enable it, so that we can report it?
Thanks in advance!
PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository

Thank you for your contribution.
Unfortunately, we are archiving this repository as a part of napari-hub plugin previews deprecation. We will no longer continue to work on this repository. Therefore, all issues and pull requests are being closed.


text:
Change Dataset.published_at to Dataset.originally_published_at

To match the analogous database column names, which are inherently descriptions, used for Collections:

The column Dataset.published_at should be changed to be Dataset.originally_published_at
A DatasetVersion.published_at column should be added

These are database column changes only, and do not impinge on the API.

@danieljhegeman
@metakuni and I are triaging H2 candidates. Please ensure that there are descriptions in all issues. Why is this breaking change being proposed? I searched slack and found #single-cell-discover-api.
I recommended that this be closed.

Removing from the epic in the meantime since this isn't a high priority item and we likely won't have time in Q3 to do this.

@brianraymor @metakuni I've added a description. These are database column changes, not API changes.

I recommend that we re-add this to the epic it was just removed from

authors: brianraymor danieljhegeman metakuni

repo: chanzuckerberg/single-cell-data-portal


text:
Cube generation runs in production have been failing for 2 months

The last time cubes were successfully generated in production was on 04/17/2023 and failures started on 04/23/2023
A manual run of wmg pipeline on the dev environment was started around 2023-06-06T12:56:02.129-07:00 and as of 2023-06-07T15:01:12.446-07:00 only 71 out of 313 datasets were processed (~ 22%) in 26 hours*:
INFO:backend.wmg.pipeline.integrated_corpus.job:Processing dataset 71 of 313

Here is the log file: https://us-west-2.console.aws.amazon.com/cloudwatch/home?region=us-west-2#logsV2:log-groups/log-group/$252Fdp$252Fdev$252Fdevstack$252Fwmg-processing/log-events/wmg-dev-devstack-wmg-processing$252Fdefault$252Fc7417a676e5c40f8aa93efa95d255800
Additionally there were numba warnings and errors that might hint at the problem. This stacktrace was taken between times 2023-06-06T16:00:41.637-07:00 and 2023-06-06T16:00:41.753-07:00
Numba warnings and errors
It seems the current version being used is at least 0.56.2 but less than 0.59.0 (inferred from the deprecation warning the logs below)
Since the version number for numba is not pinned, as of this writing, it is at the latest release: 0.57.0
/backend/wmg/data/rankit.py:10: NumbaWarning:
Compilation is falling back to object mode WITH looplifting enabled because Function "quantiles" failed type inference due to: NameError: name 'unsafe_empty_inferred' is not defined
  @nb.jit
INFO:numba.core.transforms:finding looplift candidates
/usr/local/lib/python3.10/site-packages/numba/core/object_mode_passes.py:151: NumbaWarning: Function "quantiles" was compiled in object mode without forceobj=True.

File "backend/wmg/data/rankit.py", line 11:
@nb.jit
def quantiles(max_rank: int, ranks: np.ndarray) -> np.ndarray:
^

  warnings.warn(errors.NumbaWarning(warn_msg,
/usr/local/lib/python3.10/site-packages/numba/core/object_mode_passes.py:161: NumbaDeprecationWarning:
Fall-back from the nopython compilation path to the object mode compilation path has been detected. This is deprecated behaviour that will be removed in Numba 0.59.0.
For more information visit https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit

File "backend/wmg/data/rankit.py", line 11:
@nb.jit
def quantiles(max_rank: int, ranks: np.ndarray) -> np.ndarray:
^

  warnings.warn(errors.NumbaDeprecationWarning(msg,

Pinning package numba==0.56.2 on 2023-06-08 and starting the WMG pipeline on dev at around 2023-06-08T11:39:19.266-07:00 and finished approximately 17 hours later.
Here is the slack conversation that confirms that the pipeline ran to completion successfully on dev environment: https://czi-sci.slack.com/archives/C023Q1APASK/p1686331720352709?thread_ts=1685643987.699149&cid=C023Q1APASK
Currently keeping this open because we should complete a successful run in prod environment before closing this

WMG Pipeline generation on STAGING

It seems that a scheduled job was started on staging on June 11 2023 by the scheduler and did not finish as of June 15 2023. Here are the logs for the unfinished job. @timzchang and @prathapsridharan terminated it because it hadn't finished in the expected time of 17 hours

@timzchang had started a job on June 14 2023 around 7:30 AM PST but it was blocked by the running job from June 11. Since we have killed that job from June 11, the job submitted on June 14 2023 has started running on staging. The start time for this job is June 15 2023 at 10:48 AM PST. We hope this job runs in the expected 17 hours. Here are the logs for it

Production runs of WMG Pipeline are working and completing within the expected time. Here is the latest confirmation for 06/26/2023


text:
Data consumers must be informed when gene migration is incomplete for a collection

Story
Data consumers must be informed when a collection is still in the process of gene migration.
Closed on the informational message:

The cellxgene Data Portal was recently migrated to an enhanced schema to optimize reusability. The cellxgene team is still migrating a small subset of genes with complex mappings to ENSEMBL 38, the human gene reference required by the schema. As a result, more genes may be added in the coming weeks. The current data can be used with confidence that the genes that are present are correctly mapped.

The following collections have pending gene migration issues (genes to be added):

Collection
Reference

A molecular cell atlas of the human lung from single cell RNA sequencing
https://cellxgene.cziscience.com/collections/5d445965-6f1a-4b68-ba3a-b8f765155d3a

Collection
Reference

Adult mouse cortical cell taxonomy revealed by single cell transcriptomics
https://cellxgene.cziscience.com/collections/a3c37598-b8e8-47db-92a9-eb91a77c9529

Collection
Reference

Single-Cell RNAseq analysis of diffuse neoplastic infiltrating cells at the migrating front of human glioblastoma
https://cellxgene.cziscience.com/collections/558385a4-b7b7-4eca-af0c-9e54d010e8dc

Collection
Reference

An integrated transcriptomic and epigenomic atlas of mouse primary motor cortex cell types
https://cellxgene.cziscience.com/collections/ae1420fe-6630-46ed-8b3d-cc6056a66467

Collection
Reference

Shared and distinct transcriptomic cell types across neocortical areas
https://cellxgene.cziscience.com/collections/45f0f67d-4b69-4a3c-a4e8-a63b962e843f

Collection
Reference

Single-cell gene expression profiling of SARS-CoV-2 infected human cell lines
https://cellxgene.cziscience.com/collections/d0e9c47b-4ce7-4f84-b182-eddcfa0b2658

Collection
Reference

Muraro Pancreas
https://cellxgene.cziscience.com/collections/6e8c5415-302c-492a-a5f9-f29c57ff18fb

Collection
Reference

Construction of a human cell landscape at single-cell level
https://cellxgene.cziscience.com/collections/38833785-fac5-48fd-944a-0f62a4c23ed1

Collection
Reference

A Web Portal and Workbench for Biological Dissection of Single Cell COVID-19 Host Responses
https://cellxgene.cziscience.com/collections/b9fc3d70-5a72-4479-a046-c2cc1ab19efc

Collection
Reference

An Atlas of Gene Regulatory Elements in Adult Mouse Cerebrum
https://cellxgene.cziscience.com/collections/5e469121-c203-4775-962d-dcf2e5d6a472

Collection
Reference

Azimuth meta-analysis of human scRNA-seq datasets
https://cellxgene.cziscience.com/collections/2f75d249-1bec-459b-bf2b-b86221097ced

Note: To be published on October 4 by @MaximilianLombardo :

Collection
Reference

Human cortical expansion involves diversification and specialization of supragranular intratelencephalic-projecting neurons
https://cellxgene.cziscience.com/collections/4f586cb6-972b-4ef7-a4ef-3c3800a3c004

UX Design
[TBD Figma]

Brian will get us the final warning message, but @leslieypark will be able to start the plumbing! Thanks so much both 🙏

@brianraymor
I'm going to be working on this first thing tomorrow morning (ET). Please let me know if there are any updates on the gene sets or the copy and I will create tickets under this epic! Thank you :)

@leslieypark
I added the final informational message in the top-level summary comment. This epic is now waiting on the banner figma from @hthomas-czi.  The collection id(s) should be complete.

Sounds good! Thank you!

authors: brianraymor leslieypark tihuan

repo: chanzuckerberg/single-cell


text:
🛑 us-fl (Alisson) is down

In 3646616, us-fl (Alisson) (https://us-fl-mirror.chaotic.cx/no-failover/chaotic-aur/lastupdate) was down:

HTTP code: 503
Response time: 64 ms

Resolved: us-fl (Alisson) is back up in 8a0ac27.

repo: chaotic-aur/chaotic-uptimes


text:
🛑 Silky.Network - us-ca is down

In a643146, Silky.Network - us-ca (https://sjc-us-mirror.silky.network) was down:

HTTP code: 0
Response time: 0 ms

Resolved: Silky.Network - us-ca is back up in 8bbcc32 after 10 minutes.


text:
Adding a model and a nullable foreign key in the same change exhibits a few problems

The cannot be partitioned into deployment stages message doesn't display the choices for Please select a fix
Selecting yes crashes
Adding a nullable foreign key should likely not need a post-add field?

The questioner issue should be fixed by #45 and the nullable stage issue has been fixed since 0.0.1a10.

repo: charettes/django-syzygy


text:
Allow nested pause blocks without resuming inner blocks

Addresses part of #43.
Instead of always setting tc[:prosopite_scan] to true at the end of a pause block, we can remember the previous value from before the pause block and set it to that. This allows nesting of pauses, however deep, without resuming the scan until the outermost pause has reached the end of the block.

Thanks @geshwho !

authors: charkost geshwho

repo: charkost/prosopite


text:
Google Code shutting down

On the 25th of August, Google Code will shutdown, breaking some of the links in the Readme, which should be updated to point towards the new Github repository.

Updated links, thanks for the reminder.

Hi,
you forgot the firste line in the readme "A .NET wrapper for tesseract-ocr." which should link to the github project of tesseract

authors: CoenraadS charlesw hoppler

repo: charlesw/tesseract


text:
False-positive F821: Undefined name with mypy_extensions.DefaultNamedArg

from typing import Any, Callable

from mypy_extensions import DefaultNamedArg

SomeCallableT = Callable[[Any, DefaultNamedArg(bool | None, name="some_prop_name")], None]

$ ruff test_ruff_F821.py
Found 1 error(s).
test_ruff_F821.py:5:66: F821 Undefined name `some_prop_name`

Good stuff, thanks for filing, an easy fix.

authors: actionless charliermarsh

repo: charliermarsh/ruff


text:
Tweak summary message to include total error counts

We now print, e.g., Found 3 error(s) (3 fixed, 0 remaining)..
Resolves: #1061.

I think the one risk of confusion here is that if we autofix, and that leads to new errors (e.g., we remove a statement, which leads to an unused import), then the counts can be unintuitive.


text:
Set default Rust version when testing sdist

Test Plan
See: https://github.com/charliermarsh/ruff/actions/runs/5193203293/jobs/9363428303.

\cc @konstin


text:
Some labels on axis's are missing

I'll draw a chart with on the X-axis names of cities. The problem is when I'll draw the chart. The values of the even names are missing (see the yellow marks on the image below).

For this chart I wouldn't have that. Is this a bug or have I miss anything in my code?

The auto skip feature is probably hiding them. There is a setting to turn it off, but i don't recall the exact name

I've found it in the documentation:
scales: {
    xAxes: [{
        stacked: false,
        beginAtZero: true,
        scaleLabel: {
            labelString: 'Month'
        },
        ticks: {
            stepSize: 1,
            min: 0,
            autoSkip: false
        }
    }]
}

In case the previous comment was not clear here is the documentation link:
http://www.chartjs.org/docs/latest/axes/cartesian/#tick-configuration
autoSkip property.

not working for me, even if setting autoskip:false (tried in the ticks options, in the data array...)

This works for me (as an example):
chart.scales["x-axis-0"].options.ticks.autoSkip = false;
chart.scales["x-axis-0"].options.ticks.stepSize = 1;
Note that it's not chart.scales["x-axis-0"].ticks as that contains the array of labels

I've tried this, but it doesn't solve the problem for me. I get a second set of labels on the xaxis that contains all the labels, however they don't align with the data. The first level of labels with the skipping still exists:

options: {
scaleShowValues: true,
scales: {
yAxes: [{
ticks: {
beginAtZero: true
}
}],
xAxes: [{
ticks: {
autoSkip: false
}
}]
}
}

scales: {         xAxes: {           ticks: {             autoSkip: false,             source: 'data',         }         },       },
using ticks.source help me fix that problem. At least, it works for me

scales: { xAxes: { ticks: { autoSkip: false, source: 'data', } }, }, using ticks.source help me fix that problem. At least, it works for me

 source: 'data'
I also came to this solution and it really works

authors: ClaireToulouse HeinPauwelyn SherifRefaat etimberg jnettik phil123456 phungchiminhquang reupost roma2341


text:
Check "Scales" options first to continue

Before processing, need to check "Scales" options if it's null or not. Some charts like "Pie chart" etc. may not have "Scales" options.

Error line:
https://github.com/chartjs/chartjs-plugin-annotation/blob/master/src/annotation.js#L36,L37

A quick workaround about this until PR to be merged is:
scales:{
  yAxes: [],
  xAxes: []
},

authors: lefterisnik yusufozturk

repo: chartjs/chartjs-plugin-annotation


text:
Bug: cannot insert multiple commands into a prepared statement

Chat2DB Version
2.0.11
Describe the bug
{"getApplicationMessage":{"env":"desktop","versions":"2.0.11","buildTime":1691489139135,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) chat2db/2.0.11 Chrome/108.0.5359.215 Electron/22.3.18 Safari/537.36"},"requestUrl":"http://127.0.0.1:10824/api/rdb/ddl/export","requestParams":"{"dataSourceId":2,"dataSourceName":"生命线-排水","databaseType":"POSTGRESQL","databaseName":"paishui_db","schemaName":"paishui","tableName":"ps_jc_bjfx"}","errorCode":"common.systemError","errorMessage":"An exception occurs, you can view the exception details in the log in the help menu.","errorDetail":"java.lang.RuntimeException: org.postgresql.util.PSQLException: ERROR: cannot insert multiple commands into a prepared statement\n\tat ai.chat2db.spi.sql.SQLExecutor.executeSql(SQLExecutor.java:89)\n\tat ai.chat2db.plugin.postgresql.PostgreSQLMetaData.tableDDL(PostgreSQLMetaData.java:20)\n\tat ai.chat2db.server.domain.core.impl.TableServiceImpl.showCreateTable(TableServiceImpl.java:56)\n\tat ai.chat2db.server.web.api.controller.rdb.RdbDdlController.export(RdbDdlController.java:239)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/java.lang.reflect.Method.invoke(Unknown Source)\n\tat org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:196)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)\n\tat org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:89)\n\tat ai.chat2db.server.web.api.aspect.ConnectionInfoHandler.connectionInfoHandler(ConnectionInfoHandler.java:51)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/java.lang.reflect.Method.invoke(Unknown Source)\n\tat org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:637)\n\tat org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:627)\n\tat org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:71)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)\n\tat org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)\n\tat org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:184)\n\tat org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:750)\n\tat org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:702)\n\tat ai.chat2db.server.web.api.controller.rdb.RdbDdlController$$SpringCGLIB$$0.export()\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)\n\tat java.base/java.lang.reflect.Method.invoke(Unknown Source)\n\tat org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:207)\n\tat org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:152)\n\tat org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:884)\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)\n\tat org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)\n\tat org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1081)\n\tat org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:974)\n\tat org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1011)\n\tat org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)\n\tat jakarta.servlet.http.HttpServlet.service(HttpServlet.java:527)\n\tat org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)\n\tat jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:205)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n\tat org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n\tat ai.chat2db.server.start.config.interceptor.CorsFilter.doFilter(CorsFilter.java:37)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n\tat org.zalando.logbook.servlet.LogbookFilter.doFilter(LogbookFilter.java:76)\n\tat org.zalando.logbook.servlet.HttpFilter.doFilter(HttpFilter.java:32)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n\tat org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n\tat org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n\tat org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n\tat ai.chat2db.server.start.log.LogOncePerRequestFilter.doFilterInternal(LogOncePerRequestFilter.java:32)\n\tat org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)\n\tat org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174)\n\tat org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149)\n\tat org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166)\n\tat org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)\n\tat org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)\n\tat org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)\n\tat org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)\n\tat org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)\n\tat org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341)\n\tat org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:390)\n\tat org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)\n\tat org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894)\n\tat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)\n\tat org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)\n\tat org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)\n\tat org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)\n\tat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)\n\tat java.base/java.lang.Thread.run(Unknown Source)\nCaused by: org.postgresql.util.PSQLException: ERROR: cannot insert multiple commands into a prepared statement\n\tat org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2903)\n\tat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2632)\n\tat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:341)\n\tat org.postgresql.jdbc.PgStatement.runQueryExecutor(PgStatement.java:562)\n\tat org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:539)\n\tat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:397)\n\tat org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:339)\n\tat org.postgresql.jdbc.PgStatement.executeCachedSql(PgStatement.java:325)\n\tat org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:302)\n\tat org.postgresql.jdbc.PgStatement.execute(PgStatement.java:298)\n\tat ai.chat2db.spi.sql.SQLExecutor.executeSql(SQLExecutor.java:81)\n\t... 88 more\n","solutionLink":"https://github.com/chat2db/Chat2DB/wiki/Chat2DB"}

Please refer this doc https://github.com/lib/pq/issues/928 to see if it helps.


text:
优化: 增加表管理的右键菜单

这些功能可以参考sqlyog

3.0.11已经支持

authors: SwallowGG lhl-github


text:
【问题】model_config.py 文件里面配置了 LLM_MODELS = ["Qwen-1_8B-Chat"]，但是启动后，在WEB发送chat到本地，会走 openai 的代码

[修改的配置项]
model_config.py
LLM_MODELS = ["Qwen-1_8B-Chat"]
LLM_DEVICE = "cpu"
MODEL_PATH = {
"embed_model": {
# 此处省略未改动部分
"bge-large-zh-v1.5": "D:\workspces\llm_space\bge-large-zh-v1.5\"
},
"llm_model": {
"Qwen-1_8B-Chat": "D:\workspaces\llm_space\Qwen-1_8B-Chat\",
}
}
按照官方教程一步步实现，启动完成后访问 http://127.0.0.1:8501/ 地址：

向后端发送信息  “hi”，后端报错如下：

完整的报错信息：
2024-06-11 15:23:01,615 - _client.py[line:1027] - INFO: HTTP Request: POST http://127.0.0.1:7861/chat/chat "HTTP/1.1 200 OK"
D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain_core_api\deprecation.py:117: LangChainDeprecationWarning: The class langchain_community.chat_models.openai.ChatOpenAI was deprecated in langchain-community 0.0.10 and will be removed in 0.2.0. An updated version of the class exists in the langchain-openai package and should be used instead. To use it run pip install -U langchain-openai and import as from langchain_openai import ChatOpenAI.
warn_deprecated(
2024-06-11 15:23:04 | INFO | stdout | INFO:     127.0.0.1:55927 - "POST /v1/chat/completions HTTP/1.1" 200 OK
2024-06-11 15:23:04,405 - _client.py[line:1758] - INFO: HTTP Request: POST http://127.0.0.1:20000/v1/chat/completions "HTTP/1.1 200 OK"
2024-06-11 15:23:04 | INFO | httpx | HTTP Request: POST http://127.0.0.1:20002/worker_generate_stream "HTTP/1.1 200 OK"
2024-06-11 15:23:06,070 - utils.py[line:38] - ERROR: object of type 'NoneType' has no len()
Traceback (most recent call last):
File "D:\workspaces\ai_space\Langchain-Chatchat\server\utils.py", line 36, in wrap_done
await fn
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain\chains\base.py", line 385, in acall
raise e
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain\chains\base.py", line 379, in acall
await self._acall(inputs, run_manager=run_manager)
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain\chains\llm.py", line 275, in _acall
response = await self.agenerate([inputs], run_manager=run_manager)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain\chains\llm.py", line 142, in agenerate
return await self.llm.agenerate_prompt(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain_core\language_models\chat_models.py", line 554, in agenerate_prompt
return await self.agenerate(
^^^^^^^^^^^^^^^^^^^^^
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain_core\language_models\chat_models.py", line 514, in agenerate
raise exceptions[0]
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain_core\language_models\chat_models.py", line 617, in _agenerate_with_cache
return await self._agenerate(
^^^^^^^^^^^^^^^^^^^^^^
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain_community\chat_models\openai.py", line 522, in _agenerate
return await agenerate_from_stream(stream_iter)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain_core\language_models\chat_models.py", line 87, in agenerate_from_stream
async for chunk in stream:
File "D:\workspaces\ai_space\Langchain-Chatchat.venv\Lib\site-packages\langchain_community\chat_models\openai.py", line 493, in _astream
if len(chunk["choices"]) == 0:
^^^^^^^^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()
2024-06-11 15:23:06,071 - utils.py[line:40] - ERROR: TypeError: Caught exception: object of type 'NoneType' has no len()
请问一下各位大佬，如何解决呀，拜托

补充一下，langchain-chatchat 代码是今天下载的 main 分支

我也遇到了.

我按照这个做了修改，问题解决了：https://github.com/chatchat-space/Langchain-Chatchat/issues/4032#issuecomment-2132539611

@Zyred9 同样问题，请问解决了吗

authors: Zyred9 git-quanxin urev

repo: chatchat-space/Langchain-Chatchat


text:
Add helper classes

Currently there are just a few helper classes added manually, it's better to replace with automatically generated ones using SCSS alike syntax

Should be alright as is

repo: chausme/middle-messenger


text:
Use \leavevmode for divs and \textcolor for spans?

Using your own example input:
---
pandoc-latex-color:
  - classes: [important]
    color: red
---

::: important ::::::
This is important content
::::::::::::::::::::

This is normal content, [warning content]{latex-color=orange} and [important content]{.important}.

will convert fine into PDF via pandoc -F pandoc-latex-color test.md -o test.pdf:

Problem
However converting it into .tex via pandoc -F pandoc-latex-color test.md -o test.tex results in:
{\color{red}

This is important content

}

This is normal content, {\color{orange} warning content} and
{\color{red} important content}.

This is not so good. If converted into PDF in any way (pandoc, pdflatex etc.), it will give this output:

Solution

For div (multiple paragraphs), add \leavevmode i front (see this and this)
for span (single paragraph), use \textcolor instead of color

I.e. the above .tex conversion should instead be:
\leavevmode{\color{red}

This is important content

}

This is normal content, \textcolor{orange}{warning content} and
\textcolor{red}{important content}.

Now pandoc, for some reason, won't give color tex->PDF, only md->PDF (which I've asked about here), but using using the syntax as above will make the .tex version compile correctly to PDF too.

I've made a first attempt: https://github.com/gandalfsaxe/pandoc-latex-color/commit/b7d52d9d3dda5bf99eb95ce4a97dba63cddd99a5

divs now works correctly.

I've tried to get spans to work too, but RawInline automatically adds {} around the whole string, and I don't know how to customize that.

For input:
[warning content]{latex-color=orange}
I'm getting:
{\textcolor{orange}{warning content}
should have:
\textcolor{orange}{warning content}
( and really if I didn't cheat and hardcode an extra {, it would really be that I get:
{\textcolor{orange}warning content}

I try to convert the latex code to pdf and it works perfectly.
\documentclass{article}

\usepackage{xcolor}

\begin{document}

{\color{red}

This is important content

}

This is normal content, {\color{orange} warning content} and
{\color{red} important content}.

\end{document}

produces a correct pdf file (either by using pdflatex or latex then dvipdf)

It only works because you're not involving pandoc. Try to convert the above using pandoc. Isn't writing input in non-latex (usually markdown) and then converting to latex/pdf the whole point of this, and all the other latex-related, pandoc filters? :)
You can see David Carlisle argue for using \textcolor for small paragraphs of color and \color for coloring larger spans of text here on the question "What is the difference between \textcolor and \color?":

Despite the name \textcolor also works in math mode. The main difference is just one of syntax, \textcolor takes text as an argument (like \textrm) \color affects all text to the end of the group (like \rmfamily). However \textcolor also executes \leavevmode which makes the color special occur in a much less destructive place as part of the paragraph rather than on a vertical list. So \textcolor is usually a better choice unless you are setting a colour for a large amount of text, such as the whole document.

Now to be perfectly honest, I don't know exactly what benefit \textcolor have over \color if you remember to enclose all colored sections with and I only vaguely understand what \leavevmode does in connection with this.
But I think I see what the problem was now. If you put the above into a .md file and convert to latex, pandoc will actually escape all the curly braces. i.e. this:
{\color{red}

This is important content

}

This is normal content, {\color{orange} warning content} and
{\color{red} important content}.

becomes this:
\{\color{red}

This is important content

\}

This is normal content, \{\color{orange} warning content\} and
\{\color{red} important content\}.

So it turns out that pandoc will prepend any { and } braces at the beginning and end of words with a backslash, which of course in LaTeX escapes the curly braces so they don't do what they're supposed to. I don't know why pandoc does this, and I can find any mention of this auto-escaping of curly braces it in the manual.
Solutions?
Option 1: Use raw attribute
i.e. enclose all instances of colored text in:
bla bla...
```{=latex}
{\color{red}
This is important content
}

Bla bla...
The problem with this option is that it doesn't really allow for inline text colors.
Option 2: Make the changes I suggested and add \leavevmode to divs and use \textcolor for spans.
Option 2 seems like the better choice. Unless you have a better idea or I overlooked something.

I have 2 questions:

Why do you use pandoc to compile LaTeX file?
Do you use -f latex flag when reading from LaTeX in pandoc?

In the second case, pandoc does not take into account \color instructions:
$ pandoc -f latex -t latex
{\color{red}

This is important content

}

This is normal content, {\color{orange} warning content} and
{\color{red} important content}.
\color{red}

produces
This is important content

This is normal content, { warning content} and { important content}.

Not always, but sometimes, just because it can be convenient to do conversions in one step / using one tool. Since the results of pandoc and pdflatex is mostly identical, I like to find solutions that work for both (which they do for the most part).
I would expect -f latex to do nothing when working on a .tex file as input. As far as I can tell, that happens no matter what.

Overall I see no downside to making the two changes I suggested, only upsides, unless you can enlighten me :-) The current implementation only works going md->pdf, but not md->tex without modifications. The motivation is thta md->tex can be convenient sometimes if you want to use an advanced latex template and simply use pandoc to make the chapters to use in input or include commands in the master .tex file.

I think that the \leavevmodedirective could have some side effects on LaTeX code
your solution does not work: it lacks some } in your generated code and converting This is normal content, \textcolor{orange}{warning content} from latex to pdf does not generate color.

$ pandoc -f latex -t latex
This is normal content, \textcolor{orange}{warning content}

generates
This is normal content, {warning content}

As I said in the first post, it seems like the \leavevmode when coloring whole paragraphs is recommended by several people (see here and [here](https://tex.stackexchange.com/questions/49910/how-to-colour-multiple-paragraphs and here)).
I know, and mentioned this in the comment. I can't get it to make the right braces, don't know how to fix.

authors: chdemko gandalfsaxe

repo: chdemko/pandoc-latex-color


text:
REST apis support

Is there any REST api support available where caller service will provide flagID, variant and segment detail in rest api call and flagr will give return value as true, if variant and segment details are present for inputted flagID and return false, if not.

Hey @rsahoo752055,
Is this the endpoint you are looking for?
https://checkr.github.io/flagr/api_docs/#operation/postEvaluation
You can create the variants "on" and "off". Only if the segment details are present you return "on", else "off".
Does that answer your question?

repo: checkr/flagr