text:
Doesn't work with gist.github.com

There are two issues:

the default URL regex only matches http://, not https://, which is the default scheme for Gist URLs.

neither the oembed nor the dict objects returned on success include the html attribute. Indeed, it seems nothing from the actual OEmbed JSON is returned.

This Gist has this OEmbed JSON:
{
  "author_url": "https://github.com/jamesarosen",
  "version": "1.0",
  "type": "rich",
  "url": "https://gist.github.com/733951",
  "html": "<div class=\"data syntax\">...",
  "provider_name": "GitHub",
  "provider_url": "https://github.com",
  "title": "gist: 733951",
  "author_name": "jamesarosen"
}

None of that is available from jQuery-embedly.

These both have been fixed over the last 12 months, sorry for not updating.

authors: artgibson jamesarosen

repo: embedly/embedly-jquery


text:
fix(dataset): lazily fetch dataset branch if it was not fetched on init

Summary

made 'branch' a property, which checks if the self._branch attribute exists, if not it will fetch or create the branch, and then return self._branch
also added a setter, so the self.branch attribute can be set
reduced code duplication between from_rid and from_path by extending the switch_branch method

Checklist

[x] You agree with our CLA
[x] Included tests (or is not applicable).
[x] Updated documentation (or is not applicable).
[x] Used pre-commit hooks to format and lint the code.

lgtm please Release

source: gharchive/pull-request

authors: jonas-w nicornk

repo: emdgroup/foundry-dev-tools

license_type: permissive

license_source: github-api


text:
fix: turn section into live region #306

Issue: Older screen readers don't announce individual toasts
li elements are not allowed to have the role="status" tag as per MDN.
Fixes https://github.com/emilkowalski/sonner/issues/306
What has been done:

[x] Removed aria-live, aria-atomic and role tags from the <li> element (the Toast)
[x] Added aria-live, aria-relevant and aria-atomic to the containing <section> element
[x] Removed the important key from the ToastT type

Screenshots/Videos:
N/A
Visually, not changed. Tests all pass. Build passes.
Notes
This is be a breaking change because we remove the important key from the ToastT type, meaning that consumers will get a type error if they've been using the key so far. Happy to discuss another solution to this, if any.

As a proposal, we could have a way to deprecate the important key in the ToastT interface. And maybe "announce" it for the next few minor versions. Meaning, we keep it but it does nothing so we can warn users that it will disappear and they have time to prepare.

Hm, I might need to update from main before it can be merged. I'll take care of that.

Is there any update on this PR? I could do with it as we have automated accessibility tests which it fails for... And for users 🙂

I kept merging main into this, but I don't think it'll ever actually get merged, so I gave up :(

Why do you think it will not be merged?

There are plenty of PRs unmerged 🤷

Thanks, merged. My guess is that not a lot of people use important, so it's ok to merge.

authors: andrewbarnesweb emilkowalski tonyfarney tricinel

repo: emilkowalski/sonner

license: MIT


text:
Bad animation when clicking escape immediately on open

The closing animation is not accurate to the current position of the component. Meaning if you click escape to close the component the moment it's opening, it causes the animation to "jump", rather than smoothly  closing.
https://github.com/user-attachments/assets/36e430e7-53d9-4134-a99d-e5cf7f011461

It's because it's using keyframes instead of transitions. A large refactor would be required to fix it, so I won't do it as it's an edge case anyway. Thanks for reporting though!

source: gharchive/issue

authors: Multinite emilkowalski

repo: emilkowalski/vaul


text:
'EMI experienced a critical exception while reloading, check log'

Heya.  I'm in the early stages of playing around with building a 1.19.4 Quilt modpack.  Excited to give EMI a try and see how it compares to REI/JEI.  But I couldn't get it to work.  No crashing - just that message when I open my inventory, and none of EMI's GUI renders.  Peeking at the log, this seems to be the most relevant part -
[13:04:02] [Thread-21/ERROR]: [EMI] Critical error occured during reload:
[13:04:02] [Thread-21/INFO]: [STDERR]: java.lang.AbstractMethodError: Receiver class com.teamremastered.endrem.EndRemastered$$Lambda$5435/0x000000080186c3f8 does not define or inherit an implementation of the resolved method 'abstract void accept(net.minecraft.class_1761$class_8128, net.minecraft.class_1761$class_7704)' of interface net.minecraft.class_1761$class_7914.
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at net.minecraft.class_1761.method_47306(class_1761.java:96)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at net.minecraft.class_7706.method_47338(class_7706.java:2009)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:720)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at net.minecraft.class_7706.method_47337(class_7706.java:2009)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at net.minecraft.class_7706.method_47330(class_7706.java:2020)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at dev.emi.emi.EmiStackList.reload(EmiStackList.java:41)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at dev.emi.emi.EmiReloadManager$ReloadWorker.run(EmiReloadManager.java:130)
[13:04:02] [Thread-21/INFO]: [STDERR]: 	at java.base/java.lang.Thread.run(Thread.java:833)

So tried loading without End Remastered..  and..  EMI is now working, go figure.  I'll probably just leave End Remastered disabled for now so I can continue testing EMI (JEI worked fine with ER, but JEI more than halved my FPS even with the inventory closed! - REI partially works and my FPS stays high, but for some reason the right side block/item page stays empty - I wonder if End Remastered is breaking REI as well? o.o).  But I figure I should report the incompatibility anyway, in case you guys wanna try and resolve the conflict.
MC 1.19.4
Quilt 0.18.10
End Remastered 5.2.1
EMI 0.7.3
Extra Mod Interactions 0.3.0 (I tested with this both enabled and disabled, just in case)

If this is affecting REI it's likely an issue with End Remastered. They don't seem to have a 1.19.4 version, that may be part of the problem, but they'd know best what's going wrong.

authors: MechanosG emilyploszaj

repo: emilyploszaj/emi


text:
Help Tab Problems

