Llama 3

Would be very usefull to add open source models like Llama3

If you're using Ollama it's already supported through the custom_url approach. If you want I can post a quick how to later.

Would be Nice to see the tutorial! Thanks !

Sorry for the delay. If you're running Ollama locally and have pulled some models you can use Scikit-LLM to interact with the localhost.
Load the packages
from skllm.datasets import get_classification_dataset
from skllm.models.gpt.classification.few_shot import FewShotGPTClassifier
from skllm.config import SKLLMConfig

Set the url to your Ollama server. By default localhost on port 11434. v1 is the OpenAI compatible endpoint.
SKLLMConfig.set_gpt_url("http://localhost:11434/v1/")

Load data, create a classifier, fit and test it.
X, y = get_classification_dataset()
clf = FewShotGPTClassifier(model="custom_url::llama3", key="ollama")
clf.fit(X,y)
labels = clf.predict(X, num_workers=2) # num_workers are the number of parallel requests sent

Notes

key and org  are technically not needed but expected by Scikit-LLM, simply pass ollama or a random string. You can always ommit org.
num_workers is supported by default for Ollama as well, however you need to configure the server accordingly:

export OLLAMA_MAX_LOADED_MODELS=2 # sets the max number of loaded models
export OLLAMA_NUM_PARALLEL=2 # sets the max number of parallel tasks

This approach works for FewShotGPTClassifier, ZeroShotGPTClassifier, their MultiLabel counterparts, and should work for GPTSummarizer, GPTTranslator, GPTExplainableNER (I have not tested these).
It should work work for DynamicFewShotGPTClassifier because of a recent fix by Ollama that now supports embeddings in the v1 endpoint, see here. Previously you had to set the above config to the api endpoint, which then clashed with the actual classification.

Additional info

The v1 endpoint does not support passing additional information to the server, such as context size and temperature. This may be a problem, since e.g. the context size is by default 2048. The Ollama team is actively working on a fix though.
Because DynamicFewShotGPTClassifier had no native support until recently and the missing options I adapted Scikit-LLM to work natively with Ollama and published it as a packge that depends on Scikit-LLM. You can find it here or on PyPI. Sorry for the self-advertising.

Thank you for the great explaination !
It would be nice to add the functionnality to simply load any open source
LLM model directly by just setting the path directory where the model have
been downloaded or by using an huggingface link without any key.
Le ven. 26 juill. 2024 06:20, AndreasKarasenko @.***> a
écrit :

Sorry for the delay. If you're running Ollama locally and have pulled some
models you can use Scikit-LLM to interact with the localhost.
Load the packages
from skllm.datasets import get_classification_datasetfrom skllm.models.gpt.classification.few_shot import FewShotGPTClassifierfrom skllm.config import SKLLMConfig
Set the url to your Ollama server. By default localhost on port 11434. v1
is the OpenAI compatible endpoint.
SKLLMConfig.set_gpt_url("http://localhost:11434/v1/")
Load data, create a classifier, fit and test it.
X, y = get_classification_dataset()clf = FewShotGPTClassifier(model="custom_url::llama3", key="ollama")clf.fit(X,y)labels = clf.predict(X, num_workers=2) # num_workers are the number of parallel requests sent

Notes

key and org are technically not needed but expected by Scikit-LLM,
simply pass ollama or a random string. You can always ommit org.
num_workers is supported by default for Ollama as well, however
you need to configure the server accordingly:

export OLLAMA_MAX_LOADED_MODELS=2 # sets the max number of loaded modelsexport OLLAMA_NUM_PARALLEL=2 # sets the max number of parallel tasks

This approach works for FewShotGPTClassifier, ZeroShotGPTClassifier,
their MultiLabel counterparts, and should work for GPTSummarizer,
GPTTranslator, GPTExplainableNER (I have not tested these).
It should work work for DynamicFewShotGPTClassifier because of a
recent fix by Ollama that now supports embeddings in the v1 endpoint,
see here https://github.com/ollama/ollama/issues/2416. Previously
you had to set the above config to the api endpoint, which then clashed
with the actual classification.

Additional info

The v1 endpoint does not support passing additional information to
the server, such as context size and temperature. This may be a problem,
since e.g. the context size is by default 2048. The Ollama team is actively
working on a fix though.
Because DynamicFewShotGPTClassifier had no native support until
recently and the missing options I adapted Scikit-LLM to work natively
with Ollama and published it as a packge that depends on Scikit-LLM.
You can find it here
https://github.com/AndreasKarasenko/scikit-ollama or on PyPI
https://pypi.org/project/scikit-ollama/. Sorry for the
self-advertising.

—
Reply to this email directly, view it on GitHub
https://github.com/iryna-kondr/scikit-llm/issues/109#issuecomment-2252447224,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AL2DSSJOJZ7D7J2WFT4ZDXLZOIPFRAVCNFSM6AAAAABLO45TBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJSGQ2DOMRSGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>

The maintainers of Scikit-LLM plan to offer native llama-cpp support, which will include loading models (similar to the current gpt4all implementation). You can also check out the discussion on their Discord.
In Ollama's case managing models is quite easy. E.g. ollama pull llama3 pulls the default llama3 instance and makes it available to the server. You don't need to specify paths, keys or anything with that. Or if you do ollama pull llama2 you can use llama2 instead with clf = FewShotGPTClassifier(model="custom_url::llama2", key="literally_anything").

Hi @CoteDave,
As @AndreasKarasenko already outlined, there are already multiple ways to use scikit-llm with local models either by running and OpenAI compatible web-server or using gpt4all backend that automatically handles model downloads.
However, scikit-llm is not compatible with the latest gpt4all versions and this backend will be replaced with llama_cpp in the following days. But the overall concept is going to be the same: a user provides the model name and it is downloaded automatically if not present.
We might investigate other options in the future, but overall would prefer to keep the model management outside of scikit-llm as much as possible.


Some Arabic-Indic  numbers are being reversed

Environment

Tesseract Version:tesseract 4.1.1-rc2-21-gf4ef
leptonica-1.78.0
libgif 5.1.4 : libjpeg 8d (libjpeg-turbo 1.4.2) : libpng 1.2.54 : libtiff 4.0.6 : zlib 1.2.8 : libwebp 0.4.4 : libopenjp2 2.3.0
Found AVX
Found SSE
Found libarchive 3.1.2

Hi, I've done plusminus training using tesstrain.sh on the ara.traineddata best model for adding arabic-indic characters. The problem is the model is recognizing some arabic-indic numbers correctly but others are incorrectly reversed.
here is the result with <<>> around the reversed number
والعشرين من يوليو عام ،١٨٧٦ وقضت أيامها المدرسية الأولى
هناك. ثم ارتادت في وقت لاحق مدرسة ليدي جين غري بنغهامتن/
نيويورك، وتخرجت فيها عام<<<٦٩٨١>>>. وأثبتت جدارتها بوصفها طالبة
متميزة في كلية أفاسار التي حصلت منها على شهادتها عام ٤١٩٠١

and this is the image

Do I need to change any parameters? I've found several issues for this problem but I didn't get what is the final solution

@amitdo @Shreeshrii Any help!

This is a known issue. Please see https://github.com/tesseract-ocr/tesseract/issues/1193

There are some minor issues with RTL languages related to the the bidi handling in Tesseract.
There is no known solution in Tesseract itself.
However, if you can find a repeated pattern of errors you might be able to post process the output with a script (in Python or another language) and fix the errors. Does it always reversed when there is a dot in the end of a number? If so, you can reverse all such cases.

@amitdo  @Shreeshrii I've discovered the problem
For any Arabic-indic number, tesseract output an ltr and rtl Unicodes before and after it
The problem is tesseract sometimes doesn't output the ltr code before it, so a script can be made to handle this manually


[#4330] Modify build requirements to java8

backport

Codecov Report

Merging #4343 into 1.7.x will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##            1.7.x    #4343      +/-   ##
==========================================
- Coverage   40.61%   40.59%   -0.02%
==========================================
  Files        2203     2203
  Lines       71626    71626
  Branches     9891     9891
==========================================
- Hits        29089    29080       -9
- Misses      39784    39787       +3
- Partials     2753     2759       +6

Impacted Files
Coverage Δ

...npoint/rpc/server/SimpleServerMessageListener.java
80% <0%> (-20%)
:arrow_down:

...pinpoint/profiler/instrument/AccessorAnalyzer.java
57.14% <0%> (-8.58%)
:arrow_down:

...tor/metric/datasource/DefaultDataSourceMetric.java
75.75% <0%> (-3.04%)
:arrow_down:

...ofiler/sender/StandbySpanStreamDataSendWorker.java
80.59% <0%> (-2.99%)
:arrow_down:

...m/navercorp/pinpoint/test/OrderedSpanRecorder.java
72.11% <0%> (-1.93%)
:arrow_down:

...corp/pinpoint/rpc/stream/StreamChannelManager.java
70.68% <0%> (-1.73%)
:arrow_down:

...java/com/navercorp/pinpoint/rpc/DefaultFuture.java
72.5% <0%> (-1.67%)
:arrow_down:

...orp/pinpoint/rpc/server/DefaultPinpointServer.java
78.47% <0%> (-1.05%)
:arrow_down:

...point/rpc/client/DefaultPinpointClientHandler.java
71.38% <0%> (+0.32%)
:arrow_up:

...om/navercorp/pinpoint/rpc/codec/PacketDecoder.java
63.82% <0%> (+2.12%)
:arrow_up:

... and 2 more

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 e280bca...9667010. Read the comment docs.


tensorflow.map hangs randomly when using for num_parallel_calls a value > 1

System information

Have I written custom code (as opposed to using a stock example script
provided in TensorFlow): yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): wsl2 on windows
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 2.12.0
Python version: 3.8.10
CUDA/cuDNN version: 12.0
GPU model and memory: RTX A5000 24GB

Describe the problem
I am using tensorflow in a docker container on wsl2 for training neural networks but unfortunately everything freezes during the image import if done with the tf.map function with the parameter "num_parallel_calls" set to a value >1. Below is a minimal example of the code which causes the console to freeze at a random step and the CPU-usage to drop to a minimal level while the RAM is still occupied. After everything is frozen, the docker container is unresponsive and has to be restarted by stopping the process. This might even take half a day -> a few hundred thousand iterations but it allways happens at some point.
Source code / logs
`import tensorflow as tf
def parse_function(filename):
return tf.io.read_file(filename)
filenames = []
for i in range (100000):
filenames.append("/D/test.png")
dataset_train = tf.data.Dataset.from_tensor_slices((filenames))
dataset_train = dataset_train.map(parse_function, num_parallel_calls =  2)
dataset_train = dataset_train.batch(50)
for epoch in range(1000):
for step, (x_batch_train) in enumerate(dataset_train):
print("epoch:", epoch, "start train step:",step)`
This issue is similar to others like #32454 but i still can't find a fix.
Bypassing the map-function by loading everything at once works -> definitly during mapping if parallel calls are allowed

Verify that Docker is properly configured, including memory and resource allocation settings, to ensure optimal performance.Also you can try updating the python version and dataset_train = tf.data.Dataset.from_tensor_slices((filenames)) line has double round bracket instead of single.Hope this helps

