 This allows the car to better fit the acceleration to the plan by making smaller adjustments to the acceleration to maintain/hit the target acceleration.
However, with too small of values for either the min or max jerk the car responds to changes in acceleration very sluggishly. Thus when we are requesting rapid changes to acceleration we need larger jerk values.
To achieve a good balance of resolution to responsiveness we can determine what the jerk in the plan acceleration was between the last acc command and the current command and use that as the basis of the values we request from the car. This allows a dynamic resolution that matches the current demands of the plan.
Data from runs: (left is with jerk changes, right is without)

As we can see in the data above, when we implement these changes it allows for much smaller jumps up and down while on a relatively flat section of road, but when we see large pitch increases and planned slow downs the true acceleration can still react quickly.
Subjectively, the smaller fluctuations in acceleration while on a flat(ish) section of road feel smoother and when speed changes are requested the car feels dynamic and accurate.
Note: I did also change tuning values for the longitudinal plan for my vehicle that I have not included in this merge request but are reflected in the data. The data above uses the values 0.9 for kpv and 0.1 for kiv. I suspect that the values I used will be reasonably close for larger vehicles but that the current 0.5 kpv and 0.0 kiv will be close for smaller vehicles. Once good values are confirmed I can update as needed.

I finally got around to testing this, and for Exp mode it takes out all of the "throttle hesitation" which was quite severe for me. I'm assuming because I'm on a hybrid, the instant torque and regen braking caused this, now it's all gone - great! The downside is, that stopping distance is a bit unpredictable now, it can sometimes stop very close to the lead car, depending on how the braking looked like. The difference in Exp mode comfort is significant, if we could improve the stopping distance safety without sacrificing that this would be a great improvement overall. Some cool stuff, Jacob! Any tips on how to tune this?

The downside is, that stopping distance is a bit unpredictable now, it can sometimes stop very close to the lead car, depending on how the braking looked like.

I already had a fix for this, just forgot to push up to this branch. Just pushed it up. At this point I still have a little bit of undesired behavior when there's a long period of acceleration, in that situation it overshoots and continues accelerating after hitting the desired speed. So probably the kiv is too high and needs lowered, but i haven't gotten around to tuning that behavior out because it's fairly rare.

I had a strange situation today that I think might've been caused by the jerk changes. I had the lead car stop abruptly, but I still had quite a lot of distance to it, and there was a lot of hesitation and lag in the car's braking that I didn't see before. I took over to not risk hitting the guy, here's the graph from the braking:

My question is, when the accel bottoms out at -3.5, doesn't that make the jerk very small since the delta is now 0? Shouldn't this bit know that if we're requesting the min, make lower_jerk very high?
      if self.frame % 2 == 0 and self.CP.openpilotLongitudinalControl:         # calculate jerk from plan, give a small offset for the upper limit for the cars ecu         lower_jerk = clip(abs(accel - self.accel_last) * 50, 0., 3.0)         upper_jerk = lower_jerk + 0.5

My question is, when the accel bottoms out at -3.5, doesn't that make the jerk very small since the delta is now 0?

 It actually might also explain why very occasionally i've seen overshoot after long periods of acceleration, the model may have wanted more acceleration than the limits and got clipped resulting in the same thing.
I just pushed up a change that should request more jerk as our acceleration deviates from the requested accel. Haven't tested it yet though but I would think it would fix this issue.

I tried it out with the fix, didn't notice any bad behavior, but haven't driven with it much yet.

Ok, I'm also going to test the change, thanks. I'm thinking that this new min jerk calculation based on accel error might allow to simplify/remove this bit:
if CS.out.vEgoRaw < 4.:
if accel > 0:
lower_jerk = max(0.5, lower_jerk)
upper_jerk = lower_jerk + 0.5
else:
# When decelerating from very low speeds allow more jerk to prevent a slow stop
lower_jerk = max(0.2, lower_jerk)
upper_jerk = lower_jerk + 0.5
I'm guessing these edge cases might now be covered by the error correction

Ok, I'm also going to test the change, thanks. I'm thinking that this new min jerk calculation based on accel error might allow to simplify/remove this bit:
    if CS.out.vEgoRaw < 4.:

      if accel > 0:

        lower_jerk = max(0.5, lower_jerk)

        upper_jerk = lower_jerk + 0.5

      else:

        # When decelerating from very low speeds allow more jerk to prevent a slow stop

        lower_jerk = max(0.2, lower_jerk)

        upper_jerk = lower_jerk + 0.5

I'm guessing these edge cases might now be covered by the error correction

Possibly, but for the accelerating jerk I'm skeptical just because of actuator lag

I drove for 2-3 hours yesterday and haven't had the insufficient braking problem, so that is potentially solved, but the downside is that it's now more jerky, it feels closer to stock exp mode now. I'll try making the
min_required_jerk = min(2.5, abs(accel - CS.out.aEgo) * 50)
a smaller fraction of the delta and see how that works.

Originally (before this PR) I had used the difference in actual accel and target accel as the jerk and had noticed it wasn't much of an improvement over stock behavior. So it does make sense that you're seeing the same when using it as a min.
Using a smaller fraction as you suggested would likely help. currently it's dividing by 50 because this code gets hit at 50 hz. But with this being a minimum, dividing by more than 50 shouldnt be a problem and likely would still help relieve the lag in the capped acceleration situation.
Another potential solution would be to only use the min value if it's greater than say 0.25, or possibly to do both that and the suggestion you made. I think I'll start by going with your suggestion and trying dividing by 100 for the min value. If it doesn't help I'll try adding some logic for when to use the min value

I've been driving with:
min_required_jerk = min(2.5, abs(accel - CS.out.aEgo) * 25)
and
min_required_jerk = min(2.5, abs(accel - CS.out.aEgo) * 15)
and some time with stock jerk after that. Stock jerk feels super jerky compared to both in exp mode, definitely uncomfortable. With 15 it's still more jerky than without min_required_jerk, so there might still be room for improvement, and I haven't seen any issues with hard braking yet. In general, the difference between stock and this is significant, definitely a keeper for me and possibly for upstream when it's tuned.
For testing I removed the low-speed positive accel increase and haven't felt any difference yet, I think the accel error might be taking care of it but I need to use it some more to be sure.

I've been driving with:
min_required_jerk = min(2.5, abs(accel - CS.out.aEgo) * 25)
and
min_required_jerk = min(2.5, abs(accel - CS.out.aEgo) * 15)

Lol I flipped the direction in my head in my last comment, my divide by 100 would have actually been multiply by 25. So I'll just update this to be multiply by 15 since you've already tried that and not gotten any bad breaking behavior.
I did have a PR for this upstream at one point and it got closed recently, which I never really proved it didn't cause any problems so makes sense (especially makes sense after you pointed out the issues you saw lol). they also said they don't have a whole lot of time to validate themselves, so aren't really accepting tuning for individual car types like this. So I probably won't open upstream in the near future

Been tuning the approach for the last two weeks, here's what I'm using:
`  # long_plan.accels can be empty, use current accel as a fallback
req_accel = self.sm['longitudinalPlan'].accels[0] if len(self.sm['longitudinalPlan'].accels) else accel
min_required_jerk = min(2.5, abs(req_accel - CS.out.aEgo) * 20)
max_required_jerk = 3.0
    lower_jerk = clip(abs(accel - self.accel_last) * 20, min_required_jerk, max_required_jerk)

    #allow highest jerk instantly for emergency braking
    if accel < -3.:
      lower_jerk = 3.

    upper_jerk = lower_jerk + 0.5
    stopping = stopping and CS.out.vEgoRaw < 0.01
    can_sends.extend(hyundaican.create_acc_commands(self.packer, CC.enabled and CS.out.cruiseState.enabled, accel, upper_jerk, lower_jerk, int(self.frame / 2), hud_control.leadVisible, set_speed_in_units, stopping, CC.cruiseControl.override, CS.mainEnabled, CS, escc, self.CP.carFingerprint))
    self.accel_last = accel`

I calculate the error as the plan - aEgo instead of MPC accel vs aEgo. It's smoother now but still works for strong braking. I'm not sure if the accel < -3 override is needed, but I'm assuming it will shave off a couple hundred milliseconds potentially on a strong brake.

I calculate the error as the plan - aEgo instead of MPC accel vs aEgo. It's smoother now but still works for strong braking.
Nice! that makes a lot of sense, prevents the mpc corrections from influencing things.

not sure if the accel < -3 override is needed,
Maybe not, but honestly I like erring on the side of stopping speed here and keeping it.

@rchybicki what are you doing to pass the submaster into the car controller? I'm not seeing a great way to do it cleanly and was curious how you went about it

Initially my clunky approach was to pass the long_plan to the update fn, but that meant changing all the interface files for all the cars - not great. Recently Sunny added sm to the Hyundai carcontroller and now I'm using that:
https://github.com/sunnyhaibin/sunnypilot/blob/dev-c3/selfdrive/car/hyundai/carcontroller.py
in init
 self.sm = messaging.SubMaster(['longitudinalPlan'])

https://github.com/sunnyhaibin/sunnypilot/blob/dev-c3/selfdrive/car/hyundai/carcontroller.py
in init
 self.sm = messaging.SubMaster(['longitudinalPlan'])

interesting, I thought that you could only have one sub master per process, but I guess that must only be the case for pub master

Some new findings on the jerk front, I still thought low speed SNG on exp mode was too jerky, and I was suspecting
upper_jerk = lower_jerk + 0.5
to be the cause. I thought I'd try lower_jerk at 0 and upper_jerk where lower_jerk was or a bit higher. Turns out lower jerk only applies to deceleration, so my car wouldn't slow down ever :-)
That explains why comma had lower_jerk set higher than upper_jerk, they wanted lower_jerk high for safety and upper_jerk lower for comfort. I'm testing out lower_jerk = upper_jerk, and I can already feel it's smoother - that's because upper_jerk doesn't add the 0.5 at all speeds I believe.
 Can't believe I didn't notice that before.

 That way if the ecu over shoots before our next control cycle it wont try to over compensate the other way

@rchybicki I was just thinking about some past behavior i've seen and realized the lower jerk probably isn't just deceleration and is instead just the amount of jerk down from the current acceleration.  So If you're going 3m/s and in one second you wanted to be going 2m/s you would want 1m/s of lower_jerk

Hmm I'm not sure what it really is limiting. I thought that would be the direction of the change like you describe, but when I set lower_jerk to 0 and tried to drive, it would overshoot the set speed significantly but it would stop accelerating at some point. I think I tested 40kph set went to 60kph. If lower_jerk would apply to all acceleration reduction it should never stop accelerating I think. Or maybe it applies to all reduction/increase, but 0 isn't really 0 but nearly 0 and that's why it overshot 40 to 60kph. We need to test more :-)

