benchmark: result of version 0.6. #354

commit: https://github.com/iresty/apisix/commit/af3454c6eee528c697def5e93951cfe3bfe2be7a
Alicloud : 12 vCPU 12 GiB (I/O Optimization) ecs.ic5.3xlarge , Intel Xeon(Skylake) Platinum 8163 | 2.5GHz
1 worker
[root@iZ8vb1wy4teeoaa7xgt3zpZ apisix]# ./benchmark/run.sh 1
+ '[' -n 1 ']'
+ worker_cnt=1
+ mkdir -p benchmark/server/logs
+ mkdir -p benchmark/fake-apisix/logs
+ sudo openresty -p /tmp/apisix/benchmark/server
+ trap onCtrlC INT
+ sed -i 's/worker_processes [0-9]*/worker_processes 1/g' conf/nginx.conf
+ make run
mkdir -p logs
mkdir -p /tmp/apisix_cores/
/usr/bin/openresty -p $PWD/ -c $PWD/conf/nginx.conf
+ sleep 3
+ echo -e '\n\napisix: 1 worker + 1 upstream + no plugin'

apisix: 1 worker + 1 upstream + no plugin
+ curl http://<IP_ADDRESS>:9080/apisix/admin/routes/1 -X PUT -d '
{
    "uri": "/hello",
    "plugins": {
    },
    "upstream": {
        "type": "roundrobin",
        "nodes": {
            "<IP_ADDRESS>:80": 1
        }
    }
}'
{"node":{"value":{"plugins":{},"uri":"\/hello","upstream":{"nodes":{"<IP_ADDRESS>:80":1},"type":"roundrobin"}},"createdIndex":5,"key":"\/apisix\/routes\/1","modifiedIndex":5},"action":"set"}
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   737.92us  128.01us   3.65ms   89.61%
    Req/Sec    10.88k     1.13k   21.45k    97.03%
  109292 requests in 5.10s, 434.94MB read
Requests/sec:  21432.99
Transfer/sec:     85.30MB
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   739.04us  107.21us   3.09ms   91.75%
    Req/Sec    10.85k   191.97    11.24k    70.59%
  110176 requests in 5.10s, 438.46MB read
Requests/sec:  21602.45
Transfer/sec:     85.97MB
+ sleep 1
+ echo -e '\n\napisix: 1 worker + 1 upstream + 2 plugins (limit-count + prometheus)'

apisix: 1 worker + 1 upstream + 2 plugins (limit-count + prometheus)
+ curl http://<IP_ADDRESS>:9080/apisix/admin/routes/1 -X PUT -d '
{
    "uri": "/hello",
    "plugins": {
        "limit-count": {
            "count":<PHONE_NUMBER>000,
            "time_window": 60,
            "rejected_code": 503,
            "key": "remote_addr"
        },
        "prometheus": {}
    },
    "upstream": {
        "type": "roundrobin",
        "nodes": {
            "<IP_ADDRESS>:80": 1
        }
    }
}'
{"node":{"value":{"plugins":{"limit-count":{"time_window":60,"rejected_code":503,"count":2000000000000,"key":"remote_addr"},"prometheus":{}},"uri":"\/hello","upstream":{"nodes":{"<IP_ADDRESS>:80":1},"type":"roundrobin"}},"createdIndex":6,"key":"\/apisix\/routes\/1","modifiedIndex":6},"prevNode":{"value":"{\"plugins\":{},\"uri\":\"\\\/hello\",\"upstream\":{\"nodes\":{\"<IP_ADDRESS>:80\":1},\"type\":\"roundrobin\"}}","createdIndex":5,"key":"\/apisix\/routes\/1","modifiedIndex":5},"action":"set"}
+ sleep 3
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     0.88ms  185.46us  11.05ms   91.76%
    Req/Sec     9.19k   192.33     9.67k    77.45%
  93297 requests in 5.10s, 377.69MB read
Requests/sec:  18295.08
Transfer/sec:     74.06MB
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     0.88ms  131.46us   3.56ms   91.10%
    Req/Sec     9.10k   149.39     9.39k    64.71%
  92394 requests in 5.10s, 374.04MB read
Requests/sec:  18116.66
Transfer/sec:     73.34MB
+ sleep 1
+ make stop
/usr/bin/openresty -p $PWD/ -c $PWD/conf/nginx.conf -s stop
+ echo -e '\n\nfake empty apisix server: 1 worker'

fake empty apisix server: 1 worker
+ sleep 1
+ sed -i 's/worker_processes [0-9]*/worker_processes 1/g' benchmark/fake-apisix/conf/nginx.conf
+ sudo openresty -p /tmp/apisix/benchmark/fake-apisix
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   599.95us   69.89us   3.46ms   92.69%
    Req/Sec    13.36k   152.04    13.73k    73.53%
  135648 requests in 5.10s, 539.83MB read
Requests/sec:  26599.12
Transfer/sec:    105.85MB
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   592.14us   63.51us   2.99ms   92.24%
    Req/Sec    13.54k   154.78    13.86k    65.69%
  137393 requests in 5.10s, 546.77MB read
Requests/sec:  26939.79
Transfer/sec:    107.21MB
+ sudo openresty -p /tmp/apisix/benchmark/fake-apisix -s stop
+ sudo openresty -p /tmp/apisix/benchmark/server -s stop

4 workers
[root@iZ8vb1wy4teeoaa7xgt3zpZ apisix]# ./benchmark/run.sh 4
+ '[' -n 4 ']'
+ worker_cnt=4
+ mkdir -p benchmark/server/logs
+ mkdir -p benchmark/fake-apisix/logs
+ sudo openresty -p /tmp/apisix/benchmark/server
+ trap onCtrlC INT
+ sed -i 's/worker_processes [0-9]*/worker_processes 4/g' conf/nginx.conf
+ make run
mkdir -p logs
mkdir -p /tmp/apisix_cores/
/usr/bin/openresty -p $PWD/ -c $PWD/conf/nginx.conf
+ sleep 3
+ echo -e '\n\napisix: 4 worker + 1 upstream + no plugin'

apisix: 4 worker + 1 upstream + no plugin
+ curl http://<IP_ADDRESS>:9080/apisix/admin/routes/1 -X PUT -d '
{
    "uri": "/hello",
    "plugins": {
    },
    "upstream": {
        "type": "roundrobin",
        "nodes": {
            "<IP_ADDRESS>:80": 1
        }
    }
}'
{"node":{"value":{"plugins":{},"uri":"\/hello","upstream":{"nodes":{"<IP_ADDRESS>:80":1},"type":"roundrobin"}},"createdIndex":8,"key":"\/apisix\/routes\/1","modifiedIndex":8},"prevNode":{"value":"{\"plugins\":{\"limit-count\":{\"time_window\":60,\"rejected_code\":503,\"count\":2000000000000,\"key\":\"remote_addr\"},\"prometheus\":{}},\"uri\":\"\\\/hello\",\"upstream\":{\"nodes\":{\"<IP_ADDRESS>:80\":1},\"type\":\"roundrobin\"}}","createdIndex":6,"key":"\/apisix\/routes\/1","modifiedIndex":6},"action":"set"}
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   189.44us   75.74us   2.61ms   90.56%
    Req/Sec    41.87k     2.95k   45.87k    83.33%
  424875 requests in 5.10s, 1.65GB read