@GrannyTickler,
I tried to execute the mentioned code and it was failing due to a different error. Kindly find the gist of it here and provide the complete dependencies. Thank you!

I tested the code without the docker container and it seems to work -> the issue can be closed apologies.


Fixed ordering-sensitive test

We saw CI failures lately in this specific test.
As test cases are picked up from class files which order may depend on the used filesystem and other factors like creation time, inode number, ..., we better always try to avoid any ordering assumptions in tests.

Hey @lefou , bit of thread necromany here but:
We saw this funny situation before:

for a few users, tests would be fine (e.g. on Linux)
but, for other users' devices (and maybe Jenkins, on a different Linux build I guess) those same tests failed

We fixed it up by improving how we use shared resource in the test suite, or something like this.
Would there be any way to randomise the test order at some levels (tests in a file / files in modules)?
Given that most tests shouldn't require a specific order to be run in, that could be nice to uncover flakiness earlier on.


Restructuring preprocess.inc code.

What's this PR do?
This is an attempt to restructure the unwieldy preprocess.inc file into something more usable by breaking it down into smaller preprocess files that deal with specific entities (node, page, taxonomy, user, etc). Moving forward new preprocess function can be added to the respective file, or if a new entity, then just add an include file and celebrate some sense of order in this chaotic world we live in.
Where should the reviewer start?
Probably at preprocess.inc and head to the broken out files from there. Entirely a cut and paste job, so not much code change; just double check the require_once()'s look correct.
How should this be manually tested?
Pull down the branch, clear cache and load up the site. Make sure nothing is broken. I've tested this on campaign pages and no errors/notices show up.
Any background context you want to provide?
I'm working on upgrading the reportback gallery on campaign pages to use our updated API endpoints, and working with the preprocess file has always been a bit nutty with the crazy number of functions there.

@DFurnes @sbsmith86 @angaither

Seems like a nice improvement. :loop:

Certainly cleans up the ever growing file. I'm cool with this.

sure sure


Adjustments to 1.23/1.24

added tradegoods incense, livestock, glass, gems, paper
adjusted trade good prices to this : https://forum.paradoxplaza.com/forum/index.php?threads/analysis-of-trade-good-tiers-and-prices.914875/#post-23767415
added some province event modifiers like diamond district, these probably have to be double checked to work, they probably dont work atm

It looks like these changes are failing to build (some missing semicolons perhaps). That'll need to be fixed before we can merge it.

This looks great, thank you!  I'll be pulling this in once I've hotfixed the converter to deal with the current crashes as I need to be testing other things right at the minute but I'll get back to this!

Kratostatic can u check if in current version with this change with change pop totals to yes from a 1444 save, falun converts with really high pop, probably best prov in europe, if it does, the prov modifier tool works and i shall add the missing ones like center of trade

I dont know why a number change causes an issue

So after fixing he merge issues, this is passing the checks. @kratostatic, do you think it's good to merge?

The reason I'm being slow about merging this in is that the current converter build doesn't actually convert saves so I can't easily test this to see how well it works.

-Increasing detail in pop conversion via prov modifiers and territories
-Updating forts (forgot it at some point)
-Buffing tall nations (improving dev costs far more at high dev)
-Nerf buildings a bit (tax and prod changes in formula)
-Buffing/Adjusting development via setting it to same standard as buildings
-Add new trade goods
-Adjust trade good prices to be less late game dependent
To be done:
-Add other new trade goods
-Buff development a bit more possibly (balance between money and monarch points is hard to set right)
-Make territories potentially a bit less punishing (66% instead of 50%)
-Remove pop ratio effects from formula if pop conversion is used
-Make final culture conversion (final if several) have a base effect of 5% on all culture conversions (to make culture conversion not useless late game) if pop conversion is used (u should rly consider this in general)
-Remove continental effects on literacy if pop conversion is used

With the new repo, this is now incompatible. It'll need to be redone against https://github.com/ParadoxGameConverters/EU4toVic2


Dialogs are too big on tablets

Should not set the window to match/match on tablets.

This is fixed now


Ensure that Flume's Kafka Sink covers our use cases, then phase out ours

We can drop off the kafka sink, since it is already included in Apache Flume


Fixing malformed json & fixing refs to sands-internal, accepting PR?

Hi all,
Whilst browsing through the repo, I came across a few malformed JSON & reference to sands-internal (e.g. https://github.com/HumanBrainProject/SANDS/blob/master/v0.1/core/coordinateSpace.schema.json#L42)
Are you currently accepting PR to fix minor issues like this?

Thanks for bringing it up :+1: We are aware. I'm fixing it asap.

@xgui3783 I've created PR fixing the malformed JSON & references to sands-internal.
Sorry that I overlooked your last point: YES we do accept PRs that are fixing such issues.
We are very happy for feedback and support :smiley:


Fix the activity page and how it talks to the backend

[ ] when a user edits a form, or makes a change, it needs to purge older versions instead of duplicating/keeping.

[ ] clean up the format of the data when it is submitted.

we weren't able to tackle this one prior to moving on reports, so it will have to happen when the other must haves are done.  not a showstopper.


[Action, Cloud Native Sustainability Week] Credly Badges

Part of https://github.com/cncf/tag-env-sustainability/issues/95
To recognize local meetup organizers, it would be great to issue Credly badges after the event. We could also potentially give out badges to speakers who give talks on Cloud Native Sustainability. First we need to reach out to CNCF to create Credly badges for these efforts and go from there.
Any designs that may be created can be uploaded here: https://drive.google.com/drive/folders/1JUtrZr-Aajv7j7gJtA4NC04eYxEydRqR?ths=true

I can help out here :)

@k8tgreenley do you may know whom to contact at the LF about credly badges? I assume we need to bring a design to visualize the badge. May you know the requirements of the image (size, etc.). Are there any other documents we need to provide? I guess after the event happened a list of names / emails - anything else? Thanks!

@leonardpahlke
Cloud it the sample of Credly Badges ?
(i.e. 2 type of contributions?)
I just would like to check or sync up your thought.
Program Committee

Speaker

Thanks @sysnet4admin :) right, we are planning to issue badges to organizers, local meetup organizers and potentially also speakers. I think badges are a great way to acknowledge the work we all put in. They are usually well received :)
Regarding the design, thanks! We can be flexible with the design of the badges. Last week @Bamistand proposed to work on a design 🙌

@leonardpahlke I made adjustments to the designs as we discussed yesterday, and I have uploaded them on the drive, which is of course still open to further adjustment if needed.

Thanks Mercy! I will reach out to the CNCF to check if the design is from a legal point of view ok. Thanks!

@Bamistand could we replace the CNCF logo with the TAG ENV logo - that way, everyone’s aware of which group it is? Thanks! https://github.com/cncf/artwork/tree/master/other/tag-environmental-sustainability

@leonardpahlke Yes, we can do that. It will be worked on.

Hi @leonardpahlke
I'm reaching out to inquire about the current status of badge preparations for the meetup.
To clarify, we're planning to issue badges to organizers of the Cloud Native Sustainability Week meetups as well as to the speakers, correct? Is there a possibility to extend this to contributors as well, such as student volunteers?
Has the design of the badges been confirmed by CNCF? (I have experience in badge design and received confirmation for the KCD Korea badge, so if needed, I'm available to assist with any required procedures.)
Is it permissible for meetups to announce that the LF will be issuing these badges to organizers and speakers?
Thank you. :)

@Bamistand could you upload this badge version https://drive.google.com/file/d/15bnXvMO7rV9SHcmKS7ZtZVgAzlPGW-c-/view?usp=share_link with the text "Speaker" instead of "Meetup Organizer" so we have both ready to go 🙌
Thanks Mercy!

@leonardpahlke I have added a copy https://drive.google.com/file/d/1BTmuioY2PetMwJs0Uh4aKZ4CXKFgZBUk/view?usp=sharing for Speaker.

Have we sent out all the organizer/speaker Credly badges? If so, I may be missing the speaker one from Oslo meetup 😇

Yes, we send out all the badges. There was a limit of maximum badges, so we issued just once per person.


i18n(fr): Update guides/client-side-scripts.mdx from #9519

Description (required)
Update guides/client-side-scripts.mdx from #9519

Related issues & labels (optional)

Suggested label: i18n

I'm participating to the Hacktoberfest!

Lunaria Status Overview
🌕 This pull request will trigger status changes.

Learn more
By default, every PR changing files present in the Lunaria configuration's files property will be considered and trigger status changes accordingly.
You can change this by adding one of the keywords present in the ignoreKeywords property in your Lunaria configuration file in the PR's title (ignoring all files) or by including a tracker directive in the merged commit's description.

Tracked Files

Locale
File
Note

fr
guides/client-side-scripts.mdx
Localization changed, will be marked as complete.

Warnings reference

Icon
Description

🔄
The source for this localization has been updated since the creation of this pull request, make sure all changes in the source have been applied.


createCodec using Factory

Title: createCodec using Factory
Description:

Now, in source/extensions/filters/network/http_connection_manager/config.cc,
we createCodec according to codec_type_, so if we want to extend a codec, we have to add codes in tree.
How about createCodec using a factory like many other extensions, e.g. network filters extensions, in this way, anyone can extend a new codec in a separate code rep to support a new protocol，and static link to envoy using REGISTER_FACTORY, what's more, the new protocol can reuse all of the http filters.
If this is a right idea, I'd like to contribute.

In this case, codec type is an HTTP major version (or the AUTO special case). For what protocol are you trying to add a new codec type?

In this case, codec type is an HTTP major version (or the AUTO special case). For what protocol are you trying to add a new codec type?

some private RPC protocol

it will lead to all manner of complicated exceptions to HTTP processing

@zuercher yes, i agree with you.
But in the other hand, each protocol is implemented as a separate network filter, has the following defects:

Each network filter need to implement some commen filters(like HTTP filters), e.g. RateLimit, Router, wasm, fault etc.
Istio can't config other network filters, VirtualService and DestinationRule can only config HTTP connection manager


Data quality indicators

Edit: It seems ideal to find a way to make this quality data immediately obvious on the ID page, but in the meantime, we could make a separate page that tracks our progress in a table, as discussed in #39, with rows being host genera (and/or species?) and columns being traits (including one column that just indicates whether all galls known to be associated have been added), with a check mark to indicate the ones that have been filled comprehensively.
Original: Since the site is intended to be used before it will be "complete," we should have some way to indicate to users where our data is, to the best of our knowledge, complete, and where it is not.
To that end, it would be useful to have a box to check on the admin page for a gall to indicate that every known source has been entered, which would trigger the appearance of a corresponding certificate somewhere on the gall's page (and a corresponding warning on pages for which this box has not been checked).
Similarly, it would be good to have a box to check on the admin page of a host species or genus to indicate that every gall known to be associated with it has been entered, with a corresponding certificate/warning on the ID and Explore pages for those plants.

Proposal