Good afternoon and Merry Christmas.
HelpTab :: Failed to build help for: PeelerLauncher 	System.NullReferenceException: Object reference not set to an instance of an object   at HelpTab.HelpBuilder+<>c.<HelpForBuildable>b__32_2 (RimWorld.StatModifier sb) [0x00002] in <3cb9aa835dfa4c2e9eb74cfb55c016fe>:0    at System.Linq.Enumerable+SelectListIterator2[TSource,TResult].ToArray () [0x00034] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Linq.Enumerable.ToArray[TSource] (System.Collections.Generic.IEnumerable1[T] source) [0x0001f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0    at HelpTab.HelpBuilder.HelpForBuildable (Verse.BuildableDef buildableDef, HelpTab.HelpCategoryDef category) [0x000e4] in <3cb9aa835dfa4c2e9eb74cfb55c016fe>:0    at HelpTab.HelpBuilder.HelpForDef[T] (T def, HelpTab.HelpCategoryDef category) [0x00033] in <3cb9aa835dfa4c2e9eb74cfb55c016fe>:0    at HelpTab.HelpBuilder.ResolveDefList[T] (System.Collections.Generic.IEnumerable1[T] defs, HelpTab.HelpCategoryDef category) [0x00055] in <3cb9aa835dfa4c2e9eb74cfb55c016fe>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Warning (string)
HelpTab.HelpBuilder:ResolveDefList<Verse.ThingDef> (System.Collections.Generic.IEnumerable1<Verse.ThingDef>,HelpTab.HelpCategoryDef) HelpTab.HelpBuilder:ResolveWeapons () HelpTab.HelpBuilder:ResolveImpliedDefs () Verse.LongEventHandler:UpdateCurrentSynchronousEvent (bool&) Verse.LongEventHandler:LongEventsUpdate (bool&) (wrapper dynamic-method) Verse.Root:Verse.Root.Update_Patch1 (Verse.Root) Verse.Root_Entry:Update ()
Exception from long event: System.NullReferenceException: Object reference not set to an instance of an object   at HelpTab.HelpBuilder+<>c.<ResolvePawnkinds>b__25_0 (Verse.PawnKindDef t) [0x00000] in <3cb9aa835dfa4c2e9eb74cfb55c016fe>:0    at System.Linq.Enumerable+WhereListIterator1[TSource].ToList () [0x00017] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable1[T] source) [0x0001f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0    at HelpTab.HelpBuilder.ResolvePawnkinds () [0x00029] in <3cb9aa835dfa4c2e9eb74cfb55c016fe>:0    at HelpTab.HelpBuilder.ResolveImpliedDefs () [0x0002d] in <3cb9aa835dfa4c2e9eb74cfb55c016fe>:0    at Verse.LongEventHandler.UpdateCurrentSynchronousEvent (System.Boolean& sceneChanged) [0x0001d] in <cdbd0ed5089a418da09b9a259f9dbd8f>:0  UnityEngine.StackTraceUtility:ExtractStackTrace () (wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch2 (string) Verse.LongEventHandler:UpdateCurrentSynchronousEvent (bool&) Verse.LongEventHandler:LongEventsUpdate (bool&) (wrapper dynamic-method) Verse.Root:Verse.Root.Update_Patch1 (Verse.Root) Verse.Root_Entry:Update ()
For some reason, my game seems to be corrupted by the Help Tab (I assume that's what this used to be), and I can't identify why. The item that it says has failed is the Peeler Launcher from a Mod I am reviving, but when I look at its code, it matches the Def Name at which this Mod is looking.
What does this mean?
This is my Hugs Library Log: https://gist.github.com/a36c6da01c5a73d1988b864f203e29b7 .
Thank you for any assistance you may render.
Merry Christmas,
-TURTLESHROOM

Can you share the items definition that causes the issue? (The Peeler Launcher)

Gladly.
 <ThingDef ParentName="BaseGun">     <defName>PeelerLauncher</defName>     peeler launcher 	<techLevel>Spacer</techLevel>     <description>HHHHHHHHHHHHHHHH</description>     <graphicData>       <texPath>Things/Items/PeeledWeapons/RazorLauncher</texPath>       <graphicClass>Graphic_Single</graphicClass>     </graphicData> 	<weaponTags>
PeeledWeapon

Potato Cannon
 		     </weaponTags>     <soundInteract>Interact_SMG</soundInteract> 	<generateCommonality>1.5</generateCommonality>     <statBases> 		<MarketValue>800</MarketValue> 		<Mass>0.2</Mass> 		<AccuracyTouch>0.5</AccuracyTouch> 		<AccuracyShort>0.9</AccuracyShort> 		<AccuracyMedium>0.9</AccuracyMedium> 		<AccuracyLong>0.4</AccuracyLong> 		<RangedWeapon_Cooldown>2</RangedWeapon_Cooldown> 		<defaultArmorPenetration>0.5</defaultArmorPenetration>     </statBases>     <tradeability>Sellable</tradeability>     <verbs>
         <verbClass>Verb_Shoot</verbClass>         <hasStandardCommand>true</hasStandardCommand>         <defaultProjectile>Launched_Peeler</defaultProjectile>         <warmupTime>3.2</warmupTime>         <range>40</range>         <burstShotCount>80</burstShotCount>         <ticksBetweenBurstShots>6</ticksBetweenBurstShots>         <soundCast>Shot_NeedleGun</soundCast>         <soundCastTail>GunTail_Heavy</soundCastTail>         <muzzleFlashScale>12</muzzleFlashScale>
     </verbs>     <tools>
         grip         <capacities>
Blunt

Poke

Peeler
         </capacities>         <power>4</power>         <cooldownTime>1.6</cooldownTime>

         barrel         <capacities>
Peeler
         </capacities>         <power>4</power>         <cooldownTime>1.6</cooldownTime>
     </tools> 	<equippedStatOffsets> 		<TerrorSource>0.1</TerrorSource> 	</equippedStatOffsets>   </ThingDef>

0.5
is not a valid property under statBases
Its a property used when defining DamageDefs


text:
Switch to Envoy 1.30.1

Switch to Envoy 1.30.1 (and pull in some other dependency bumps from main as well)

Merge master for dependency bumps
Update Envoy to 1.30.1.

Update Go to 1.21.10 in the base-python image (which, uh, we don't really use in this branch!).
Update Go packages:
golang.org/x/sys v0.15.0 => v0.18.0
google.golang.org/protobuf v1.32.0 => v1.33.0
Update Python packages:
blinker 1.7.0 => 1.8.2
durationpy 0.5 => 0.6
flask 3.0.0 => 3.0.3
gunicorn 21.2.0 => 22.0.0
idna 3.4 => 3.7
packaging 23.2 => 24.0
typing-extensions 4.8.0 => 4.11.0
urllib3 2.1.0 => 2.2.1

It makes me rather happy, actually... 😂

repo: emissary-ingress/emissary


text:
Suggestion for Navio2 C++ library

I've been toying around with the C++ library, and wasn't satisfied with the way the code is layed out in the repo. As a programmer I was expecting a Makefile for the Navio C++ portion that builds the library and installs it to the right place so I can link it. I instead made my own, check it out here.
It essentially builds the library and examples. I would happily transfer this work to you guys if you like.

@chutsu
It'd be very nice to see a PR! We can discuss it in details there, alright?

Well the repo I made only contains your C++ library code, not the python and scripts. So I'm not sure a PR here makes sense.

authors: chutsu staroselskii


text:
tune colormap according to series range, and make plots without OSM background

I added a utility function make_colormap so that

zero corresponds to the center of the original colormap (e.g. white for RdBu)
we keep only the colors to encompass the range of the series

There are two ways to use the function

with the min and max values of the series (default mode)
giving a quantile to compress the scale, this can be useful for a better contrast

The quantile mode works well except when there is just one or two values above / below 0 so that the clipped values have the same sign (and then the function does not do anything but returns the initial colorscale).
I also plotted the choropleth traces without background.

Nice!

authors: chagaz emmanuelle


text:
pydot dependency

Hi Emre, I really liked the idea! Just tried some stuff. I have a question, I tried to run:
r("Rasmus").get_network("/tmp/x.png")

Error poped up:
ImportError: You need pydot library to get network functionality.

Maybe It would be better to mention on README.md or maybe this should come with pydot what do you think ?
Again, thanx for the tool :)

Also user needs to install graphviz:
brew install graphviz # for osx

helped me out...

just updated the readme about this. thanks :+1:

authors: emre vigo

repo: emre/relationships

license: mit

license_source: bigquery


text:
Issues when trying to build locally

Trying the local setup locally (Ubuntu 23.10) following: https://github.com/emscripten-forge/recipes?tab=readme-ov-file#local-builds
First issue encountered after running this command:
./emsdk/setup_emsdk.sh 3.1.45 ~/emsdk

Running CMake: ['cmake', '-G', 'Unix Makefiles', '-DCMAKE_BUILD_TYPE=Release', '-DPYTHON_EXECUTABLE=/home/jtp/micromamba/envs/emscripten-forge/bin/python3', '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14', '-DZSTD_FROM_INTERNET=ON', '/home/jtp/emsdk/ccache/git-emscripten_64bit/src']
[Errno 2] No such file or directory: 'cmake'
Could not run CMake, perhaps it has not been installed?
Installing this package requires CMake. Get it via your system package manager (e.g. sudo apt-get install cmake), or from http://www.cmake.org/
error: installation failed!

So I installed cmake in the emscripten-forge environment with:
micromamba install cmake

Deleting ~/emsdk and re-running ./emsdk/setup_emsdk.sh 3.1.45 ~/emsdk.
Second issue now is (at the emsdk building ... phase):
CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
CMake invocation failed due to exception!
Working directory: /home/jtp/emsdk/ccache/git-emscripten_64bit/build_emscripten_64
Command '['cmake', '-G', 'Unix Makefiles', '-DCMAKE_BUILD_TYPE=Release', '-DPYTHON_EXECUTABLE=/home/jtp/micromamba/envs/emscripten-forge/bin/python3', '-DCMAKE_OSX_DEPLOYMENT_TARGET=10.14', '-DZSTD_FROM_INTERNET=ON', '/home/jtp/emsdk/ccache/git-emscripten_64bit/src']' returned non-zero exit status 1.
error: installation failed!

Logging this in an issue here so it's easier to find.
Maybe I made a mistake in one of the previous steps. I'll try to start over to double check.

I believe cmake and make need to be installed

authors: DerThorsten jtpio

repo: emscripten-forge/recipes


text:
refactor out duplicate code

@npmccallum I did these changes to factor out any possibilities of mmledger failing as I'm debugging SGX2. There's also added self-consistency checks in addition to minimizing the code paths.

In SGX we must to pro-actively mmledger to detect overlaps because it will be a long time, if ever, we support them, given the complexities, which have to nothing to do with mmledger implementation. By dividing the problem like this to nicely encapsulated components, it's easy to make the call to delete() optional without messing out the code.

@npmccallum please review

@npmccallum mmap PR is not anymore dependent on this but please approve this when you can because it is needed for continuation.

Added snapshot of the Heap to this PR. It can refined from this point forward.

moved heap to a separate branch which i upstream later on

repo: enarx/mmledger


text:
[f-droid] scanner in meetup freezes consistently

See: https://github.com/encointer/flutter_qr_reader/issues/3
The scan is successful though.
Ass this only happens in the meetup scanner, I believe it has to do with displaying the snack bar, or that the scanner does not immediatelly navigate somewhere else after scanning.

Closed by #875

repo: encointer/encointer-wallet-flutter


text:
Initial Spanish translation

As part of #760, we want an initial translation done for kolibri-explore-plugin.

Here are the English versions of the strings. They come in three files because of how kolibri-explore-plugin is split up between frontend and backend, and different frontend modules. django.txt is actually a PO file but I had to rename it to get GitHub to accept it.
django.txt
kolibri_explore_plugin-messages.csv
welcome-screen-messages.csv

@jofilizola, the English versions of the strings for the kolibri-explore-plugin are above for you to take a look at.

@pwithnall I am organizing the translation file with screenshots, for people translating it might not be very obvious where things sit, since they are not so familiar with all of the UI element. There are a few things that I need help with, all marked in the document:

Error messages that I can't force to appear, would you be able to get me screenshots? YELLOW
Strings that are in the UI with no identifiers listed RED
Strings that I could not find where the in the UI they live PURPLE (are these fade.downloadCompletedLabel related to the individual content download, card UI?)
Strings that come straight from Kolibri as they are, the quizzes components are marked in gray, can we use the ones from Kolibri?

Here's the document, if you see something wrong there, please let me know!
Thanks!!

Left some comments and some screenshots (where I can easily produce them) in the document.

Here’s an updated version of the message files, including a lot more messages from other parts of the UI which were previously untagged for translation.
This should now be pretty much the full set of strings to translate.
LC_MESSAGES.zip

Thanks Philip! I'm going through the files and I spotted that the template-ui-messages.csv is empty when I open and  I don't see the .json file in the .zip folder. I don't know what I'm missing... could you take a look, please?

Ah yes, it’s meant to be empty. There aren’t actually any translatable messages in the template-ui package.

Ah, ok! Will there be?

Not unless someone adds more features to template-ui. The lack of messages to translate is because it doesn’t contain any human-readable strings, not because there are missing translation annotations.

Not unless someone adds more features to template-ui. The lack of messages to translate is because it doesn’t contain any human-readable strings, not because there are missing translation annotations.

@pwithnall did you use master branch for the extraction? I see some: git grep '$trs' packages/template-ui/

@jofilizola Here are the missing template-ui messages for translation:
template-ui-messages.zip

And here’s the final batch of strings for translation, from the loading screen:
loading-screen.zip
Included are the English strings, and my initial (dodgy) Latin American Spanish translation. It’ll need reviewing and tweaking.

@pwithnall I took the liberty to start importing the strings after I did QA of the documents. I started with the kolibri_explore_plugin.app-messages.json as is the only one in current master. Here is a PR: https://github.com/endlessm/kolibri-explore-plugin/pull/832
I wrote a simple script for this (pasted below for now). You can see in the output that there are some missing string IDs. Probably because of moving messages around between the components.
import os
import json
import csv

csv_path = 'Spanish_Translations_kolibri_explore_plugin-messages - kolibri_explore_plugin-messages.csv'
json_path = 'kolibri_explore_plugin/locale/es_419/LC_MESSAGES/kolibri_explore_plugin.app-messages.json'

json_data = {}
with open(json_path) as json_file:
    json_data = json.load(json_file)

csv_data = []
with open(csv_path, encoding='utf8') as csv_file:
    csv_reader = csv.reader(csv_file)
    for row in csv_reader:
        csv_data.append(row)

csv_data.pop(0)  # first line is header

total_missing = 0
for i, row in enumerate(csv_data):
    _id = csv_data[i][0]
    translation = csv_data[i][3].strip()
    if _id in json_data:
        if translation == '':
            # Ignore missing ones
            continue
        json_data[_id] = translation
    else:
        print(f'Missing ID: {_id}')
        total_missing += 1

with open(json_path, 'w', encoding='utf8') as json_file:
    json.dump(json_data, json_file, ensure_ascii=False, sort_keys=True, indent=2)

print(f'Total Missing: {total_missing}')

Here is the script above in a PR: https://github.com/endlessm/kolibri-explore-plugin/pull/834
The import would work like this:

Save the spreadsheet as CSV
Run the script to update the JSON, eg: ./scripts/import_translation.py ~/Descargas/Spanish_Translations_kolibri_explore_plugin-messages\ -\ kolibri_explore_plugin-messages.csv kolibri_explore_plugin/locale/es_419/LC_MESSAGES/kolibri_explore_plugin.app-messages.json

This is how it looks in my end. Some translations that were correctly imported (like "READ") are not being translated:

And here’s the final batch of strings for translation, from the loading screen: loading-screen.zip
Included are the English strings, and my initial (dodgy) Latin American Spanish translation. It’ll need reviewing and tweaking.

@manuq @pwithnall  I've prepared a new document for this: https://docs.google.com/spreadsheets/d/1fYO_rili_EVrdMiG3LTZf6AHyqTo2KG_eaIcL7yh__U/edit#gid=644360418 and used the translations we already had in other documents for the same copy.

This is how it looks in my end. Some translations that were correctly imported (like "READ") are not being translated:

https://docs.google.com/spreadsheets/d/1qtkHtDQOMzfK_8_IQnL59WGK-ub2BjIpsccjac7iYf0/edit#gid=1161103477
Line 26, 21, 22, 23 we have the translation to the media type in this document
The tabs translations are in this one: https://docs.google.com/spreadsheets/d/1J4OyG-KCARsC0hSc0zC0LOguUdpmVw_YJxYG2HA5rBc/edit#gid=1177927074
lines 72, 74

And here’s the final batch of strings for translation, from the loading screen: loading-screen.zip
Included are the English strings, and my initial (dodgy) Latin American Spanish translation. It’ll need reviewing and tweaking.

@manuq @pwithnall I've prepared a new document for this: https://docs.google.com/spreadsheets/d/1fYO_rili_EVrdMiG3LTZf6AHyqTo2KG_eaIcL7yh__U/edit#gid=644360418 and used the translations we already had in other documents for the same copy.

https://github.com/endlessm/kolibri-explore-plugin/pull/845

Spanish localization of the UI is fully working 7.1 onwards.

authors: erikos jofilizola manuq pwithnall

repo: endlessm/kolibri-explore-plugin


text:
[Request - Product] Strapi

Full and short name of product
Strapi
The leading open-source headless CMS.
100% JavaScript / TypeScript and fully customizable.
Does this product have LTS versions? What are the intervals between each LTS version?
No
What is the website for the product and for its version information?
https://github.com/strapi/strapi/releases
https://github.com/strapi/strapi/tags
Additional context

From https://github.com/strapi/strapi/blob/develop/SECURITY.md:

As of April 2024 (and until this document is updated), only the v4.x.x GA or STABLE releases of Strapi are supported for updates and bug fixes. Any previous versions are currently not supported and users are advised to use them "at their own risk".

v5.x.x Beta is considered unstable is only supported during the beta period for NON-PRODUCTION usage
v4.x.x Stable is considered LTS until further notice
v4.x.x Beta is considered unstable and not supported
v4.x.x Alpha is considered unstable and not supported
v3.x.x is considered deprecated and not supported

There's also a list of supported operating systems and node versions at https://github.com/strapi/strapi/tree/develop?tab=readme-ov-file#-requirements


text:
Fix error when using rustversion with MIRAI

Issue
When using rustversion with MIRAI an error will occur
Steps to Reproduce
As mentioned in the documentation
Expected Behavior
No error.
Actual Results
Error: unexpected output from rustc --version': "mirai 1.1.9\n"

Environment
rustc 1.77.0-nightly (2023-12-29)
Solution
Replace following code in MIRAI/checker/src/cargo-mirai.rs
if std::env::args().any(|a| a == "--version" || a == "-V") {
        let version_info = rustc_tools_util::get_version_info!();
        println!("{version_info}");
        return;
 }

with
if std::env::args().any(|a| a == "--version" || a == "-V") {
       let output = std::process::Command::new("rustc")
            .arg("--version")
            .output()
            .expect("failed to execute rustc");

        let version_info = String::from_utf8_lossy(&output.stdout);
        // your personal logic to retrieve version information that matches the required format.
        // Get YYYY-MM-DD date pattern
        let date_pattern = Regex::new(r"\d{4}-\d{2}-\d{2}").unwrap();

        if let Some(date_match) = date_pattern.find(&version_info) {
            let mut prefix = "";
            if let Some(left_parenthesis_index) = version_info.find("("){
                prefix = &version_info[..left_parenthesis_index].trim_end();
            }
            let date = &version_info[date_match.start()..date_match.end()];
            let parsed_version = format!("{} ({})", prefix, date);
            println!("{}", parsed_version);
        } else {
            println!("{}", version_info.trim());
        }
        return;
 }

This is an example of a version that meets the format requirements: rustc 1.77.0-nightly (2023-12-29)
You can add the required logic according to the version_info obtained to make it meet the format requirements.

I am not up to speed on why cargo-mirai needs to implement "--version" this way. I'd like to understand it fully before incorporating the suggested change. Can you tell me a bit more about just how I would replaciagte "When using rustversion with MIRAI"? Also, can you tell me where I can find the code that produces the 'Error: unexpected output from rustc --version' message?
Thanks

repo: endorlabs/MIRAI


text:
d executor

See packages/ for existing examples
Please merge to v3 branch!

f852b60b69996b0bca211ebdf04b0812dcfbc7d4

repo: engineer-man/piston


text:
Parallel requests causes losing some stdout

Adding a 0 ms sleep here seems to fix it for some reason:
proc.on('exit', async (code, signal) => {
    await new Promise(resolve => set_timeout(resolve, 0));
    this.exit_cleanup();

    resolve({ stdout, stderr, code, signal, output });
});

Commenting the cleanup doesn't fix it

Hi, I am also facing this issue.  Any solutions on how to fix it?

Fixed with the backport PR #613

authors: Brikaa gouseferoz


text:
Phasor Class in phasor.py

Can we replace all our functional code into objected-oriented fashion so that it will be really intuitive for users to just add, sub, mul, eq phasor
>>> p1 = Phasor(3, 120)
>>> p2 = Phasor(4, 120)
>>> p1 + p2
Phasor(7, 120)
>> p1 - p2
>> p1 * p2

class Phasor:
    """
    Complex Phasor Generator.

    Generates the standard Pythonic complex representation
    of a phasor voltage or current when given the magnitude
    and angle of the specific voltage or current.
    """

    def __init__(self, mag: float, ang: float) -> None:
        """Initialize the phasor.

        Parameters
        ----------
        mag : float
            The magnitude of the phasor
        ang : float
            The angle of the phasor in degrees
        """
        self.mag = mag
        self.ang = _np.radians(ang)

    def __add__(self, other: 'Phasor') -> 'Phasor':
        """Return the sum of the phasors.

        Parameters
        ----------
        other : object
            The other phasor to add to the current phasor

        Returns
        -------
        object
            The sum of the two phasors
        """
        if isinstance(other, Phasor):
            a = _c.rect(self.mag, self.ang)
            b = _c.rect(other.mag, other.ang)

            return Phasor(_np.abs(a + b), _np.radians(_np.angle(a + b)))

        else:
            return ValueError("Phasor can only be added to another phasor")

    def __sub__(self, other: 'Phasor') -> 'Phasor':
        """Return the difference of the phasors.

        Parameters
        ----------
        other : object
            The other phasor to subtract from the current phasor

        Returns
        -------
        object
            The difference of the two phasors
        """
        if isinstance(other, Phasor):
            a = _c.rect(self.mag, self.ang)
            b = _c.rect(other.mag, other.ang)

            return Phasor(_np.abs(a - b), _np.radians(_np.angle(a + b)))

        else:
            return ValueError("Phasor can only be subtracted from another phasor")

    def __mul__(self, other: 'Phasor') -> 'Phasor':
        """Return the product of the phasors.

        Parameters
        ----------
        other: object
            The other phasor to subtract from the current phasor

        Returns
        -------
        object
            The difference of the two phasors
        """
        return Phasor(self.mag * other.mag, self.ang + other.ang)

    def __eq__(self, __o: 'Phasor') -> bool:
        """Return True if the phasors are equal.

        Parameters
        ----------
        __o : Phasor
            The other Phasor object to compare to the current phasor

        Returns
        -------
        bool
            True if the phasors are equal, False otherwise
        """
        if isinstance(__o, Phasor):
            return self.mag == __o.mag and self.ang == __o.ang
        else:
            return False

    def __str__(self) -> str:
        """Return the string representation of the phasor."""
        return _cprint(self())

This is something I've been interested in exploring. I think it would be worth investigating the value of extending Python's base complex class as a phasor, and formulating the unique methods we need.
Overall, I'm for it! Let's explore what can be done!

I've done some exploratory work on this subject. Ultimately, I want to extend the existing functionality from Python's complex type, because I believe it will help set a few guard rails. This work can be explored in https://github.com/engineerjoe440/ElectricPy/blob/dev/investigate-phasor-type-class/electricpy/_phasor.py
I want to acknowledge the length of work you'd gone to on this, however. You've put forth some really tremendous effort! I think if I'm to move forward to this, I'm going to use some of your docstrings, since I like them much more than my own. (mine were very short in some cases).
Please explore and let me know what your thoughts are!

I've gone ahead and built a separate Python package called phasors that's available here: https://github.com/engineerjoe440/phasors and provides this exact functionality. I'll be looking to pull that back in for use in this package at some point in the future.


text:
Allow capital_base to limit base currency amount in live mode

Currently, live trading uses the amount of base currency in the account to determine the capital available for trading. Using the capital_base parameter would allow to manually enforce a limit.

In release 0.3.9.

repo: enigmampc/catalyst


text:
fix: Catch error 🥅

Catch error in OnSizeAllocated function in InputField for iOS crash.

Refs: #448

Currently, develop branch will be shipped in v2.6 and there is some time to release. I'll merge this PR into develop and cherry-pick your commit to rel-2.5 to release a patch for current version

Thanks @enisn!!

repo: enisn/UraniumUI


text:
[BUG] LaTeX not rendering!

Description
When LaTeX returned by the AI model, with markdown mode enabled, it doesn't render.
Device and browser
MacBook Pro M1 on Arc (Chromium Based) on latest Sonoma version
Screenshots and more

Willingness to Contribute

[ ] 🙋♂ Yes, I would like to contribute a fix.

Thanks for reporting @AarushX. The rendering is fully handed off to a markdown rendering plugin, but I think I can intercept and render properly.

Parsing much more latex, at least the "[\n ... ]\n" blocks.

@enricoros ^

authors: AarushX enricoros

repo: enricoros/big-AGI


text:
Cannot find java.exe within Windows Subsystem for Linux

I'm trying to set up a Scala development environment within Windows Subystem for Linux (WSL) using both JRE and JDK installed on Windows i.e., not within WSL. I exported JAVA_HOME and JRE_HOME to the appropriate folders and alias java=java.exe. This works quite well: java -version runs and sbt does its job too. I can populate an ensime configuration with sbt ensimeConfig.
The issue is that ensime-vim cannot find Java when starting vim. I suspect this is due to the fact that ensime-vim thinks it's on a Linux system and looks for java within :java-home (as set in .ensime config). However, since it's an installation on Windows, it's actually java.exe. (This is probably related to #383.)
Is there some way to configure ensime-vim to look for java.exe instead of java?
Steps to reproduce

Set-up WSL to use JDK and JRE on Windows
Alias java to java.exe
Follow installation instructions of ensime-vim

Expected behaviour
I open a *.scala file in vim on WSL and "everything just works".
Actual behaviour
In vim ensime-vim comlains:
[ensime] Java not found or not executable, verify :java-home in your .ensime config

Hi Niklaas, could you try checking what Python's notion of os.name is when running under WSL? In Vim you can try this:
:py import os; print(os.name)

Also check the value of os.pathsep too, we might want to update that part of #383's changes to try to rely more on Python's platform-agnosticism help too.

Thanks for your prompt response.
:py import os; print(os.name) gives posix.
:py import os; print(os.pathsep) gives :.
For comparison: On gvim in Windows I get nt and ; respectively.

At the moment I don't have a Linux system at hand to check whether posix and : can be used to distinguish WSL from a normal Linux. Anyway, in my ZSH config I use uname -a | grep Microsoft to find out whether the shell is run within WSL or not:
> uname -a
Linux len-x1 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31 14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

At the moment I don't have a Linux system at hand to check whether posix and : can be used to distinguish WSL from a normal Linux.

No, these values are the same as when running in Linux or OS X.
So, we could try checking for an executable named java.exe as a fallback even when os.name is posix, to handle this case of running in WSL when the Java installation comes from Windows. But the next question is how does java.exe -cp behave under these conditions? As a Windows executable is it necessary that the classpath entries given to it are separated by ; even though it's invoked from WSL?
I don't have an environment suitable for testing this, so your quickest route to a solution will likely come if you can try to experiment yourself. The code touched by #383 should be the relevant areas you need to look at: finding the java executable and passing it a classpath (that code could be updated to use os.pathsep.join(classpath) instead of a manual ternary, aside from the unknown point in question).
I'd also like to understand the use cases—I'm not a Windows person at all, so I wonder about why you have (and want) this setup of JRE/JDK installed in Windows, and presumably Vim and maybe Python, etc. in WSL. Might life be easier in other ways too if you installed Java in WSL?

authors: ches niklaas

repo: ensime/ensime-vim


text:
Once entered an incorrect function when re-editing the node the CB doesn't offer any functions

Having accepted via Ctrl-Enter an incorrect entry (like use) then when re-editing the CB shows nothing helpful.
https://user-images.githubusercontent.com/4699705/228514964-0550f060-2580-44d8-8dda-fce14dbf30cd.mp4

This was kind of expected when we implemented the cursor-aware CB. The reason is that we filter out all entries that do not match the already typed qualified name, and operator2. is considered to be a qualified name because of the current implementation.
To mitigate the issue you can recreate a node.
Technically this exact issue should be fixed by #4967
cc @farmaazon

Let's treat it as a duplicate of #4967

authors: farmaazon jdunkerley vitvakatu

repo: enso-org/enso


text:
Edge rendering details

[x] Fix output ports anti-aliasing: The end-caps and variable-width portions of output ports are separate objects in order to efficiently tie the variable-width portion to the node's width. They need to overlap each other and the node in order to avoid apparent gaps due inexact FP math and antialiasing.
[ ] Z-order: A disconnected edge should render above nodes (except the attached node); target-attachment segments should be rendered above nodes. As individual components of an SVG object cannot be given different Z-indexes, objects that need different stacking should be rendered by separate component instantiations. (Target attachments could be drawn by the nodes, but they'll need the coloring information computed for rendering the edges.)

Refinement idea: The edge "above node" could be just a part of the port.

The issues:
Incoming edge is not drawn above node background:

Disconnected edge is not drawn above other nodes:

authors: farmaazon kazcw


text:
Synchronize right-dock state in module metadata

Store the docs-opening state in the same place where camera position is (per method)
If there is no info about it, just open the doc panel if there's any documentation to show.
We don't want to store it in the file, because it should not be synchronized between users.

We should also store right-dock width.


text:
using index.Fields().Unique() for single column causes DROP/CREATE INDEX migration cycle

[x] The issue is present in the latest release.

as of 87e21993097e

[x] I have searched the issues of this repository and believe that this is not a duplicate.

https://github.com/ent/ent/issues/1344 was reporting the same phenomenon but different issue

Current Behavior 😯
The following schema causes DROP/CREATE INDEX migration cycle. Though it is mentioned in the document to use field.String().Unique() for single column, I'm assuming this behavior is unintentional.
// ent/schema/user.go

package schema

import (
	"entgo.io/ent"
	"entgo.io/ent/schema/field"
	"entgo.io/ent/schema/index"
)

func (User) Fields() []ent.Field {
	return []ent.Field{
		field.String("email"),
	}
}

func (User) Indexes() []ent.Index {
	return []ent.Index{
		index.Fields("email").Unique(),
	}
}

DROP INDEX is happening here:
https://github.com/ent/ent/blob/master/dialect/sql/schema/migrate.go#L344
Expected Behavior 🤔
either of the following:

raise error when index.Field(..).Unique() with single column is used
accept single column index.Field(..).Unique() and migration cycle does not happen

Steps to Reproduce 🕹
Steps:

add the schema above
run ent auto migration

Your Environment 🌎

Tech
Version

Go
1.16

Ent
v0.9.2-0.20210929153101-87e21993097e

Database
Postgres

Driver
github.com/jackc/pgx/v4 v4.13.0

Hey @Liooo and thanks for reporting this issue.
What's your PostgreSQL version? Thanks 🙏

Hey @a8m thanks for the quick response 👍
❯ postgres --version
postgres (PostgreSQL) 13.3

Hey @Liooo, I was able to reproduce this and submitted a patch #2004
Please, update to the latest master version, and let me know if we can close this issue. Thanks 🙏

@a8m that was the fastest fix I've seen in opensource 🚀 lol thanks so much, ill check later 🙏

confirmed the fix, closing 👍

repo: ent/ent


text:
Community Meeting September 27, 2023

Overview
At 10am Eastern, 7am Pacific, 2pm UTC; find your time
Video call link: https://meet.google.com/ved-ivnv-aen
dial-in: (US) +1 409-444-2447
PIN: 873 550 579#
More phone numbers: https://tel.meet/ved-ivnv-aen?pin=7872592963542&hs=1
Add topics you'd like to discuss below!

HACBS-2668 was suggested.

https://drive.google.com/file/d/1JPj2Bq_ySU99rbAFkZhyPS0xoAojsXY3/view?usp=drive_link

authors: robnester-rh simonbaird

repo: enterprise-contract/community


text:
store multigraphs in Zenodo

Archive for each multi-graph object (road network with associated elevations) at the conclusion of review

done:  https://doi.org/10.5281/zenodo.6354813


text:
envoy: update upstream to 44bcb12

Signed-off-by: Mike Schore mike.schore@gmail.com

Thanks @mattklein123!

repo: envoyproxy/envoy-mobile


text:
Latest Envoy on Centos 7

looking at https://github.com/envoyproxy/envoy/issues/22365 it looks like latest envoy can't be trivially compile on centos.
trying to run envoy compiled on debian/ubuntu will fail since libc 2.29 or above is not available.
I was able to run latest envoy on centos7 with libc 2.29 compiled on cento 7 into $HOME/opt/glibc-2.29

copy envoy to $HOME
patchelf --set-interpreter ./opt/glibc-2.29/lib/ld-linux-x86-64.so.2 envoy
patchelf --set-rpath ./opt/glibc-2.29/lib:/usr/lib64 envoy
envoy was able to start and pass a few simple tests.

Did anyone try this out?
Can this be an alternative way to support new envoy releases on centos 7 and centos 8?

cc: @phlax

Can this be an alternative way to support new envoy releases on centos 7 and centos 8?

i think using a custom glibc is a valid way to run Envoy on platforms that do not have a supported version - whether directly on the host, in a chroot, or in a container
personally i would consider using a container if at all possible - the distroless container, for example, has basically just that - ie envoy+glibc - but has a lot of other benefits baked in when compared to running directly on the host

Thanks!
Sadly, in this case there is no support for running containers on the target.

So going back to the question.
Would using an image compiled for ubuntu and patching to use a local libc be accepted as a deployment option for "bare metal" centos (7 or 8)?
I see similar challenges as centos7 for centos8

authors: RyanTheOptimist phlax sambercovici

repo: envoyproxy/envoy


text:
Need a way to use envoy.extensions.filters.http.ext_authz.v3.ExtAuthz for both requests and responses.

From what I can tell, the envoy.extensions.filters.http.ext_authz.v3.ExtAuthz only gets triggered when a request goes through the filter chain. When a response comes back, this seems to be skipped. Is there a way to run this in both cases? It would be helpful for be because I would like to use code in my ExtAuthz server to check headers in the response.

Have you seen https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto#envoy-v3-api-msg-extensions-filters-http-ext-proc-v3-externalprocessor? It might be a better fit.

Can you use this to reject messages as well?
On Fri, May 19, 2023, 4:39 PM Kuat @.***> wrote:

Have you seen
https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/filters/http/ext_proc/v3/ext_proc.proto#envoy-v3-api-msg-extensions-filters-http-ext-proc-v3-externalprocessor?
It might be a better fit.
—
Reply to this email directly, view it on GitHub
https://github.com/envoyproxy/envoy/issues/27523#issuecomment-1555343909,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBTO54HTNEZ75AKGAMLLWTXG7ZAZANCNFSM6AAAAAAYIJIFII
.
You are receiving this because you authored the thread.Message ID:
@.***>

@kyessenov I looked into ext_proc, however I am nervous that it is not in release and does not have security support at this time. Is there no way to get the ext_authz filter to run in both directions?

Yes, I'm pretty sure as it was designed primarily to authorize the request headers.
ext_proc is currently actively being improved so I think it's highly likely it's going to be safe enough to use soon.

Is there a target for a stable release at this point or is "soon" as good
as it gets right now? Also thank you for your help.
On Wed, May 24, 2023, 2:11 PM Kuat @.***> wrote:

Yes, I'm pretty sure as it was designed primarily to authorize the request
headers.
ext_proc is currently actively being improved so I think it's highly
likely it's going to be safe enough to use soon.
—
Reply to this email directly, view it on GitHub
https://github.com/envoyproxy/envoy/issues/27523#issuecomment-1561865067,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBTO5YDIDSQ4LIONDU55D3XHZTNJANCNFSM6AAAAAAYIJIFII
.
You are receiving this because you authored the thread.Message ID:
@.***>

Maybe @yanjunxiang-google  or @tyxia  can speak in detail, but ext_proc is a core filter - and the more it is used, the faster it'll mature.

Yeah, there is ongoing work to turn ext_proc filter into stable.  I don't have a date, but "in several weeks" probably is a good estimate.

Thanks a bunch! That is a reasonable enough estimate for me to use this now
and take the update when it comes.
On Wed, May 24, 2023, 4:07 PM yanjunxiang-google @.***>
wrote:

Yeah, there is ongoing work to turn ext_proc filter into stable. I don't
have a date, but "in several weeks" probably is a good estimate.
—
Reply to this email directly, view it on GitHub
https://github.com/envoyproxy/envoy/issues/27523#issuecomment-1561987616,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABBTO5ZOOKAIQSGYCAUHAITXH2BCRANCNFSM6AAAAAAYIJIFII
.
You are receiving this because you authored the thread.Message ID:
@.***>


text:
How to configure google_grpc for continuous DNS name resolution/target service discovery?

Hello,
I'm using google_grpc for the ext_proc filter and trying to make it continuously resolve the target URI (which belongs to a headless service with horizontal pod autoscaling) in order to discover new pod IPs for load-balancing. Currently, the gRPC client will resolve the target URI once on startup and therefore never discover the new pod IPs, unless all existing targets are dead.
Below is my current grpc_service configuration
grpc_service:
  google_grpc:
    target_uri: "<headless-service-name>.default.svc.cluster.local:443"
    stat_prefix: ext_proc
    channel_args:
      args:
        "grpc.lb_policy_name": { string_value: "round_robin" }
        "grpc.dns_min_time_between_resolutions_ms": { int_value: 1 }

With envoy_grpc, this works out-of-the-box when specifying a cluster using strict DNS service discovery.
Any ideas how to achieve the same for google_grpc?

cc @lizan

authors: ori-nat wbpcode


text:
http: initialize HeaderMap from iterator

Signed-off-by: Shikugawa rei@tetrate.io
For an explanation of how to fill out the fields, please see the relevant section
in PULL_REQUESTS.md
Commit Message: This PR allows to initialize header map from iterator in addition to the initializer list.
Additional Description:
Risk Level: Low
Testing: Unit
Docs Changes:
Release Notes:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]

/review @mattklein123


text:
Revert "Adding ECDS config dump support. (#23902)"

This was landed without senior maintainer approval and contributed to breaking coverage on main
let's roll back and then roll forward when it has sufficient testing and approvals
Part of https://github.com/envoyproxy/envoy/pull/24354

@kyessenov It turns out @zirain's issue https://github.com/envoyproxy/envoy/issues/20086 is not due to config dump. That issue has been closed.

authors: alyssawilk yanjunxiang-google


text:
[WIP/release/1.27] repo: Release v1.27.0

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

cc @botengyao im going to add @yanavlasov 's summary above to the commit message here - also should be useful for announce email/s

/docs

rebased and updated commit message

/wait it seems #28647 has not worked correctly

actually should be good - its reading the version from the branch so in prs it still appears as dev, but one it lands it should read the correct one

releasing


text:
generic proxy: fix test in debug mode

Commit Message: generic proxy: fix test in debug mode
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

There are two problems in debug mode:

library_autolink=disabled is set and some factory are not registered automatically.
Unexpected mock.

This PR fixed above problem.


text:
Add hash to per-route-config

Description:
Some filters need to pre-process the per-route-local config data. If config proto hash can be calculated
at config time, the hash can be used to detect per-route config change. This is how it can be used:
For each request:
auto cfg = route()->perFilterConfig("name");
if (per_thread_map.find(cfg->hash_) == per_thread_map.end()) {
        obj = pre_process(cfg->config_);
        per_thread_map[cfg->hash_] = obj;
} else {
        obj = per_thread_map[cfg_hash_];
}

Risk Level: Low

@mattklein123 @rshriram @htuch please review

@qiwzhang thanks for working on this! I think we've already discussed this a few times, but I don't think this is the best and most general way of approaching this problem. It still will force you to do hash checking in the data-path which is not optimal. It also IMO makes the interfaces a bit overloaded for what most people need.
IMO the correct solution here is to allow filters to get a callback if the per-filter config has changed during RDS reload. Then, filters can do whatever they want with this information.

@mattklein123 we still need this config_hash even with your callback approach.
If there are N routes, each may have its own per_route_config, a filter could use your proposed factory callback to get N per_route_configs and generate N pre-processed objects at config time.
But at run-time when a request comes, we need to map a selected route to the pre-processed object.  There are many ways to map them, 1) if there are unique route_id,  I am not sure if we have such route_id.  2) just use the per_route_config hash to find the pre-processed object.  In this way,  the processed object can be shared by multiple routes with the same config.

OK, will submit another PR with callback approach.


text:
repo: Dev v1.32.0

Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]