Requests/sec:  83313.72
Transfer/sec:    331.56MB
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   183.00us   62.11us   2.65ms   85.62%
    Req/Sec    42.98k     2.06k   46.98k    63.73%
  436109 requests in 5.10s, 1.69GB read
Requests/sec:  85512.73
Transfer/sec:    340.31MB
+ sleep 1
+ echo -e '\n\napisix: 4 worker + 1 upstream + 2 plugins (limit-count + prometheus)'

apisix: 4 worker + 1 upstream + 2 plugins (limit-count + prometheus)
+ curl http://<IP_ADDRESS>:9080/apisix/admin/routes/1 -X PUT -d '
{
    "uri": "/hello",
    "plugins": {
        "limit-count": {
            "count":<PHONE_NUMBER>000,
            "time_window": 60,
            "rejected_code": 503,
            "key": "remote_addr"
        },
        "prometheus": {}
    },
    "upstream": {
        "type": "roundrobin",
        "nodes": {
            "<IP_ADDRESS>:80": 1
        }
    }
}'
{"node":{"value":{"plugins":{"limit-count":{"time_window":60,"rejected_code":503,"count":2000000000000,"key":"remote_addr"},"prometheus":{}},"uri":"\/hello","upstream":{"nodes":{"<IP_ADDRESS>:80":1},"type":"roundrobin"}},"createdIndex":9,"key":"\/apisix\/routes\/1","modifiedIndex":9},"prevNode":{"value":"{\"plugins\":{},\"uri\":\"\\\/hello\",\"upstream\":{\"nodes\":{\"<IP_ADDRESS>:80\":1},\"type\":\"roundrobin\"}}","createdIndex":8,"key":"\/apisix\/routes\/1","modifiedIndex":8},"action":"set"}
+ sleep 3
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   214.38us   84.32us   4.47ms   90.24%
    Req/Sec    36.98k     2.04k   41.07k    66.67%
  375243 requests in 5.10s, 1.48GB read
Requests/sec:  73581.33
Transfer/sec:    297.88MB
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   211.16us   64.10us   2.68ms   80.29%
    Req/Sec    37.35k     1.79k   41.98k    74.51%
  378878 requests in 5.10s, 1.50GB read
Requests/sec:  74296.58
Transfer/sec:    300.77MB
+ sleep 1
+ make stop
/usr/bin/openresty -p $PWD/ -c $PWD/conf/nginx.conf -s stop
+ echo -e '\n\nfake empty apisix server: 4 worker'

fake empty apisix server: 4 worker
+ sleep 1
+ sed -i 's/worker_processes [0-9]*/worker_processes 4/g' benchmark/fake-apisix/conf/nginx.conf
+ sudo openresty -p /tmp/apisix/benchmark/fake-apisix
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   153.01us   49.13us   2.62ms   84.60%
    Req/Sec    50.91k     2.57k   54.23k    73.53%
  515952 requests in 5.10s, 2.01GB read
Requests/sec: 101177.24
Transfer/sec:    402.65MB
+ sleep 1
+ wrk -d 5 -c 16 http://<IP_ADDRESS>:9080/hello
Running 5s test @ http://<IP_ADDRESS>:9080/hello
  2 threads and 16 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   157.58us   51.36us   2.55ms   83.78%
    Req/Sec    49.54k     2.76k   54.13k    71.57%
  502522 requests in 5.10s, 1.95GB read
Requests/sec:  98542.29
Transfer/sec:    392.16MB
+ sudo openresty -p /tmp/apisix/benchmark/fake-apisix -s stop
+ sudo openresty -p /tmp/apisix/benchmark/server -s stop

we can use tool stata to generate the graph automaticly, take a look at: http://www.sohu.com/a/213311266_489312


Use actual media type on BlobStatus

Replace BlobStatus.BlobType with actual media type, as a string
This cleans up a lot of the confusion around what type it actually is.
Also adds IsManifest() and IsIndex() methods to BlobStatus, so one can easily check if it is an index, manifest, or just regular old blob.
This became necessary to pass the correct type all the way up to containerd and use it further down. Follow on to #1357 .

I still want eyes on it, though

Btw, gofmt seems to be complaining about something @deitch

LGTM

Thanks for that @rvs ; forgot to run make fmt. Well, I guess that is why we have CI. Fixed now.

Found some minor errors. Cleaned them up. This is ready from my perspective. Gotta love eden for making the testing cycle easier.

Also, I have no clue what yetus is complaining about. When you dig through, it gives a link, whose contents are "Artifact not found".

One log thing to fix.

Fixed.

How much testing has this seen? Should I build the branch (once log issue is fixed) and run the integration tests? Want to verify that the new size code comes up with the correct size etc.

eden has made my life much easier, so I have gone as far as launching both OCI containers and Ubuntu. But it would benefit from the full integration tests.


Thread Recommendation

First, i want to say thank you for fixing the problem with the bad proxy I didn't know user agent can cause such a problem like that
The second one i want to ask the threads from proxy_check.py and youtube_viewer.py are based on RAM or CPU usage because i don't have big spikes when i use proxy_check.py but for youtube_viewer 10 are recommended for youtube pattern or can i use more than 10?

I opened this "Issue" because we cannot communicate or if we can i don't know how i only know via Issue tab

proxy_check use requests module without chrome instance so you can use more than 100 thread no problem. But in youtube_viewer to watch the video you need a chrome driver. If your PC is good enough opening 10 chrome instances wouldn't be much besides this headless chrome take less ram compared to the original Google Chrome.
Like 50 chrome instances could hang your PC. However, you can play around with threads number see which works best for you.

Thank you for your answer do you think 16 GB ram can handle 50-100 threads for youtube_viewer?

try with 50. Also, it first checks if the proxy is good or bad with the request module. If good then it opens chrome. So there is a chance that chrome instances always will be less than threads you define.

Thats good feature thank you for information i collect now to donate you :) your project is unique and you deserve more

yeah, it would be great if you could support this project. Thanks.


Requests not supported with HuggingFace Chat Templates

Hi,
I'm trying to call the multimodal sglang server using OpenAI compatible API.
This is the code to start the server:
python3 -m sglang.launch_server --model-path liuhaotian/llava-v1.6-34b --tokenizer-path liuhaotian/llava-v1.6-34b-tokenizer --port 30000 --tp 1

Then I used this code to call the server:
import base64
import os
import openai

def encode_image(image_path):
    with open(image_path, "rb") as image_file:
        return base64.b64encode(image_file.read()).decode("utf-8")