[ ] add a data state field to the gall table: values (TBD)
[ ] add a data state field to the host table: values: boolean (yes all galls entered; no not all galls entered)
[ ] modify the main gall display page to show the state value in some way
[ ] add logic to automatically compute this state based on known data. algorithm TBD - only applies to gall not host
[ ] add the state field to the admin page for gall allowing an admin to override any computed state
[ ] add the state field to the admin page for host allowing an admin to verify that all known galls for that host have been entered

Proposal

[ ] add a data state field to the gall table: values (TBD)
[ ] add a data state field to the host table: values: boolean (yes all galls entered; no not all galls entered)
[ ] modify the main gall display page to show the state value in some way
[ ] add logic to automatically compute this state based on known data. algorithm TBD - only applies to gall not host
[ ] add the state field to the admin page for gall allowing an admin to override any computed state
[ ] add the state field to the admin page for host allowing an admin to verify that all known galls for that host have been entered

I think that the data quality should be tied to the species level (gall/host). I am not entirely clear on what this means in terms of the reality of what is possible given the data that we will have.

I think that the data quality should be tied to the species level (gall/host). I am not entirely clear on what this means in terms of the reality of what is possible given the data that we will have.

This all looks good except I don't see how any of these states state could be calculated algorithmically? The database has no way to know if we've entered every relevant source.

This all looks good except I don't see how any of these states state could be calculated algorithmically? The database has no way to know if we've entered every relevant source.

The data quality could be computed based on the non-presence of data. i.e., a gall with no sources is definitely not good data. We could also score for missing fields like, location, color, etc. if we wanted. We do not have to do this but it is possible.

The data quality could be computed based on the non-presence of data. i.e., a gall with no sources is definitely not good data. We could also score for missing fields like, location, color, etc. if we wanted. We do not have to do this but it is possible.

I see. That doesn't seem like a good idea given that it would mistakenly flag lots of things as complete when they were only partially complete. Might be useful at some point to be able to summon every species missing a certain value, though. But I would say that's a separate issue from what I'm trying to achieve here and not worth the time/effort now.

I see. That doesn't seem like a good idea given that it would mistakenly flag lots of things as complete when they were only partially complete. Might be useful at some point to be able to summon every species missing a certain value, though. But I would say that's a separate issue from what I'm trying to achieve here and not worth the time/effort now.

We need to think a little more specifically about when we want to call something "done" and whether that differs for galls and hosts. There are two distinct things I have in mind here, and I'm slightly worried that they are not what other people might expect and might be confusing/conflicting.
For hosts, I want to tell users that the ID filter function for location/detachable is comprehensive. That way, the filter tool is useful long before the other work is done. It's a goal we can achieve extremely quickly and easily. I sat down and did all of Weld's Q alba species in like an hour the other day.
For each gall, I think the quality indicator should be a much higher bar to clear. I think it should mean we've added every known source with unique, relevant info, all of the traits and host relationships are updated to reflect that, and our ID notes tell them everything we know or suspect that isn't reflected in the other sources. IMO this should not necessarily mean that traits other than location/detachable are comprehensive.
First of all, do these thresholds make sense on their own? Any feedback/disagreement?
Second, my fear is that people will assume that if a host is marked complete, that means each gall associated with it will be complete in the latter sense. So we need to make that really clear on the host page, maybe even use a different icon or something, to communicate that these two indicators mean different things.

So if there are no comments, here's what I'd put. We can always change it later if people disagree.
Host:
"All galls known to occur on this plant have been added to the database, and can be filtered by Location and Detachable. However, sources and images for galls associated with this host may be incomplete or absent, and other filters may not have been entered comprehensively or at all."
Gall:
"All sources containing unique information relevant to this gall have been added and are reflected in its associated data. However, filter criteria may not be comprehensive in every field."

Sorry I completely missed this the other day. Late to the show, but what you have put together above makes sense, Adam. I'd think in this field specifically (galls) that new information will become available constantly as so much is still undescribed, understudied, and unknown. I'd hope that most coming to this site for the purpose of seeking help ID'ing a gall would understand that and your messages are clear. Data/content will always be at the mercy of the speed in which it becomes available and known to those maintaining the database.


Base unfold's components on django-components?

Unfold looks awesome, with a great set of components already implemented and in wide use.
Over at django-components we are building a reusable base component that we are hoping others will find useful. It's really nicely packed with great features that I think will benefit this projects, and possibly remove some code here and reduce the maintenance burden (if you want to). Would this be something you would be open to pursuing? We'd happily consider changes to make it more convenient to use for you.

For collaboration requests please use form below:
https://unfoldadmin.com/consulting/

@lukasvinclav Even though this is a non-commercial suggestion?

@EmilStenstrom I don't have regular contact form on the site so in this case you have to use this one to reach me :-)


Multiple VMs / can't find storage-pool

For this, I'm currently unable to provide a PR. Because I'm not completely understand it.
I tried to create 3 VMs.
1st attempt:
module "my_pool" {
  source = "srb3/pool/libvirt"
  name   = "default"
  path   = "/data/virt/vms/pools/kvm_tf_pool"
}

module "my-domain" {
  count      = 3
  source     = "srb3/domain/libvirt"
  os_name    = "ubuntu"
  hostname   = "tf-kvm-test-${count.index}"
  os_version = "20.10"
  memory     = 2048
  pool       = "default"
  vcpu       = 2
  autostart  = true
  network    = "${var.location}-tf"
  user_cloudinit = templatefile("./templates/cloud_init.cfg", {
    hostname       = "tf-kvm-test-${count.index}"
    user           = "ansible"
    ssh_public_key = chomp(file("~/.ssh/id_rsa.pub"))
  })
}

Terraform doesn't like it:

So I thought, Terraform doesn't like to use the same pool for multiple VMs. So this was my 2nd attempt:
module "my_pool" {
  count  = 3
  source = "srb3/pool/libvirt"
  name   = "default-${count.index}"
  path   = "/data/virt/vms/pools/kvm_tf_pool-${count.index}"
}

module "my-domain" {
  count      = 3
  source     = "srb3/domain/libvirt"
  os_name    = "ubuntu"
  hostname   = "tf-kvm-test-${count.index}"
  os_version = "20.10"
  memory     = 2048
  pool       = "default-${count.index}"
  vcpu       = 2
  autostart  = true
  network    = "${var.location}-tf"
  user_cloudinit = templatefile("./templates/cloud_init.cfg", {
    hostname       = "tf-kvm-test-${count.index}"
    user           = "ansible"
    ssh_public_key = chomp(file("~/.ssh/id_rsa.pub"))
  })
}

The funny thing: No word about the first pool, but errors regarding the 2nd and 3rd one:

Which I cannot understand, the pools have been created:
[root@lab2 ~]# virsh pool-list
 Name                 Status     Automatischer Start
-------------------------------------------
 data                 Aktiv      ja
 default-0            Aktiv      ja
 default-1            Aktiv      ja
 default-2            Aktiv      ja

This is not related to #7, as I have that fix in place. Just before I spend hours of debugging, is it supposed to be working with count?

same here - help appreciated


SVI notebook errors in Python 3.5

Hi! I'm trying to run the SVI notebook (http://nbviewer.jupyter.org/github/SheffieldML/notebook/blob/master/GPy/SVI.ipynb) on Python 3.5 using the devel branch of GPy. I get the following error at In [4]:
Z = np.random.rand(20,1)

batchsize = 10
m = GPy.core.SVGP(X, Y, Z, GPy.kern.RBF(1) + GPy.kern.White(1), GPy.likelihoods.Gaussian(), batchsize=batchsize)
m.kern.white.variance = 1e-5
m.kern.white.fix()

---------------------------------------------------------------------------

TypeError                                 Traceback (most recent call last)

<ipython-input-4-382f732b700d> in <module>()
      2
      3 batchsize = 10
----> 4 m = GPy.core.SVGP(X, Y, Z, GPy.kern.RBF(1) + GPy.kern.White(1), GPy.likelihoods.Gaussian(), batchsize=batchsize)
      5 m.kern.white.variance = 1e-5
      6 m.kern.white.fix()

/.../lib/python3.5/site-packages/paramz/parameterized.py in __call__(self, *args, **kw)
     46         self._in_init_ = True
     47         #import ipdb;ipdb.set_trace()
---> 48         self = super(ParametersChangedMeta, self).__call__(*args, **kw)
     49         #logger.debug("finished init")
     50         self._in_init_ = False

/.../lib/python3.5/site-packages/GPy/core/svgp.py in __init__(self, X, Y, Z, kernel, likelihood, mean_function, name, Y_metadata, batchsize, num_latent_functions)
     34             #Make a climin slicer to make drawing minibatches much quicker
     35             self.slicer = climin.util.draw_mini_slices(self.X_all.shape[0], self.batchsize)
---> 36             X_batch, Y_batch = self.new_batch()
     37
     38         #create the SVI inference method