As a follow up, we should update the release schedule https://github.com/envoyproxy/envoy/blob/main/RELEASES.md#major-release-schedule

authors: KBaichoo phlax


text:
Global rate limit infra components

RateLimitInfraIR - holds the config to manage the ratelimit service.
global-ratelimit runner that subscribes to XdsIR messages and translates it to RateLimitInfraIR.
enhance the infrastructure runner to subscribe to RateLimitInfraIR messages and translate it into platform specific ratelimit resources.

Relates to https://github.com/envoyproxy/gateway/issues/670
Signed-off-by: Arko Dasgupta arko@tetrate.io

https://github.com/envoyproxy/ratelimit/pull/374 should unblock this PR and we should be able to reuse the config structure from upstream

now blocked on https://github.com/envoyproxy/gateway/pull/726 which updates the Xds IR with a rate limit definiton

repo: envoyproxy/gateway


text:
How to stop simulated routing

I have passed the argument to stop simulated routing but it does not stop
final start = WayPoint(
       name: "Start",
       latitude: provider.startingPosition!.latitude,
       longitude: provider.startingPosition!.longitude,
       isSilent: false);
   final destination = WayPoint(
       name: "Destination",
       latitude: provider.destinationPosition!.latitude,
       longitude: provider.destinationPosition!.longitude,
       isSilent: false);

   var wayPoints = <WayPoint>[];
   wayPoints.add(start);
   wayPoints.add(destination);

   final _navigationOption = MapBoxNavigation.instance.getDefaultOptions();
   _navigationOption.simulateRoute = false;

   MapBoxNavigation.instance.registerRouteEventListener(_onRouteEvent);
   MapBoxNavigation.instance.setDefaultOptions(_navigationOption);

   await MapBoxNavigation.instance.startNavigation(
       wayPoints: wayPoints,
       options: MapBoxOptions(
         simulateRoute: false,
       ));