Hmm I'm not sure what it really is limiting. I thought that would be the direction of the change like you describe, but when I set lower_jerk to 0 and tried to drive, it would overshoot the set speed significantly but it would stop accelerating at some point. I think I tested 40kph set went to 60kph. If lower_jerk would apply to all acceleration reduction it should never stop accelerating I think. Or maybe it applies to all reduction/increase, but 0 isn't really 0 but nearly 0 and that's why it overshot 40 to 60kph. We need to test more :-)
I tried just setting upper/lower jerk to 1/2 the opposite depending on if we were increasing or decreasing acceleration and it didn't seem to cause any problems, im going to try something a bit more aggressive than 1/2 today and see if it smooths things out

@rchybicki haven't driven on it much, but just a simple check of
if accel > aEgo:
  lower_jerk = 0
elif accel <= aEgo:
  upper_jerk = 0

doesn't seem to cause any problems and my initial impression is that it does make things smoother

Same experience here, I'm using:
upper_jerk = jerk if accel >= self.accel_last else 0
lower_jerk = jerk if accel <= self.accel_last else 0

Random comment incoming!
Is there any progress on this idea? I feel that my vehicle would benefit from this change

Random comment incoming!
Is there any progress on this idea? I feel that my vehicle would benefit from this change

I've been running the following for a while, never got around to updating this draft pr branch:
https://github.com/commaai/openpilot/compare/master...pfeiferj:openpilot:pfeifer-hkg-long-control-tune

Awesome! I'll test it out on mine and see how it flows

This PR is no longer relevant with the latest longitudinal API refactor in upstream. Thanks to everyone that worked on this PR!


Align the attribute names for Property1D, Property2D and Property3D w…

Align the attribute names for Property1D, Property2D and Property3D with the speckle-sharp repo

Description & motivation
The fix for the reported issue link

Changes:

To-do before merge:

Screenshots:

Validation of changes:

Checklist:

[x] My pull request follows the guidelines in the Contributing guide?
[x] My pull request does not duplicate any other open Pull Requests for the same update/change?
[x] My commits are related to the pull request and do not amend unrelated code or documentation.
[x] My code follows a similar style to existing code.
[ ] I have added appropriate tests.
[ ] I have updated or added relevant documentation.

References

Thanks for the fixes @ItsPatrickHe


Test (Automatedly) the Main Flow (post sign-up) of using dpm

Test walkthrough of publisher interaction.

 configure
publish
tag
delete
purge

FIXED


Support unlimited disk cache time

For #559

Current coverage is 73.63% (diff: 100%)

Merging #566 into master will decrease coverage by 0.19%

@@             master       #566   diff @@
==========================================
  Files            21         21
  Lines          2240       2242     +2
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits           1654       1651     -3
- Misses          586        591     +5
  Partials          0          0

Powered by Codecov. Last update 077fc0a...e459e89


Improving navbar design and home page

when we hover on navbar its showing blue color which doesnot match the theme of website
and also the text written on home page should be somewhat centre so it will look nice i can improve it all please assign this to me

Hey..navbar is being resolved by #7
and for the home page text and alignment, it is being resolved by #58
Thanks!

ok

Please assign me this issue so that I can resolve it under GSSOC-23


Bring the log-ingest example pipeline back to using prepper.

Description
Our examples should use prepper. They work with both 1.2 and 1.3. Now that 1.2 is out, most users will end up running against that version.
Issues Resolved
N/A
Check List