/.../lib/python3.5/site-packages/GPy/core/svgp.py in new_batch(self)
     90         Return a new batch of X and Y by taking a chunk of data from the complete X and Y
     91         """
---> 92         i = next(self.slicer)
     93         return self.X_all[i], self.Y_all[i]
     94

/.../lib/python3.5/site-packages/climin/util.py in draw_mini_slices(n_samples, batch_size, with_replacement)
     90     else:
     91         while True:
---> 92             random.shuffle(idxs)
     93             for i in idxs:
     94                 yield slices[i]

/usr/lib/python3.5/random.py in shuffle(self, x, random)
    270                 # pick an element in x[:i+1] with which to exchange x[i]
    271                 j = randbelow(i+1)
--> 272                 x[i], x[j] = x[j], x[i]
    273         else:
    274             _int = int

TypeError: 'range' object does not support item assignment

@alansaul can you have a look? And add tests, so that the code gets run in the travis tests, so it does not happen again?

This seems to be a problem with climin. Forcing idxs to be a list in line 92 of util.py seems to reseolve the issue:
     90     else:
     91         while True:
---> 92             random.shuffle(list(idxs))
     93             for i in idxs:
     94                 yield slices[i]

I meet this questions and fixed with @cxhernandez's solution.

This seems to work/not work depending on the version of climin. The PyPI version of climin is different to the Github version. Installing via pip install climin will install climin 0.1a1 from PyPI, but following the instructions on the readthedocs, as follows, will install climin pre-0.1, which should work with Python 3.5+:
$ git clone https://github.com/BRML/climin.git /path/to/climin
$ cd /path/to/climin
$ pip install .

i have the same problem with google colab python version3.6 and @wilocw  solution work well.

Stale.


Error of graph module

Can you tell me which module is this 'graph' ?
File "C:\Users\Pratik\AppData\Local\Programs\Python\Python35\lib\site-packages\summa_init_.py", line 2, in
from summa import commons, export, graph, keywords, pagerank_weighted,
File "C:\Users\Pratik\AppData\Local\Programs\Python\Python35\lib\site-packages\summa\commons.py", line 2, in
from graph import Graph
ImportError: No module named 'graph'

I have the same issue on Xubuntu 16.10.
  File "main.py", line 9, in <module>
    from summa.summarizer import *
  File "/usr/local/lib/python3.5/dist-packages/summa/__init__.py", line 2, in <module>
    from summa import commons, export, graph, keywords, pagerank_weighted, \
  File "/usr/local/lib/python3.5/dist-packages/summa/commons.py", line 2, in <module>
    from graph import Graph
ImportError: No module named 'graph'

Same issue here using Elementary OS 0.4:
Traceback (most recent call last):   File "get_fb_page_status.py", line 11, in <module>     from summa.keywords import keywords # Keyword extraction   File "/usr/local/lib/python3.5/dist-packages/summa/__init__.py", line 2, in <module>     from summa import commons, export, graph, keywords, pagerank_weighted, \   File "/usr/local/lib/python3.5/dist-packages/summa/commons.py", line 2, in <module>     from graph import Graph ImportError: No module named 'graph'
Any workaround?

Should be this. Did you install the package using pip?

The code is not intended to run with Python 3.
To do so I had to do many changes like change print x calls to print(x), xrange to range, prefixing imports with dots (e.g. from graph becomes from .graph), etc.

@jeanbmar Can you please share the updated python code. I have to run text summarizer on Python3 but it does not support Python 3.

@jeanbmar Sir, could you please upload the Python 3 code !

Closing this as the new release is for Python 3.


PGA memory leak with LOBs (Regression)

The memory leak bug that was fixed once in the release 2.7.6 started appearing again in 2.7.24. Actually, the bug was reintroduced in 2.7.7

result after use sqlx
PGA [bytes]: 8906750.000000
Temp LOB count: 1
PGA [bytes]: 8879358.000000
Temp LOB count: 2
PGA [bytes]: 8879358.000000
Temp LOB count: 3
PGA [bytes]: 8879358.000000
Temp LOB count: 4
PGA [bytes]: 8879358.000000
Temp LOB count: 5
PGA [bytes]: 8879358.000000
Temp LOB count: 6
PGA [bytes]: 8879358.000000
Temp LOB count: 7
PGA [bytes]: 8879358.000000
Temp LOB count: 8
PGA [bytes]: 8965206.000000
Temp LOB count: 9
PGA [bytes]: 8965206.000000
Temp LOB count: 10

Both test cases are showing the leak, as the number of temp LOB locators is always increasing.
Do you agree?
Just, with sqlx I would expect that the PGA is also increasing.
Have you also replaced sql in the test case?
Without sqlx it's the PL/SQL anonymous block: sql := "BEGIN SELECT to_clob('A') into :c FROM dual; END;
With sqx it has to be a query sql := "SELECT to_clob('A') FROM dual"

result after correction by calling lob.close(0x10000)
PGA [bytes]: 8906750.000000
Temp LOB count: 1
PGA [bytes]: 8899838.000000
Temp LOB count: 2
PGA [bytes]: 8886550.000000
Temp LOB count: 0
PGA [bytes]: 8879086.000000
Temp LOB count: 1
PGA [bytes]: 8879086.000000
Temp LOB count: 2
PGA [bytes]: 8886550.000000
Temp LOB count: 0
PGA [bytes]: 8879086.000000
Temp LOB count: 1
PGA [bytes]: 8899566.000000
Temp LOB count: 2
PGA [bytes]: 8886550.000000
Temp LOB count: 0
PGA [bytes]: 8879086.000000
Temp LOB count: 1

the problem now is there is some sort of lab introduce by calling this function for each lob data

I have function in command.go which free all temp lobs at the end of query/exec  it will help if you have multiple lobs in same query/exec call.
so I will update the code by adding all these lob locator to temp lob array of the command and let freeTemporayLobs do its job

result after add returned lobs to stmt.temporayLobs
PGA [bytes]: 8906750.000000
Temp LOB count: 0
PGA [bytes]: 8879358.000000
Temp LOB count: 0
PGA [bytes]: 8879358.000000
Temp LOB count: 0
PGA [bytes]: 8879358.000000
Temp LOB count: 0
PGA [bytes]: 8879358.000000
Temp LOB count: 0
PGA [bytes]: 8899838.000000
Temp LOB count: 0
PGA [bytes]: 8899838.000000
Temp LOB count: 0
PGA [bytes]: 8899838.000000
Temp LOB count: 0
PGA [bytes]: 8899838.000000
Temp LOB count: 0
PGA [bytes]: 8899838.000000
Temp LOB count: 0

I make a new commit would you please test it before make new release

fixed in v2.7.26


Limitations of clusters created after this Preview is enabled in a subscription

Related to the following note in the doc:

Any AKS cluster you create after you've successfully registered the WindowsPreview feature flag use this preview cluster experience. To continue to create regular, fully-supported clusters, don't enable preview features on production subscriptions.

We are looking at using this feature in a development (not production) environment. Some of our clusters will have Windows node pools and some will not. We understand that enabling the preview feature limits support options. What other limitations do we need to consider? Will all AKS clusters be affected even if Windows node pools are not created?

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 6de70aec-9ebe-5655-6657-5c171de374b1
Version Independent ID: c9eb35c8-8703-511b-987b-e2a441be2e47
Content: Preview - Create a Windows Server container on an Azure Kubernetes Service (AKS) cluster
Content Source: articles/aks/windows-container-cli.md
Service: container-service
GitHub Login: @mlearned
Microsoft Alias: mlearned

Thanks for the question! We are investigating and will update you shortly.

@aaronwjha it won't impact existing clusters but any cluster created after enabling this feature will be impacted. Even if you enable the feature and don't create a cluster with a Windows Node pool.
Besides that, other limitations are documented here:
https://docs.microsoft.com/en-us/azure/aks/windows-node-limitations

@MicahMcKittrick-MSFT thanks for the response and link to documentation. We are still not clear on what the impact is to non-Windows clusters created after the preview has been enabled. Is there anything more you can share?

@MicrosoftDocs/aks-pm can anyone on here add some additional details?

@aaronwjha any cluster you created that has a windows pool falls under the preview support scope until that feature goes GA. For other clusters not using any preview features those will still receive regular support scope.


NUMBER QUESTIONS IN CARDS

As an end user I want to see the number of the question to refer to a colleague to ""look at question #

See #556


Graceful handling of deleted export dirs

You often need to automate cleanups in a multi-tenant environment to keep disk space under control. I'm running a scheduled job to delete export folders older than x days.
Currently when the user clicks a download link for an export with a deleted folder:

The csv export returns a file of 0 bytes
The xlsx export fails with a server error

This PR aborts with 419 "Page expired" when the export directory has been deleted. IMHO 419 is a better choice than 404 here because it makes it clear to the user what's going on. 404 implies that something's broken, 419 implies that the export has just "expired".

LGTM, thanks!


Fix basedate calculation

Current method of numdate/datenum calculation works incorrectly for timezones that are equal nowadays but were different in the past (e.g. Europe/Minsk and Europe/Moscow). Suggested method bypasses this issue by initializing basedate to UTC 1899-11-30 00:00:00 and slightly modifying TZ offsets handling.

We'll revisit dates later this month.  Please don't merge with latest, as the actual commits can be cherrypicked as needed.
Given the 4-year old V8/NodeJS/Chrome timezone bug and the declining prospects of a real fix to V8, we'll have to adjust.  Would it make more sense to anchor to a date that does not suffer from the bug?  Looking at the tz database, the last timezone to align to integral minutes is Africa/Monrovia, which shifted on 1972-01-07 (date code 26305 in the 1900 date system)

Please don't merge with latest, as the actual commits can be cherrypicked as needed.
My fail. Apologize.
I slightly refactored numdate()/datenum() functions. AFAIK OADate must be treated as it has no TZ or DST issues ("always in local TZ"), so I suggest to do all calculations in UTC and at the very end de-adjust TZ offset forcibly added by JS engine


Kivy's online documentation is not being updated

As far as I know the doc building task is being dispatched from the mac mini to the server where the docs are hosted, or something similar, the point is that docs are not being rebuilt if something is wrong with the mac.
Please have a script running directly on the website server, watching for new github commits and rebuilding the docs.
@tito, @matham i'm only aware of you having access to the server.

I'm going to plug back the mac mini this week. I still don't have reliable internet at home, so it will be move away. We can't run the documentation update on the server itself.

Why is a server side build not possible?

If it's because of resources, we could make use of travis, it builds the docs anyway on every commit.

It turns out travis supports keys: http://docs.travis-ci.com/user/encryption-keys/.
This looks like a great solution for uploading the docs built by travis.

Fixed in https://github.com/kivy/kivy/pull/3781.


Add non-streaming ASR server implementation

This PR tries to implement the framework proposed in https://github.com/k2-fsa/k2/pull/975
The current implementation is all in Python.
The following shows a screen recording for the running results: 1 server + 4 clients.
https://user-images.githubusercontent.com/5284924/169350034-05f5cad8-d6f5-413f-ab52-0855141a26b2.mov
Usage
# start the server
cd icefall/bin
./offline_server.py

# start the client(s)
./offline_client.py

# to start multiple clinets, open a new terminal, and run ./offline_client.py again

From the output of py-spy top --pid <pid-of-the-server>, we can see that a large part of the time is spent in neural network computation. I am going to write a c++ extension to do the nerual network computation, which can be run in a separate thread with the global interpretor lock being released.
The decoding part will still be in Python, we can move it to C++ if needed.
Shall we put the server stuff in a separate repo, e.g., k2-fsa/server or can I put it in csukuangfj/server?

Very cool. If it's an "official" server that is going to be supported with the rest of the project, then I vote for k2-fsa/server

Closing it.
See https://github.com/k2-fsa/sherpa, which is dedicated to the ASR server stuff.


Change http server to mostly use URIs for instead of string paths

As described in title. There shouldn't be as much string manipulation in resolving the filesystem path.

implemented in https://github.com/microsoft/vscode-livepreview/commit/d8630f6faa10aa0e2710d307e15b8db4a5aea961


Wikimedia viewer JSONP problem

NOTE: ISSUES ARE NOT FOR CODE HELP - Ask for Help at https://gitter.im/FreeCodeCamp/Help
JSONP - which is required to solve the CORS issue on the Wikimedia viewer and a few other ziplines simply has stopped working on codepen.io.  I have asked on Glitter, checked dozens of solutions including JSONP plugins,  tried code that worked from other Freecodecampers on line, tried numerous Javascript, Ajax, JQuery, JSONP approaches, etc.  I have spent more effort on overcoming CORS than on the rest of this curriculum combined.
Issue Description
A JQuery call produces a CORS error.  Different JSONP issues require access to the JSON file: jquery4u.settings.json (which we don't have on codepen.io).  We could overcome this on our own server by configuring server parameters, but we cannot configure the codepen.io server.  Simple Ajax calls fail (i.e., "failure:").
Browser Information
Windows 8, using Chrome and Fireforx
Your Code
I have obviously tried a lot of commented out approaches.
var arrResults = [];
var html = '';
var endpoint = "https://en.wikipedia.org/w/api.php?";
var call = endpoint + "format=jsonp&action=query&callback=?&titles="; //prop=info&  jsonpCallback
var response = "";
var dataRec = [];
/*
function w3r_callback(data){
console.log(data);
}
$.getJSON(request,
{
titles: getItem
},
function(data) {
console.log
//$.each(data.items, function(i,item){
//$("a href=").attr("src", item.media.m).appendTo("#results");
//if ( i == 10 ) return false;
});
});
*/
/*jsonCallback(
{ 		"sites": 		[ 			{
"siteName": "JQUERY4U",
"domainName": "http://www.jquery4u.com",
"description": "#1 jQuery Blog for your Daily News, Plugins, Tuts/Tips & Code Snippets."
},
{ 				"siteName": "BLOGOOLA", ....			}
]);    */
/*var api = new mw.Api( {
ajax: {
headers: { 'Api-User-Agent': 'Example/1.0' }
}
} );
*/
//$.getJSON( "ajax/test.json", function( data ) {
//  var items = [];
//  $.each( data, function( key, val ) {    items.push( "" + val + "" );   });
//  $( "", {     "class": "my-new-list",     html: items.join( "" )    }).appendTo( "body" ); });
//  $.each( data, function( key, val ) {    items.push( "" + val + "" );   });
//  $( "", {     "class": "my-new-list",     html: items.join( "" )    }).appendTo( "body" ); });
// $.ajax({  dataType: "json",   url: link,  data: response,  success: parseRecords() });
function result(title, snippet) {
this.title = title;
this.snippet = snippet;
}
function getRecords() {
console.log("going to get a wiki page");
var sought = document.getElementById("searched").value;
var request = call + sought;
var response = "";
var rr = "";
console.log("using address for items as:"+request);
//  $.getJSON(request, function(json) {
//                  $(".message").html(JSON.stringify(json));   });
function jsonpCallback () {
console.log("in jsonpCallback");
}
/*
jQuery.support.cors = true;
$.ajax({
url: request,
dataType: "jsonp",  // was json
contentType : "text/html",
callbackParameter : 'jsonpCallback',  // $.jsonp only; $.ajax uses 'jsonpCallback'
type: 'GET',  // was post in his
headers: { 'Api-User-Agent': 'Example/1.0'    ,
'Access-Control-Allow-Origin' : '*' },
success: function(data) { // parseRecords(response)
alert("logging data in ajax success:");
//alert(data);
//alert("json parse");
rr  = JSON.parse(data);
console.log(JSON.stringify(rr));
console.log("done");
},
failure: //function(XHR, textStatus, errorThrown)
function() { alert("failed"); },
error: function(XHR, textStatus, errorThrown) {
alert("something went wrong: "+ textStatus + "|" + errorThrown);
}
});
console.log("past ajax query but still in get records");
*/
$.getJSON(request,
function(data) {
rr  = JSON.parse(data);
console.log(JSON.stringify(rr));
});
/*
$.ajax({
url: link + '&srsearch=' + sought, dataType: 'jsonp', type: 'POST',
headers: { 'Api-User-Agent': 'Example/1.0' },
sucess: function(data) {
// $('.results').empty();  // avoid showing previous results
// arrResults.length = 0;        // Then we also clear the array with the results
var resArr = data.query.search;
for (var result in resArr) {
//arrResults.push(new Result(resArr[result].title, resArr[result].snippet));
html = '<a href="https://en.wikipedia.org/wiki/' + resArr[result].title + '"target="_blank">' + resArr[result].title + '' + resArr[result].snippet + '';
$('.results').append(html); // Displays the elements to the page
}}});
console.log("trying to send REST request from JSP");
var xhr = new XMLHttpRequest( );  // {mozSystem : true}
xhr.open("GET",  request, false);
xhr.setRequestHeader( 'Api-User-Agent', 'Example/1.0' );
xhr.setRequestHeader( 'Access-Control-Allow-Credentials', 'True');
xhr.setRequestHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE');
xhr.setRequestHeader('Access-Control-Allow-Origin','*');
xhr.send();    console.log(xhr.statusText);    console.log(xhr.responseText);
*/
}

I'm sorry, but as your issue says at the top of it:

NOTE: ISSUES ARE NOT FOR CODE HELP - Ask for Help at https://gitter.im/FreeCodeCamp/Help

jsonp definitely does still work in CodePen. Here's a (confirmed working) sample of how you might query the Wikipedia API in codepen:
$.getJSON('http://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=' + term + '&callback=?');

The &callback=? at the end tells jQuery this is a jsonp request.
Hope that gets you on the right track! Good luck and happy coding!

This is a very strange problem: I can take other people's code that works and it doesn't work for me.  I can get it to work intermitently and then not.  Something is wrong with codepen.io.  I have spent more time on this problem than the rest of the course combined.

On Wed, 2/24/16, Logan Tegman<EMAIL_ADDRESS>wrote:
Subject: Re: [FreeCodeCamp] Wikimedia viewer JSONP problem (#7225)
To: "FreeCodeCamp/FreeCodeCamp"<EMAIL_ADDRESS>Cc: "drdaveg"<EMAIL_ADDRESS>Date: Wednesday, February 24, 2016, 5:27 PM
I'm sorry, but as your issue
says at the top of it:
NOTE: ISSUES ARE NOT FOR CODE HELP - Ask for Help at https://gitter.im/FreeCodeCamp/Help
jsonp definitely does still work in CodePen.
Here's a (confirmed working) sample of how you might
query the Wikipedia API in codepen:
$.getJSON('http://en.wikipedia.org/w/api.php?format=json&action=query&generator=search&gsrnamespace=0&gsrlimit=10&prop=pageimages|extracts&pilimit=max&exintro&explaintext&exsentences=1&exlimit=max&gsrsearch=' + term + '&callback=?');
The &callback=? at the end tells jQuery
this is a jsonp request.
Hope that gets you on the right track! Good luck and happy
coding!
—
Reply to this email directly or view
it on GitHub.

http://api.jquery.com/jQuery.getJSON/
JSONP //Paragraph
If the URL includes the string "callback=?" (or similar, as defined by the server-side API), the request is treated as JSONP instead. See the discussion of the jsonp data type in $.ajax() for more details.


Experimental Traceur features/ES7

One experimental/ES7 feature supported through Traceur that I want to start using today is async/await.
What is JSHint’s stance on supporting experimental Traceur features i.e. ES7, e.g. async/await?

Hi, I read through a few pull requests and issues regarding support of ES7 async/await, but it seems the conversation has died off.  Has there been any other thinking or progress towards support in some shape or form?

:+1:

Nothing's been discussed off-line--the conversation on GitHub is the extent of it

Do I understand correctly then that async/await won't be handled (supported or ignored) until a plugin system is developed?

Please remember that the async/await is a proposal for a far-future version of the language and not a specification. Beyond the initial development effort, extending JSHint core with support for this syntax would be a burden on both the maintainers and the consumers. Changes to the proposal will need to be reflected in the user's platform (whether a runtime or a transpiler), the user's code, and also in JSHint itself. It would be hard enough for JSHint to synchronize updates with platform changes, but the problem becomes intractable when you recognize that the userbase will upgrade incrementally. (Proposal changes might seem unlikely, but we're even today struggling with last-minute modifications to ES6's module syntax--see gh-2019 and gh-2036 for a couple examples.)
This is why prior to standardization, the healthiest way for JSHint to support this syntax would be through a plugin system. Once this feature approaches standardization, I expect JSHint's core will be extended to support it natively (just as is happening with ES6 features today).
@rwaldron @caitp @mikesherov If this reasoning reflects your thoughts, I think it would be best to close this issue.

How long for the plugin system to emerge?

I certainly appreciate how a request to support async/await may feel like a burden on the JSHint contributors, but I just wanted to provide my perspective and nothing more to encourage support in spite of @jugglinmike's stated concerns:
With the rise in popularity of transpilers (with support for async/await) like traceur and especially babel, the flood of increasingly standardized ESNext features (further encouraging the use of transpilers), the proliferation of promises, and the present support for generators in node.js and io.js (which makes async/await sugar for function* instead of a hack), async/await will see a dramatic increase in usage in the near future.
Further, the popularity of talks like @jhusain's excellent ES7 talks at NodeDay and NodeSummit add to the async/await excitement. At Noderiety and the companies I partner with for node.js training, we're teaching generators/promise first development, and the only thing limiting teaching async/await first is JSHint support.
So obviously I'm bias, but the presence of async/await causes JSHint to go crazy, and makes it almost unusable (admittedly, not the fault or responsibility of the JSHint project). Something as simple as just ignoring (or stripping when linting) the async/await keywords would at least make it possible to use both async/await and JSHint together.
Please consider providing some minimal hack or workaround to at least make JSHint and async/await not incompatible, or consider leaving this issue open and providing some guidance on how to add such a workaround in a manner that would be successfully merged.
Thanks.

For anyone in the same boat as me, I was able to get eslint, babel-eslint and SublimeLinter-eslint working.

@CrabDude thanks, that is also the direction I am moving.

Something as simple as just ignoring (or stripping when linting) the async/await keywords would at least make it possible to use both async/await and JSHint together.

This has been suggested and I'm all for it.

@rwaldron Excellent. At least this would change this issue from a "wontfix" to an open issue to ignore async/await keywords until it is finalized, for the happy fellow that has time to implement it, wherever he may be. =)

@CrabDude

For anyone in the same boat as me, I was able to get eslint, babel-eslint and SublimeLinter-eslint working.

thank you for pointing me in the right direction

I'd really like to see some solution for this. Currently it makes JSHint a bit unusable as it just ends up saying "Too many errors".

@billinghamj You can read more about this issue here: http://jshint.com/blog/new-lang-features/ . In the short-term, your best bet is JSHint's ignore directive. You'll be happy to know that async/await advanced to "stage 2" of TC-39's proposal process, meaning it is now on the docket for experimental/unstable implementation in JSHint.

@jugglinmike Is it possible to put "ignore" in the config and get it to ignore "async" and "await" as keywords entirely?

@billinghamj nope, sorry.

@jugglinmike has raised this clear proposal - https://github.com/jshint/jshint/issues/2601 which supersedes this. I'm closing for clarity (there are alot of old comments on this issue)


URL to Office JS API is inconsistent with the actual API

The linked documentation page says to add a script tag linking to the following CDN url:
https://appsforoffice.microsoft.com/lib/1/hosted/Office.js

This URL does correctly serve the current office js API, however the telemetry code included in said js API seems to expect the url to be ending with either office.debug.js or office.js (lowercased), not Office.js:

Your CDN must match the url case-insensitively, so this is probably more likely an unintended minor bug with the js code itself (but I'm not sure where the right place to report that would be).
Doesn't cause any major errors, just the following TypeError whenever our addin is started (which has incorrectly been picked up as an error in our application code by our monitoring):

The documentation should probably be updated to https://appsforoffice.microsoft.com/lib/1/hosted/office.js if that is the correct url (which avoids this error), or more likely the code just needs to match resource urls case-insensitively too.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 3b5dc847-5ea4-9ec9-e855-224639ed6861
Version Independent ID: d8c790b3-d886-91d2-8480-f01164a7a3aa
Content: Understanding the Office JavaScript API - Office Add-ins
Content Source: docs/develop/understanding-the-javascript-api-for-office.md
Product: non-product-specific
Technology: add-ins
GitHub Login: @o365devx
Microsoft Alias: o365devx

@BROOSWAJNE It is fixed in the source file for that article. The new version should become public tomorrow evening, Pacific US time zone.

@BROOSWAJNE It is fixed in the source file for that article. The new version should become public tomorrow evening, Pacific US time zone.

Thanks!


Add Contributors page

It contains all authors who have landed a pull-request against the repo.

Coverage remained the same at 92.478% when pulling 1774bffc08395378714153ffd7bf023cb4db7d63 on jcwilson:master into 46b45fbe56b1a735c9eb4b169362da7594021b7a on loanzen:master.


⚠ Bofrost.lu has degraded performance

In e6adb9f, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1186 ms

Resolved: Bofrost.lu performance has improved in 1464401.


 The fault filter configuration at the route level is specified via the route metadata. Currently, its a bit unoptimized, in that the Struct to typed proto conversion takes place in the data path. However, this code will be a no-op when there is no route-level configuration.
Note: This is a short term fix, to allow Istio route rules to generate faults per route as shown here (https://github.com/istio/api/blob/master/networking/v1alpha3/virtual_service.proto#L787-L805). It is technically possible to create an equivalent configuration without this PR, by having multiple fault filters, with same set of match conditions as those found in the route. It however results in relatively higher perf drop as each request will be subject to multiple redundant http header matches across different fault filters in the same listener. This PR addresses the problem above by allowing a single empty fault filter to be always set (just like setting an empty CORS filter), and allowing individual routes to supply fault configurations if they wish to.
A longer term discussion should involve specifying route-level filter config overrides (or even virtual host level).
@mattklein123 / Lyft folks, please note the TODO in the fault_filter.cc . It should technically have 0 impact in your internal use of fault filter with runtimes, etc.
Risk Level: Low
Testing: Unit tests
Docs Changes: PR to follow.
Release Notes: Added support for specifying fault injection config per HTTP route

I'm not a fan of short term fixes or hacks if we can do this cleanly. Let's try and resolve https://github.com/envoyproxy/data-plane-api/issues/540 first before merging this one.

@rshriram, agreed with @htuch. I think we have agreement on the config issue. Can we close this and reopen when that has landed?

@rshriram I'm going to close this for now. Let's reopen when the data-plane-api PR is finalized (or please just flip a coin with @kyessenov to do that PR 😉 )


Use O(log n) table lookup algorithms for operands.

Similar to https://github.com/KhronosGroup/SPIRV-Tools/projects/2#card-1059120 but for operands.

FYI @antiagainst This is one thing I was talking about.


BUILD FAILED

src/main.cpp:4:10: fatal error: git_info.hpp: No such file or directory
    4 | #include "git_info.hpp"
      |          ^~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:47: src/main.o] Error 1

in both git and aur

Roger that, can cook a fix in a few minutes.

@shadowelite-sec fixed :+1:
Test & close if it works

@shadowelite-sec fixed 👍 Test & close if it works

working ! , Thanks


Document the API using the GitHub Wiki

Probably want to wait until the app is mostly feature complete.

This documentation should also be available from within the webapp itself.


translate title names in the HAProxy plugin

I promise I have tested it ;)
Fun fact: german already has the translation for one of them.

@fraenki: I leave it up to you.

@fichtner added


woof-doom: init at 14.5.0

Description of changes
Adds woof! version 14.5.0
Release notes: https://github.com/fabiangreffrath/woof/releases/tag/woof_14.5.0

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

@ofborg eval


ListItem has background color of backgroundStrong by default

Current Behavior
The ListItem component now has a backgroundColor property with value of $backgroundStrong which was added some time ago:
https://github.com/tamagui/tamagui/commit/d5b9842f063f100f57c52ca71c556d1c2673a8ab#diff-1454dfa1f65c14e091433ef66b30738c489824c35be0a62b04db86726211b52a
I think this is a mistake
Expected Behavior
The ListItem should not have any background set by default, or if it is, it should be $background
Tamagui Version
1.14.4

Reproduction
Use `ListItem` component. You will see a backgroundStrong background color.

System Info
No response

This is fixed in the upcoming release #883

@natew This is not fixed in the new release. It's broken in a different way.
The ListItem component now has a strong background.
If I overwrite them themes key in tamagui.confg.ts like this:
themes: {
  dark: themes.dark,
  light: themes.light
}

the issue goes away.
but if I do this:
{
  themes
}

and import the themes object from @tamagui/themes it breaks again.
I did some investigating and realized the issue comes from allThemes that's defined in @tamagui/themes/src/themes.tsx. themes.dark_ListItem has the value:
themes.

{"background": "#050505", "backgroundFocus": "#050505", "backgroundHover": "#151515", "backgroundPress": "#191919", "backgroundStrong": "#050505", "backgroundTransparent": "#050505", "borderColor": "#191919", "borderColorFocus": "#191919", "borderColorHover": "#232323", "borderColorPress": "#151515", "color": "#fff", "colorFocus": "#fff", "colorHover": "#fff", "colorPress": "#fff", "colorTransparent": "#fff", "placeholderColor": "#626262"}

as you can see the values of background, backgroundStrong and backgroundTransparent are the same.


[RFE] Enable multi-platform support for  Multus Dynamic Networks Controller CNI image.

Is your feature request related to a problem? Please describe.
The upstream image of the Multus Dynamic Networks Controller CNI (available at this link) currently supports only the amd64 architecture. To extend its support, we should build a multi-platform image that includes support for the s390x and arm64 architecture as well.
Describe the solution you'd like
Enable multi-platform support for building the image of Multus Dynamic Networks Controller CNI.
Describe alternatives you've considered
Additional context

I don't have time for this right now.
If the community needs this fixed, the community can implement it.
And I have no clue how we'll test these builds work. This will be required as well.
I'm not closing this issue, but I'll remove myself as an assignee.

@maiqueb With the proposed changes, I successfully built a multi-platform image supporting both amd64 and s390x architectures. I then deployed the Multus Dynamic Networks Controller CNI using the CNAO operator on a Kubernetes cluster running on s390x. I was able to run the E2E tests successfully on the s390x cluster.
Here are the results:
Ran 7 of 7 Specs in 93.268 seconds
SUCCESS! -- 7 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestDynamicNetworksControllerE2E (93.27s)
PASS
ok  	github.com/k8snetworkplumbingwg/multus-dynamic-networks-controller/e2e	93.281s
Is this sufficient to verify the correctness of the proposed changes? Also, I would appreciate it if you could provide more details regarding the image build process and the testing approach.

@maiqueb With the proposed changes, I successfully built a multi-platform image supporting both amd64 and s390x architectures. I then deployed the Multus Dynamic Networks Controller CNI using the CNAO operator on a Kubernetes cluster running on s390x. I was able to run the E2E tests successfully on the s390x cluster.
Here are the results: Ran 7 of 7 Specs in 93.268 seconds SUCCESS! -- 7 Passed | 0 Failed | 0 Pending | 0 Skipped --- PASS: TestDynamicNetworksControllerE2E (93.27s) PASS ok github.com/k8snetworkplumbingwg/multus-dynamic-networks-controller/e2e 93.281s
Is this sufficient to verify the correctness of the proposed changes? Also, I would appreciate it if you could provide more details regarding the image build process and the testing approach.

This is good, but I wonder how can we assure this stays working ?... Can we have a lane on this architecture running on github's CI ? I really don't know.
We could probably just plow through and accept the change - meaning, the only thing we test is that we can build imgs for  s390x. We wouldn't know if we can actually run them, or if their behavior is the expected.

@maiqueb I’ve implemented multi-platform build support in PR #267 using GitHub Actions. Could you please review the changes?


Add Clockify

Adding Clockify, not much more to say.

Duplicate of #164 fyi

Apologies, didn't look before submitting clearly.


Transpiling a small python program to c++ fails with a traceback

Hi.
Thanks for py2many.  It's a really cool idea.
I'm trying to transpile this program:
#!/usr/local/cpython-3.9/bin/python3
import math
import time
import random
def main():
a = []
random.seed(time.time())
t1 = time.time()

for i in range(0, 5000000):
    b = random.random()
    if b > 0.5:
        c = math.pow(b, 1.546)
    else:
        c = math.pow(b, 0.434232)
    d = math.cos(c + i)
    a.append(math.atan(d))

t2 = time.time()
print(t2 - t1)

main()
...but when I try to transpile it to C++, I get a long traceback ending in:
File "/home/dstromberg/.local/lib/python3.9/site-packages/py2many/tracer.py", line 150, in visit_Name
return self.visit(var.assigned_from.value)
File "/usr/local/cpython-3.9/lib/python3.9/ast.py", line 407, in visit
return visitor(node)
File "/home/dstromberg/.local/lib/python3.9/site-packages/py2many/tracer.py", line 160, in visit_Call
return "{0}({1})".format(node.func.id, params)
AttributeError: 'Attribute' object has no attribute 'id'
I tried both the pypi py2many, as well as tonight's github py2many - and I tried both CPython 3.8 and CPython 3.9.  I didn't scrutinize the output tremendously carefully, but I think it was the same traceback for all 4.

Lets use https://github.com/adsharma/py2many/issues/303 for the Rust, and this issue for the C++.
The transpilation failure for C++ can be fixed by changing https://github.com/adsharma/py2many/blob/19e850e/py2many/tracer.py#L160 from
-return "{0}({1})".format(node.func.id, params)
+return "{0}({1})".format(get_id(node.func), params)

However the next problem is that the compiler will fail with
issue303.cpp:7:10: fatal error: 'random.h' file not found
#include "random.h"
         ^~~~~~~~~~
1 error generated.

Changing that to #include <random> and the next line to #include <time.h> gets the compiler a bit further, but still has quite a few compilation errors, some related to C++ syntax, and others related to the math and random functions not being implemented yet.

a: List[float] = []

would also help, so that transpiler isn't  generating things like decl_type<> to guess the type of the element. That's what caused the problem. Sending a fix.
Eventually I think type inference is a better way to handle this. The decl_type<expr> method is used in only the C++ target.

@dstromberg: thank you for the report. Please give it a shot and reopen if it's still not fixed.
We still have some work to do for API translation:
random.random
time.time
etc to their equivalents via plugins.py. Best done by using types instead of strings in the dictionary. We support both for now as a stop gap measure.

I did a 'git pull origin' followed by sudo python3 setup.py build install
...but I'm still getting:
File "/home/dstromberg/.local/lib/python3.9/site-packages/py2many/tracer.py", line 150, in visit_Name
return self.visit(var.assigned_from.value)
File "/usr/local/cpython-3.9/lib/python3.9/ast.py", line 407, in visit
return visitor(node)
File "/home/dstromberg/.local/lib/python3.9/site-packages/py2many/tracer.py", line 160, in visit_Call
return "{0}({1})".format(node.func.id, params)
AttributeError: 'Attribute' object has no attribute 'id'
Thanks.

The stack trace indicates that you're still using old code. I had to sometimes do:
pip3 uninstall py2many  # answer yes to any prompts
sudo python3 setup.py install

to get rid of the old code.

I removed a few pieces of older py2many's and tried again.
Now I get:
Writing to: .
p2m.py...p2m.cpp
could not evaluate auto
could not evaluate auto
Traceback (most recent call last):
File "/usr/local/bin/py2many", line 33, in
sys.exit(load_entry_point('py2many==0.2.1', 'console_scripts',
'py2many')())
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/cli.py",
line 436, in main
rv = _process_once(settings, source, outdir, env=env)
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/cli.py",
line 313, in _process_once
settings.post_rewriters,
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/cli.py",
line 117, in transpile
code = transpiler.visit(tree) + "\n"
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/clike.py",
line 248, in visit
return super().visit(node)
File "/usr/lib/python3.7/ast.py", line 262, in visit
return visitor(node)
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/clike.py",
line 265, in visit_Module
body_dict[b] = self.visit(b)
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/clike.py",
line 248, in visit
return super().visit(node)
File "/usr/lib/python3.7/ast.py", line 262, in visit
return visitor(node)
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/pycpp/transpiler.py",
line 515, in visit_If
return "".join(var_definitions) + super().visit_If(node)
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/clike.py",
line 409, in visit_If
buf.append("if({0}) {{".format(self.visit(node.test)))
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/clike.py",
line 248, in visit
return super().visit(node)
File "/usr/lib/python3.7/ast.py", line 262, in visit
return visitor(node)
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/clike.py",
line 445, in visit_Compare
right = self.visit(node.comparators[0])
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/clike.py",
line 248, in visit
return super().visit(node)
File "/usr/lib/python3.7/ast.py", line 262, in visit
return visitor(node)
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/pycpp/transpiler.py",
line 462, in visit_Str
node.raw_string = super().visit_Str(node)
File
"/usr/local/lib/python3.7/dist-packages/py2many-0.2.1-py3.7.egg/py2many/clike.py",
line 364, in visit_Str
node_str = node.value
AttributeError: 'Str' object has no attribute 'value'
make: *** [Makefile:14: p2m-cpp-t] Error 1
Any further suggestions?
Thanks!
On Mon, May 31, 2021 at 3:56 PM adsharma @.***> wrote:

The stack trace indicates that you're still using old code. I had to
sometimes do:
pip3 uninstall py2many  # answer yes to any prompts
sudo python3 setup.py install
to get rid of the old code.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adsharma/py2many/issues/302#issuecomment-851709407,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGTEGSE6MBV2IAYW7ESUQTTQQHZ7ANCNFSM45X5JSHA
.

--
Dan Stromberg

Yeah - this looks like a different problem. Is it the same program attached to this task that you're trying?
It works for me thusly: https://paste.ubuntu.com/p/Z4zQNgGJYD/
Two questions:

Is it possible for you to try python3.8 or 3.9? Those are the configs we're testing in our env.
If the program you're trying is different from the one above, can you attach it here?

On Mon, May 31, 2021 at 9:13 PM adsharma @.***> wrote:

Yeah - this looks like a different problem. Is it the same program
attached to this task that you're trying?
It works for me thusly: https://paste.ubuntu.com/p/Z4zQNgGJYD/
Two questions:

Is it possible for you to try python3.8 or 3.9? Those are the
configs we're testing in our env.
If the program you're trying is different from the one above, can
you attach it here?

It's the same program, and here's the traceback for CPython 3.9:

cd p2m && /usr/local/cpython-3.9/bin/py2many --cpp=1 p2m.py
Traceback (most recent call last):
File "/usr/local/cpython-3.9/bin/py2many", line 33, in
sys.exit(load_entry_point('py2many==0.2.1', 'console_scripts',
'py2many')())
File "/usr/local/cpython-3.9/bin/py2many", line 25, in
importlib_load_entry_point
return next(matches).load()
File "/usr/local/cpython-3.9/lib/python3.9/importlib/metadata.py", line
77, in load
module = import_module(match.group('module'))
File "/usr/local/cpython-3.9/lib/python3.9/importlib/init.py", line
127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in
_call_with_frames_removed
File
"/usr/local/cpython-3.9/lib/python3.9/site-packages/py2many-0.2.1-py3.9.egg/py2many/cli.py",
line 33, in
from pykt.transpiler import KotlinTranspiler, KotlinPrintRewriter,
KotlinBitOpRewriter
ImportError: cannot import name 'KotlinBitOpRewriter' from
'pykt.transpiler'
(/home/dstromberg/.local/lib/python3.9/site-packages/pykt/transpiler.py)
make: *** [Makefile:14: p2m-cpp-t] Error 1
Thanks!
--
Dan Stromberg

/home/dstromberg/.local/lib/python3.9/site-packages/pykt/transpiler.py

This path looks odd. pykt should be under the py2many directory. Suggest removing everything py2many from site-packages.

I removed a few pieces of older py2many's and tried again.

Suggest removing all of py2many (so "import py2many" gives you an error) and then installing from origin/main branch.

On Tue, Jun 1, 2021 at 12:12 PM adsharma @.***> wrote:

/home/dstromberg/.local/lib/python3.9/site-packages/pykt/transpiler.py
This path looks odd. pykt should be under the py2many directory. Suggest
removing everything py2many from site-packages.
I removed a few pieces of older py2many's and tried again.
Suggest removing all of py2many (so "import py2many" gives you an
error) and then installing from origin/main branch

Apologies - I'm not that accustomed to removing packages after python3
setup.py install.
But I think I got it all this time.
Now I get:
cd p2m && /usr/local/cpython-3.9/bin/py2many --cpp=1 p2m.py
Writing to: .
p2m.py...p2m.cpp
could not evaluate auto
could not evaluate auto
could not evaluate time.time
could not evaluate random.seed
could not evaluate time.time
could not evaluate random.random
could not evaluate pycpp::math::pow
could not evaluate pycpp::math::pow
could not evaluate pycpp::math::cos
could not evaluate pycpp::math::atan
could not evaluate a.push_back
could not evaluate time.time
could not evaluate main_func
Traceback (most recent call last):
File "/usr/local/cpython-3.9/bin/py2many", line 33, in
sys.exit(load_entry_point('py2many==0.2.1', 'console_scripts',
'py2many')())
File
"/usr/local/cpython-3.9/lib/python3.9/site-packages/py2many-0.2.1-py3.9.egg/py2many/cli.py",
line 441, in main
rv = _process_once(settings, source, outdir, env=env)
File
"/usr/local/cpython-3.9/lib/python3.9/site-packages/py2many-0.2.1-py3.9.egg/py2many/cli.py",
line 324, in _process_once
proc = run(cmd, env=env)
File "/usr/local/cpython-3.9/lib/python3.9/subprocess.py", line 501, in
run
with Popen(*popenargs, **kwargs) as process:
File "/usr/local/cpython-3.9/lib/python3.9/subprocess.py", line 947, in
init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/cpython-3.9/lib/python3.9/subprocess.py", line 1819, in
_execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'clang-format'
Any further suggestions?
Thanks.  ^_^
--
Dan Stromberg

Congrats! You got everything else right. The last step is to install a code formatter so the generated code is human readable.
If you're using a ubuntu like system, you'd run:
sudo apt install clang-format

I'm making a diff to translate APIs like time.time() and random.random() to cpp. That's a separate problem vs transpilation. The C++ stdlib is rather large, so API translation of everything is not feasible. Hopefully you can add what you need to plugins.py.

I'll land the diff above once it passes the tests. After that you'll have to fix two things in the generated code manually for your test case.
srand(time.time()) fails to compile because srand expects an unsigned int. You need to perform the appropriate cast.
t2 - t1 is std::chrono::duration arithmetic. You need to insert the code manually to convert it to an int.
Once you figure out how to make it work, I can look into performing these type conversions automatically.

I'm now using the following as input .py:
#!/usr/local/cpython-3.9/bin/python3
import math
import random
import time
import typing
def main():
a: typing.List[float] = []
time_in_seconds = int(time.time())
random.seed(time_in_seconds)
t1 = float(time.time())

for i in range(0, 5000000):
    b = random.random()
    if b > 0.5:
        c = math.pow(b, 1.546)
    else:
        c = math.pow(b, 0.434232)
    d = math.cos(c + i)
    a.append(math.atan(d))

t2 = float(time.time())
print(t2 - t1)

if name == 'main':
main()
And I'm getting the following error:
cd p2m && /usr/local/cpython-3.9/bin/py2many --cpp=1 p2m.py
Writing to: .
p2m.py...p2m.cpp
could not evaluate auto
could not evaluate auto
could not evaluate time.time
could not evaluate random.seed
could not evaluate time.time
could not evaluate random.random
could not evaluate pycpp::math::pow
could not evaluate pycpp::math::pow
could not evaluate pycpp::math::cos
could not evaluate pycpp::math::atan
could not evaluate a.push_back
could not evaluate time.time
could not evaluate main_func
cd p2m && clang p2m.cpp
p2m.cpp:1:10: fatal error: 'pycpp/runtime/builtins.h' file not found
#include "pycpp/runtime/builtins.h" // NOLINT(build/include_order)
^~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Further tips?
Thanks.
On Tue, Jun 1, 2021 at 7:38 PM adsharma @.***> wrote:

I'll land the diff above once it passes the tests. After that you'll have
to fix two things in the generated code manually for your test case.
srand(time.time()) fails to compile because srand expects an unsigned int.
You need to perform the appropriate cast.
t2 - t1 is std::chrono::duration arithmetic. You need to insert the code
manually to convert it to an int.
Once you figure out how to make it work, I can look into performing these
type conversions automatically.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/adsharma/py2many/issues/302#issuecomment-852667928,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAGTEGQKDOZGLNB3TCZWMBDTQWKQ7ANCNFSM45X5JSHA
.

--
Dan Stromberg

These headers are in https://github.com/adsharma/py2many/tree/main/pycpp/runtime
So if you are in the py2many repo root, you can do add -I . to your compiler flags so it can find those headers.

I've got a C++ (heavy on C-isms I'm afraid - I have a lot more C knowledge than C++) version working, using the auto-generated C++ as a starting point.
Does this help?  I notice it's a bit slow, not sure what I'm doing wrong - it's slower than cython and pypy even:
#include "pycpp/runtime/builtins.h" // NOLINT(build/include_order)
#include "pycpp/runtime/range.hpp"  // NOLINT(build/include_order)
#include "pycpp/runtime/sys.h"      // NOLINT(build/include_order)
#include <iostream>                 // NOLINT(build/include_order)
#include <vector>                   // NOLINT(build/include_order)
/* Just a sample script for py2many. */

#include "stdlib.h"
#include <sys/time.h>
#include <iostream>
#include "math.h"

double give_time_as_double() {
    struct timeval tv;
    gettimeofday(&tv, NULL);
    return (double)(tv.tv_sec) + (double)(tv.tv_usec) / 1000000.0;
}

inline void main_func() {
  // This was automatically generated:
  // auto a = {};
  // This is more C++ (or more C, actually) :
  double *a = (double *)malloc(5000000 * sizeof(double));

  // This was automatically generated:
  // int time_in_seconds = pycpp::to_int(time.time());
  // This is more C++:
  double time_in_seconds;
  time_in_seconds = give_time_as_double();

  // This was automatically generated:
  // random.seed(time_in_seconds);
  // This is more C++:
  srand((unsigned int)time_in_seconds);

  // This was automatically generated:
  // double t1 = static_cast<float>(time.time());
  // This is more C++:
  auto t1 = give_time_as_double();

  for (auto i : rangepp::xrange(0, 5000000)) {
    // This was automatically generated:
    // auto b = random.random();
    // This is more C++:
    auto b = rand();

    // This was automatically generated:
    // decltype(math.pow(b, 1.546)) c;
    // This is more C++:
    auto c = pow(b, 1.546);
    if (b > 0.5) {
      // This was automatically generated:
      // c = pycpp::math::pow(b, 1.546);
      // This is more C++:
      c = pow(b, 1.546);
    } else {
      // This was automatically generated:
      // c = pycpp::math::pow(b, 0.434232);
      // This is more C++:
      c = pow(b, 0.434232);
    }
    // This was automatically generated:
    // auto d = pycpp::math::cos(c + i);
    // This is more C++:
    auto d = cos(c + i);

    // This was automatically generated:
    // a.push_back(pycpp::math::atan(d));
    // This is more C++:
    a[i] = atan(d);
  }
  // Added this since we malloc'd previously.
  free(a);
  // This was automatically generated:
  // double t2 = static_cast<float>(time.time());
  // This is more C++:
  double t2 = give_time_as_double();

  std::cout << t2 - t1;
  std::cout << std::endl;
}

int main(int argc, char **argv) {
  pycpp::sys::argv = std::vector<std::string>(argv, argv + argc);
  main_func();
}

Thanks!

FWIW here's the profile I got via perf record/report:
    46.18%  foo1     libm-2.31.so         [.] __branred
    18.89%  foo1     libm-2.31.so         [.] __atan_fma
    13.86%  foo1     libm-2.31.so         [.] __cos_fma
    10.90%  foo1     libm-2.31.so         [.] __ieee754_pow_fma
     1.63%  foo1     libm-2.31.so         [.] pow@@GLIBC_2.29
     1.62%  foo1     foo1                 [.] main_func

I'll have to see the equivalent cython to figure out why it's faster. For pypy what were the precise version and input python script so I can reproduce?

// auto a = {};

For py2many to generate better code, you'll need to type hint the python3 sources such as:
a: List[float] = []

The type inference works for simple cases (see infer_ops.py test case), but more work needs to be done.

Is __branred this?  https://github.com/lattera/glibc/blob/master/sysdeps/ieee754/dbl-64/branred.c
I tried to attached the Cython3 version, but got an error from github - so I'm pasting it below, followed by the Pypy3 version.
cython: language_level = 3
import time
import random
from libc cimport math
from libc.stdlib cimport calloc, free
cdef main():
cdef double *a
cdef double b
cdef double c
cdef double d
cdef int i
a = <double *>calloc(5000000, sizeof(double))
if a == NULL:
    raise SystemExit('calloc failed')

try:
    random.seed(time.time())
    t1=time.time()

    for i in range(5000000):
        b=random.random()
        if b>0.5:
            c=math.pow(b,1.546)
        else:
            c=math.pow(b,0.434232)
        d=math.cos(c+i)
        a[i]=math.atan(d)

    t2=time.time()
    print(t2-t1)
finally:
    free(a)

main()
And the Pypy3 version - the interpreter version is in the #!, and I'm doing all this on Linux:
#!/usr/local/pypy3-7.3.3/bin/pypy3
import math
import time
import random
def main():
a=[None] * 5000000
random.seed(time.time())
t1=time.time()

for i in range(0, 5000000):
    b=random.random()
    if b>0.5:
        c=math.pow(b,1.546)
    else:
        c=math.pow(b,0.434232)
    d=math.cos(c+i)
    a[i]=math.atan(d)

t2=time.time()
print(t2-t1)

main()
Thanks!

I played around a bit with this benchmark. Here are the results I found:
cpython3: 1.9s
pypy: 0.93s
your-cpp-from-py2many: 0.71s
cython: 0.6s

Looking at the profiles, it doesn't look like we're benchmarking cpython vs pypy vs cython vs py2many. We're primarily comparing the library implementations of cos and tan. And it does look like glibc's version is slower.
https://sourceware.org/bugzilla/show_bug.cgi?id=24603
may be related. Yeah, the URL you have seems to match.

Would you believe the code originated with someone asking why python was 10x slower than C++?


4.x: Fix MockBean to work with argument matchers

Description

Call toString() to force initialization of the mocked instances
Use produceWith instead of createWith
Use addTransitiveTypeClosure instead of addType to support more than just one type
Minor refactoring of the processMockBean method
Add unit test

Fixes #9397
Documentation
None.

It would be better to add the test also in testng module.


HIVE-24313: Optimise stats collection for file sizes on cloud storage

What changes were proposed in this pull request?

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

@rbalamohan can you take a look please?


How do I know how many messages I sent after I sent a push through the topic?

How do I know how many messages I sent after I sent a push through the topic?

It‘s not possible to get that information via API calls, you will only know that Firebase has accepted the message if the send doesn‘t result in an error.
I‘m not sure, but if you want to track the delivered messages, my best guess is to trigger a Firebase Analytics Event from the client application when the message has arrived there.

thanks


XY-Grid cell gutters not output at larger breakpoints

How to reproduce this bug:
.SearchForm {
  @include xy-cell(shrink, $gutter-position: right left bottom, $vertical: true);
  @include breakpoint(xxlarge) {
    @include xy-cell(shrink, $gutter-position: right left bottom top, $vertical: true);
  }
}

What should happen:
.SearchForm {
    flex: 0 0 auto;
    height: auto;
    margin-right: 0.625rem;
    margin-left: 0.625rem;
    margin-bottom: 0.625rem; }
    @media screen and (min-width: 90em) {
     .SearchForm {
        flex: 0 0 auto;
        height: auto;
        margin-right: 0.9375rem;
        margin-left: 0.9375rem;
        margin-bottom: 0.9375rem;
        margin-top: 0.9375rem; } }

What happened instead:
.SearchForm {
    flex: 0 0 auto;
    height: auto;
    margin-right: 0.625rem;
    margin-left: 0.625rem;
    margin-bottom: 0.625rem; }
    @media screen and (min-width: 90em) {
     .SearchForm {
        flex: 0 0 auto;
        height: auto; } }

Note the lack of margin at the XL breakpoint.
Browser(s) and Device(s) tested on:
SASS compiled with node-sass-chokidar
Foundation Version(s) you are using:
6.4.1
Test case link:
Sorry - not sure how to set up a CodePen with Foundation SCSS.

Looking at the xy-cell mixin:
@if $gutter-output {
  // If gutters = map
  @if(type-of($gutters) == 'map') {
    // If $gutters map has a key = $breakpoint, output the value
    @if (map-has-key($gutters, $breakpoint)) {
      @include xy-gutters($gutter, $gutter-type, $gutter-position);
    }
  }
  // If not a map
  @else {
    @include xy-gutters($gutter, $gutter-type, $gutter-position);
  }
}

Unless overridden, $gutters = $grid-margin-gutters, which are:
$grid-margin-gutters: (
  small: 20px,
  medium: 30px
) !default;

Since the xxlarge breakpoint doesn't exist in the $gutters map, it doesn't get printed, even though xy-gutters() is capable of falling back to a smaller breakpoint.

Hello,
is there a solution for this?

My sense is that this should be actually getting the breakpoint at a higher point than the pasted code... we run
 // Get our gutters from map if available, if not map just return the value.
  $gutter: -zf-get-bp-val($gutters, $breakpoint);

which should pull the gutter out for the biggest breakpoint less than $breakpoint, and then get used down below, but I'll dig in further and see what's going on.

Ah, no @rbayliss is spot on... we're currently deliberately not emitting gutters if we're not at one of the responsive gutter breakpoints. @brettsmason this is our responsive gutter headache again. :P
My sense is if you're using zf-cell and you pass in $gutter-output: true you should always have gutters included, even though we know that if someone simply loops over breakpoints with zf-cell they'll get extra css. It's the only way we can guarantee correctness when someone can include this at any breakpoint... then within our auto-class generation we can be careful and explicit about only outputting the gutters we need at those breakpoints themselves.  If we're worried about it, we could do some optimization with a bulk mixin like the xy-cell-breakpoints mixin that was discussed.
@brettsmason you're more of the architect on zf-cell, anything I'm getting wrong here?


Feature - interview implementation

backend-controller.js
site-controllers
outages controllers
helpers util functions
request handler promises
error handler
dynamic request mapping helper with config json
swagger express routing with operations
Project skeleton creation for API middleware

Merge Initial implementation


enable the minWidth/maxWidth/minHeight/maxHeight features

@facebook-github-bot shipit

We should get this in for Android as well! cc @mkonicek

Sorry to be the bad guy here but the implementation of min/max width/height on css-layout isn't ready to be used. It only supports a couple of cases and not even many of the common use cases nor any edge case.
Using this one would be really bad as people are going to rely on this bad implementation and it's going to be a major pain to upgrade to the proper one once we fix the issues

Concerning about this. Is there any plan or even actual moves on implementing them?

@vjeux Is the API likely to change?

@nicklockwood: the api is going to stay the same. But if people use it today and we upgrade it, it'll break their app in subtle ways that we can't make backward compatible.
The current implementation is not just a bit off, it's completely wrong for most common inputs.
Right now no one is working on it, but I'll gladly accept pull requests that improve the implementation.

FYI It is inside documentation:
https://facebook.github.io/react-native/docs/flexbox.html#proptypes
and:
https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/LayoutPropTypes.js
https://github.com/facebook/react-native/commit/2244a86eea9e6ad2d4094b126530f07291324f15

FYI {min,max}{Width,Height} have been removed from the docs: https://github.com/facebook/react-native/commit/2529179769ff7f24f9b91acc5417e19983958ff6
A per vjeux's comment above:

The current implementation is not just a bit off, it's completely wrong for most common inputs. Right now no one is working on it, but I'll gladly accept pull requests that improve the implementation.

The implementation is here: https://github.com/facebook/css-layout

Temporary fix here:


PWA for mobile

Implement a PWA functionality so users can have a better mobile experience without the need of a native browser app wrapper.

Resolved.


Handlers need to be unregistered to avoid retention leak.

More jshint errors, odd I didn't change these


261 imprint statement for films

https://github.com/uwlib-cams/MARC2RDA/blob/main/Working Documents/2XX.csv

https://docs.google.com/spreadsheets/d/1GYNZJCtVbj7eU9xtJtVw6Eumk3eDnF_bf7wRrQuuHe4/edit#gid=1726866130
Hello Everyone,
Please see finished spreadsheet for Field 261 - Imprint Statement for Films (Pre-AACR 1 Revised) [USMARC only]. Would anyone be available to review this spreadsheet?
Thanks.
Alice


⚠ Bofrost.de has degraded performance

In bfda64b, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1527 ms

Resolved: Bofrost.de performance has improved in 9bf1515 after 6 minutes.