am i missing something?.
It does not follow my current position either, it just simulates everything, i have tested with android emulator routes, it works on my google_maps display the route changes according to my current location but does not work with this package.

Is this on iOS or Android. Is this on the simulator/emulator or real device? Will always simulate on simulator or emulator

okay didn't know that it will always simulate on emulator, let me try it on a real device thank you. @eopeter

authors: eopeter mbaka-bilal


text:
jungle3 release

[x] create and deploy all the contracts
[x] check we have a state history
[x] api needs to be setup
[ ] setup the dacfactory and create some test dacs

DAC creation failed.

repo: eosdac/eosdac-contracts


text:
Inifnite loader for "New conversation"

EPAM AI DIAL chat version
0.15.2
What happened?
Inifnite loader for "New conversation"
Confidential information

[X] I confirm that do not share any confidential information

verified on staging

authors: IlyaBondar YauheniyaH

repo: epam/ai-dial-chat


text:
Validation task (extensive coverage) doesn't load all pages

Preconditions:
Extensive coverage job for multi-page document is created.
Steps to reproduce:
Go to the validation task.
Result:
Only first page is displayed.
It's reproduced for all task statuses (and for not started job)
Expected result:
All pages are displayed.

fixed

repo: epam/badgerdoc


text:
Message is inexplicably grayed out