[ ] New functionality includes testing.
[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[ ] Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

All of the integration tests are failing because of what looks like a dependency issue.

Something is using JCenter. This needs to be fixed and it probably has nothing to do with this.

Does your build fail locally @dlvenable? Because mine is still successful after rebasing against main.

@graytaylor0 , I'm tracking this in #859.


[Bug]: Paste Full Bibliography Wait

Bug Description

Full Bibliography Paste takes a bit long, albeit works without issue upon wait.

Followed Chris's advice here to update my pandoc (now ver. 3.1.5) there has been a small decrease in waiting time, from 5-6s to ~4s, I think.

relevance unsure: my library contains over 10k entries

Relevant Screenshot
No response
To Reproduce
No response
Debugging Log
Upon inspecting the debug log a notice that I lot of entries I have doesn't contain URL, I am not sure this is relevant factor the explains the delay as these log were generated when SCP is triggered, *before* anything is typed in.

I think the only relevant section within the log is:

[7:49:52.725 am] Supercharged Citation Picker[Script Filter] Processing complete
[7:49:52.808 am] Supercharged Citation Picker[Script Filter] Passing output 'gilabert2023HumanDignitySocial' to Run Script
[7:49:59.368 am] Logging Stopped.

Though, the "logging stopped" was my manual action, not a reflection of the time needed to paste full bibliography.

Sample BibTeX Entries
@article{1987FacialDiscriminationExtending,
  title = {Facial {{Discrimination}}: {{Extending Handicap Law}} to {{Employment Discrimination}} on the {{Basis}} of {{Physical Appearance}}},
  shorttitle = {Facial {{Discrimination}}},
  date = {1987},
  journaltitle = {Harvard Law Review},
  volume = {100},
  number = {8},
  eprint = {1341199},
  eprinttype = {jstor},
  pages = {2035--2052},
  publisher = {{The Harvard Law Review Association}},
  issn = {0017-811X},
  url = {https://www.jstor.org/stable/1341199},
  urldate = {2022-02-20},
  file = {/Users/vpchris/Zotero/storage/KPE5NJHC/1987 Facial Discrimination - Extending Handicap Law to Employment Discrimination on.pdf;/Users/vpchris/Zotero/storage/MBW4KWMU/1987 Facial Discrimination - Extending Handicap Law to Employment Discrimination on.skim}
}

@book{1992SelfEmploymentPrograms,
  title = {Self {{Employment Programs}} for {{Unemployed Workers}}},
  date = {1992},
  publisher = {{U.S. Dept. of Labor, Employment and Training Administration, Unemployment Insurance Service}},
  location = {{Washington, D.C.}},
  langid = {english},
  annotation = {OCLC: 30034279},
  file = {/Users/vpchris/Zotero/storage/J8X8KID2/Wandner et al 1992 Self Employment Programs for Unemployed Workers.pdf}
}

@article{2000ResourcesLiberalEquality,
  title = {The {{Resources}} of {{Liberal Equality}}},
  date = {2000},
  journaltitle = {Imprints},
  volume = {5},
  pages = {63--82},
  url = {http://www2.warwick.ac.uk/fac/soc/pais/people/clayton/research/theresources_/rle.pdf},
  file = {/Users/vpchris/Zotero/storage/5Z47S47V/2000 The Resources of Liberal Equality.pdf}
}

@book{2002RightSelfEmployment,
  title = {Right to {{Self Employment Bill}}},
  date = {2002},
  publisher = {{House of Parliament, Great Britain}},
  isbn = {978-0-215-70097-1},
  langid = {english},
  keywords = {5th⭐},
  annotation = {OCLC:<PHONE_NUMBER>},
  file = {/Users/vpchris/Zotero/storage/7JL54C5T/Great Britain et al 2002 Right to Self Employment Bill.pdf}
}

Buffer Files
untitled folder 2.zip
Workflow Configuration

Checklist

[X] I have updated to the latest version of this workflow.
[X] I have tried manually reloading the buffer (Alfred keyword scp, select Force Buffer Reload).

Hmm, can't see anything out of the ordinary here.
Do you maybe have an old device, low free RAM? If it is the latter, a restart of your mac might help.
If you use pandoc normally to convert a markdown file with citations, how long does that take?

Also could you attach a full debugging log? That could help pinpoint where the bottleneck might be

Hmm, can't see anything out of the ordinary here.
Do you maybe have an old device, or low free RAM? If it is the latter, a restart of your mac might help.

M1 8G ram here.

If you use pandoc normally to convert a markdown file with citations, how long does that take?

The pandoc conversion to .docx is instant (contains multiple references), much quicker than the Paste.

much quicker!!
[2:08:17.888 pm] Supercharged Citation Picker[Script Filter] Processing complete
[2:08:17.960 pm] Supercharged Citation Picker[Script Filter] Passing output 'gilabert2023HumanDignitySocial' to Run Script
[2:08:19.885 pm] Supercharged Citation Picker[Run Script] Processing complete
[2:08:19.898 pm] Supercharged Citation Picker[Run Script] Passing output 'Gilabert, P. (2023). Human Dignity and Social Justice. OUP Oxford.' to Copy to Clipboard

Hmm, it still takes way longer than on my device though (2000ms vs 350ms) 🤔
But well, guess it's now at least quick enough to work properly with?


get_openai_callback dosen't work with streaming = True

System Info
0.0.166
Who can help?
@agola11
Information

[ ] The official example notebooks/scripts
[X] My own modified scripts

Related Components

[X] LLMs/Chat Models
[ ] Embedding Models
[ ] Prompts / Prompt Templates / Prompt Selectors
[ ] Output Parsers
[ ] Document Loaders
[ ] Vector Stores / Retrievers
[ ] Memory
[ ] Agents / Agent Executors
[ ] Tools / Toolkits
[ ] Chains
[X] Callbacks/Tracing
[X] Async

Reproduction
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
from langchain.chat_models import ChatOpenAI
from langchain.callbacks import get_openai_callback
question = "What is the answer of the meaning of life?"
prompt = PromptTemplate(
    input_variables=["input"],
    template="{input}",
)
llm = ChatOpenAI(temperature=0.7, max_tokens=2000, streaming=True)
chain = LLMChain(llm=llm, prompt=prompt)

with get_openai_callback() as cb:
    print(chain.run(question))
    print("\n\n")
    print(cb)

result
As an AI language model, I do not have a personal belief system or opinion, and therefore, I do not have an answer to this question. The meaning of life is a philosophical and subjective topic that varies from person to person. It is up to individuals to find their own purpose and meaning in life.

Tokens Used: 0
	Prompt Tokens: 0
	Completion Tokens: 0
Successful Requests: 1
Total Cost (USD): $0.0

when set streaming = False, it works.
Expected behavior
should return with token usage info with streaming = True or False

related issue
https://github.com/hwchase17/langchain/issues/3114

Hi,
In order to solve this bug I created my own async and cost calculator 'handler'(require tiktoken dependency):
from langchain.callbacks.base import AsyncCallbackHandler
from langchain.schema import LLMResult
from typing import Any, Dict, List
import tiktoken

MODEL_COST_PER_1K_TOKENS = {
    "gpt-4": 0.03,
    "gpt-4-0314": 0.03,
    "gpt-4-completion": 0.06,
    "gpt-4-0314-completion": 0.06,
    "gpt-4-32k": 0.06,
    "gpt-4-32k-0314": 0.06,
    "gpt-4-32k-completion": 0.12,
    "gpt-4-32k-0314-completion": 0.12,
    "gpt-3.5-turbo": 0.002,
    "gpt-3.5-turbo-0301": 0.002,
    "text-ada-001": 0.0004,
    "ada": 0.0004,
    "text-babbage-001": 0.0005,
    "babbage": 0.0005,
    "text-curie-001": 0.002,
    "curie": 0.002,
    "text-davinci-003": 0.02,
    "text-davinci-002": 0.02,
    "code-davinci-002": 0.02,
}

class TokenCostProcess:
    total_tokens: int = 0
    prompt_tokens: int = 0
    completion_tokens: int = 0
    successful_requests: int = 0

    def sum_prompt_tokens( self, tokens: int ):
      self.prompt_tokens = self.prompt_tokens + tokens
      self.total_tokens = self.total_tokens + tokens

    def sum_completion_tokens( self, tokens: int ):
      self.completion_tokens = self.completion_tokens + tokens
      self.total_tokens = self.total_tokens + tokens

    def sum_successful_requests( self, requests: int ):
      self.successful_requests = self.successful_requests + requests

    def get_openai_total_cost_for_model( self, model: str ) -> float:
       return MODEL_COST_PER_1K_TOKENS[model] * self.total_tokens / 1000

    def get_cost_summary(self, model:str) -> str:
        cost = self.get_openai_total_cost_for_model(model)
        print( cost )

        return (
            f"Tokens Used: {self.total_tokens}\n"
            f"\tPrompt Tokens: {self.prompt_tokens}\n"
            f"\tCompletion Tokens: {self.completion_tokens}\n"
            f"Successful Requests: {self.successful_requests}\n"
            f"Total Cost (USD): {cost}"
        )

class CostCalcAsyncHandler(AsyncCallbackHandler):
    model: str = ""
    socketprint = None
    websocketaction: str = "appendtext"
    token_cost_process: TokenCostProcess

    def __init__( self, model, token_cost_process ):
       self.model = model
       self.token_cost_process = token_cost_process

    def on_llm_start( self, serialized: Dict[str, Any], prompts: List[str], **kwargs: Any) -> None:
       encoding = tiktoken.encoding_for_model( self.model )

       if self.tocken_cost_process == None: return

       for prompt in prompts:
          self.tocken_cost_process.sum_prompt_tokens( len(encoding.encode(prompt)) )

    async def on_llm_new_token(self, token: str, **kwargs) -> None:
      print( token )

      self.tocken_cost_process.sum_completion_tokens( 1 )

    def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None:
      self.tocken_cost_process.sum_successful_requests( 1 )

I use this way:
token_cost_process = TokenCostProcess()

chat = ChatOpenAI(
        streaming=True,
        callbacks=[  CostCalcAsyncHandler( "gpt-3.5-turbo", token_cost_process ) ],
        temperature= 0
        model_name = "gpt-3.5-turbo"
)

I hope this helps anyone.
Thanks,

I have no idea Michal!

@hwchase17 @dev2049 The solution by @acoronadoc for cost tracking here seems pretty solid for streaming chat. Do you agree? We could make a PR for it.

wondering about the same (and thanks for the contribution!)

LangSmith records streaming tokens. Any Progress?

A variation inspired by @acoronadoc
from typing import Any, Dict, List

import tiktoken
from langchain.callbacks.base import AsyncCallbackHandler
from langchain.callbacks.openai_info import (
    MODEL_COST_PER_1K_TOKENS,
    get_openai_token_cost_for_model,
)
from langchain.schema import LLMResult

class Cost:
    def __init__(
        self, total_cost=0, total_tokens=0, prompt_tokens=0, completion_tokens=0
    ):
        self.total_cost = total_cost
        self.total_tokens = total_tokens
        self.prompt_tokens = prompt_tokens
        self.completion_tokens = completion_tokens

    def __str__(self):
        return (
            f"Tokens Used: {self.total_tokens}\n"
            f"\tPrompt Tokens: {self.prompt_tokens}\n"
            f"\tCompletion Tokens: {self.completion_tokens}\n"
            f"Total Cost (USD): ${self.total_cost}"
        )

    def add_prompt_tokens(self, prompt_tokens):
        self.prompt_tokens += prompt_tokens
        self.total_tokens += prompt_tokens

    def add_completion_tokens(self, completion_tokens):
        self.completion_tokens += completion_tokens
        self.total_tokens += completion_tokens

class CostCalcCallbackHandler(AsyncCallbackHandler):
    def __init__(self, model_name, cost, *args, **kwargs):
        self.model_name = model_name
        self.encoding = tiktoken.encoding_for_model(model_name)
        self.cost = cost
        super().__init__(*args, **kwargs)

    async def on_llm_start(
        self, serialized: Dict[str, Any], prompts: List[str], **kwargs: Any
    ) -> None:
        for prompt in prompts:
            self.cost.add_prompt_tokens(len(self.encoding.encode(prompt)))

    async def on_llm_end(self, response: LLMResult, **kwargs: Any) -> None:
        for generation_list in response.generations:
            for generation in generation_list:
                self.cost.add_completion_tokens(
                    len(self.encoding.encode(generation.text))
                )
        if self.model_name in MODEL_COST_PER_1K_TOKENS:
            prompt_cost = get_openai_token_cost_for_model(
                self.model_name, self.cost.prompt_tokens
            )
            completion_cost = get_openai_token_cost_for_model(
                self.model_name, self.cost.completion_tokens, is_completion=True
            )
            self.cost.total_cost = prompt_cost + completion_cost

Example usage:
import asyncio

from langchain.chat_models import ChatOpenAI

model_name = "gpt-3.5-turbo"
cost = Cost()
chat = ChatOpenAI(
    streaming=True,
    callbacks=[CostCalcCallbackHandler(model_name, cost)],
    temperature=0,
    model_name=model_name,
)
asyncio.run(chat.apredict(text="What's 2+2?"))
print(cost)

# Tokens Used: 17
#         Prompt Tokens: 9
#         Completion Tokens: 8
# Total Cost (USD): $2.95e-05

Hi, @shadowlinyf,
I'm helping the LangChain team manage their backlog and am marking this issue as stale. The issue you raised regarding the get_openai_callback function not working with streaming=True has been confirmed and discussed by several users, including acoronadoc, pors, MichalBortkiewicz, and nick-solly. Potential solutions and variations have been proposed, but the issue remains unresolved.
Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.
Thank you for your understanding and contribution to LangChain!

I am still having this issue with streaming

openai_info

@nick-solly @acoronadoc Does this still work with the new ChatOpenAI (from langchain_openai import ChatOpenAI) ?
I'm using the above callback code/setup on an OpenAI Functions Agent and I am seeing a token count, but when I compare it to the Token Count on the LangSmith trace, I see a different count of the tokens. Do you know why??
In LangSmith i see: 1671 tokens

And in my Callback print i see: 1094 tokens

Any know where the discrepancy of the count is? / How to fix?

I have a solution by set stream_usage=True when you initiate ChatOpenAI instance
`
from langchain_openai import ChatOpenAI
from langchain_community.callbacks import get_openai_callback
llm = ChatOpenAI(temperature=0, stream_usage=True)
with get_openai_callback() as cb:
for chunk in chain.stream("What is Map Reduce"):
print(chunk)
print(cb.prompt_tokens)
print(cb.completion_tokens)
`

It seems that the method in this document is currently recommended.

https://python.langchain.com/docs/how_to/chat_token_usage_tracking/
https://github.com/langchain-ai/langchain/issues/20524


Initial claims ontology

partiallySupports should be an attribute of PROPERTY_TYPE, not of PROPERTY, since that determination is made for the PROPERTY_TYPE. We need to think of PROPERTY_TYPE as a first class ENTITY, rather that just an "enumeration". We will still have predefined identifiers in SADL for PROPERTY_TYPE for he enumeration.

I'm expecting the PROPERTY_TYPEs to exist in the ontology before any OBJECTIVES are ever added. Would it make sense for OBJECTIVES to point to PROPERTY_TYPE, perhaps?

Eric,
I was just going to modify this comment based upon discussion with Vatsan this morning. The "partiallySupports" attribute has been in the PROPERTY class (and not used) long before the new approach with CLAIMS was proposed.  I agree with you it doesn't belong in PROPERTY_TYPE, but neither does it belong in PROPERTY or OBJECTIVE. Our understanding is that it belongs in CLAIM, which can support specific OBJECTIVE(s) based upon the PROPERTY(s) and THEORY the claim uses. E.g., one can write claims to support different objectives using overlapping sets of properties.
Devesh
From: Eric Mertens @.>
Sent: Friday, October 28, 2022 12:05 PM
To: ge-high-assurance/RACK @.>
Cc: Bhatt, Devesh (AdvTech) @.>; Comment @.>
Subject: [External] Re: [ge-high-assurance/RACK] Initial claims ontology (PR #804)
WARNING: This message has originated from an External Source. This may be a phishing email that can result in unauthorized access to Honeywell systems. Please use proper judgment and caution when opening attachments, clicking links or responding.
partiallySupports should be an attribute of PROPERTY_TYPE, not of PROPERTY, since that determination is made for the PROPERTY_TYPE. We need to think of PROPERTY_TYPE as a first class ENTITY, rather that just an "enumeration". We will still have predefined identifiers in SADL for PROPERTY_TYPE for he enumeration.
I'm expecting the PROPERTY_TYPEs to exist in the ontology before any OBJECTIVES are ever added. Would it make sense for OBJECTIVES to point to PROPERTY_TYPE, perhaps?

Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fge-high-assurance%2FRACK%2Fpull%2F804%23issuecomment-1295241482&data=05|01|devesh.bhatt%40honeywell.com|7c5a3099cc244c97cee108dab9068535|96ece5269c7d48b08daf8b93c90a5d18|0|0|638025735032017829|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=qa3DtwslqDKXCNa6EzpYJXF72J3S%2F7By9BcxpRCJnr4%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADJXVB2F2O2R4Z5QWBUI6OLWFQBS7ANCNFSM6AAAAAARFT4VFU&data=05|01|devesh.bhatt%40honeywell.com|7c5a3099cc244c97cee108dab9068535|96ece5269c7d48b08daf8b93c90a5d18|0|0|638025735032017829|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=6o8sCrgRtbFGy1GWaLe95POCFuethcbZwUoZTR314ls%3D&reserved=0.
You are receiving this because you commented.Message ID<EMAIL_ADDRESS>

All of the claims types have been incorporated into the enumeration variant CSVs. I recommend using the [...] menu to select View File to get a pretty table view in the PR changed files tab.
We've instantiated the claims diagram with example bits from each of the contributing teams claims information.
Note that the "source" column in these CSV files are simply for reference as we iterate on this design. They are not going to be loaded into RACK itself.

@bhatt111 we've moved partiallySupports over to a CLAIM per discussion today.

@bhatt111 I've incorporated your changes to the SRI overlay

I just noticed that with the new claim enumeration types, we now have CWEs added as both PROPERTY_TYPES and MITRE-CWE. Is this really what we want? Should we remove one of them?

I believe the CWE's may have been added as PROPERTY_TYPEShttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fge-high-assurance%2FRACK%2Fblob%2Fclaims%2FRACK-Ontology%2Fontology%2Fclaims%2FPROPERTY_TYPES.csv&data=05|01|devesh.bhatt%40honeywell.com|46de96b669b745c9d64d08dac0d62650|96ece5269c7d48b08daf8b93c90a5d18|0|0|638034323264531535|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=NlD6GuIrnmxsz8kwTEQJk5d%2FWu7g%2Bb3Z92Pv1EXtbR0%3D&reserved=0 by Lockheed, bit by SRI team.
Devesh
From: Kit Siu @.>
Sent: Monday, November 7, 2022 9:39 AM
To: ge-high-assurance/RACK @.>
Cc: Bhatt, Devesh (AdvTech) @.>; Mention @.>
Subject: [External] Re: [ge-high-assurance/RACK] Initial claims ontology (PR #804)
WARNING: This message has originated from an External Source. This may be a phishing email that can result in unauthorized access to Honeywell systems. Please use proper judgment and caution when opening attachments, clicking links or responding.
I just noticed that with the new claim enumeration types, we now have CWEs added as both PROPERTY_TYPEShttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fge-high-assurance%2FRACK%2Fblob%2Fclaims%2FRACK-Ontology%2Fontology%2Fclaims%2FPROPERTY_TYPES.csv&data=05|01|devesh.bhatt%40honeywell.com|46de96b669b745c9d64d08dac0d62650|96ece5269c7d48b08daf8b93c90a5d18|0|0|638034323264531535|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=NlD6GuIrnmxsz8kwTEQJk5d%2FWu7g%2Bb3Z92Pv1EXtbR0%3D&reserved=0 and MITRE-CWEhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fge-high-assurance%2FRACK%2Fblob%2Fclaims%2FRACK-Ontology%2Fontology%2FMITRE-CWE%2FMITRE_CWE.csv&data=05|01|devesh.bhatt%40honeywell.com|46de96b669b745c9d64d08dac0d62650|96ece5269c7d48b08daf8b93c90a5d18|0|0|638034323264531535|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=vCC1WB90pfNy1mLrtD4IFvtlXZTx13xpJC8SuiHX4GU%3D&reserved=0. Is this really what we want? Should we remove one of them?

Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fge-high-assurance%2FRACK%2Fpull%2F804%23issuecomment-1305793691&data=05|01|devesh.bhatt%40honeywell.com|46de96b669b745c9d64d08dac0d62650|96ece5269c7d48b08daf8b93c90a5d18|0|0|638034323264531535|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=9GVvq9paevb%2FsAoWdPiku9pc5Wqnm%2FTuFiOyRBr7wPI%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FADJXVB7SO3C5PDEQMDFNJXTWHEPADANCNFSM6AAAAAARFT4VFU&data=05|01|devesh.bhatt%40honeywell.com|46de96b669b745c9d64d08dac0d62650|96ece5269c7d48b08daf8b93c90a5d18|0|0|638034323264531535|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|3000|||&sdata=L%2BVuAKG6oSJfK5VeRRBKgfNPMmO49gHGD3XBv5vHlPY%3D&reserved=0.
You are receiving this because you were mentioned.Message ID<EMAIL_ADDRESS>

@kityansiu I agree that it's not great that the CWEs are duplicated.
Maybe another encoding would just be to have a single "CWE present in module" property and require the claim to use "addresses" to point the the actual MITRE_CWE instance.


Added support for a locally hosted LLM

Hi,
I've added a new command line parameter: endpoint. If endpoint is set to any value, it should inference with whichever endpoint the user has set. The API endpoint must be OpenAI compatible.
I have tested this out with LM Studio on a M1 Pro Mac, with the CodeLlama-13B-Instruct. It's barely passable. Am soon going to test it out on a full server using phind or wizardcoder 34B, they should be at least as good as ChatGPT-3.5Turbo.

牛逼， openai把之前的虚拟手机号注册的全封了， 我正需要这个。 另外我看代码里面的日志也是搭建的镜像站


Re-enable NetworkTimeout

Fixes: https://github.com/Azure/azure-sdk-for-net/issues/20859

/azp run net - core - ci


Interpolation format is not used during build/server phase

Describe the bug
We're experiencing a translation issue on our Next.JS boilerplate which uses next-i18next for translations.
The boilerplate: https://github.com/CrystallizeAPI/crystallize-nextjs-boilerplate
The interpolation format function does not get executed on the server, resulting in wrong translation output in the initial server response. The correct formatting is applied after client hydration.
Occurs in next-i18next version
8.1.3
Steps to reproduce

Go to the production website, https://furniture.superfast.shop/
Open devtools
Turn off Javascript
Refresh page to see the result from the build

Expected behaviour
Prices should be in the format of e.g.: €60
Screenshots
Before hydration

After hydration

You'll need to provide a minimum reproduction in order for others to debug.

You'll need to provide a minimum reproduction in order for others to debug.

I've added a minimum reproduction now

@hakonkrogh What I meant was that the repo you provided is complex and your problem most likely lies therein. If you would like assistance, you will need to reproduce your error in a simple repo, preferably a copy of the simple example.
Normally in these cases, you will end up discovering an implementation error in the process of creating a minimal repro.
Good luck!

Sounds like a fair request, I'll get on that 👍

Great. Happy to reopen if you can provide a minimum repro.

Created a minimum repo: https://github.com/hakonkrogh/i18next-simple

Is the Intl API defined in your server environment?

Is the Intl API defined in your server environment?

Yes, you should assume Node v14 here as the runtime (I forgot to mention that before)

Why did you choose to override your config only in _app? That is the root of your problem. Please read the documentation carefully. If you want to override the config in either _app or serverSideTranslations, you will need to do so consistently. I recommend just moving your changes into your next-i18next.config.js if they are serialisable.
Good luck!

Why did you choose to override your config only in _app? That is the root of your problem. Please read the documentation carefully. If you want to override the config in either _app or serverSideTranslations, you will need to do so consistently. I recommend just moving your changes into your next-i18next.config.js if they are serialisable.
Good luck!

The issue with this is that functions cannot be serialised as JSON, so we cannot have the interpolation.format function in the next-i18next.js file.

I've just seen we're actually missing the bit about also passing the unserialisable config into serverSideTranslations! That's a mistake.
If you're using TypeScript, you should be able to see the function call signature. This would be a great PR to improve documentation.

I've just seen we're actually missing the bit about also passing the unserialisable config into serverSideTranslations! That's a mistake.
If you're using TypeScript, you should be able to see the function call signature. This would be a great PR to improve documentation.

This is the solution. We're not using typescript in the boilerplate, that would have helped reveal the possible configuration options. I just pushed an update to our boilerplate unserialising the config, and then moving the format function into the proper config file: https://github.com/CrystallizeAPI/crystallize-nextjs-boilerplate/commit/1135ac465fc0c3a55f277d4e05ea7c688748a925.
Thanks for helping out resolving this issue 👍

@hakonkrogh Great! Would you be interested in creating a PR to update the docs?

@hakonkrogh Great! Would you be interested in creating a PR to update the docs?

Yup, on it right now


CIP 0037 - Unambiguous name for ERC-20 on Celo chain - Discussions

Discussions for CIP-37

Somebody on the last developer call mentioned a near-term fix for this issue is to update the documentation to make it clear that ERC-20-conforming tokens on the Celo blockchain are not compatible with the Ethereum blockchain, so I made this doc with potential updates to 7 places in the documentation where this could be most helpful
Feel free to add comments, and if those changes look good, I'll update the docs

@willkraft  nice work.  @barbaraliau might be better than myself for reviewing that doc

Thanks, @barbaraliau let me know what you think of those changes, and I can update the docs if they look okay

Hi @barbaraliau, hope you've had a good weekend! I wanted to follow up here - let me know what you think about those changes to the docs, and I can submit them if they look okay

How should we proceed with this? We are adding more and more tools and documentation that needs to reference ERC20 like tokens on Celo. Imo, sooner we have the name the better.
I would propose we just do a poll among stakeholders, and just choose a name and go with it. Having a name seems strictly better than waiting for a perfect option.

For my part i've let it go as i'm outside of my area of expertise and there seemed to be some strong opposition from some because it technically is the erc20 interface and I worried at this point it's to late.   I do think CFT is a great consumer name.
If this does happen i think i will need to be by app developers coming together.

I like CRC-20 because it is close enough to ERC-20 that it intuitively infers what it is, but is different enough to indicate that it's not an Ethereum based token.

Relevant tweet on naming conventions https://twitter.com/brendan_dharma/status/1392243927076392962
Also having @prestwich in the conversation is good. There's this proposal by Pedro Gomez https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md


added dev packages and fixed a typo

A typo is inhibiting this.coordinates from being accessed.
also, some dependencies are not in the package.

getCoordinate() covered in 49a01864bbc44284a56fb3bc08091bd982418cdf
package.json in 8d15b49b9cdb7b1e378c1a0eef5d275f89e411b8
Thanks for bring in to our attention!


moltemplate binary is not on PATH across logins

in D. Molatemplate, step 4, the .local/bin is exported to $PATH and the .bashrc is sourced but the export is not added to the .bashrc and therefore doens't persist across logins

same for the packmol export

solved in #2


knife azure server create failing

Have been trying to create azure vm using knife using a hosted chef server but have been failing to do so . It waits for winrm to respond and then finally kills itself.
Can someone please provide me help to get me unblocked its very urgent for me to move ahead from here.
Any help will be highly appreciated.
Thanks in advance.
PS C:\chef-repo> knife azure server create --azure-connect-to-existing-dns --azure-dns-name chefnode --azure-vm-name 'node5' --azure-service-location 'East Asia' --azure-source-image 'bd507d3a70934695bc2128e3e5a255ba__RightImage-Windows-2008R2-SP1-x6
4-iis75-v5.8.8' --winrm-user 'node' --winrm-password 'node12!@' --bootstrap-protocol winrm --distro 'windows-chef-client-msi'
..........
Waiting for virtual machine to reach status 'provisioning'............vm state 'provisioning' reached after 2.85 minutes.
Waiting for virtual machine to reach status 'ready'..........................vm state 'ready' reached after 6.76 minutes.
.
DNS Name: chefnode.cloudapp.net
VM Name: node5
Size: Small
Azure Source Image: bd507d3a70934695bc2128e3e5a255ba__RightImage-Windows-2008R2-SP1-x64-iis75-v5.8.8
Azure Service Location: East Asia
Public Ip Address: <IP_ADDRESS>
Private Ip Address: <IP_ADDRESS>
WinRM Port: 47077
Environment: _default
Waiting for winrm on <IP_ADDRESS>:47077
Waiting for remote response before bootstrap.WARNING: Unsupported version of httpclient. The supported major version of library is httpclient version 2.4. This code path monkey patches few methods in httpclient to support additional features. This co
uld possibly work, but it is advised to extensively test your version. If you are aware of the impact of using 2.5.0, this warning can be disabled by setting USE_HTTPCLIENT_MAJOR to the major version 2.5.
ERROR: No response received from remote node after 0.01 minutes, giving up.
ERROR: RuntimeError: Command execution failed.
PS C:\chef-repo>
Thanks,
Pravin

@waghpravin14 , did you get this solved? I take it you have installed knife-azure on your Windows (7?) local machine and you had trouble getting Azure to fully respond?
AnneTheAgile

@waghpravin14
Can you also set following and try again ?
winrm set winrm/config/winrs @{MaxMemoryPerShellMB="1000"}

@waghpravin14 we've released a new version of knife-azure (1.4.0) -- could you attempt to repro and let us know how things go? Also, setting the winrm settings above would be helpful as well.

Closing since we haven't heard any more reports on this.


pull request for e2e test at 01/09/2017 10:26:07

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Random Verses

needing some advice please , using php , want to display random verses from the bible book there is 66 books and 1,189 chapter and 31,102 verses in total , we would like to use the numbers based on the numbers 3, 7, 12, and 40 when randomly showing until the script stopped , so we will have a start and stop button and each time should start at a random place totally different and follow the numbers pattern we want and mark the verses until we click the stop button to display the verse that is stopped at ...
what we would like it to happen is that on when someone clicks on Start it would use the numbers we would like it to go through the verses until user clicks to stop it again and it would show the verse that is stopped at , so if there is 7 users or more running the script the same time they should all get different results from different books etc etc but based on same wanted base numbers  hope that make sense
any help will be great thank you in Jesus name,
God Bless "Jesus Loves You" "For I know the plans I have for you,” declares the Lord, “plans to prosper you and not to harm you, plans to give you hope and a future."  Jeremiah 29:11

any help will be great thank you in Jesus name

I just wandered over to this GitHub project to report a possible issue. That's when I saw this unanswered post. So, I figured... you did say "any" help... and no one else replied... so here's some mustard seed sized help. 😄

needing some advice please , using php

This is where I get confused right away. I'm trying to figure out your requirements and I'm not sure that PHP is the best language. It's not just random hate of PHP either. I like PHP.

we would like to use the numbers based on the numbers 3, 7, 12, and 40 when randomly showing until the script stopped

I'm not sure why those numbers are important. 3 is not a multiple of 31,102... neither is 7, 12, or 40. So, I'm not exactly sure how you're imagining the shuffling to work. In particular, I'm not sure if it's just random numbers that are shown, or if it's random bible verses. The latter is one of the reasons why I question the use of PHP. If the verses are shown randomly... every few seconds... or even every few milliseconds... I imagine that would be tough on the server.
It seems like you're trying to build an online bible study game.
If things are only shuffling locally, until a player presses a button, maybe PHP could do the job, but then the other players would have to constantly hit the server waiting for an update — not efficient.
I don't know what's best for you to do. This reply is merely just to tell you how I'm reacting to these requirement. If I'm understanding this correctly, the project is game-like, with more than a few people playing simultaneously. That makes me think of socket.io...
https://socket.io
https://github.com/socketio/socket.io

Socket.IO enables real-time, bidirectional and event-based communication.
It works on every platform, browser or device, focusing equally on reliability and speed.

Maybe that's what you're looking for? 🤔
While that software seems nice, I haven't actually used it... not yet at least. This might not be the most helpful information, but I find that development projects are often deceptively challenging. There are some complex ideas involved in this project. I think a good next step could be to define the requirements in detail. Then, maybe those requirements can be split up into more manageable parts.

What does it mean to shuffle? (What's being shuffled, and how frequently is it shuffled?)
How are the people connecting to each other? (Internet? Local Network? Shared screen?)
If it's online, is there a chat feature?
What does the interface look like?
Are the bible verses stored locally or on the server?
Is this a game? How do people win? Is it a quiz? Is there a score?

Hopefully that's helpful information.

I only check scrollmapper once in a great while since its a very basic project and, thankfully, the bible never changes :D
There are ways to write random select statements in SQL, but I'll definitely leave this open for more qualified people to help.
God bless you as well.

Not necessarily it has to be in TSQL. Every programming language has methods that allows you to do what you need. It’s a logic matters.

not the best with programming coding etc , The idea is to have a button
would shuffle in between the scriptures based on God's numbers and show one
when clicked again thats all , if there is a formula for this it wont
matter really if it is php  or not  :)
Thank you so much for all taking time to write really appreciated
God Bless
"Jesus Loves You"
"For I know the plans I have for you,” declares the Lord, “plans to prosper
you and not to harm you, plans to give you hope and a future."  Jeremiah
29:11
On Sun, 6 Dec 2020 at 19:50, Roger E Surmay<EMAIL_ADDRESS>wrote:

Not necessarily it has to be in TSQL. Every programming language has
methods that allows you to do what you need. It’s a logic matters.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/scrollmapper/bible_databases/issues/48#issuecomment-739553670,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AIPJVR35P6VIUZGAF2KVP6LSTPN6TANCNFSM4TZAGXPA
.

I know what you mean. I did exactly what I said before. I had a button which fired a event and brought me Randon scriptures. I used qml at that time (5 years ago) for blackberry app. So, nowadays there are a lot of ways to do that.


Can't create binding redirect from 2.2.5 to 3.0.0. because of public key change

How do we deal with this? We have 3rd party libraries that reference 2.2.5 and we use 3.0.0. Changing the public key completely defeats this useful mechanism for dealing with dependency conflicts.

Hi @jahmai Unfortunately, there's not much we can do here. The key had to change because the old key was the same key the .NET Framework used which would make it impossible for the community to build their own versions.
For now, we do need the eco-system to update to 3.0.

Understandable but very painful!

@clairernovotny I opened a new issue #1813 which I now realize is a duplicate of this one.
It is of course understandable the need to change the public key going forward, but it feels like from Rx v4.0.0 it would be possible to provide compatibility facades for the old Rx v2 assemblies to the new System.Reactive.dll signed with the .NET framework public key.
This would be a one-off release purely for backwards compatibility reasons to give legacy apps a transition path.


Improve the documentation for std.utf.byUTF

Clarified

@schveiguy @DmitryOlshansky This PR provides an improvement over what we currently have. While it would be nice to have some sort of formatted, standard table to present the range capabilities of returned values, no one has an idea on how to do that as of now.
For now, this PR can be merged as is to slightly improve the status quo.

@quickfur Added.

Auto-merge toggled on


Table icon

Describe the bug
Icon table migration is not in the repository and it is necessary for tickets types.
To Reproduce
Clone repository, configure database and run migrations
Expected behavior
Migration for icon table
Screenshots

As described in the docs, the 5th step of installation, you need to execute the database seeder, in this step the icons table is created and filled with data:
´´´php
Database seed: using the docker terminal for laravel.test-1 container run this command php artisan db:seed
´´´

As described in the docs, the 5th step of installation, you need to execute the database seeder, in this step the icons table is created and filled with data:

Database seed: using the docker terminal for laravel.test-1 container run this command

php artisan db:seed

https://laravel-help-desk.herokuapp.com/docs/#idocs_installation

thank you for the fast response.
I think a create table inside a migration is not the proper way

Yes I totally agree with you, an improvement of the icons function is in progress, it will have a seeder for the schema and an update of seeder to have all the icons list of the latest fontawesome icons set.

@cristian-araujo
A PR was made to migrate the icons schema definition to a migration, and also the seeder of fontawesome icons list is updated to the last set (based on the metadata https://github.com/FortAwesome/Font-Awesome/blob/master/metadata/icons.json)
PR: #80

@cristian-araujo A PR was made to migrate the icons schema definition to a migration, and also the seeder of fontawesome icons list is updated to the last set (based on the metadata https://github.com/FortAwesome/Font-Awesome/blob/master/metadata/icons.json)
PR: #80

thank you, I think this help desk has much potential, but in real scenario it need to be improved a little more.
I have some ideas for it, I was thinking to fork this project and make the changes by myself but if you want, I can share the improvements.
sorry for my english, i'm still learning it

Any contribution (idea, code, …) helping to improve this application will be welcome.
You can use the conversation section of this repository to share ideas, or make pull request as you like.
Thank you in advance.


Configuration is reloaded twice on change

Is this a Bug or Feature request?:
Bug
Description of the problem:
After changing the logger provider configuration, the event handler callback registered using IOptionsMonitor<T>.OnChange() fires two times. According to my tests the framework actually reloads the configuration data twice.
Steps to reproduce the problem:
appsettings.json
{
  "Console": {
    "IncludeScopes": false
  }
}

Program.cs
using System;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Console;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;

namespace loggertest
{
    class Program
    {
        static void Main(string[] args)
        {
            var config = new ConfigurationBuilder()
                .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
                .Build();

            var services = new ServiceCollection();
            services.AddLogging(b =>
            {
                b.AddConfiguration(config);
                b.AddConsole();
            });

            using (var sp = services.BuildServiceProvider())
            {
                var options = sp.GetRequiredService<IOptionsMonitor<ConsoleLoggerOptions>>();
                options.OnChange((o, name) => Console.WriteLine($"Name = {name}, Hash = {o.GetHashCode()}, Content = {JsonConvert.SerializeObject(o)}"));
            }

            Console.ReadLine();
        }
    }
}

Run the program, edit the contents of the settings json file and save it.
Additional notes:
The problem doesn't occur when I manually configure the options:
services.AddLogging(b =>
{
    b.AddConsole();
    b.Services.Configure<ConsoleLoggerOptions>(config);
});

The problem is not specific to file system watchers or PhysicalFileProvider. The memory implementation of IFileProvider used in my tests produces the same effect.
The issue seems to be related to the following commit:
https://github.com/aspnet/Logging/commit/cc350d7ef616ef292c1b4ae7130b8c2b45fc1164
Version:
Microsoft.Extensions.Logging 2.1.0+

I looked into this, two events are caused by how ConfigurationBuilder handles adding two sections from the same original configuration object.
We add both a section with loggers full type name and an alias to configuration builder here and when event fires for original IConfiguration it causes a reload per each section. /cc @HaoK
There is not much we can do here from logging perspective.


Create time_bnds for output netCDF files

Description
Compute time_bnds and attach them to output.
Can probably be done using OCGIS, also see https://github.com/pydata/xarray/issues/2481 for xarray functionality that could help go into this direction.

This could be potentially solved by resampling the ds.time with the same frequency as the indicator and exratcing min / max

@huard here is the bit of code that I was talking about (I used it when making mf-datasets filenames but it could maybe serve for the time bounds as well)
freq = 'YS'
timestamps = ds.time.resample(time=freq)

for n, i in enumerate(zip(timestamps.min(),timestamps.max())):
    print('year', n, 'start', i[0], '\nyear',n,'end', i[1], '\n\n')

With the merge of #164 I'm pushing this up to v0.15. Work for you, @huard?

Sure. Want to include the PR for the doc refactoring in it or not ?

If it's feasible, why not? I need to speak with @aulemahal to see if there's anything that I can help with with regards to that PR.

@huard  Is this a priority? It could be done for 0.15 or we wait for the CRIM's suggestion for the refactoring and then we implement this?

@aulemahal No, this is a bonus feature.

We can't add a coordinate with a new dimension (nbnd) to a DataArray. This would only work on a dataset. What do we do with this ?

See https://github.com/andersy005/xtimeutil

Closed with #1207


Link to workflow patterns in EDA

https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/event-driven

raised from personal account.

raised from personal account.

Could that be linked here as well?

@udidahan I've added links to the PR.


ath9k: broken in 5.4.47 and later, 5.7.4, 5.7.3, 5.6.19 and others

Ath9k is as of currently completely broken in linux (5.4.47 and later, 5.7.4, 5.7.3, 5.6.19 and others) . This is being reported and discussed upstream https://bugzilla.kernel.org/show_bug.cgi?id=208251<EMAIL_ADDRESS>I'm creating a bug report here just in case anyone else is puzzled by the sudden breakage, and so that we can keep an eye on it.

The revert landed in 5.4.52, it's solved on master now ^_^


[FN] Refactor- remove async from consensus rules

Having rules run in async has not benefit, especially that the db layer is not async anymore.
This is a PR to remove that asyncness from full and partial validation.

Won't this prevent us from doing parallel validation of (at least) partial validation?
This could be one way that our node becomes insanely fast.

Won't this prevent us from doing parallel validation of (at least) partial validation?
I don't think it changes much because we stull use AsyncQueue and call the CM asynchronously

  await item.PartialValidationCompletedAsyncCallback(result).ConfigureAwait(false);

However you raise in interesting point, our partial validator will processes items synchronously it seems to me because we await every item in the queue.

I just read the old code, where the async was in the loop... if it was supposed to be used in parallel that's not the way to do that
old code:
https://github.com/stratisproject/StratisBitcoinFullNode/blob/67a16d7e6e041ac00a886d868be269c0fd302011/src/Stratis.Bitcoin/Consensus/ConsensusRuleEngine.cs#L227-L250
foreach (AsyncConsensusRule rule in asyncRules)
         {
             using (this.performanceCounter.MeasureRuleExecutionTime(rule))
             {
                 await rule.RunAsync(ruleContext).ConfigureAwait(false);
             }
         }

the await in the loop is useless, because it just returns controll to the ExecuteRulesAsync caller
e.g. look some response in this post
https://stackoverflow.com/questions/19431494/how-to-use-await-in-a-loop

We don't want to make parallel the execution of rules themselves, but we do want to run two blocks in the validator in parallel, in case two chains are presented we processes both partial validation in parallel which is currently not the case blocks from both chain swill wait in the queue and be processed sequentially

On the sidechains rule: SideNode will need to ping MainNode to ask for collateral info.
My comment about parallel is wrong / irrelevant, we can parallel task all of the synchronous rules soon anyway.

@dangershony as discussed, can you please sync main and test net up to 100k blocks and check that all is OK?

@dangershony can you please fix the conflict?

Re-raised internally as a possible future refactoring task.


nested records not fetched

When a query includes nested records, pyorient does not include the nested records, but rather a link to the nested record (or tries to, in the case of temporary records, see #209). Orient Studio returns the nested records themselves. This is particularly an issue in the case of temporary records, as you can't simply select the temporary record in a separate query.
For example, with the query select 1, $t let $t=(select 1), the oRecordData of the first record is (with my monkey patch to fix temporary record links):

The result is the same with non-temporary records, example select 1, $t let $t=(select from some_table limit 1) fetchplan *:1:

While Studio includes the actual nested record data:

Raw response as shown in Studio:
{
    "result": [
        {
            "1": 1,
            "@type": "d",
            "@rid": "#-2:3",
            "@version": 0,
            "$t": [
                {
                    "1": 1,
                    "@type": "d",
                    "@rid": "#-2:1",
                    "@version": 0
                }
            ],
            "@fieldTypes": "$t=z"
        }
    ],
    "notification": "Query executed in 0.043 sec. Returned 1 record(s)"
}

Studio also properly includes the nested data automatically for temporary records (like (select 1)), and includes the nested data for a persisted record when using an appropriate fetchplan. (I won't show an example here as I can't share details of our data or structures).
My current workaround is to convert the result to JSON in my query (select @this.toJSON() as data from (...)), then parse the returned JSON in Python.

Hi,
Can you share some code snippets on how you are processing the (select @this.toJSON() as data from (...))?  I has a similar query but was getting a JSON serialisation issue?  Refer my issue 217 just posted?
Thanks

@kfloz
            process = respond

            if jsonify:
                def process(v):
                    return respond(loads(v.oRecordData['data']))
                query = 'SELECT @this.toJson() AS data FROM ({})'.format(query)

            result = self.client_command(query)
            response = [process(v) for v in result]

respond() is my helper for preparing a response for use in my application, self.client_command() is simply a reconnecting wrapper around OrientDB().command().
As noted in the responses to your issue #217, the result will still be an OrientDB record response with a single field - by default it will be named this, I just prefer to alias it as data.


finance.currencyCode tests

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (472520e) to head (5455d6d).

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files            8         8
  Lines           71        71
  Branches        14        14
=========================================
  Hits            71        71

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


ModuleNotFoundError: No module named 'etl'

I have installed the module 'etl' but I receive the following error when running command:
python3 etl2xml -i ../../wmi/Terminal-Services-Core.etl -o ../../wmi/Terminal-Services-Core.xml
Traceback (most recent call last):
  File "/Users/Ben/Desktop/elrond_dev/etl-parser/bin/etl2xml", line 9, in <module>
    from etl.error import GroupNotFound, VersionNotFound, EventTypeNotFound, EtwVersionNotFound, EventIdNotFound, \
ModuleNotFoundError: No module named 'etl.error'

Resolved with
python3 -m pip install etl-parser


Updated to UTF-8 as the default charset

Fixes #300

IMHO the fix needs to go the other way (specify ISO-8859-1 when there's no header) for spec conformance.
We really should have a test for this, one way or the other.

I'm going to leave this open, but not merge to save @elharo 's coment / review.  My thought was about limiting changes to existing behavior.

Closing as this is not the desired behavior.


Add Optional Done Parameter to Task Complete Message

Added the ability to specify done on a powershell job via the sdk, similar to how the node sdk works

Closing this as we may need to look into another approach


How to verify JWT in feathers issued by another feathers instance ?

Hello,
I've a little question,
I've setup an feathers instance to allow LDAP auth and return JWT if success.
And now i've setup another feathers instance (for a different service),
I wanted to protect routes of second instance with JWT of first instance.
But i don't know how to do it without building another auth service (so duplicated...).
Do you have some clue ?
Thank you

The simplest way would be to go ahead and register the auth plugin on the other server.  You can disable external access to the /authentication endpoint using a hook.  As long as you have the same secret and jwt config on both servers, you'll be able to use the feathers-authentication-jwt plugin and the authenticate('jwt') hook.

Okay thank you, what i need to write in hook to disable access ?

https://docs.feathersjs.com/api/hooks-common.html#disallow


the selection of random seed

May I ask if the results you reported in the paper are the results of running with a random seed of 2021? Did you run multiple random seeds to take the average?

As we stated in the paper, we adopt five random seeds.


We can't install Error

Fresh install of Windows, no office installed and when I run setup.exe /configure I get the following:
We can't install
The following product(s) can't be installed at the same time:
ProPlus2019Retail
Not having office installed already, not sure how to proceed from this.

Cannot even download the files 👍

@plecomp -- I'm checking with the product team to see if they know why you might be seeing this error. There are no other Office apps on the computer, such as Project or Visio?  Thanks.

@DHB-MSFT Nope. Fresh copy of windows, only office related thing on a fresh install is the get office app which I removed and also ran the office removal tool to see if that alleviated resolved the problem but same error each time unfortunately

@DHB-MSFT here is my xml: let me know if you see sth wrong, and I did put the whole name.

<Product ID="ProPlus2019Volume"

I ran from an admin command line: setup.exe /download config.xml

@Simoncusonnet Is that all that is inside your xml? If so, it is incomplete. There is an example over here: https://docs.microsoft.com/en-us/deployoffice/office2019/deploy
Though that does add a lot in that may not be necessary. Simplest xml file I have seen looks like this:
-

You can also use this tool to help create config files: https://officedev.github.io/Office-IT-Pro-Deployment-Scripts/XmlEditor.html
@DHB-MSFT - correct me if I am wrong here.

As you can see, my xml file i not that different than the exemple of MS on https://docs.microsoft.com/en-us/deployoffice/office2019/deploy#sample-configurationxml-file-to-use-with-the-office-deployment-tool
And Yes, I have office 2016 installed (word/excel/ppt/outlook) but I only want to download the installation files, so that I can put them on a server for company-wide distribution. The same way I did with the old version, and then I created the MSP
Why did MS change something that was working well with another stuff with problems ?

@Simoncusonnet -- I think there must be some hidden invalid character in your xml file because I can't open/view your xml in Edge, but all my xml files (including one I created that looked like yours and which did the download just fine) can be viewed in Edge.  And yes, you can just download the files with the Office Deployment Tool and put them on a share. But you'll need to then create xml files that the ODT can use to install from that network share. Hope that helps.

@plecomp -- The Product ID for Office Professional Plus 2019 (available through volume licensing) is ProPlus2019Volume.  Only volume licensed versions of Office 2019 are currently available.

Hello, thank you all, I finally found out what was wrong in the xml file, I missed one ">" at the end of the product line :-( ans there were also some extra spaces at the end of some lines, now I can open the files in edge ;-) I don't have the error message anymore, and I have a "Data" flder in my 2019 folder, but it's totally empty... I'll let it run a little, and we'll see if something in it ...

@DHB-MSFT Thank you for the info. What I was trying to achieve is installing office to our windows 10 images with the option to try, buy, or activate. Ready for its release. Is Is there a particular way this should be done? As previously I had run a batch file which flagged the first run status for office when the system was put into OOBE.

For troubleshooting questions, you might consider posting them to the Answers forum or the Tech Community. Probably more people are on those sites (than reading this article) and you might get a faster response/answer.

@plecomp -- There might be an OPK (OEM/Office Preinstallation Kit)  available on the Device Partner Center that might be able to help with your Try/Buy/Activate scenario.

So blooded helpful!!
Any ideas what the problem is?


fix load_layout_options

before they were being ignored

What's going on with pytest? O.o

it's only on windows


Matplotlib incompatibility when using virtualenv

RuntimeError when importing matplotlib.pyplot in a jupyter notebook from a virtual environment:
RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are Working with Matplotlib in a virtual enviroment see 'Working with Matplotlib in Virtual environments' in the Matplotlib FAQ
I have solved the problem using one of the solutions mentioned at: Matplotlib VirtualEnv FAQ and that is ok when using python from the command line or a script file, but not with the kernel used in jupyter.
So, the question is: how to create a jupyter kernel that uses a specific bash which properly setups python to use matplotlib within a virtual environment.
Another solution is:
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt

But maybe that is not the best thing to do. So, any suggestions?.
Operating System: OS X El capitan
Tensorflow version: 0.8.0

Just curious why you would post this question here?! This is clearly not an issue in tensorflow.

I'm closing this as it doesn't seem relevant to TensorFlow.

for those who find this with a google search - this is the mostly solution I found that worked at getting matplotlib errors to go away even with jupyter notebooks: http://blog.rousek.name/2015/11/29/adventure-with-matplotlib-virtualenv-and-macosx/
I hope this doesn't reopen the ticket.

For Mac OS X users who still get this issue, the simplest work around I found is to add this line:
backend: TkAgg
in ~/.matplotlib/matplotlibrc
https://stackoverflow.com/questions/34977388/matplotlib-runtimeerror-python-is-not-installed-as-a-framework


Page events request/response not fired for WebSocket connection

I am browsing the page https://www.bitcoin.de/de/btceur/market.
The page implements a WebSocket connection via wesocket.io. If I understand correctly wesocket.io supports both XHR-Polling and WebSockets.
I case WebSockets are used the page events request/response are not fired if any data is updated on the page. How can I listen to WebSocket updates?
  await page
    .goto("https://www.bitcoin.de/de/btceur/market", {
      waitUntil: ["networkidle2"]
    })
    .catch(() => {});

  page.on("request", async request => {
   });

Two ways.

You could tap into the raw protocol to detect that the websocket is created. That would involve writing some https://chromedevtools.github.io/devtools-protocol/tot/Network/#event-webSocketCreated
Easier would be to inject some JS code before page load what listens for message events.

I'd follow #2 for now.

@aslushnikov I would be very grateful if you would share how you solved this.


1.2.1 (closes #180, closes #183)

1.2.1

Coverage increased (+0.02%) to 97.59% when pulling 2d37d09e079d50c64c6a5bbdb72788365e1bf5fe on development into 291dbc2a20fd1512895d52ca26925e6420e3d4c9 on master.


mac shortcut keys

I would like to add mac shortcut keys..

Sure, I am assigning you this topic.

hi Aryan,
submitted my pullrequest.. please check. Thanks


SPT-798 Added CIMIT API Gateway Dashboard

Description:
Added a dashboard to Dynatrace to monitor the Contra Indicators API Gateway.
Ticket number:

SPT-798

Checklist:

[x] Is my change backwards compatible? Please include evidence - Adds a new dashboard to Dynatrace. If data does not exist the Dashboard will just show blank data.
[ ] I have tested this and added output to Jira Comment:
[ ] Documentation added (link) Comment:

Thanks @steve01beattie


How to get a bitmap by takePicture ?

I tried to get the bitmap in the following way, but there will be a crash error.
code
imageCapture?.takePicture(executor, object : ImageCapture.OnImageCapturedListener() {
    override fun onCaptureSuccess(image: ImageProxy?, rotationDegrees: Int) {
        super.onCaptureSuccess(image, rotationDegrees)
        imageProxyToBitmap(image!!.planes[0].buffer)
    }
})

crash error
java.lang.IllegalStateException: Image is already closed
        at android.media.Image.throwISEIfImageIsInvalid(Image.java:72)
        at android.media.ImageReader$SurfaceImage$SurfacePlane.getBuffer(ImageReader.java:965)
        at androidx.camera.core.AndroidImageProxy$PlaneProxy.getBuffer(AndroidImageProxy.java:141)
        at com.fimo.camera.page.camera.CameraFragment$takePhoto$1$onCaptureSuccess$1.run(CameraFragment.kt:335)
        at java.util.concurrent.ThreadPoolExecutor.processTask(ThreadPoolExecutor.java:1187)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:929)

implementation "androidx.camera:camera-core:1.0.0-alpha06"
implementation "androidx.camera:camera-camera2:1.0.0-alpha06"
implementation "androidx.camera:camera-view:1.0.0-alpha03"

waiting for your reply, thank you :)

Hi @lijialiang, this repo is used to report issues with the sample itself. Since your question is about how to use the library, I would recommend using one of the following resources:

StackOverflow (use tag android-camerax)
https://g.co/camerax/developers
https://issuetracker.google.com


Flickering when using as widget

I am trying to animate a graph using ipywidgets but the output is flickering.
Is there a native way to embed the widget in ipywidgets? I am trying to figure it out from the docs, but they seem to be incomplete. The CytoscapeWidget has a callback to widgets, perhaps you can send me in the right direction?
from ipycytoscape import CytoscapeWidget
import networkx as nx
class Visualizer:
    def __init__(self, graph):
        self.graph = graph
        self.widget= CytoscapeWidget()
        self.widget.graph.add_graph_from_networkx(graph)
        self.update_nodes()
        style = [
        dict(selector = 'node',
              css = {
                  "background-color": "data(color)",
                  "text-outline-width" : 10
                    }),
        dict(selector = ':selected',
            css = {"background-color" : 'red',
                   "line-color" : "black",
                   "source-arrow-color" : "yellow",
                   "target-arrow-color" : "purple"})]
        self.widget.set_style(style)
    def update_nodes(self, data = None):
        if data:
            for idx, c in enumerate(data):
                node = self.widget.graph.nodes[idx]
                node.data['color'] = c
        else:
            for node in self.widget.graph.nodes:
                if np.random.rand() < .5:
                    node.data['color'] = 'red'
                else:
                    node.data['color'] = 'blue'

g = nx.complete_graph(10)
v = Visualizer(g)
ts = iw.IntSlider(min = 0, max = 10, step = 1)
print(iw.widgets.interaction.__file__)
def callback(*args, **kwargs):
    kwargs.get('x')
    v.update_nodes()
display(v.widget)
plot = iw.interactive(callback, x = ts)
plot

Hey @cvanelteren thanks for the issue! :)
Will have a look at it soon.

hi thanks for the reply.
Just naively, I believe the issue is that the whole widget is being redrawn. Let me know if I can help!

Hey @cvanelteren so, I'm about to merge a PR that will fix your issue.
I tested the following code:
from ipycytoscape import CytoscapeWidget
import numpy as np
import networkx as nx
import ipywidgets as iw
class Visualizer:
    def __init__(self, graph):
        self.graph = graph
        self.widget= CytoscapeWidget()
        self.widget.graph.add_graph_from_networkx(graph)
        self.update_nodes()
        style = [
        dict(selector = 'node',
              css = {
                  "background-color": "data(color)",
                  "text-outline-width" : 10
                    }),
        dict(selector = ':selected',
            css = {"background-color" : 'red',
                   "line-color" : "black",
                   "source-arrow-color" : "yellow",
                   "target-arrow-color" : "purple"})]
        self.widget.set_style(style)
    def update_nodes(self, data = None):
        if data:
            for idx, c in enumerate(data):
                node = self.widget.graph.nodes[idx]
                node.data['color'] = c
        else:
            for node in self.widget.graph.nodes:
                if np.random.rand() < .5:
                    node.data['color'] = 'red'
                else:
                    node.data['color'] = 'blue'

g = nx.complete_graph(10)
v = Visualizer(g)
ts = iw.IntSlider(min = 0, max = 10, step = 1)
print(iw.widgets.interaction.__file__)
def callback(*args, **kwargs):
    kwargs.get('x')
    v.update_nodes()
display(v.widget)
plot = iw.interactive(callback, x = ts)
plot

But I think it will work with yours too. If you need, I can release a new version of ipycytoscape now, if you need, do you? I think this is a cool example to have in the docs of how to use ipycytoscape as a widget, please feel free to add it to the docs =)

Just naively, I believe the issue is that the whole widget is being redrawn. Let me know if I can help!

@cvanelteren you're spot on with the diagnosis. I think there are actually two redraws happening.

Becuase you use interactive ipywidgets will redraw the output

instead I would do: ts.observe(callback, names='value')

ipycytoscape was redrawing the graph every time

fixed by https://github.com/QuantStack/ipycytoscape/pull/109

Thanks for the fix. I pulled the repo, however no my widget stopped working altogether with:
Error displaying widget: model not found
The extension is enabled:
JupyterLab v2.2.6
Known labextensions:
   app dir: /home/casper/miniconda3/share/jupyter/lab
        @axlair/jupyterlab_vim v0.12.4  enabled  OK
        @jupyter-widgets/jupyterlab-manager v2.0.0  enabled  OK
        jupyter-cytoscape v1.0.4  enabled  OK
        jupyter-matplotlib v0.7.4  enabled  OK
        jupyterlab-dash v0.3.0  enabled  OK
        jupyterlab-plotly v4.11.0  enabled  OK
        plotlywidget v4.11.0  enabled  OK
        vispy v0.3.0  enabled  OK

@cvanelteren How'd you install the the pulled extension? You need to follow the full instructions here: https://ipycytoscape.readthedocs.io/en/latest/develop-install.html
pip install .
jupyter labextension install .

I installed initially using the extension manager. I tried reinstalling it using:

jupyter labextension uninstall jupyter-cytoscape
jupyter labextension install .
Produces error log with `Error: Cannot find module 'jupyter-cytoscape/package.json'. Through nbextension it install but error persists. Pretty odd.

Weird, what directory are you running those commands from?
Perhaps starting from scratch will help. (at worst make a new conda env) I would try the following:
pip uninstall ipycytoscape
jupyter labextension uninstall jupyter-cytoscape
git clone https://github.com/QuantStack/ipycytoscape.git
cd ipycytoscape
pip install .
jupyter labextension install .

I tried that too. Same error:
cat /tmp/jupyterlab-debug-gsea1xwh.log | egrep "Error" Error: Cannot find module 'jupyter-cytoscape/package.json'     raise RuntimeError(msg) RuntimeError: JupyterLab failed to build

Ok I torched my env and reinstalled it. All is good now. Update looks good! Also saves the layout thanks a bundle!

We have to add this to our test routine somehow...
Do you know more precisely when it happened @cvanelteren it'd help to track the problem.
Thanks for the update.

On this machine 3.0.0rc10 is running of jupyterlab, the ipycytoscape was installed using the latest master branch. Under jupyterlab, the update seems to be blitted but flicker (2x draw it seems) when a change is detected. In the example of above, if one were to keep the colors the same for every slider update, no flickering will occur.


HBASE-27557 [JDK17] Update shade plugin version

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 24s
Docker mode activated.

-0 :warning:
yetus
0m  2s
Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck

_ Prechecks _

_ master Compile Tests _

+0 :ok:
mvndep
0m 11s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
2m 18s
master passed

+1 :green_heart:
compile
0m 48s
master passed

+1 :green_heart:
shadedjars
3m 46s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 22s
master passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 14s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
2m  7s
the patch passed

+1 :green_heart:
compile
0m 48s
the patch passed

+1 :green_heart:
javac
0m 48s
the patch passed

+1 :green_heart:
shadedjars
3m 50s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 21s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
0m 30s
hbase-protocol-shaded in the patch passed.

+1 :green_heart:
unit
0m 46s
hbase-shaded in the patch passed.

17m 36s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/1/artifact/yetus-jdk8-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/4948

Optional Tests
javac javadoc unit shadedjars compile

uname
Linux 0dc0eb03a720 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 3f1087fe82

Default Java
Temurin-1.8.0_352-b08

Test Results
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/1/testReport/

Max. process+thread count
404 (vs. ulimit of 30000)

modules
C: hbase-protocol-shaded hbase-shaded U: .

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/1/console

versions
git=2.34.1 maven=3.8.6

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
0m 43s
Docker mode activated.

-0 :warning:
yetus
0m  3s
Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --whitespace-eol-ignore-list --whitespace-tabs-ignore-list --quick-hadoopcheck

_ Prechecks _

_ master Compile Tests _

+0 :ok:
mvndep
0m 19s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
2m 51s
master passed

+1 :green_heart:
compile
0m 51s
master passed

+1 :green_heart:
shadedjars
4m  8s
branch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 19s
master passed

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 12s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
2m 40s
the patch passed

+1 :green_heart:
compile
0m 52s
the patch passed

+1 :green_heart:
javac
0m 52s
the patch passed

+1 :green_heart:
shadedjars
4m  1s
patch has no errors when building our shaded downstream artifacts.

+1 :green_heart:
javadoc
0m 18s
the patch passed

_ Other Tests _

+1 :green_heart:
unit
0m 34s
hbase-protocol-shaded in the patch passed.

+1 :green_heart:
unit
0m 42s
hbase-shaded in the patch passed.

19m 46s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/1/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/4948

Optional Tests
javac javadoc unit shadedjars compile

uname
Linux 771b2d3057f7 5.4.0-1085-aws #92~18.04.1-Ubuntu SMP Wed Aug 31 17:21:08 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 3f1087fe82

Default Java
Eclipse Adoptium-11.0.17+8

Test Results
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/1/testReport/

Max. process+thread count
419 (vs. ulimit of 30000)

modules
C: hbase-protocol-shaded hbase-shaded U: .

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/1/console

versions
git=2.34.1 maven=3.8.6

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
1m 40s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

+0 :ok:
mvndep
0m 11s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
4m 10s
master passed

+1 :green_heart:
compile
1m 26s
master passed

+1 :green_heart:
spotless
0m 55s
branch has no errors when running spotless:check.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 15s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
4m 25s
the patch passed

+1 :green_heart:
compile
1m 25s
the patch passed

+1 :green_heart:
javac
1m 25s
the patch passed

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
xml
0m  4s
The patch has no ill-formed XML file.

+1 :green_heart:
hadoopcheck
13m 48s
Patch does not cause any errors with Hadoop 3.2.4 3.3.4.

+1 :green_heart:
spotless
1m  6s
patch has no errors when running spotless:check.

_ Other Tests _

+1 :green_heart:
asflicense
0m 21s
The patch does not generate ASF License warnings.

37m 56s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/1/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/4948

Optional Tests
dupname asflicense javac hadoopcheck spotless xml compile

uname
Linux 27c5e2ee7de5 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 3f1087fe82

Default Java
Eclipse Adoptium-11.0.17+8

Max. process+thread count
77 (vs. ulimit of 30000)

modules
C: hbase-protocol-shaded hbase-shaded U: .

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/1/console

versions
git=2.34.1 maven=3.8.6

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

+0 :ok:
reexec
1m 46s
Docker mode activated.

_ Prechecks _

+1 :green_heart:
dupname
0m  0s
No case conflicting files found.

+1 :green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

+0 :ok:
mvndep
0m 13s
Maven dependency ordering for branch

+1 :green_heart:
mvninstall
4m  6s
master passed

+1 :green_heart:
compile
1m 20s
master passed

+1 :green_heart:
spotless
0m 55s
branch has no errors when running spotless:check.

_ Patch Compile Tests _

+0 :ok:
mvndep
0m 13s
Maven dependency ordering for patch

+1 :green_heart:
mvninstall
3m 55s
the patch passed

+1 :green_heart:
compile
1m 35s
the patch passed

+1 :green_heart:
javac
1m 35s
the patch passed

+1 :green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

+1 :green_heart:
xml
0m  4s
The patch has no ill-formed XML file.

+1 :green_heart:
hadoopcheck
12m 59s
Patch does not cause any errors with Hadoop 3.2.4 3.3.4.

+1 :green_heart:
spotless
0m 53s
patch has no errors when running spotless:check.

_ Other Tests _

+1 :green_heart:
asflicense
0m 17s
The patch does not generate ASF License warnings.

36m 17s

Subsystem
Report/Notes

Docker
ClientAPI=1.41 ServerAPI=1.41 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/2/artifact/yetus-general-check/output/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/4948

Optional Tests
dupname asflicense javac hadoopcheck spotless xml compile

uname
Linux e1e38651d6c8 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
dev-support/hbase-personality.sh

git revision
master / 4add5250ed

Default Java
Eclipse Adoptium-11.0.17+8

Max. process+thread count
77 (vs. ulimit of 30000)

modules
C: hbase-protocol-shaded hbase-shaded U: .

Console output
https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-4948/2/console

versions
git=2.34.1 maven=3.8.6

Powered by
Apache Yetus 0.12.0 https://yetus.apache.org

This message was automatically generated.


Wrong links in FAQ

In the FAQ  https://creativecommons.org/faq/ , there's a list of links under "Can Creative Commons give legal advice about its licenses or other tools, or help with CC license enforcement?"  They don't link to the right places.
Marking practices for creators should link to https://wiki.creativecommons.org/wiki/Marking_your_work_with_a_CC_license
Marking practices for reusers should link to https://wiki.creativecommons.org/wiki/Best_practices_for_attribution
I'd fix it myself but I don't see that page being a wordpress page I can update.  (right?)
Thanks!
Mari

It's not WordPress, but a Markdown file on GitHub... https://github.com/creativecommons/faq/edit/master/faq-en.md
Line 112 is where you'd update it, if you're interested...
It won't appear on the site immediately, you'll need one of us to do that part.

Updated!

@mattl i don't think so. many of the other links are bad too. unless you didn't merge the pull request yet?
What is the proper markdown conventions to direct to the wiki page we want? For example, in faq-en.md, there's this: Marking practices for creators but that link isn't right. But we want it to go to wiki.creativecommons.org/wiki/Marking_your_work_with_a_CC_license, no?

Sorry, you'll need to look at the preview of the page on GitHub, it hasn't been pulled yet.
Yeah, it needs to be a full URL with a http:// or https:// prefix (http is fine, it'll redirect to HTTPS if/when we have that)

I just fixed mine.

Also, I bet there's lots of broken ones that were links to wiki pages and now need full urls.  I'm happy to sift through and fix these if that helps.

That would be useful. See some earlier chat in #creativecommons about this link https://creativecommons.org.au/learn-more/fact-sheets/which-creative-commons-licence-is-right-for-me-poster (which doesn't work) which is in the 'how should I decide which license to choose' section of the FAQ for example.

Sounds great

I've got myself organized for this, just need to trudge through and actually make the changes.  I reserve the right to do this on Monday when the US folks are off and there aren't as many interruptions.

Any update on this? I have to put up some new page for Jane today, so it would be good to do all this in one swoop.

Sorry about the delay, got swamped and pushed this down.  Will see how much more I can do in the next 40 minutes.

Not urgent :)

I got a little less than half way through (total).  You can send these changes now and I'll work on more next week?

Sounds good.

Finally, I finished this.  Just committed my changes.
Sorry for the delay, feel free to shame me.

awesome :) i'll push it to the site now

Looks good.
Pushed https://github.com/creativecommons/faq/commit/cfa300aeebf1a3c81a043011206d406c6b3ce884 to production.

In reality, you're my hero. Thanks!


:construction_worker: chore: Disable prerelease workflow

Description
Disable prerelease workflow as we are treating all 0.x versions of evmts as an alpha/beta
Testing
Explain the quality checks that have been done on the code changes
Additional Information

[ ] I read the contributing docs (if this is your first contribution)

Your ENS/address:

Current dependencies on/for this PR:

main

PR #256   👈

This comment was auto-generated by Graphite.


Updating compliance tests to use prune-unused OPA compiler flag

WIP: Need to figure out if use of this flag has negative impact on test coverage
Partially fixes #110
Signed-off-by: Johan Fylling<EMAIL_ADDRESS>

Huh, yeah definitely looks like something like that is going on. Would have expected ~70 tests to be added, but the diff is only +9 from before 🤔 We could of course just compile with the prune flag where the plan otherwise comes back as nil, or is there some smarter solution, you reckon?
main
Ran 1140 tests containing 1140 assertions.
0 failures, 0 errors.
test/compliance
Ran 1149 tests containing 1149 assertions.
3 failures, 2 errors.

Forgot to mention 😄 : the 62 missing tests are because of eval failures when running OPA to generate the baseline. Will look into those separately.

Ah, interesting! Do let me know what you find 🤓

Lots of failing tests to figure out 😅 .


Remove "Implementation" section from issue templates

Suggested Improvement

This is a follow-up to https://github.com/WordPress/openverse/issues/329 in our primary repo.
We have a few other issue templates, namely .github/ISSUE_TEMPLATE/infrastructure_improvement.md and .github/ISSUE_TEMPLATE/code_quality.md which also have "Implementation" sections which can be removed.

Would like to solve.


Trained weights for MNIST

Hi All!
I wonder how to acquire pretrained network or weights file to run the things solely to the inference?
Somehow we have faced some difficulties with training the net under tensorflow 1.12,
it said the graph could not be sorted in topological order and training seems to stall.
Thanks in advance.

I just met the same issue! Tensorflow threw ‘topological sort failed with message: The graph couldn't be sorted in topological order’. (CUDA: 9.0 TensorFlow: 1.12.0 Language: Python 3.6)
Thanks in advance.