def request_vision(image):
    client = openai.Client(
        base_url="http://localhost:30000/v1", api_key="sk-empty"
    )
    max_tokens = 300
    model = "default"
    base64_image = encode_image(image)
    messages = [
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "What’s in this image?"
                },
                {
                    "type": "image_url",
                    "image_url": {
                        "url": f"data:image/jpeg;base64,{base64_image}"
                    }
                }
            ]
        }
    ]
    response = client.chat.completions.create(
        model=model,
        messages=messages,
        max_tokens=max_tokens
    )
    return response

request_vision('image.png')

However, running this code yielded the following error:
InternalServerError: Error code: 503 - {'detail': 'Structured content requests not supported with HuggingFace Chat Templates. Make sure the server specifies a sglang chat template.'}

How can I resolve this problem?

Solved it. Just specify --chat-template=chatml


[java-resnames] fix: report proto3 field presence in SupportedFeatures

Let's take this discussion offline to the testing thread.

Added the flag back, seems to pass now.

Friendly ping.


Unrecognized device error when setting memory growth

System information

OS Platform and Distribution : Windows 10
TensorFlow installed from: PIP
TensorFlow version: tf-nightly-gpu 2.4.0-dev20200808
Python version: 3.7.4
Installed using virtualenv? PIP
CUDA/cuDNN version: CUDA 10.2
GPU model and memory: GeForce GTX 1050 Ti

Describe the problem
When listing available physical devices GPU does appear. Nonetheless, when setting memory growth (tf.config.experimental.set_memory_growth(gpu, True)), python does not recognize the device.
Any other info / logs
ValueError: Unrecognized device: [PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

@Echambouleyron
Please, provide the exact sequence of commands / steps that you executed before running into the problem.Thanks!


adr for MB-7112

Description
This is an adr for the state changes we need for service counseling.
There is some markdown linting stuff I need to fix, but wanted to get 👀 on content ASAP so a team can pick this up next week.
References

Create new move "status" for Services Counseling
Miro with a graphical view of it.

Messages

:book:
:link: MB-7112

  Generated by :no_entry_sign: dangerJS against 88e7e951b55030c5605ee4b85b7084859bcf3767


fix(curriculum): typo of through instead of though

Checklist:

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #45788

Hi @ashratigan, Congrats on your first pull request (PR)! 🎉
Thank you for your contribution to the page! 👍
We are happy to accept these changes and look forward to future contributions. 📝


luci-app-dockerman: sub menu not showing

Steps to reproduce:

Install luci-app-dockerman.
Reload luci page.

Actual behavior:
The Docker menu contains no sub menu.

Expected behavior:
The Docker menu should contains sub menu.

Additional Information:
Replace alias("admin", "docker", "config") with firstchild() resolve this issue.
--- a/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
+++ b/applications/luci-app-dockerman/luasrc/controller/dockerman.lua
@@ -9,7 +9,7 @@ module("luci.controller.dockerman",package.seeall)

 function index()
        entry({"admin", "docker"},
-               alias("admin", "docker", "config"),
+               firstchild(),
                _("Docker"),
                40).acl_depends = { "luci-app-dockerman" }

IIRC there's no such issue in previous version of luci. Is this expected behavior?
OpenWrt version information from system /etc/openwrt_release
DISTRIB_ID='OpenWrt'
DISTRIB_RELEASE='22.03.2'
DISTRIB_REVISION='r19803-9a599fee93'
DISTRIB_TARGET='x86/64'
DISTRIB_ARCH='x86_64'
DISTRIB_DESCRIPTION='OpenWrt 22.03.2 r19803-9a599fee93'
DISTRIB_TAINTS=''

I just updated OPKG and the same issue has now happened to me. My dockers are running as i can still access them but I too have lost the sub menu's as yuo have:

I make a snapshot image with dockerman integrated. Droplist menu lost after reconfig docker root path or create some containers. Luci unable to dispatch.

I confirm the same issue on latest 22.03 but in 21.02 all is OK

Hi @lisaac https://github.com/lisaac/luci-app-dockerman - maybe we should report here ?

@ysc3839 Thanks - your workaround/solution is working fine

luci-app-dockerman in master was apparently broken and then fixed in April with commit 0c1fc7f6 from PR #5789
Package in 22.03 was fine at that time.
22.03 has then got broken in Dec 2022 due to backport commit fc759abea
I will backport the dockerman fix 0c1fc7f6  from master.

Shoudl be fixed with 68e23b284


[Bug] No settings options

I think after the recent discord update, for some reason this plugin isn't showing settings.

For now, you can use this: download
There is no ClientThemebypass, but the plugin works :)

Nice timing I was planning to fix it today lol

should be fixed in latest update


Add agreement bucket to run_app.sh

Running the app without DM_AGREEMENTS_BUCKET set causes the app to fail in various places (such as the frameworks dashboard).
Setting the variable resolves the issue.

:+1: after a rebase.


Serial recovery on nRF requires a power-cycle after flashing

When using the serial recovery mode and after flashing with ninja flash and resetting with button 1 pressed, mcumgr will time out unless one power-cycles the board.
Not urgent, should not block 1.2

CC @lemrey

Any idea if this can be fixed in software, or does it just have to be documented?

I think it should be fixable by software because the UART works fine for things like the console. We will look into this very soon, but it's not serious enough to warrant delaying the release.

It is possible this was an issue with the virtual machine (VirtualBox). The issue disappeared when switching from the EHCI 2.0 USB controller to the OHCI 1.1 USB controller; I was not able to reproduce this in VMWare player.

@lemrey can you please run Logic16 with pca10056 to see if the request packet is actually reaching the nRF IC?

Is this still an issue?

@nvlsianpu @lemrey is this still relevant?

Closing. Please re-open if this is still an issue.


Cyberpunk: Only include .archive files from archive/pc/mod/

Without this, modlist.txt ends up in the modlist, along with all the .xl files for ArchiveXL. While this doesn't seem to cause issues, it does confuse red4-conflicts a bit.

@ZashIn I have no clue how CP2077 works, is that a valid change?

Yes valid change, can be merged. Oversight of mine, afaik only .archive files make sense in modlist.txt


Use apollo-client without apollo-link-http

I am implementing my own link (not based on http). If I exclude apollo-link-http from packages (to save some space) the apollo service will crash because unable to load apollo-link-http. Would you accept a PR to have a BaseApolloService without apollo-link-http (and maybe without cache) from which ApolloService will inherit and from which users can inherit in advanced cases?

Yes, the design you describe makes a lot of sense. Ideally we should support the most common use case out-of-the-box with little/no required config, but also make it possible to serve more advanced use cases like yours.
Regarding the name, this is somewhat unconventional but what do you think about ApolloBaseService instead of BaseApolloService? I like it because it keeps the Apollo prefix.

If this base service is a mixin, you should take a look at #139.


Background not showing up