This persisted even after closing and reopening the app.

I believe this is fixed

authors: alexrisch saulmc

repo: ephemeraHQ/converse-app


text:
创建

Description

Markup:

// Your code

Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Improvement/refactoring (non-breaking change that doesn't add any feature but make things better)

1

1

1

1

repo: epicmaxco/vuestic-admin


text:
Tidy up where we get files from

Now most essential files for epics-containers come from ibek itself.
See https://github.com/epics-containers/ibek/issues/114#issuecomment-1740549764

Codecov Report

Merging #115 (9174f07) into main (a7c4323) will decrease coverage by 6.51%.
Report is 5 commits behind head on main.
The diff coverage is 27.43%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@            Coverage Diff             @@
##             main     #115      +/-   ##
==========================================
- Coverage   75.69%   69.19%   -6.51%
==========================================
  Files          15       16       +1
  Lines         687      779      +92
==========================================
+ Hits          520      539      +19
- Misses        167      240      +73

Files
Coverage Δ

src/ibek/gen_scripts.py
100.00% <100.00%> (ø)

src/ibek/globals.py
96.42% <100.00%> (ø)

src/ibek/ioc.py
98.88% <ø> (-0.02%)
:arrow_down:

src/ibek/runtime_cmds/commands.py
100.00% <ø> (ø)

src/ibek/__main__.py
92.59% <71.42%> (-7.41%)
:arrow_down:

src/ibek/ioc_cmds/docker.py
13.79% <0.00%> (-2.00%)
:arrow_down:

src/ibek/support_cmds/commands.py
46.31% <0.00%> (-4.26%)
:arrow_down:

src/ibek/support_cmds/checks.py
19.35% <21.05%> (-0.22%)
:arrow_down:

src/ibek/ioc_cmds/commands.py
51.85% <30.43%> (-7.61%)
:arrow_down:

src/ibek/ioc_cmds/assets.py
17.77% <17.77%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

authors: codecov-commenter gilesknap

repo: epics-containers/ibek


text:
Fix name validation

Fixes #16

The yaml-schema extension now reports the error:

@gilesknap are you happy with this as a resolution to #61 ?

So I think this is what we needed
10:04
As in it solves the main issue I had with autogen pvi yaml

authors: GDYendell gilesknap

repo: epics-containers/pvi


text:
WIP: add all required facts to spec tests to allow puppet 4.4.2 tests pass

add ruby 2.1.7 to travis build
rebased version of #232

rebased on #237 which will be merged before this.

repo: epost-dev/opennebula-puppet-module


text:
Add IsSqlValue instance for Maybe, move SqlValue stuff to a separate module

Adds IsSqlValue instance for Maybe and moves all the SqlValue stuff to its own module.

Excellent! :+1:

authors: anttih epost

repo: epost/purescript-node-postgres


text:
API enhancement

Added routes:

/u

/settings
user basic information /:username
fetch user posts with pagination

/home

fetch friends posts with pagination

/p

add post

/c

roots comments pagination
leaf comments pagination

/l --> likes
/cron --> cron jobs
[...catchall] --> 404 route

Fixed routes:

/auth

LGTM

repo: eptastellar/Orbit


text:
:sparkles: Improve data grid

resolves #3234
What does this pull request change?
This pull request introduces the following improvements to the data-grid:
Most of these changes have been discussed with @yusijs.

✨ Reexport @tanstack/react-table types to ease typing in apps using the data grid
📌 Move eds-core-react to peer dependencies

This is neccessary because EDS uses React Context and the grid and the project should
have the same React instance running. This makes it possible to set EDS Density of the
table above the component.

♻ Move text truncating into default cell to enable overwriting cell content

This enables custom cells like popover, autocomplete or other cells that overflows the cell itself.

🐛 Inherit row background color for pinned cells

This ensures hover color on the whole row when columns are pinned

🐛 Support 100% width

Support string width and height

✨ Allow setting minWidth of table
✨ Expose getRowId callback from react-table
✨ Expose virtualizer ref

This is needed to be able to run "scroll to" functionality in apps.

🐛 Hide virtualizer rows top and bottom rows when not needed

Why is this pull request needed?
In order to implement this in our project, we need to be able to use custom cells, set 100% width and use the EdsProvider with the table. Also, there are some minor bugs discovered during implementation.

I cannot edit reviewers, but I would like a review from @yusijs 😄
It seems like the checks are failing due to a missing secret, but I'm not sure whether it's on my side or yours?

I have added @yusijs as a reviewer 🙂
The checks failing from forked pull requests are on our end. We need to fix the github action, but in the meantime we  can run the tests locally 👍

✅ Lint
✅ Tests
✅ Types

lint/test/types all seems to be in order still 👍

Yes I will merge 👍 Was just trying the build downstream in an app for the final test  but looks good

authors: magnh oddvernes

repo: equinor/design-system


text:
As an editor for Equinor storage I want to add content to be able to build my page

TODO
Follow the description in the wiki to create the Equinor storage  satellite page
Acceptance criteria

An Equinor storage version of Sanity studio is available including preview
A Equinor storage version of the web page is available

https://web-storage-energyvision-dev.radix.equinor.com/
https://studio-storage-energyvision-dev.radix.equinor.com/

Tested with cookie declaration, text, image

Closed

authors: fernandolucchesi meols wenche

repo: equinor/energyvision


text:
[Snyk] Upgrade pixi.js from 6.4.2 to 6.5.0

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade pixi.js from 6.4.2 to 6.5.0.

:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 5 versions ahead of your current version.
The recommended version was released 21 days ago, on 2022-07-22.

Release notes

Package name: pixi.js

6.5.0 - 2022-07-22 Read more

6.5.0-rc.4 - 2022-07-20🔥 Sorting blocking bug related to @ pixi/assets
💾  Download
Development Build:

https://pixijs.download/v6.5.0-rc.4/pixi.js
https://pixijs.download/v6.5.0-rc.4/pixi.js.map
https://pixijs.download/v6.5.0-rc.4/pixi.mjs
https://pixijs.download/v6.5.0-rc.4/pixi.mjs.map

Production Build:

https://pixijs.download/v6.5.0-rc.4/pixi.min.js
https://pixijs.download/v6.5.0-rc.4/pixi.min.js.map
https://pixijs.download/v6.5.0-rc.4/pixi.min.mjs
https://pixijs.download/v6.5.0-rc.4/pixi.min.mjs.map

Documentation:

https://pixijs.download/v6.5.0-rc.4/docs/index.html

Changed
v6.4.2...v6.5.0-rc.4

6.5.0-rc.3 - 2022-07-20🔥 Sorting more blocking bugs related to @ pixi/node
💾  Download
Development Build:

https://pixijs.download/v6.5.0-rc.3/pixi.js
https://pixijs.download/v6.5.0-rc.3/pixi.js.map
https://pixijs.download/v6.5.0-rc.3/pixi.mjs
https://pixijs.download/v6.5.0-rc.3/pixi.mjs.map

Production Build:

https://pixijs.download/v6.5.0-rc.3/pixi.min.js
https://pixijs.download/v6.5.0-rc.3/pixi.min.js.map
https://pixijs.download/v6.5.0-rc.3/pixi.min.mjs
https://pixijs.download/v6.5.0-rc.3/pixi.min.mjs.map

Documentation:

https://pixijs.download/v6.5.0-rc.3/docs/index.html

Changed
v6.4.2...v6.5.0-rc.3

6.5.0-rc.2 - 2022-07-15🔥 Hotfix for @ pixi/node
💾  Download
Development Build:

https://pixijs.download/v6.5.0-rc.2/pixi.js
https://pixijs.download/v6.5.0-rc.2/pixi.js.map
https://pixijs.download/v6.5.0-rc.2/pixi.mjs
https://pixijs.download/v6.5.0-rc.2/pixi.mjs.map

Production Build:

https://pixijs.download/v6.5.0-rc.2/pixi.min.js
https://pixijs.download/v6.5.0-rc.2/pixi.min.js.map
https://pixijs.download/v6.5.0-rc.2/pixi.min.mjs
https://pixijs.download/v6.5.0-rc.2/pixi.min.mjs.map

Documentation:

https://pixijs.download/v6.5.0-rc.2/docs/index.html

Changed
v6.4.2...v6.5.0-rc.2

6.5.0-rc - 2022-07-14This is a do-no-harm prerelease and to test new packages @ pixi/assets and @ pixi/node.
💾  Download
Development Build:

https://pixijs.download/v6.5.0-rc/pixi.js
https://pixijs.download/v6.5.0-rc/pixi.js.map
https://pixijs.download/v6.5.0-rc/pixi.mjs
https://pixijs.download/v6.5.0-rc/pixi.mjs.map

Production Build:

https://pixijs.download/v6.5.0-rc/pixi.min.js
https://pixijs.download/v6.5.0-rc/pixi.min.js.map
https://pixijs.download/v6.5.0-rc/pixi.min.mjs
https://pixijs.download/v6.5.0-rc/pixi.min.mjs.map

Documentation:

https://pixijs.download/v6.5.0-rc/docs/index.html

Changed
v6.4.2...v6.5.0-rc

6.4.2 - 2022-06-02💾  Download
Development Build:

https://pixijs.download/v6.4.2/pixi.js
https://pixijs.download/v6.4.2/pixi.js.map
https://pixijs.download/v6.4.2/pixi.mjs
https://pixijs.download/v6.4.2/pixi.mjs.map

Production Build:

https://pixijs.download/v6.4.2/pixi.min.js
https://pixijs.download/v6.4.2/pixi.min.js.map
https://pixijs.download/v6.4.2/pixi.min.mjs
https://pixijs.download/v6.4.2/pixi.min.mjs.map

Documentation:

https://pixijs.download/v6.4.2/docs/index.html

Changed
v6.4.0...v6.4.2
🔥 Hotfix

Fix: Resolves issue where "exports" broke Webpack (#8381) @ zwade

🐛  Fixed

Clarify that the object's mask must be in the subtree of its parent in the docs (#8378) @ lazarljubenovic

    from pixi.js GitHub release notes

Commit messages

Package name: pixi.js

63b9f0c v6.5.0
bff5c47 Move VERSION to core instead of bundle (#8520)
1db04bb Fix LoaderResource tests (#8518)
6fc416e Fix app and ismobilejs typings (#8517)
611ca6a v6.5.0-rc.4
c2bcc64 Fix error with assets import path
0027841 v6.5.0-rc.3
380906d FIx extensions for esm modules to .mjs (#8505)
326fa79 Adds exports to package.json in Assets (#8504)
675b7aa Fix Jest not exiting properly when killing the http server (#8513)
b5dd432 Fix bundle ismobilejs (#8506)
559e3df v6.5.0-rc.2
011feab Fixes Node not starting (#8497)
ffa04c3 Fixes ReferenceError: Can't find variable: ImageBitmap (#8499)
d81beda Fix the hello world example for Node bundle (#8495)
b928798 Fix Rollup warning, ignore used node dependencies (#8493)
16005f8 v6.5.0-rc
c0877e0 Chore: Add script to clean types (#8492)
4776c29 Add detection parsers to Assets (#8482)
9c6c295 Chore: Drop add/remove from resolvers/parsers/caches (#8488)
063870f remove add/remove parsers
84096a7 Chore: Eliminate redundant handling code for extensions (#8485)
6ff95ce Fixes #7272 Cubemap resources not being reuploaded on GL context loss (#8479)
a7f477d Rename resolver parsers (#8483)

Compare

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

Closing. No security patches and no new features needed at the moment.

authors: nilsml ooystein

repo: equinor/esv-intersection


text:
🐛 : Missing System / Comm Pack / circuit / Area columns and filters in RC tool

---- ATLE 22.03 is it possible to make a local cache that looks up what circuits are connected to HTs? Then we use the local cache to make a column and filter that updates every 15 mins (the reason to update is to catch the new RCs that are created). Maybe you could make some logic that updates the cache when a new RC is made? ---
We need the following filters included in Metadata and have columns:
System
Comm Pack
Circuit
Area

Seems like this is the fields that are missing when loading the table and filters
Area
Attachements
Circuits
CommPkIds
CommPkNos
CreatedBy
ModifiedBy
Switchboards
Systems

We have a duplicate https://github.com/equinor/lighthouse-client/issues/1675. I will close the duplicate issue

these columns are now temp removed as data was NULL. we need them back for April.

Agreed to implement System, Comm Pack, Circuit, Area, CreatedBy and ModifiedBy. These is the only fields that is needed

CommPkg and system is added.
Performance implications

[ ] CreatedBy
[ ] ModifiedBy

Hard to implement without data becoming stale

[ ] Circuit
[ ] Area

@MagnusGjosund  are there any fields in this issue that needs to be added to any view?

No need to add any fields

Remaining filters has been added or can be added to the analytics

authors: EDUT-Equinor Gustav-Eikaas JoneUE MagnusGjosund aman-riaz

repo: equinor/lighthouse-client


text:
Startup -> GrandOpening and BasicsPack

some changes to startup, including a new name
new pack based around basic cards

Hey, I really appreciate you contributing to the project, however I have to be the bearer of bad news.
With the quantity of packs we have in the project at this point it's important that we take a closer look at the packs and sadly the basics pack falls a little short of the required design standards.
The pack boils down to a combination of the base classes with none of their interesting mechanics mixed with a lot of screens. I've seen an archetype like this in Hermit which had genuinely creative effects, so it can definitely be done.
Long story short, I won't be merging this pack in its current state, sorry. If you really want to play with the idea some more, I'd recommend taking a look at Hermit and a critical look at what the pack wants to achieve while also keeping in mind that you need some form of scaling.

authors: GameboyJ erasels

repo: erasels/PackmasterCharacter


text:
why have you used @real?

@zakariyaaminullah :
I don't understand why your XML file shows @real in these cases, which seem to be metrically regular. Please check.

Maybe it's an imperfection in the tex>xml conversion process carried out by Axelle?

Those were provided by Axelle in the earlier version of the critical edition XML, and I forgot to eliminate them.

authors: arlogriffiths zakariyaaminullah

repo: erc-dharma/tfd-nusantara-philology


text:
Algorithm test performance metric

A more structured discussion (with documentation) needs to be made about methods to calculate the algorithm performance.
Currently, the metric is:
 error = sum( supply_timeseries - demand_timeseries)

possible candidates are:
r-squared method
number of undersupplies
weighted error : absolute error + harsher penalty for undersupplies
ex)
error = supply_timeseries - demand_timeseries
bad_score = 0
for i in error:
    if i < 0:
        # alpha is some coefficient for `harshness' of penalty
        bad_score += alpha * i
    else:
        bad_score += i

perhaps: Chi Square Goodness of Fit Test

closed with https://github.com/ergs/d3ploy/pull/124


text:
wait for pid termination on quit

wait for all pids created by proctmux to terminate before quitting
This PR includes a hack to close stdin in the input loop. termion async_stdin may be the best way to remove that hack.

She is beauty, she is grace.

authors: erhickey napisani

repo: erhickey/proctmux


text:
devise some way to run tests for a particular reader without commenting out all the other tests

... not sure exactly what the best way to do that would be, but it'd be nice to have.

an initial implementation performed in 2.0 branch


text:
Seems to add extra packages to package.json

Super cool idea, by the way. But I'm trying it out and it seems like it's adding the dependencies of my dependencies to package.json. For instance, cheerio is a dependency of enzyme, and I'm using enzyme in my app. But npm-install-webpack-plugin installed cheerio into my package.json even though I'm not relying on it directly.

Weird.  I do a check to ignore any sub-modules that are in node_modules.

[ ] Test dependency installation of cheerio.

Also seemed to install babel-loader as well as webpack-hot-middleware into my project. They are dependencies of a server located in a different directory.

Different directory?  Which directory is it?  You have a package.json in
your project right?
On Tue, Feb 9, 2016 at 2:30 PM Satyajit Sahoo notifications@github.com
wrote:

Also seemed to install babel-loader as well as webpack-hot-middleware
into my project. They are dependencies of a server located in a different
directory.
—
Reply to this email directly or view it on GitHub
https://github.com/ericclemmons/npm-install-webpack-plugin/issues/26#issuecomment-182048025
.

--

Eric Clemmons

@ericclemmons The modules folder was specified using the resolveLoader.root option of webpack (both the dependencies are for the server and they were missing). The actual project is in a different directory.

Trying to integrate with - https://github.com/satya164/quik , which is a server to do dev without setup.

Ah, now I see.  Yep, this is a problem until #17 is finished up.  I'm launching a project this week, so I should be able to finalize the next release soon.
Sorry for the delay!

@ericclemmons Ah. Cool. Thanks :)

@satya164 Wanna check this out with v3.0.0?

@ericclemmons Will do soon. Thank you.

Re-open if it's an issue!

authors: bmakuh ericclemmons satya164

repo: ericclemmons/npm-install-webpack-plugin


text:
questions that would be useful to me to see answered in the readme..

I'm reading the docs and some of the blog posts and I love the concepts of simple functions and reusability. I've formed a few ideas on how I could build simple classes that import a lot of their functionality from one or more shared function libraries. Now I'm looking at stampit and wondering if it's overkill for what I want to do. At this stage I only really need maybe a half dozen classes some very similar, some not so I'm wondering..

when and how should it be used?
ie.
what benefits would it bring to a very simple object structure if thats all I need?
should it be saved for when I need lots of objects that need to share common code and complex behaviours?

I'll figure these things out for myself eventually I'm sure but I'm always happy for a head start.
cheers

and having a play for a couple of hours it's great and it doesn't need to be as complex as it seems the first time you read the readme.. I was so confident I thought I'd write a little example that might have helped me.. just writing this I learned a few more things, but I have to admit the init args still has me a bit perplexed..
import stampit from 'stampit'
import assign from 'lodash/object/assign'

let Thing = stampit({
  init: ({self, stamp, args}) => { assign(this, args) },
  methods: {
    myReverse(arg1, arg2) {
      return [arg2, arg1]
    }
  }
})

let OtherThing = Thing
  .init(
    function ({self, stamp, args}){
      console.log('init', args)
      this.arg2 = args
    }
  )
  .methods({
    myMultiplier(arg1, arg2) {
      return [arg1, arg2, arg1, arg2]
    }
  })

let thingInstance = OtherThing({ key: 'value' }, 'arg2')

console.log('instance', thingInstance)
console.log('reverse', thingInstance.myReverse('three','four'))
console.log('multiplier', thingInstance.myMultiplier('three','four'))

---
init [ 'arg2' ]
instance { key: 'value', arg2: [ 'arg2' ] }
reverse [ 'four', 'three' ]
multiplier [ 'three', 'four', 'three', 'four' ]

Writing stamps that take arguments is an anti-pattern. Stamps support arguments primarily to support legacy constructor arguments. When you're dealing with stamp composition, there is a high probability of argument collision which could create some very unexpected and frustrating results.

I wish I had time for more thorough and helpful feedback but I'm strapped for time today. Lucky, the other Stampit community members are amazing and wonderful people. I'm sure they'll be very helpful.
Welcome to the community. We're glad to have you! =)

wow, ok, I totally missed that one. Thank you. I'm now looking at refs() and my mental model has rust flipped to where I'm attaching stamps to the nodes in my object (created by parsing an xmlish document).

possibly a better example.. I think I know what I need to do (build up a tree of node objects) but it's not what I'd like to do (load a node into a stamp, access/modify and have modifications reflected in the main object).
import map from 'lodash/collection/map'

let Node = stampit({
  methods: {
    getGutter(sides, types) {
      let gutter = 0
      map(types, (type) => {
        if (this.node.attr[type]){
          map(sides, (side) => { gutter += this.node.attr[type][side]-0 })
        }
      })
      return gutter
    },
    setPaddingLeft(size) {
      this.node.attr.padding.left = size
    }
  }
})

let doc = {
  kids: [
    {
      attr: {
        padding: { left: 5, right: 10 },
        margin: { left: 3, right: 6 }
      }
    }
  ]
}

let node = Node.create({ node: doc.kids[0] })

node.setPaddingLeft(18)

console.log('doc', JSON.stringify(doc, null, 2))
console.log('node', JSON.stringify(node.node, null, 2))

@ericelliott no worries about the time thing, totally understand, thanks for responding. I'll keep playing and learning (learning loads every step of the way). @koresar asked me to share my thoughts and questions, so that's mainly all I'm doing.

Very cool. Thanks for taking the time. It really helps us understand how we can flesh out the documentation to better orient beginners to using stamps. =)

So create() would seem to be the way, but it looks like that is doing a deepcopy

Nope, it copies by reference. Moreover, Node.create() and Node() is exactly the same call.
I believe we have that in the docs, but obviously that info is hidden in the pile of other "very useful" info.
I'm seeing people are getting very confused of our readme. :(

so what am I doing wrong then, or how am I explaining myself incorrectly? 8)
Using refs() achieves my goal of setting the padding.left value in doc, but creating another stamp for each instance is not what I'd want to do.
import stampit from 'stampit'
import map from 'lodash/collection/map'

let Node = stampit({
  methods: {
    setPaddingLeft(size) {
      this.attr.padding.left = size
    }
  }
})

let doc = { kids: [ {attr: {padding: { left: 5, right: 10 } } } ] }

let node = Node(doc.kids[0])
node.setPaddingLeft(18)
console.log('doc', JSON.stringify(doc, null, 2))

node = Node.refs(doc.kids[0])()
node.setPaddingLeft(18)
console.log('refdoc', JSON.stringify(doc, null, 2))

>>>>

doc {
  "kids": [
    {
      "attr": {
        "padding": {
          "left": 5,
          "right": 10
        }
      }
    }
  ]
}
refdoc {
  "kids": [
    {
      "attr": {
        "padding": {
          "left": 18,
          "right": 10
        }
      }
    }
  ]
}

I think you are trying to do something like this?
let doc = { kids: [ {attr: {padding: { left: 5, right: 10 } } } ] }

let Node = stampit()
  .refs(doc.kids[0])
  .methods({
    setPaddingLeft(size) {
      this.attr.padding.left = size;
    }
  });

let node = Node();

node.setPaddingLeft(18)
console.log(doc.kids[0].attr.padding.left);

node.setPaddingLeft(5)
console.log(doc.kids[0].attr.padding.left);

yes, that's turning my last example around a bit. I achieves the result of updating the main doc by reference but involves creating a new stamp for each instance which doesn't seem right. I'll be creating hundreds of instances where only the kid is different.
Ideally I would be able to do
let node1 = Node(doc.kids[0])
let node2 = Node(doc.kids[1])
let node3 = Node(doc.kids[2])
node1.setPaddingLeft(18)
node2.setPaddingLeft(10)
node3.setPaddingLeft(15)

and have the doc object updated accordingly.

I didn't turn your example around, I corrected it.
In your example let node = Node(doc.kids[0]) does not set refs. As @ericelliott said above, passing arguments is an anti-pattern and should be avoided.
You don't need to create a new instance for each node, just create one doc instance.
let src = { kids: [ {attr: {padding: { left: 5, right: 10 } } } ] }

let Doc = stampit()
  .refs({ kids: src.kids })
  .methods({
    setPaddingLeft(node, size) {
      this.kids[node - 1].attr.padding.left = size;
    }
  });

let doc = Doc();

doc.setPaddingLeft(1, 18)
console.log(src.kids[0].attr.padding.left);

doc.setPaddingLeft(1, 5)
console.log(src.kids[0].attr.padding.left);

sorry, I was referring to the last example in that post..
node = Node.refs(doc.kids[0])()
node.setPaddingLeft(18)
console.log('refdoc', JSON.stringify(doc, null, 2))

which I think does what you're doing there (with a bit of short-hand).
I'll try to give a better example, but keep it as concise as possible.
Here is an example doc for which I would like to use different "classes" to handle the different node types as each node type has different behaviour.
  let doc = {
    attr: {
      padding: { left: 5, right: 10 },
      margin: { left: 3, right: 6 }
    },
    kids: [
      {
        tag: 'row'
        attr: { padding: { left: 5, right: 10 }, },
        kids: [
          {
            tag: 'cell',
            attr: { padding: { left: 5, right: 10 }, },
            kids: 'Hello'
          },
          {
            tag: 'cell',
            attr: { padding: { left: 5, right: 10 }, },
            kids: 'Goodbye'
          }
        ]
      }
    ]
  }

so what I'm hearing is that to do what I want to do I need to create a new stamp for each node, then instanciate a single instance from that stamp which to me feels like creating a class & instance for each node.

so, yeh, you're confirming what I said about Node.create() which is the same as Node()

So create() would seem to be the way, but it looks like that is doing a deepcopy

The notation Node.refs({ ba: 'boom' })() does what I want, but feels like it's doing extra work just to get the instance created to contain a reference to the main doc compared to Node({ ba: 'boom' }).
checking out for a bit, thanks for your help.

I'm not sure if you are understanding how an instance is created with stampit. In your previous example
let node1 = Node(doc.kids[0])
let node2 = Node(doc.kids[1])
let node3 = Node(doc.kids[2])
node1.setPaddingLeft(18)
node2.setPaddingLeft(10)
node3.setPaddingLeft(15)

You just created 3 separate instances. stampit is a factory that returns a factory.

Yeh, looks like I'm definitely missing something somewhere, will keep at it, thanks again.

You're welcome!

@lecstor if you get on the gitter channel I can walk you through it https://gitter.im/ericelliott/stampit?utm_source=share-link&utm_medium=link&utm_campaign=share-link

stampit is a factory that returns a factory

But at some stage you need an object instance, my goal isn't to build factories, it's to do useful stuff 8)
And the idea of a class is that you use it to create object instances that have different properties but shared behaviour.
My conundrum here is that I wish for the properties of my objects to be references to a larger object.
To do that with stampit I need to use refs() which means creating another class with my refs attached and then instantiating an instance of that class rather than having a class that I can create all of my objects from. I could do this with Node.create() if I didn't want the properties to be a reference.
So if that's just something stampit wont do, then cool, fair enough. If it will, then I'm hoping someone can tell me how as I can't get it to comply.
cheers

ok. the bottom line.. Is this considered a bad or a waste of cycles?
(no different to earlier code, but does what I want with a convenience method)
import stampit from 'stampit'
import map from 'lodash/collection/map'

let Node = stampit({
  methods: {
    setPaddingLeft(size) {
      this.attr.padding.left = size
    }
  },
  static: {
    fromRef: function(args) {
      return this.refs(args)()
    }
  }
})

let doc = { kids: [
  {attr: {padding: { left: 5, right: 10 } } },
  {attr: {padding: { left: 20, right: 20 } } }
]}

let node1 = Node.fromRef(doc.kids[0])
let node2 = Node.fromRef(doc.kids[1])
node1.setPaddingLeft(18)
node2.setPaddingLeft(16)
console.log('doc', JSON.stringify(doc, null, 2))

Yeah, you aren't understanding. Let's step through your code.
let Node = stampit({ ... });

You are still using args when we have said it's an anti-pattern.
What do you think Node is at this point?

Hint 1: console.log(typeof Node);
Hint 2: it's not a stamp instance

fromRef: function(args) {
  return this.refs(args)()
}

You have declared fromRef a static function. this will be equal to Node, which is not an object instance and does not have access to object instances and their state.
let node1 = Node.fromRef(doc.kids[0])

What do you think this is doing? What it is actually doing is returning a shallow copy of doc.kids[0]. It is in no way related to Node (since node is a factory not an instance).
In the end all you did was go in a big circle, never actually making use of your stamp.

hehe. I'm having trouble not believing what I'm seeing. It looks like a duck, and walks like a duck.. (and behaves like I want). I'm not sure how it's not making use of the stamp as it gives me an object which I can call methods on to manipulate the data I want it to.

Args are an anti-patter, but isn't that exactly what create(properties) does? I'm just working around the fact that create deepcopies the properties so I lose my reference.
What if I expand the example to it's intended usage?
import stampit from 'stampit'
import map from 'lodash/collection/map'

let Node = stampit({
  methods: {
    setPaddingLeft(size) {
      this.attr.padding.left = size
    }
  },
  static: {
    fromRef: function(args) {
      return this.refs(args)()
    }
  }
})

let Cell = Node.methods({
  ima(){
    console.log('== Ima Cell ==', this.attr.padding.left)
  }
})

let Row = Node.methods({
  ima(){
    console.log('== Ima Row ==', this.attr.padding.left)
  }
})

let doc = { kids: [
  {attr: {padding: { left: 5, right: 10 } } },
  {attr: {padding: { left: 25, right: 50 } } },
]}

let node1 = Cell.fromRef(doc.kids[0])
node1.setPaddingLeft(18)
node1.ima()

let node2 = Row.fromRef(doc.kids[1])
node2.setPaddingLeft(28)
node2.ima()

console.log('doc', JSON.stringify(doc, null, 2))

>>>

== Ima Cell == 18
== Ima Row == 28
doc {
  "kids": [
    {
      "attr": {
        "padding": {
          "left": 18,
          "right": 10
        }
      }
    },
    {
      "attr": {
        "padding": {
          "left": 28,
          "right": 50
        }
      }
    }
  ]
}

There are many wrong things in this thread. Let me get to a computer in few
hours. I'll explain where we were misguided.
On Sat, 6 Jun 2015 10:51 Jason Galea notifications@github.com wrote:

hehe. I'm having trouble not believing what I'm seeing. It looks like a
duck, and walks like a duck.. (and behaves like I want). I'm not sure how
it's not making use of the stamp as it gives me an object which I can call
methods on to manipulate the data I want it to.

Args are an anti-patter, but isn't that exactly what create(properties)
does? I'm just working around the fact that create deepcopies the
properties so I lose my reference.
What if I expand the example to it's intended usage?
import stampit from 'stampit'
import map from 'lodash/collection/map'
let Node = stampit({
methods: {
setPaddingLeft(size) {
this.attr.padding.left = size
}
},
static: {
fromRef: function(args) {
return this.refs(args)()
}
}
})
let Cell = Node.methods({
ima(){
console.log('== Ima Cell ==', this.attr.padding.left)
}
})
let Row = Node.methods({
ima(){
console.log('== Ima Row ==', this.attr.padding.left)
}
})
let doc = { kids: [
{attr: {padding: { left: 5, right: 10 } } },
{attr: {padding: { left: 25, right: 50 } } },
]}
let node1 = Cell.fromRef(doc.kids[0])
node1.setPaddingLeft(18)
node1.ima()
let node2 = Row.fromRef(doc.kids[1])
node2.setPaddingLeft(28)
node2.ima()
console.log('doc', JSON.stringify(doc, null, 2))

== Ima Cell == 18
== Ima Row == 28
doc {
"kids": [
{
"attr": {
"padding": {
"left": 18,
"right": 10
}
}
},
{
"attr": {
"padding": {
"left": 28,
"right": 50
}
}
}
]
}
—
Reply to this email directly or view it on GitHub
https://github.com/ericelliott/stampit/issues/93#issuecomment-109492197.

cool, back to my chores then.. have a good day @koresar!

I'll take a chance to answer later. For now I think @lecstor has found a bug.
Stampit v1 factories were mixin' (shallow copy) the first argument - stamp(someRefs).
Stampit v2 factories are deep merging/cloning the first argument - stamp(objToClone).
@ericelliott in this thread we decided to deep clone the factory argument: https://github.com/ericelliott/stampit/issues/40#issuecomment-70052358
Was that a correct decision back then?
IMO we should have two options:
stamp(refs) or stamp.create(refs) - should shallow copy.
stamp.createFrom(props) - should deep merge/clone. (Please, suggest better name.)
OR
stamp(refs) - for shallow copying.
stamp.create(props) - for deep merging/cloning.

Few more thoughts.
Answering my own question:

Was that a correct decision back then?

No, it was not. Because people cannot pass objects to factories anymore. :( Well, they can, but the object will be cloned entirely, which most of the people don't want. But, if someone want, he can do it manually stamp(clone(object)).
I'd highly recommend us to make stampit v2 shallow copy it's argument. This is what people using ES6 would want because of new argument/object destructuring syntax.
stamp({ database, userName, age: 42 })
I'm starting the coding.

for my 2c worth I ++ @koresar there. I can see benefit of "safety first" and protecting from effects from afar but I think most would expect references to remain intact. A convenience method for cloning wouldn't be a bad thing, maybe even if create() did the deep copy while stamp() remained shallow. Create kinda hints at creating a new thing. On the other hand, the simplicity of cloning before handing over the object as @koresar said negates the necessity of the deep clone option.
If I had gone the path I did with a little less stubbornness I likely would have bailed on stampit earlier without questioning it, accepting it wasn't the tool for my task at hand.

I guess I am totally lost now as to why no one else is seeing what I am seeing. @lecstor is not using stamps correctly at all. He doesn't understand the difference between a factory and a stamp instance and doesnt understand the behavior of static methods.
AFTER you call stampit(), ANOTHER factory is returned.
let Node = stampit() // <---- Node is a factory NOT a stamp instance
  .refs({})
  .methods({});

At this point the contents of refs and methods are stored internally by the stamp factory, they CANNOT be used. Before trying to access or mutate state or call stamp methods, Node must stamp out a stamp instance!
let nodeInstance = Node({ any refs to override });

nodeInstance.someRef;
nodeInstance.someMethod;

Everything @koresar has  said though still stands. The behavior of stamp factory args may need to be rethought.

You did notice that I was calling the function returned by refs?
this.refs(args)()  <-

so the same as
newStamp = stampit.refs()
node = newStamp()
``
and the issue is that

let nodeInstance = Node({ any refs to override });  <- these "refs" are deepcopied
the code above that I posted runs as-is. You can copy/paste to a file and `babel-node` it.

Wow.... I apologize @lecstor! I never noticed the extra pair of parenthesis... my last couple comments can be scratched out and mostly forgot about.
What I now do not understand is why you think you need the static convenience method? What is wrong with
import stampit from 'stampit'
import map from 'lodash/collection/map'

let Node = stampit({
  methods: {
    setPaddingLeft(size) {
      this.attr.padding.left = size
    }
  },
})

let doc = { kids: [
  {attr: {padding: { left: 5, right: 10 } } },
  {attr: {padding: { left: 20, right: 20 } } }
]}

let node1 = Node.refs(doc.kids[0])();
let node2 = Node.refs(doc.kids[1])();
node1.setPaddingLeft(18)
node2.setPaddingLeft(16)
console.log('doc', JSON.stringify(doc, null, 2))

no worries @troutowiz

No reason other than it bugs me. Both do exactly the same thing, one's just prettier in use.
Lecstor out.

I guess its your way of working around create() unexpected behavior. Makes sense.
Keep checking in here @lecstor as you have found a possible bug as @koresar mentioned.

@koresar we talked about it here too #57

Thanks Carl!
Clearly, it's not even a bug but mis-implementation.
I beg your pardon, people. My fault. I forgot what we agreed to at the #57.
Good we haven't released the current master branch. ☺
If anyone could edit the README to point out that stamps accept refs as an
argument, that would be great. Thank you.
On Sun, 7 Jun 2015 02:14 Carl Olsen notifications@github.com wrote:

@koresar https://github.com/koresar we talked about it here too #57
https://github.com/ericelliott/stampit/issues/57
—
Reply to this email directly or view it on GitHub
https://github.com/ericelliott/stampit/issues/93#issuecomment-109608754.

Just to clarify: invoking the stamp and calling .create() should do the same thing. Want a deep clone method? Call it something else.

PR fix #96 submitted. Please review.

Closing this, feel free to reopen if the PR did not satisfy you.

authors: ericelliott koresar lecstor troutowicz unstoppablecarl

repo: ericelliott/stampit


text:
Always blocked

Hi,
First of all, thanks for this amazing code.
I'm trying to use it with a proxy but 100% of times it says that the IP is blacklisted.
It happens also to you?
My code:
import requests
from pylinkedin.scraper import LinkedinItem
from pylinkedin.utils import CustomRequest

while True:
    url = "http://gimmeproxy.com/api/getProxy"
    querystring = {"get":"true","supportsHttps":"true","anonymityLevel":"1", "protocol":"http"}
    r = requests.request("GET", url,  params=querystring)
    res = r.json()
    proxy = res['curl']
    c = CustomRequest(list_proxies=[{'https':proxy}])
    try:
        LinkedinItem(url = 'https://www.linkedin.com/in/kennethreitz')
    except:
        pass

Thanks for your comments
Indeed Linkedin has a really agressive anti scraping policy. I think LinkedIn is blacklisting the block of ips of cloud providers (Aws, DigitalOcean ...). Even for residential ips it seems that after 2 or 3 requests you ip will be banned.
Just try a simple requests.get('https://www.linkedin.com/in/kennethreitz') and look at the response and status code with the proxy. LinkedIn has a custom 999 status code for scraping.

It's curious, using different proxies always I get a 999 error.
Getting a cookie from a web browser and adding it to your code it works with the proxies used before. So Linkedin probably detects that the request don't come from a web browser...

Interesting !  did you pass your own session cookie (the one linked to your linkedin profile) ? I know LinkedIn can deactivate if you scrape while being connected (using selenium, phantomjs ...)
I also didn't test the code with proxies but it doesn't seem the issue comes from the code but likeley from Linkedin itself.

I used an anonymous session cookie and I could scrape ~50 profiles with this session.
Maybe they're detecting if it's a browser or not who make the request with javascript.

I am having the same problem. But I worry that it is on Linkedin's side.
If I just open firefox (no linkedin cookies) and go to the test profile (https://www.linkedin.com/in/kennethreitz) it requests my credentials. I do not pass the request any login cookies (maybe if I did it would work?) But I think there is a limit to that. As soon as Linkedin detects a user viewing even 50 profiles/hour they may blacklist you as a user.
Any thoughts on this?

@ericfourrier I've had similar problems and linkedin authwalls were persistent, I find your work very helpful. I currently use it over proxycrawl API to avoid blocks, so instead of making a get request to linkedin directly, I make a request to that API which gives me the data. That is the only way I could do it right now. Thanks for the tool.

authors: DarkShineLights arkkanoid ericfourrier rochenka

repo: ericfourrier/scrape-linkedin