Hi,
First, thanks for the great work.
I was trying to read this presentation: https://spark-summit.org/2014/wp-content/uploads/2014/06/Testing-Spark-Best-Practices-Anupama-Shetty-Neil-Marshall.pdf. It has a dark background (an image or a gradient I'm not sure) with white text. With no background, the text is white on white and thus is illegible.
There's no error in the browser console, I'm using the firefox 41 on kubuntu 15.04.

Adding screenshots.
In firefox:

In okular (kde's pdf viewer):

The rendering of this PDF has improved a bit after recent patches. The black background is now rendered, but the shading is still not visible.

Closing as fixed by PR #6684.


Updated to use gcloud plugin

I'm closing this PR. As discussed in email, we need the gcloud plugin code to be in a separate branch so as not to break the existing docs that reference this repository.


Error using numeral.locale('pt-br');

When I use the 'locale' of lib I am returning the following error.
My function:

VS Code error:

Browser error:

To solve this error I had to create a new 'locale'.

Dumb question, but does your project also reference the locales.js file? That seems to be where the optional locales are attached to the numeral object.

In my case I had to 'require' the locales I needed before using them.

In my case to make it work I just required both the numeral and the locales file:
  let numeral = require('numeral');
  let locales = require('numeral/locales');

I just don't think this is the best way. My opinion is that Numerals.js should try to load the locale once the user call numeral.locale('pt-br');, in case it does not exist it should use the default locale.
I don't think it should ever raise an exception trying to change the locale.

The same problem.
I'm trying to implement number format by locale and ie: 6542.32 in pt-br continues yet 6542.32.

In an ES6 environment:
import numeral from 'numeral';
import 'numeral/locales';

numeral.locale('pt-br');
numeral(10000).format('0,0') // 10.000

numeral.locale('en-au');
numeral(10000).format('0,0') // 10,000

ES5 environment:
var numeral = require('numeral');
require('numeral/locales');

numeral.locale('pt-br');
numeral(10000).format('0,0') // 10.000

numeral.locale('en-au');
numeral(10000).format('0,0') // 10,000


Toolbar Notification Component

Feature Request
I'm seeing a trend that many of our apps with need a notification count/icon menu item w/ a dropdown menu w/ list items, etc
Screenshots or link to CodePen/Plunker/JSfiddle

md-menu-trigger now accepts a MdMenuPanel interface.
https://github.com/angular/material2/pull/1564/files#diff-863c4e6ab704390217dec7361906bec8R30
So this might be just a matter of creating a menu like component and leverage material2 menu-trigger.
e.g.

...

    <button td-notification-menu-item> Refresh </button>

...

where TdNotificationMenu implements MdMenuPanel (maybe even extend MdMenu)
OR just creating a directive to style the md-menu differently, and apply our theme on it.
e.g.
<md-menu td-notification-menu #menu="mdMenu">

...

    <button md-menu-item> Refresh </button>
    <button md-menu-item> Settings </button>
    <button md-menu-item> Help </button>
    <button md-menu-item disabled> Sign Out </button>

...

</md-menu>

Is this on the roadmap still? Beta.0 or later?

We are doing the initial design, if all goes well, we will include it in alpha.10

Initial implementation of notifications and menu core submodules with https://github.com/Teradata/covalent/pull/213


Allow guests to use the design view of Winforms in a Live Share session

This is a must have.

Thanks for filing this request. This looks like a duplicate of https://github.com/MicrosoftDocs/live-share/issues/1538.
We're unable to prioritize this feature request. We understand that this may be disappointing but unfortunately, we’re not able to prioritize this feature over the other current areas of focus on the team.


Feat: support complicated addon parameter

Addon parameter support  complicated parameter such as [struct, array].
eg:
list parameter: vela addon enable xxx imagePullSecrets={a,b,c}.
struct parameter: vela addon enable xxx image.Repo=www.test.com image.tag=1.1 the args will translate to
{
  image: {
    repo: www.test.com
    tag: 1.1
  }
}

Signed-off-by: 楚岳<EMAIL_ADDRESS>Description of your changes

Fixes #
I have:

[ ] Read and followed KubeVela's contribution process.
[ ] Related Docs updated properly. In a new feature or configuration option, an update to the documentation is necessary.
[ ] Run make reviewable to ensure this PR is ready for review.
[ ] Added backport release-x.y labels to auto-backport this PR if necessary.

How has this code been tested

Special notes for your reviewer

Which addon will need this feature?

Which addon will need this feature?

Got the answer from https://github.com/oam-dev/catalog/pull/243.

Hi @wangyikewxgm , I tried this new feature, but hit one issue.

input list arguments for 'vela addon enable'

vela addon enable velaux imagePullSecrets={myreg}

2.The list is stored in Secret
"imagePullSecrets": "[myreg]",
3.curl api-server
curl <IP_ADDRESS>:8000/api/v1/addons/velaux/status
this api can not parse imagePullSecrets to List. It is string in
 "args": {
  "imagePullSecrets": "[myreg]",
  "repo": "hub.jdcloud.com",
  "serviceType": "NodePort",
  "version": "v1.2.3"
 },

4.if you open velaux addon's details page on VelaUX webpage
The webpage will crash.

Hi @wangyikewxgm , I tried this new feature, but hit one issue.

input list arguments for 'vela addon enable'

vela addon enable velaux imagePullSecrets={myreg}

2.The list is stored in Secret "imagePullSecrets": "[myreg]",
3.curl api-server curl <IP_ADDRESS>:8000/api/v1/addons/velaux/status this api can not parse imagePullSecrets to List. It is string in
 "args": {
  "imagePullSecrets": "[myreg]",
  "repo": "hub.jdcloud.com",
  "serviceType": "NodePort",
  "version": "v1.2.3"
 },

4.if you open velaux addon's details page on VelaUX webpage The webpage will crash.

Thanks for report, What's your vela's version. I have try in 1.2.3 but cannot regenerate this bug.
And this way storage list parameter is fine. Add list parameter in webpage just like this.
And I have submit a new issue  in velaux to track this: https://github.com/oam-dev/velaux/issues/372


Test Pull Request for Forecasting challenge

Here are my updated code and forecast files. This is mostly just a check for me, so don't feel like you need to accept these. Thanks so much for your help Freya!

reject Test PR


Simplify Package Exports

This PR simplifies package exports by removing intermediary directories in favor of .js / .cjs for differentiation. This also allows folks to import safari-14-idb-fix/dist/index.cjs directly if desired.

Closing in favor of #8.


pyperclip is not a dependency anymore.

hey there,
I've just removed pyperclip from the dependencies, and made the code to use the clipboard module provided by wxPython

Hi,
Thanks for the pull request. Although your version of the sourcecode was not up to date so I got it from your page and implemented it in the newest version that was already on my git hub. Now it is using wx's clipboard instead of pyperclip. Also you forgot an indentation for returning object t in function get_clipboard()


Array-like functions

This makes a few simple functions from Base act on ITensors, and overloads randn(i,j) for i::Index. Some duplicate existing functions, like ndims == order.
You may not want all of these, but I wonder what the rule is. And more generally, why ITensor <: AbstractArray is not true?

Codecov Report

Merging #16 into master will decrease coverage by 0.26%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
- Coverage   61.68%   61.41%   -0.27%
==========================================
  Files          26       26
  Lines        2067     2076       +9
==========================================
  Hits         1275     1275
- Misses        792      801       +9

Impacted Files
Coverage Δ

src/itensor.jl
64.82% <0%> (-4.3%)
:arrow_down:

Continue to review full report at Codecov.

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

It'd be good to add some basic tests for these functions.

This seems good, though is there a particular reason to define the randn(::Index...) type constructors? That would maybe make me think it makes an Array based on the dimensions of the Indices, it seems like randomITensor is more clear.

I agree with the comments above. Let's please make the following changes:

add unit tests & fix any errors
please remove the randn overloads

And to answer why ITensor is not <: AbstractArray, it is because in general the goal of an ITensor is to have a memory-independent interface, which is at least conceptually at odds with the AbstractArray interface. It could work, but we would want to check that making ITensor a subtype of AbstractArray adds some value. For now we will just add our own ITensor functions and keep it in mind as a possibility.

OK I tidied up a bit, added some tests. I've deleted the randn overload. I added some docstrings, and put indents into several others.
One of these is mul!(A,x,B). I wonder if this should be scale!, as LinearAlgebra.mul! is matrix multiplication. But I did not rename it.
I do still wonder about ITensor <: AbstractArray, as this might make it easier to compose with other things outside this package. (For instance, to use your SVD in a calculation which is otherwise not very tensor-contraction heavy). It would not imply a fixed storage type, only the eltype and ndims need to be part of the type. I had a go in another branch but ran into problems with the way you do TR + TC by mutating copy(TR), added some promote_type(eltype... things but far from finished.

I think it's somewhat important to make ITensor <: AbstractArray. AbstractArray makes no promises about memory layout at all. One of the biggest advantages of julia is generic code reuse, so if we do a good job of implementing ITensor <: AbstractArray then one can plug it into all sorts of generic AbstractArray code and have it 'just work'.
On this topic, I actually think rand should replace randomITensor. The common interface for random instances of a type T is rand(T, args...) so we could just replace randomITensor(args...) with  rand(ITensor, args...). This will make generic interfaces easier and not cost any verbosity.

One of these is mul!(A,x,B). I wonder if this should be scale!, as LinearAlgebra.mul! is matrix multiplication. But I did not rename it.

I went back and forth about what to call this. I wasn't sure if scale! was great since I would think that would be more like scale!(A,x) to scale A in-place by x. In the end, we would prefer to use broadcast notation for this, such as:
A .= x .* B

so hopefully mul! will just become an internal function anyway.

I do still wonder about ITensor <: AbstractArray, as this might make it easier to compose with other things outside this package. (For instance, to use your SVD in a calculation which is otherwise not very tensor-contraction heavy). It would not imply a fixed storage type, only the eltype and ndims need to be part of the type. I had a go in another branch but ran into problems with the way you do TR + TC by mutating copy(TR), added some promote_type(eltype... things but far from finished.

It is something to consider, I think we would want to see a particular use case before we made a design decision like that. To me it makes more sense to make the subtypes of TensorStorage <: AbstractArray since their interface fit better.

I think it's somewhat important to make ITensor <: AbstractArray. AbstractArray makes no promises about memory layout at all. One of the biggest advantages of julia is generic code reuse, so if we do a good job of implementing ITensor <: AbstractArray then one can plug it into all sorts of generic AbstractArray code and have it 'just work'.

I think it would be good to see a particular use case of where that would be useful, but it is something I would be open to. For now we are focused on implementing all of the functions we want for ITensors, which in general are pretty custom and I believe generally orthogonal to the functionality of the AbstractArray interface (for example, it is generally not necessary to call permutedims on an ITensor, since permutations are handled automatically by ITensor functions). One use case could be that it makes it easier to implement broadcasting over ITensors, but I need to dig into that more.

On this topic, I actually think rand should replace randomITensor. The common interface for random instances of a type T is rand(T, args...) so we could just replace randomITensor(args...) with rand(ITensor, args...). This will make generic interfaces easier and not cost any verbosity.

rand(ITensor, args...) could be a good alternative interface, I think the single function randomITensor(...) is still good for simplicity. Again, I think we would want to see a situation where there is a clear advantage before we start adding more functions (that seem to do the same thing).

On rand, it's a little confusing to know what the ideal spelling is... rand(Float32, 3,4) isa Matrix but rand(Matrix{Float32}, 3,4) is an error. So while rand(ITensor, i,j,k) looks nice (to me!) it may not allow much to be made generic. Another possible spelling is randn!(ITensor(i,j,k)), I guess, like rand!(Matrix{Float32}(undef, 3,4) ).
Supporting broadcasting would be neat, and a move towards being generic. Am not sure I see the conflict between scale!(A,x) and scale!(A,x,B), like add! you could add as many methods as seem useful, but they all do similar element-wise things, if I understand right. Whereas mul! is the friendly spelling of part of  gemm!.

One serious issue with inheritance as an approach to generic programming is that you can only inherit from one thing, or else you have to deal with multiple-inheritance issues. And there are other issues.
But it could definitely be good to let ITensors be pluggable into existing abstract array code.
So how about the following compromise approach: we could (just as an experimental thing for a while) make a wrapper type that holds an ITensor and inherits from AbstractArray. It wraps all of the AbstractArray functions like ndims by calling the appropriate function on the ITensor it holds.
Then we could make a function treatAsArray which takes an ITensor and returns it wrapped into this wrapper object. So then (hypothetically) one could do things like sort!(treatAsArray(T)) where T is an ITensor.
Feel free to destroy this idea!

Making ITensor <: AbstractArray is quite unlikely to make anyone's life easier from within ITensors.jl and will likely not benefit any usecases we can easily foresee right now. The advantage of generic code is to users who are doing things with the package that we don't expect.
I think that if ITensors.jl is well written enough, the ITensor type can become a lingua franca for tensor based operations in julia. For instance, someone writing a neural network may think

Hey, Arrays are kinda annoying for the sort of things I want to do with my neural network. I just want these indices to correspond to a weight and this index to correspond to a bias and I want general contractions between my tensors to be smart enough to respect that and I don't want to worry about the actual details of the memory layout.

An ITensor may indeed be a better option for that person, but that dream may shatter if they can't take an ITensor and stick it into a package that wasn't designed knowing about ITensors. The easiest way to do that is to respect and support common interfaces.
Regarding permutedims: yes, ITensor users may not need to use that, but it still makes sense to implement it, afterall it's just a shuffling of indices and then any code that relies on permutedims (say TensorCast.jl) can straightforwardly use an ITensor. None of this means that we have to give up the current ITensor interface, it just means that if we support more of the AbstractArray interface, this code will be more useful to more people.
For instance, the DifferentialEquations.jl and the Flux.jl people probabably never dreamed that they'd one day be supporting shoving eachothers code together, but mere days after a NeuralODE paper dropped, they were able to write a couple hundred lines of code and suddenly they had their own NeuralODE implementation https://julialang.org/blog/2019/01/fluxdiffeq .

On rand, it's a little confusing to know what the ideal spelling is... rand(Float32, 3,4) isa Matrix but rand(Matrix{Float32}, 3,4) is an error. So while rand(ITensor, i,j,k) looks nice (to me!) it may not allow much to be made generic. Another possible spelling is randn!(ITensor(i,j,k)), I guess, like rand!(Matrix{Float32}(undef, 3,4) ).

Yes, I don't know what the signature would be for randn to construct an ITensor. We should definitely support randn!(ITensor(i,j,k)) anyway (probably randomITensor(i,j,k) would just call that). We will also have similar functions like randn!(::MPS) and randn!(::MPO) if we don't already.

Supporting broadcasting would be neat, and a move towards being generic. Am not sure I see the conflict between scale!(A,x) and scale!(A,x,B), like add! you could add as many methods as seem useful, but they all do similar element-wise things, if I understand right. Whereas mul! is the friendly spelling of part of gemm!.

Maybe mul! isn't the right choice given how it is already used in Julia, it just seems like it reads well as "multiply these things to together, then store into the preallocated ITensor". In that sense mul!(A,x,B) is nearly the same as mul!(A,ITensor(x),B) (which should also work), in the sense that mul! of ITensors is the contraction of ITensors, so mul!(A,x,B) is like the contraction of an order-0 tensor with an order-n tensor. I think of scale!(A,x) as involving only as scaling in-place, while mul!(A,x,B) doesn't really do that (it scales another ITensor, then stores the result in a pre-allocated ITensor). I don't think it is too bad here to diverge a bit from the Julia definition, I think it is pretty clear what it means in the context of ITensors.

It already almost supports the AbstractArray interface, which is just size, ndmis, getindex I think. Of course this thinks of indices being integers in a fixed order, but this need not be storage order. inds(A) has an order, and A[2,3] works. The hurdle to my #array branch passing tests was real + complex being implemented with a mutation (of the container not the storage).
A potential upside is that @code_warntype might give less bright red Anys. I haven't dug enough to know whether that matters for performance. (Although I guess that's just about the type of ITensor not its <: relations.)
A potential downside is that if you intend to hack broadcasting such that ITensor .+ ITensor goes only by the named indices, then it could complicate your life: I guess ITensor .+ Matrix  isa Matrix, but would  ITensor .= ITensor .+ Vector be an error, if their orders disagree?
But anyway maybe this question is beyond this little PR.

@MasonProtter: I am very sympathetic to this idea and definitely excited about the vision of generic programming. Here's why I'm being conservative about the <: AbstractArray thing though: why AbstractArray? Why not some other type we haven't heard of yet but which could be closer in spirit to ITensor? (<: UnorderedArray or <: AbstractTensor etc.). So I worry that if we put <: AbstractArray and people start writing code that depends on that, we will get locked in to this choice and if we change it it later, it will be a breaking change. So we may do it but I don't want to do it hastily.
On a related note, is there a way to write an "is_array" trait in Julia as an alternative to inheriting from AbstactArray?

Since the base language already exports AbstractArray, it has already kinda solidified as the common super-type for tensor like ideas and if something like UnorderedArray or AbstractTensor appeared, they would likely be <:AbstractArray as well. In fact, we would probably benefit from making our own type AbstractTensor <: AbstractArray and have ITensor <: AbstractTensor.
I think you'll find that the AbstractArray interface actually makes very few assumptions about what's inside it. Basically all it assumes is index-ability and some notion of dimensionality / rank as @mcabbott said.

I think one concern with using the AbstractArray interface would be that it would automatically define certain functions on ITensor that we might not want to implement right now  (i.e. something that changes the storage, but doesn't do the correct corresponding thing with the indices, such as a reshape or slicing). This could become a bit of a rabbithole of fixing unintended overloaded behavior.
I definitely appreciate that it would be good to make ITensor play nicely with other packages (for example, we want ITensor to work with packages for iterative solvers). However, because of the possible unintended consequences and development overhead, I think it is best to wait for a good application where we need ITensor <: AbstractArray (if you come up with one, we would be happy to hear about it!).

As long as the corresponding basic functions getindex, setindex!, etc. are defined properly, I'm not sure how functions composed of those would end up abusing the index structure.

@MasonProtter: although we don't do this very much, in principle functions which operate on ITensors can dynamically return the tensor indices in a different order and even ITensors with different numbers of indices. So this could make AbstractArray code that relies on the order not changing very brittle to use in conjunction with ITensor. One could protect against this by inserting lines of code that make sure the indices are in a certain, expected order though. This could actually be another argument in favor of my treatAsArray function idea in fact: it could require that you put the indices in the order you want when making the array wrapper object.

Re mul!, sorry my mistake, I was misunderstanding this function. It's like add!(A,0,x,B) = A .= x .* B not like scale!(A,x,B) = A .*= x .* B. Which is then OK, since mul!(rand(3), 5, ones(3)) == [5,5,5] does exactly this. Docs corrected now, and one more test.
 It's only touching the ITensor through A[2,3] etc. That seems OK to me, in that you do support indexing directly like this. But I agree the potential space of designs here is quite large. If you want maximum freedom then perhaps you should not expose integer indexing at all?
On my other computer I was making some convenience macros for wrapping & unwrapping the data, which is another way to go back and forth to ordinary code. If that sounds interesting I will make a PR.

Here's the 5-minute version of the wrapper idea, note that permute(x, ijk...) isn't lazy
struct WrappedTensor{T,N} <: AbstractArray{T,N}
    tensor::ITensor
    WrappedTensor(x::ITensor) = new{eltype(x), order(x)}(x)
end

Base.AbstractArray(x::ITensor) = WrappedTensor(x)
Base.AbstractArray(x::ITensor, ijk::Index...) = WrappedTensor(permute(x, ijk...))

ITensors.ITensor(x::WrappedTensor) = x.tensor

Base.size(x::WrappedTensor) = dims(x.tensor)
Base.getindex(x::WrappedTensor, i...) = x.tensor[i...]
Base.setindex!(x::WrappedTensor, y, i...) = setindex!(x.tensor, y, i...)

Actually there are a lot of nice things in this pull request (I like having things like ndims work for ITensors, for example, and there are docstrings) so I'm reopening.
I'll probably make a few small changes in the process of merging the pull is all.


Custom Slide Timings Reopening #218

What:
There is now the option to create a list of timings for the duration of each slide.
Why:
They allow users more freedom and assist with content such as slideshows where there is varying amounts of content per slide.
How:
There is a new Slider property called Interval list that allows the user to input that in addition to intervals and it will automatically apply the list instead.
Checklist:

[x] Documentation added/updated
[x] Typescript definitions updated
[x] Tests added and passing
[x] Ready to be merged

If you slide to the next image with drag it now behaves appropriately. I still need to fix it for the button pressing.

If you slide to the next image with drag it now behaves appropriately. I still need to fix it for the button pressing.
I marked your PR as a work in progress which will keep this from being marked stale/closed. The last time we touched base you were still looking at a timing fix when a user clicks on a button, is that correct ?

@captnstarburst That is correct, it has been a while since I have looked at it due to holiday, however, I will be revisiting it this evening.


Webpack v4

Adds Webpack v4
Removes CommonsChunkPlugin, NamedModulesPlugin and NoEmitOnErrorsPlugin which were removed by the release 4.0.0 (https://github.com/webpack/webpack/releases)
Set mode based on IS_DEV:

let config = {
    // Set webpack mode:
    mode: IS_DEV ? 'development' : 'production',
...
}

Looks legit. Let me try this out.

I am not able to get this working.  When I run yarn start on the basic example I get:
module.exports = class Template extends Tapable {
                                        ^

TypeError: Class extends value #<Object> is not a constructor or null
    at Object.<anonymous> (/Users/jared/workspace/github/jaredpalmer/razzle-next/packages/razzle/node_modules/webpack/lib/Template.js:14:41)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/jared/workspace/github/jaredpalmer/razzle-next/packages/razzle/node_modules/webpack/lib/Module.js:12:18)
    at Module._compile (module.js:635:30)

Apparently, Webpack v4 doesn't like old loaders packages. I've updated eslint-loader and now I'm updating file-loader. I'll go through all the examples to see if anything else breaks. I am running yarn on examples / some_example and yarn start, basic ran without this error. I'll be back when I run the other examples.

Of the 20 examples, 14 have passed.
The ones that broke:

Elm (still waiting for compatibility update): https://github.com/elm-community/elm-webpack-loader/issues/134

React loadable also has an open PR to migrate: https://github.com/jamiebuilds/react-loadable/pull/110

The with-vendor-bundle example of splitChunks does not return the same way and I didn't find enough documentation to replicate the example.

Inferno and Rax have a problem with es-lint, maybe / * eslint-disable react-in-jsx-scope * / solve it.

In the jsxstyle example I got Error: Can not find module 'jsxstyle / lib / styleCache', I did not find the webpack loader for it, so I'm not sure if the error was brought by the update. I didn't find this module in the project's node_modules.

Of the 20 examples, 14 have passed.
The ones that broke:

Elm (still waiting for compatibility update): https://github.com/elm-community/elm-webpack-loader/issues/134

React loadable also has an open PR to migrate: https://github.com/jamiebuilds/react-loadable/pull/110

In relation to the with-vendor-bundle example, splitChunks does not return the same and I did not find enough documentation to replicate the example.

Inferno and Rax have a problem with es-lint, maybe / * eslint-disable react-in-jsx-scope * / solve it.

In the jsxstyle example I got Error: Can not find module 'jsxstyle / lib / styleCache', I did not find the webpack loader for it, so I'm not sure if the error was brought by the update. I did not find this module in the project's node_modules.

We'll have to wait on react-loadable and figure out vendor bundle

We are also blocked of https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/731

Ok. I'll wait for loader updates and try again.

@alohawav I added<EMAIL_ADDRESS>and updated Uglify's placement.
I also made some changes to related the new chunking. However, I think I should remove it looking back at it as it will break everyone's apps.

I believe we should change from assets-webpack-plugin to webpack-manifest-plugin (https://github.com/kossnocorp/assets-webpack-plugin/issues/83), due to the lack of updating.
We can keep the file name though: "assets.json" in the plugin config. But we still have to wait, because they are still solving problems with the update (https://github.com/danethurber/webpack-manifest-plugin/pull/128)
Do you think is valid dynamically insert the chunks listed in assets.json? Maybe with this approach, we can prevent problems with different chunks in each project:
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST)

${markup}

       {Object.keys(assets).reduce((scripts, key) => {
    return scripts + `<script src=“${assets[key]}" defer crossorigin></script>`
}, '')}

All the examples are running, except for RX that needs correction of the es-lint rules, I've corrected those of Inferno, but I did not find a plugin for the RX.

JS is not loading with vendor bundle example on the client.


scaffolds a data package

GitHub Issue
gh issue.
Changes

nx gen of the data package
setup the folder strucuture
a few basic utils and types
2 classes (Haus and Query)
Init tests

Packages Added
Brief list of any packages added, and if folks need to rerun yarn install to run locally
Checks

[x] Critical lint errors are resolved
[x] App runs locally
[x] App builds locally (run the build command for any impacted package and check for any errors before the PR)

this is the issue, i opened with the wrong one:
https://github.com/HausDAO/daohaus-monorepo/issues/39


Multilingual model tokenization differs from Python

Hi again.
In my experimentation I have found that the tokens coming out from BertTokenizers are not exactly the same as in Python.
One example is the spanish word "últimamente". I run this code in python:
from transformers import (BertTokenizer)
tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-cased', do_lower_case=False)
print(tokenizer.tokenize("últimamente"))

And my result is:   ['última', '##mente']
But then in C# I write:
BertMultilingualTokenizer tokenizer = new BertMultilingualTokenizer();
var t = tokenizer.Tokenize("últimamente");
Console.WriteLine($"{t[1].Item1}");

And my result is "[UNK]".
I'm guessing the vocabulary file in your package may not be the same (outdated?) as the one in Huggingface.
Please take a look into it.

I have a PR to fix this here: https://github.com/NMZivkovic/BertTokenizers/pull/3
@NMZivkovic Would it be possible to merge my PR?  It's a small one line fix on the tokenizer.

PR is merged. The new version (1.10.0) contains this fix.
Thanks for contributing!

I have tryed 1.10 and still the word "últimamente" gets tokenized as [UNK].
I guess DanMMSFT's PR solved an issue (thanks, btw!) but not the one causing my problem.
Then, tokenizing "últimamente" like ['última', '##mente'] speaks by itself: no 2-chars parts there. So I stick with my first impression, must be something the likes of difference in vocabulary.


Compatibility with react-native-maps?

I'm trying to build for android but it's failing with the following error at dexDebug:
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/actions/ItemListIntents;
Unknown source file : 	at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
Unknown source file : 	at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
Unknown source file : 	at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
Unknown source file : 	at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
Unknown source file : 	at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
Unknown source file : 	at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
Unknown source file : 	at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
Unknown source file : 	at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file : 	at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file : 	at com.android.dx.command.Main.main(Main.java:106)

I'm wondering if this is caused by react-native-maps since it uses some google libraries. The build.gradle file for react-native-maps mentions this:
dependencies {
  compile 'com.facebook.react:react-native:+'
  compile "com.google.android.gms:play-services-base:8.4.0"
  compile 'com.google.android.gms:play-services-maps:8.4.0'
}

Could this be causing some sort of a conflict? Any idea on how to get this sorted out?

can you ask them to upgrade to use purely +? play-service is 9.2.1 now and they are still sticking with 8

@evollu I manually edited their gradle file and put + and it finally builds without any errors.
dependencies {
  compile 'com.facebook.react:react-native:+'
  compile "com.google.android.gms:play-services-base:+"
  compile 'com.google.android.gms:play-services-maps:+'
}


Endpoints for one direction

I am trying to create a ground station that works with wifibroadcast. Wfb supports sending data like air_tx > gs_rx & gs_tx > air_rx as udp ports on localhost.
In total, I have port 14550 on gs: <IP_ADDRESS> in order to send telemetry data to air and 14551 in order to receive it from air. Essentially, this requires one udp endpoint, which should send messages to one uart port and receive from another. I create two endpoints and even connect them via a group, I can see data being received over the air but I can't send anything. I suspect that the endpoint for receiving data over the air immediately sends it to all other points, including the one intended for transmission, and a loop occurs, creating a load on the channel. How should I set up the endpoints in the sample workflow? I guess if the endpoints had a parameter like direction (in, out, both by default) that would solve my problem.

By default, each message received on one endpoint will be transmitted on all other endpoints. So if you have two endpoints for the same link, mavlink-router will try to loop the received message back to your "wifibroadcast" link. (I don't know, if wifibroadcast already prevents data being sent out again on the "receiving" port.)
The other issue might be, that data with a target address (like parameter requests) will only be transmitted on endpoints, if the system has connected on this endpoint. You should be able to check this, if you get "x messages to unknown endpoints" in the log.
Both issues should be solved by adding the two endpoints to the same group (see readme and scroll to the "Endpoint groups:" heading).
To actually prevent data being sent, you could try to set one of the outgoing message filters to something not used.


[SPARK-8339] [PySpark] integer division for python 3

Itertools islice requires an integer for the stop argument.  Switching to integer division here prevents a ValueError when vs is evaluated above.
@davies
This is my original work, and I license it to the project.

Thanks, please send this PR to github.com/apache/spark


Undefined index: Picture

In the following files:
APP/Plugin/Gallery/Controller/AlbumsController.php, line 57
APP/Plugin/Gallery/View/Albums/upload.ctp, line 192
If you upload database entries and images are uploaded but the view doesn't show them.

If your database relationship is correct this should return an empty array and not an Undefined error, as you can see here: https://www.dropbox.com/s/gqltbill6myjbxo/Screenshot 2015-01-12 10.53.00.png?dl=0


fix(backend): add relation messages to database query

🍰 Pullrequest

Issues

fixes #2741
relates #2787

Todo

[X] Show chat symbol

Why the changes in the unit test?

@Mogge cause the logic of objectContaining makes it very difficult to debug the error, so I changed the order to exactly the same order that is given back from the query.
Maybe we should refactor the querried datas an check that there is exactly the object we hope.


self activation email does not have activation link in it

hi,
i got the email for email activation but it does not have any links inside to activate. what should be link so i can put in email template

Hi !
Thanks for you interest in the pH7CMS.
If you want to use something as such, then you cannot use the same link on every email. It is quite obvious that it will be needing a different link generated for every user, plus store the link in the database so it can be compared later on so it can activate the actual user.
Those functions will require you do to some coding.
I'd suggest you take some time to read this post.
https://github.com/pH7Software/pH7-Social-Dating-CMS/wiki/How-to-ask-for-help
https://ph7cms.com/doc/en/code-convention

Hi,
actually my mistake , I delete the content in that email template in admin section. is it possible to get the content
Regards,
On Friday, March 1, 2019, 7:41:48 PM GMT+7, Polyna-Maude R.-Summerside<EMAIL_ADDRESS>wrote:

Hi !
Thanks for you interest in the pH7CMS.
If you want to use something as such, then you cannot use the same link on every email. It is quite obvious that it will be needing a different link generated for every user, plus store the link in the database so it can be compared later on so it can activate the actual user.
Those functions will require you do to some coding.
I'd suggest you take some time to read this post.
https://github.com/pH7Software/pH7-Social-Dating-CMS/wiki/How-to-ask-for-help
https://ph7cms.com/doc/en/code-convention
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

How about simply getting the file you erased from the distribution archive ?

Hi @samit78
Not sure why you didn't see any hyperlink in the email. Maybe a problem with the webemail software.
FYI, the link is generate here for the email content: https://github.com/pH7Software/pH7-Social-Dating-CMS/blob/ec2b2867d51156c9a25ff6e71bd4e10fd32f2ab4/_protected/app/system/core/classes/RegistrationCore.php#L135

@samit78
The content of the email to put back through the admin panel is
https://github.com/pH7Software/pH7-Social-Dating-CMS/blob/master/_protected/app/system/global/views/base/tpl/mail/sys/mod/user/account_registration.tpl

Hope it helps! And if you appreciate the software, don't forget to review it on https://sourceforge.net/projects/ph7socialdating/ (it just takes one minute to create an account and leave a review).
This really motivates me to continue my hard work on the software 😄

@samit78  Hope it helps! And if you appreciate the software, don't forget to review it on https://sourceforge.net/projects/ph7socialdating/ (it just takes one minute to create an account and leave a review).
This really motivates me to continue my hard work on the software 😄


chore: Commit message linting in the website repo

@sobi3ch thanks for starting this, added some comments.
Adding @miedziak @mattgreg as reviewers to the rules as they contribute to this repo frequently. Please review the rules.
We can customize the type and scope enums best fit the needs of this repo. I think a separation between code and content of the website would be helpful, hence the suggestion for a content: type.
What do you all think?

@sobi3ch thanks for starting this, added some comments.
Adding @miedziak @mattgreg as reviewers to the rules as they contribute to this repo frequently. Please review the rules.
We can customize the type and scope enums best fit the needs of this repo. I think a separation between code and content of the website would be helpful, hence the suggestion for a content: type.
What do you all think?
content type sounds reasonable.

@miedziak could you merge this at the right time ... note that this linting forces all lower case commit message subject lines. So I suggest merging any other open PRs that use upper case first or this will cause their builds to fail.

just realized that the commit message of this commit itself wouldn't pass linting so that may need to be amended before a merge @miedziak @sobi3ch

just realized that the commit message of this commit itself wouldn't pass linting so that may need to be amended before a merge @miedziak @sobi3ch

corrected


Add tests for makeup lesson

Fixes #115

Do you plan on adding more tests to improve coverage? (Not saying you need to, just checking)

nah

is there a code coverage target we must hit? if not then no plans

The codecov report says the target is 74.62% to pass the coverage test, but i remember 2103T team expects about 85 or above. I think you might want to add more tests to hit the target.


Map current user journeys

Session one of mapping as a team - complete
Session two of mapping as a team - TBC
Compare map with existing discovery map - TBC
Validate with users - TBC