change out election deadlines infobox

Found throughout the site, we need to get these updated to 2018 dates:

The _includes folder is where we'll want to put a new template for 2018 election dates. Here's the previous include to use as a template: _includes/2017-municipal-election.html

Added.


pandas DataFrame.to_parquet get killed while writing to hdfs3

My code like below

from hdfs3 import HDFileSystem

hdfs = HDFileSystem(host=HDFS_HOST, port=HDFS_PORT)
df = hdfs.read_stockquantitylogs(input_path)
df = process_df(df, process_stock_quantity_log, stack_hour=False)

output_path = input_path.replace('/arch', '/clean', 1)

hdfs.makedirs(dirname(output_path))
with hdfs.open(output_path, 'wb') as f:
    df.to_parquet(f)

I didn't use dask for now, it is pandas. Here df is [31909929 rows x 3 columns] , I fond if I write 1000, it works. But print Killed when write the whole df.

I change to put , still get killed.

I change to https://hdfscli.readthedocs.io/  , error gone. Though I have to save file in local then upload to hdfs.

It is hard to diagnose what "killed" might mean - presumably some buffer overrun in the C layer. It would be interesting to know the data size of the file you are trying to write.
You might want to try arrow's hdfs interface, which seems to be less error prone.

Can't hdfs3 catch such error ?

This message is not being created by hdfs3, but by the OS when the process does something illegal. It will be in the C layer, because python produces nicer messages, and so there is no opportunity for python to catch it. You could perhaps invoke gdb to find out what, but such investigations are very hard.


Default theme anormal in Next.js

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Steps to reproduce 🕹
Minimal reproducible project: https://github.com/hydroper/mui-theme-issue
Steps:

Create a Next.js application with npx create-next-app@latest, selecting the recommended choices
Install Material UI by running npm install @mui/material @emotion/react @emotion/styled
Place this at app/page.tsx:

'use client';

import { useState } from 'react';
import Image from 'next/image'
import { Box, Container, Card, CardHeader, CardContent, TextField, Typography, Button } from '@mui/material';
import { ThemeProvider, createTheme } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';

const darkTheme = createTheme({
  palette: {
    mode: 'dark',
  },
});

export default function Home() {
  const [auth, setAuth] = useState<void>(undefined);
  return (
    <ThemeProvider theme={darkTheme}>
      <CssBaseline/>
      <main className="flex flex-col items-center justify-center w-full h-full">
        <Container>
          <Box>
            {auth == null ? <SigIn setAuth={setAuth}/> : null}
          </Box>
        </Container>
      </main>
    </ThemeProvider>
  )
}

type SigInProps = {
  setAuth: (auth: void) => void,
};

function SigIn({setAuth}: SigInProps) {
  return (
    <Card>
      <CardHeader>
        <Typography variant="subtitle1">Subtitle</Typography>
      </CardHeader>
      <CardContent>
        <div className="flex flex-col gap-4">
          <TextField required id="username" label="Username"/>
          <TextField required id="password" type="password" label="Password" autoComplete="current-password"/>
          <Button variant="contained">Sig in</Button>
        </div>
      </CardContent>
    </Card>
  );
}

Run the application with npm run dev

Current behavior 😯

The content inside the button is black (its text).
The card header is not displayed.

Expected behavior 🤔
Normal styling for the default theme.
Context 🔦
A game
Your environment 🌎
Browser: Opera (Chromium)

npx @mui/envinfo
  System:
    OS: Windows 10 10.0.22621
  Binaries:
    Node: 18.16.1 - C:\Program Files\nodejs\node.EXE
    Yarn: Not Found
    npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: Not Found
    Edge: Spartan (44.22621.2134.0), Chromium (116.0.1938.76)
  npmPackages:
    @emotion/react: ^11.11.1 => 11.11.1
    @emotion/styled: ^11.11.0 => 11.11.0
    @mui/base:  5.0.0-beta.14
    @mui/core-downloads-tracker:  5.14.8
    @mui/material: ^5.14.8 => 5.14.8
    @mui/private-theming:  5.14.8
    @mui/styled-engine:  5.14.8
    @mui/system:  5.14.8
    @mui/types:  7.2.4
    @mui/utils:  5.14.8
    @types/react: 18.2.21 => 18.2.21
    react: 18.2.0 => 18.2.0
    react-dom: 18.2.0 => 18.2.0
    typescript: 5.2.2 => 5.2.2

Hi @hydroper, it looks like you need to set up a Theme Registry for Material UI to get it to cooperate with the Next.js App Router. Read the Material UI + App Router documentation to see how to do this. You can also check out this boilerplate example to see the setup in action.
I'm going to close this as we prefer not to use GH Issues for support, but if you're still having trouble getting this to work, please don't hesitate to ask on Stack Overflow (use the material-ui tag) and I'll be happy to work with you to resolve it.


Inline Datepicker with MatCalendar

For some case is it helpfully to have the datepicker as inline calendar.
But currently the datepicker is only available with on body tag, with a full page background layer for handle the close interaction.
Is it possible to inject the datepicker inline, or can this be a ne feature for the future?
One solution is to use the "mat-calendar" component, but its might be not official and a little bit hacky.
Like:
<mat-calendar #calendar [selected]="selDate" (selectedChange)="getChangedValue($event)"></mat-calendar>
But its need to add more code in the *.ts file to update the view correctly.
Like the changed value:
  getChangedValue(newDate) {     this.selDate =  newDate     this.calendar['_activeDate']  = newDate;     this.calendar['monthView'] = false; // this line updates the calendar view
Any solution to use the code easier or to implement at the current state an inline datepicker?
Best regards,
Stephan

any solution to this? I am also interested and I think it would be a very good option.

+1

+1

Please show your support by :+1: on the original comment rather than posting "+1" comments that spam people

Same issue here, and it seems that <mat-calendar> would perfectly fit our current needs, but sadly it's not exposed as part of the public API.
Any words on this from the maintainer team would be great, to know whether we can hope for this to surface in the public API someday or not? Seeing that this issue is more than a year old is not good news anyways 😞

@sinedied Actually you can use it normally. It seems that it was never properly documented though. Just tested here to be sure and, yeah, it works as long as you import MatDatepickerModule. See #8173 for a wee bit more info.

Using mat-calendar and it works perfect like so:
<mat-calendar (selectedChange)="calendarChange($event)">
</mat-calendar>

Should be documented, Hopefully these comments will bump this to light

MatCalendar is actually exposed through the API - just look at how to define a custom header for the date picker. The only thing is that it's not documented.

You can create your own header component by following the below example
https://stackblitz.com/angular/kkrdobyvqpo?file=src%2Fapp%2Fdatepicker-custom-header-example.ts.
And rather than passing the header component in "[calendarHeaderComponent]="exampleHeader"" use [headerComponent]="exampleHeader" for mat-calendar.

I have seen such a question in https://stackoverflow.com/questions/57433084/is-there-a-way-to-show-mat-calendar-with-multi-month-view-using-angular-material. About how to make a multi-month View with mat-calendar. From other Apis, there is always a mode called flat mode. Is there also such a thing in Mat-calendar? After reading the code i have found nothing.....


EntityFramework Core migrations not being ignored.

I am not sure what is going on but I am getting the following errors when building a dotnet core 2.0 app;

20171102121558_Initial.Designer.cs(17, 33): [CS1591] Missing XML comment for publicly visible type or member 'Initial.BuildTargetModel(ModelBuilder)'
20171102121558_Initial.cs(9, 26): [CS1591] Missing XML comment for publicly visible type or member 'Initial'
20171102121558_Initial.cs(11, 33): [CS1591] Missing XML comment for publicly visible type or member 'Initial.Up(MigrationBuilder)'
20171102121558_Initial.cs(236, 33): [CS1591] Missing XML comment for publicly visible type or member 'Initial.Down(MigrationBuilder)'

On all of these files has // <auto-generated /> on the first lines of the file put there by EntityFramework Core.
From what I understand the Analyzers should be ignoring these files? Am I missing something? I am using StyleCop.Analyzers 1.0.2. I have tried version 1.1.0-beta0004 as well with no success.

My stylecop.json looks like this;
{
  "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
  "settings": {
    "documentationRules": {
      "companyName": "Lombard Insurance Company",
      "copyrightText": "Copyright (c) {companyName}. All rights reserved. ",
      "xmlHeader": true,
      "fileNamingConvention": "metadata"
    },
    "namingRules": {
      "allowedHungarianPrefixes": [ "as", "do", "id", "if", "in", "is", "my", "no", "on", "to", "ui" ]
    }
  }
}

This is a duplicate of #1867. Specific guidance to address the situation can be found in https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1867#issuecomment-160696004. :smile:

Thanks. Sorted.


Vickel: Watch +18004168919

Vickel requests the watch of the watch_number +18004168919. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

Approved by Jeff Schaller in Charcoal HQ


[swiftlint] disable swiftlint rule type_body_length

Codecov Report

Merging #14 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #14   +/-   ##
=======================================
  Coverage   93.32%   93.32%
=======================================
  Files           4        4
  Lines         539      539
=======================================
  Hits          503      503
  Misses         36       36

Continue to review full report at Codecov.

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


Touch-friendly seekbars

I have two problems with the current seekbar:

The line is too thin. I often miss it.
Trying to use the seekbar results in me activating my gesture to switch apps. This is because of how low the seekbar is.

Suggestion:
Make the seekbar thicker. This will automatically raise it slightly and hopefully I do no longer accidentally trigger my gestures. It would also be more touch friendly. Finally, it fits m with the UI - it would look very nice and consistent with the buttons, which have a nice blur effect.
Current:

Suggestion:

Reference:
https://android-arsenal.com/details/1/6291#!description

The seekbar is responsive to touch not only on the thin blue line, but on the whole blurry area within the outline. The height of that area should be at least 48dp, just like the buttons. I'll double-check.
But with your screenshot (thanks for that), I realize that your seekbar is so low because you hide the optional information below. I will make sure there's a minimum padding between the bar and the screen bottom edge, raising it above your app switch gesture area.

I just checked and the height with information seems perfect. I suggest just removing the info without lowering the seekbar.


Plugin for NetBeans 8.1?

Hi guys, can you please upload this for NetBeans 8.1?

Please, upload this for NetBeans 8.1!!!

Sure, release will be available soon for 8.1

Please download the plugin http://plugins.netbeans.org/plugin/49666/js-css-minify-compress


Expiring unused sessions after 10 minutes on inactive

I am trying to find a way to expire unused sessions after 10 minutes of inactive usage. Any help would be appreciated.

2 options:

Use this module's expires option:

var store = new MongoDBStore({ expires: 25 });
app.use(session);

Create a TTL index in mongodb. This module doesn't have the ability to build a TTL index for you, so you'd have to do it yourself.

@vkarpov15 Using option (1)/(2) would expire all sessions after 25 seconds or the uninitialized ones?

All sessions. Sorry, didn't read carefully. No way to do that as far as I know. Easiest way would to use setinterval to delete unused sessions


Implement handler test cases

Implement handler test cases and update mocker configuration

Codecov Report
Attention: Patch coverage is 88.23529% with 2 lines in your changes missing coverage. Please review.

Project coverage is 53.83%. Comparing base (9bd5861) to head (975180b).

Files with missing lines
Patch %
Lines

pkg/core/composer/composer.go
87.50%
1 Missing and 1 partial :warning:

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #24      +/-   ##
==========================================
+ Coverage   48.94%   53.83%   +4.88%
==========================================
  Files          21       21
  Lines         521      522       +1
==========================================
+ Hits          255      281      +26
+ Misses        252      226      -26
- Partials       14       15       +1

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


Linux Build VS Quick Installation

 I don't know what is big difference between building on linux and quick installation when downloading carla.
I'm downloading carla because I have to test scenarios using Ros.
I found that I got too much errors when building on Carla.
Is there many system restriceted when using quick installation?

Yes, you can't modify the whole scene using Unreal Engine editor if you don't build from source.


#269 do not update if text did not change

I do not know why the "show help" tests are failing.
When I try "/sell help" it works OK.

I do not know why the "show help" tests are failing. When I try "/sell help" it works OK.

Probably the testing library is too limited for the all this new stuff, we can remove all updates, I will remove it on another commit


Encrypted storage

We can add [encrypt] operation for a resource of any kind.
Upon activation, the resource would be encrypted and moved into .ark/encrypted subfolder.
A password should be used for encryption and decryption, but it would be nice to use PIN-code for decryption (so we would store encryption keys and unlock them when PIN is valid). Fingerprint instead of PIN can be used as well (must be configurable).
The resource must be possible:

To share in encrypted form, e.g. send via a messenger.
To decrypt without the app.

To achieve these, some common algorithm and format must be used. See https://github.com/C2SP/C2SP/blob/main/age.md and https://github.com/str4d/rage.
Encryption would break last modified attribute, so first discovered or "our own" last modified should be used, see #141 for the inspiration. It would be nice to sort resources in the way like they are without encryption, just asking PIN code for displaying protected resources.

Encrypted resources should be labeled by special encrypted tag automatically.


stop and start hdfs-mesos and multiple hdfs-mesos frameworks

Hello,
I'd like to have some suggestions on how to achieve or getting close to the following:
1 - How do you completely stop and start the hdfs-mesos framework, maintaining a consistent HDFS cluster? (for example, using a scheduler that pins the namenodes and journal nodes to specific slaves ?)
I'm wondering what happens if the entire mesos cluster goes down (i.e. datacenter power failure) will I be able to recover the HDFS cluster?
2 - Is it possible to run multiple hdfs-mesos frameworks? (for example customizing data dirs locations, framework names, TCP ports of journalnodes, namenodes and datanodes etc. for each hdfs cluster)
Thank you!

Regarding backup and recovery, we do have this work on our roadmap. In addition, there is a distcp function that copies from an active HDFS cluster to another one.

Multitenancy is not yet possible, but it's something farther out on the roadmap. PR's are welcome.


fix: move emptiness tests to deprovisioning and deduplicate deletion logic

Issue #, if available:
Description of changes:

removes duplicated deprovisioning logic used for emptiness. node/emptiness.go and deprovisioning/controller.go were both executing deletion logic.
moves respective tests over

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

5 of 6 (83.33%)  changed or added relevant lines in 1 file are covered.
55 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.9%) to 73.527%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pkg/controllers/node/emptiness.go
5
6
83.33%

Files with Coverage Reduction
New Missed Lines
%

pkg/controllers/node/emptiness.go
5
85.37%

pkg/operator/operator.go
5
0%

pkg/operator/options/options.go
45
0%

Totals

Change from base Build<PHONE_NUMBER>:
-0.9%

Covered Lines:
4791

Relevant Lines:
6516

💛  - Coveralls


Add Support for Telegram Mini Apps

Breaking Changes
N/A
Changes

feat:
fix:
chore: Update labs

Associated Issues
closes #...

why was this closed?

really hoping for this to be opened again! would help a lot with development of web3 miniapps

This will be integrated in another PR. This might be the one https://github.com/WalletConnect/web3modal/pull/2352
ETA is 2 months approx. We need to do an important refactor. But will finally support TG bots and mini Apps 👍


Incremented version to 1.2.3.

Coming from https://github.com/opensearch-project/opensearch-build/issues/1365.

Codecov Report

Merging #229 (9578766) into 1.2 (d106d34) will increase coverage by 0.05%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                1.2     #229      +/-   ##
============================================
+ Coverage     75.07%   75.13%   +0.05%
- Complexity     1909     1912       +3
============================================
  Files           260      260
  Lines         11094    11094
  Branches       1746     1746
============================================
+ Hits           8329     8335       +6
+ Misses         1811     1810       -1
+ Partials        954      949       -5

Impacted Files
Coverage Δ

...ent/rollup/action/explain/ExplainRollupResponse.kt
75.00% <0.00%> (-10.00%)
:arrow_down:

...anagement/indexstatemanagement/model/Transition.kt
63.07% <0.00%> (-1.54%)
:arrow_down:

.../opensearch/indexmanagement/rollup/model/Rollup.kt
84.43% <0.00%> (+0.47%)
:arrow_up:

...nt/rollup/action/stop/TransportStopRollupAction.kt
70.73% <0.00%> (+1.21%)
:arrow_up:

...ensearch/indexmanagement/rollup/model/ISMRollup.kt
94.73% <0.00%> (+1.75%)
:arrow_up:

.../rollup/action/start/TransportStartRollupAction.kt
68.67% <0.00%> (+3.61%)
:arrow_up:

...arch/indexmanagement/rollup/RollupSearchService.kt
59.25% <0.00%> (+3.70%)
:arrow_up:

Continue to review full report at Codecov.

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

@peternied Yes, here is the issue for it https://github.com/opensearch-project/index-management/issues/123

@peternied Yes, here is the issue for it #123

Ironically issue 123 (1.2.3)

I don't see this release version updated in https://github.com/opensearch-project/index-management/releases


[Help] Individual Page Styling

Status
Almost done but could use more stying
Place where improvements needed

Image division
Styles for tags
etc


Able to go to login page even if the user is authenticated

Issue
When I login into the admin panel then i am able to go to login page again by hiting the url.
Expected Result
User should be redirect to dashboard page when he tries to hit login page.

Good find @whysoawesome0207. I'll get a fix out for this soon as possible.


Update ants.py to include newest version 2.2.0

Codecov Report

Merging #25 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #25   +/-   ##
=======================================
  Coverage   92.08%   92.08%
=======================================
  Files          23       23
  Lines         897      897
  Branches       66       66
=======================================
  Hits          826      826
  Misses         52       52
  Partials       19       19

Impacted Files
Coverage Δ

neurodocker/interfaces/ants.py
88.09% <ø> (ø)
:arrow_up:

Continue to review full report at Codecov.

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

Thanks @binarybottle
Addresses #22


x/net/http2: remove support for Go 1.8 and earlier

Our normal policy for x/* repos is to only support tip and the previous two Go releases.

Let's clean up some of all the +build conditional code in x/net/http2 and merge a bunch of the files back together.

Verify with grpc & App Engine, though, to make sure we don't break them.

@dfawley, what is your schedule or rationale for when and how you move grpc-go's minimum Go version? Looks like you still support Go 1.6 (as we kinda do, except for our tests started to accidentally require Go 1.7+?). But you're moving to Go 1.7? Would you be fine with Go 1.9, now that App Engine defaults to Go 1.9?

I would defer to the AppEngine team (cc @broady) on this one.  We were ready to drop support for 1.6 many, many months ago, but kept it in at their request.  My preference would be to only support the same versions that are supported by Go (so, 1.9 & 1.10 now), and require users to vendor/use vgo in order to keep using older Go versions.

21 more days...
https://groups.google.com/forum/#!topic/google-appengine-go/wHsYtxvEbXI

We’re writing to let you know that we are deprecating Go 1.8 support on App Engine, and new deployments using this language version will no longer be available on November 1, 2018.


cant work

Note: The tool won't work properly if you didn't give correct email information
GENERAL INFORMATION ABOUT NUMBER
[+]Country:Spain
[+]Time Zone:Atlantic/Canary
[+]Carrier:Vodafone
Traceback (most recent call last):
File "/home/sirhof2/Moriarty-Project/DeepInfo/risks.py", line 31, in spamcallsStart
user_reports=WebDriverWait(self.driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div[2]/div[1]/div/p[1]"))).text
File "/home/sirhof2/.local/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 90, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
#0 0x560ba5da3cd3
#1 0x560ba5bab968
#2 0x560ba5be2fd7
#3 0x560ba5be31a1
#4 0x560ba5c16154
#5 0x560ba5c00bdd
#6 0x560ba5c13ea8
#7 0x560ba5c00aa3
#8 0x560ba5bd63fa
#9 0x560ba5bd7555
#10 0x560ba5deb2bd
#11 0x560ba5def418
#12 0x560ba5dd536e
#13 0x560ba5df0078
#14 0x560ba5dc9bb0
#15 0x560ba5e0cd58
#16 0x560ba5e0ced8
#17 0x560ba5e26cfd
#18 0x7f5e63f6cd80
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sirhof2/Moriarty-Project/DeepInfo/risks.py", line 45, in spamcallsStart
spam_risk=WebDriverWait(self.driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div[2]/div[1]/div/div[2]/div[1]/div/div[1]/span[2]"))).text
File "/home/sirhof2/.local/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 90, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
#0 0x560ba5da3cd3
#1 0x560ba5bab968
#2 0x560ba5be2fd7
#3 0x560ba5be31a1
#4 0x560ba5c16154
#5 0x560ba5c00bdd
#6 0x560ba5c13ea8
#7 0x560ba5c00aa3
#8 0x560ba5bd63fa
#9 0x560ba5bd7555
#10 0x560ba5deb2bd
#11 0x560ba5def418
#12 0x560ba5dd536e
#13 0x560ba5df0078
#14 0x560ba5dc9bb0
#15 0x560ba5e0cd58
#16 0x560ba5e0ced8
#17 0x560ba5e26cfd
#18 0x7f5e63f6cd80
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sirhof2/Moriarty-Project/Moriarty.py", line 175, in
MP.run()
File "/home/sirhof2/Moriarty-Project/Moriarty.py", line 145, in run
self.spamcalls_()
File "/home/sirhof2/Moriarty-Project/Moriarty.py", line 122, in spamcalls_
spamcalls().spamcallsStart(self.phoneNumber)
File "/home/sirhof2/Moriarty-Project/DeepInfo/risks.py", line 57, in spamcallsStart
spam_risk=WebDriverWait(self.driver, 10).until(EC.element_to_be_clickable((By.XPATH, "/html/body/div[2]/div[1]/div/div[2]/div[1]/div/div[1]/h4"))).text
File "/home/sirhof2/.local/lib/python3.10/site-packages/selenium/webdriver/support/wait.py", line 90, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace:
#0 0x560ba5da3cd3
#1 0x560ba5bab968
#2 0x560ba5be2fd7
#3 0x560ba5be31a1
#4 0x560ba5c16154
#5 0x560ba5c00bdd
#6 0x560ba5c13ea8
#7 0x560ba5c00aa3
#8 0x560ba5bd63fa
#9 0x560ba5bd7555
#10 0x560ba5deb2bd
#11 0x560ba5def418
#12 0x560ba5dd536e
#13 0x560ba5df0078
#14 0x560ba5dc9bb0
#15 0x560ba5e0cd58
#16 0x560ba5e0ced8
#17 0x560ba5e26cfd
#18 0x7f5e63f6cd80

Hello, this is not the correct version. This tool has been updated. Please use the latest version


Chore: Move usdlib to pipeline

Changelog Description
Moved usdlib.py from ayon_core/lib/ to ayon_core/pipeline/.
Additional info
I'm not sure if the lib file is usefull in any way for AYON. It contains parse_avalon_uri which probably should not be available at all?
Reason to move is the file is dependent on ayon_core.pipeline, but ayon_core.lib should not import anything from there.
Testing notes:
Collectors CollectInstancesUsdLayered and CollectUsdBootstrap should work as they did.

So technically this file could move to ayon-usd if ALL usd related plug-ins for all hosts would end up relying on that AYON usd addon.
I'm currently using usdlib.py a lot, across Maya, Houdini and Blender. Basically it has the unified end point to asset/shot contributions publishing.
It could be that current state of usdlib in core is outdated but this PR https://github.com/ynput/OpenPype/pull/5925/files originally implemented a lot of what I'm using - and I have made more tweaks since.
Regarding parse_avalon_uri - I need something like that during publishing to investigate the contents of an AYON entity URI so I do need to access the functionality. Where it will reside I'm not sure - what's a good place? Separate it into a ayon_core.lib.ayon_uri?
Similarly I also have construct_ayon_uri from its components, currently on my end also in usdlib which should likely need to move somewhere else then as well.
What's a good location?

Reason to move is the file is dependent on ayon_core.pipeline, but ayon_core.lib should not import anything from there.

So, to fully understand:
Anything in .lib should never import from .pipeline? Good to know, thanks.
Note that ayon_core.lib.applications seems to also do so, so might need fixing as well? (Although those imports occur from within the functions)

In my version of openpype.lib.usdlib the imports are:
from openpype.client import (
    get_asset_by_name,
    get_subset_by_name,
    get_representation_by_name,
    get_hero_version_by_subset_id,
    get_version_by_name,
    get_last_version_by_subset_id
)
from openpype.pipeline import (
    get_representation_path
)

So only get_representation_path would be 'at fault' here?
The need for it has to do with querying the resulting path for an AYON URI (including paths for publishes that are not yet integrated yet, but by also allowing to query the current publishing context and its instances) so that during publishing you can get the destination filepath for an AYON URI after the publish completed. Like an "assumed destination".

I think that none of that would be working in AYON. Asset name is not unique and requires path. I think we have already determined the uri for our resolvers. But I'm not the person to answer.

In my version of openpype.lib.usdlib the imports are:

Anything in openpype.lib should not touch openpype.pipeline, including applications.py which will be converted to addon.

I think that none of that would be working in AYON. Asset name is not unique and requires path. I think we have already determined the uri for our resolvers. And I guess all of that should be in ayon-used, as you mentioned. But I'm not the person to answer @antirotor might know.

Asset name is not unique and requires path

That's totally fine - the AYON URI should still be correct and parseable, etc. I would just need to match with folderPath instead of asset. The logic transfers, it's just a different attribute.

I think we have already determined the uri for our resolvers.

I personally think we should not consider the AYON entity URIs to be USD-related only. They are just as usable and relevant outside of USD.

Anything in openpype.lib should not touch openpype.pipeline at all, including applications.py which will be converted to addon.

Fine with me. :) As long I can make it available. So each addon, like ayon_usd could expose such a pipeline module and would adhere to the same rules as lib versus pipeline here? Or?

Thanks for the quick reply!

I personally think we should not consider the AYON entity URIs to be USD-related only. They are just as usable and relevant outside of USD.

AYON entity uri is a full definition of a context, so you're right. But what is in usdlib.py is something that is USD related and I'm not the person to tell how much it will stay untouched as I know nothing about it at this moment. Also the uri will be connected to a schema, the schema will be related to it's usage, and ayon:// would be too generic.

Fine with me. :) As long I can make it available. So each addon, like ayon_usd could expose such a pipeline module and would adhere to the same rules as lib versus pipeline here? Or?

I don't think it is doesn't make sense to make such a rule, it always really matters on usage of the addon. Core has lib, settings, addon, host and pipeline. Whereas pipeline and host are directly connected to work with the pipeline part so might require some dependency import. And lib, settings and addon should be possible to import with only minimum requirements. And all of that should avoid circular import. But most of addons have usually much simpler structure. e.g. hosts have only addon.py and the pipeline part is, currently, in api folder. But the api subfolder is also not requirement anymore.

Do you mean it should be like ayon+entity://? I believe I heard somewhere from @mkolar that ayon:// would be, as default, resolve as ayon+entity://. Or did you mean something else?

So many questions I don't have answer to 😄


I cant find .losses code

When I checked code, I couldn't find  .losses.
Please let me know detail.
gaussian_diffusion.py line 8 :
from .losses import normal_kl, discretized_gaussian_log_likelihood ()

When I checked code, I couldn't find .losses. Please let me know detail. gaussian_diffusion.py line 8 : from .losses import normal_kl, discretized_gaussian_log_likelihood ()

https://github.com/XDUWQ/SketchKnitter/blob/main/sketch_diffusion/losses.py


bash: diesel: command not found

I've installed "diesel_cli" but when I'm calling "diesel setup" or  "diesel_cli", the exception is "bash: diesel: command not found" or "bash: diesel_cli: command not found". What's the matter? Wasn't it supposed to insert itself into the path?

How'd you install it? With cargo install? It writes the binary to a path
like .cargo/bin/. See cargo's docs for details.
yyolf117<EMAIL_ADDRESS>schrieb am Sa. 26. Aug. 2017 um 13:00:

I've installed "diesel_cli" but when I'm calling "diesel setup" or
"diesel_cli", the exception is "bash: diesel: command not found". What's
the matter? Wasn't it supposed to insert itself into the path?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/diesel-rs/diesel/issues/1131, or mute the thread
https://github.com/notifications/unsubscribe-auth/AABOXz8zPIZw3wTx-5ecQ-wIG2QzWAAWks5sb_rlgaJpZM4PDcl2
.

yes, with cargo install.

$ ls ~/.cargo/bin/
diesel

but
$ diesel
bash: diesel: command not found

So, I guess ~/.cargo/bin/ isn't in $PATH? It probably should be! ;)
You can also tell cargo install to install it somewhere else, like /usr/local/bin.
(I think rustup adds this but only for certain shells and system.)

ok, how about my last question?

I didn't see your edit or the question in the code block.

what if I gave it a different name? MY_DATABASE_URL

Then… you have an environment variable called MY_DATABASE_URL. But diesel_cli has no way of knowing that it exists or that it should even care about that. Thus, you'll need to pass it the --database-url argument with the (you guessed it) database url, or use the env variable name it expects.

thx.  but I can't use DATABASE_URL in each project I have because, of course, each connection string in each proejct is different.

That's what the .env file is for :) Have a look at the guide.

I didn't find anything related to "--database-url" being passed as an argument to diesel in the command line, where is it?

What do you mean? Have you read diesel --help? It's diesel --database-url="your url".
yyolf117<EMAIL_ADDRESS>schrieb am So. 27. Aug. 2017 um 05:21:

I didn't find anything related to "--database-url" being passed as an
argument to diesel in the command line, where is it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/diesel-rs/diesel/issues/1131#issuecomment-325174657,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABOX54OwdRwP11yTfefzFJcpdqxP8uxks5scODMgaJpZM4PDcl2
.

yeah, thanks.


sentinel will have own version; note that if redis and sentinel locat…

…ed at same host version will be taken from sentinel_version variable

:shipit:


Drastically expand bootcamp or provide user guide

I'm still frequently struggling to understand core concepts in openml.
I think we need to drastically expand the bootcamp or provide another language-agnostic user guide.
The REST API docs are probably the most complete, but they don't contain any semantics (and probably shouldn't).
For example if I want to know what the difference between data set qualities and data set features is, I wouldn't know where to look. And I'm not sure the docs have a complete list of either of them.
(The issue is inspired by me not being able to find any documentation of what a "version" of a data set is).

So are you ok with expanding the bootcamp? I might send a PR about that...

Yes, thank you!


Can't run 2.0 on PHP 7.4

First of all, I want to thank author for this great lib, you are truly awesome!
As I understood correctly, composer.json states that 2.0 supports PHP 7.4, but there are some features used in the code, that are available only on ^8.0.
For example https://github.com/westacks/telebot/blob/master/src/Helpers/Type.php#L67
PHP 7.4 shows this error "Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE)"
Thank you for your work!

Hello, yes, I kind of messed up support for older PHP versions when Travis CI was deleted, and I was lazy to run tests for older PHP manually. Also, the tests brake sometimes because Telegram stop accepting requests, as they are kind of bombarding their API with requests. I configured GitHub actions to run checks again in last update, and there are quite a work to do, and I slowly fixing it. The main focus for now is to make tests working again, so now I'm mostly trying to fix broken syntax and implement local testing system. Thanks for report!


feat/daemon spawn

Adds additional endpoints for starting new daemons.

[x]  API endpoints (may change)
[x]  subprocess exec for the "local" region, for testing functionality
[x] kubernetes client in progress

This PR has the best title I have seen

there's some dependency this adds that wants something not in the alpine docker build world.
maybe linux headers?
# github.com/zondax/hid
In file included from /go/pkg/mod/github.com/zondax/hid@v0.9.0/libusb/libusb/os/linux_usbfs.c:43,
                 from /go/pkg/mod/github.com/zondax/hid@v0.9.0/hid_enabled.go:26:
/go/pkg/mod/github.com/zondax/hid@v0.9.0/libusb/libusb/os/linux_usbfs.h:24:10: fatal error: linux/types.h: No such file or directory
   24 | #include <linux/types.h>
      |          ^~~~~~~~~~~~~~~


images: Align Repo to be consistent

Since we push to ghcr.io/alonakaplan with github actions,
align all instances in the code to use those registry / repository.
Once we move under kubevirt we will align accordingly.
Signed-off-by: Or Shoval<EMAIL_ADDRESS>

Since we push to ghcr.io/alonakaplan, align all instances in the code to use those or at least the repository name of the local ones. Registry can't be hardcoded because the port is determined each cluster-up.
Once we move under kubevirt we will align accordingly.
Signed-off-by: Or Shoval<EMAIL_ADDRESS>
The PR message is not clear.  Please explain you're aligning to the container registry used by the github actions when pushing a PR.
The reason why the local registry is not used can be omitted or rephrased.

Done + rebased


Check that sk_SSL_CIPHER_value returns non-NULL value.

Fixes openssl#19162.
I revisited the code and it looks that sk_SSL_CIPHER_value should not return NULL. But these checks with assert make it more obvious.
There are other places that iterate over all ciphers' indexes, but they are more internal, so probably no need to add these checks.

Checklist

[ ] documentation is added or updated
[ ] tests are added or updated

This pull request is ready to merge

Merged to master and 3.0 branches. Thank you.

Hmmm, it seems like 3.0 didn't fare entirely well with this change.  Currently seeing build errors for the 3.0 branch in https://ci.buildbot.openssl.org/#/builders

Fix in #19252


S3 akas column should not hardcode the partition to :aws:

Describe the bug
The akas column does not set the partition properly.
Steampipe version (steampipe -v)
N/A
Plugin version (steampipe plugin list)
Example: v0.12.0
Additional context
https://github.com/turbot/steampipe-plugin-aws/blob/main/aws/table_aws_s3_bucket.go#L575

There are also issues with hardcoding ARN formats in table_aws_iam_policy.go and table_aws_ec2_instance_type.go:
https://github.com/turbot/steampipe-plugin-aws/blob/main/aws/table_aws_iam_policy.go#L216
https://github.com/turbot/steampipe-plugin-aws/blob/main/aws/table_aws_ec2_instance_type.go#L289


add nodeSelector for apiserver

Why are these changes needed?
We utilize the combinations of tolerances and nodeSelector to manage which nodes the computing pods would be assigned to. And we also have the apiserver for access control, so it's important to support nodeSelector for apiserver. Could you kindly review and merge this PR? Thanks!
Related issue number
None
Checks

[x] I've made sure the tests are passing.
Testing Strategy

[x] Unit tests
[x] Manual tests
[ ] This PR is not tested :(

@kevin85421

cc @YQ-Wang @han-steve would you mind reviewing this PR? Thanks!

This seems like a duplicate of https://github.com/ray-project/kuberay/pull/2523


Add the ability to change screenshot key

Currently in Raylib, F12 is always set as the screenshot key, so there is no way that a developer can use the F12 key for a different action without taking a screenshot. This pull request introduces a SetScreenshotKey function, very much like SetExitKey, that allows a developer to change the key used to take a screenshot or even disable screenshotting. It is useful for when a developer wants to use a different method of screenshotting, take screenshots of a RenderTexture or put screenshots into a different directory. For developers using bindings, this is a good way to disable screenshotting without access to the SUPPORT_SCREEN_CAPTURE macro.

@BlueStaggo I have my doubts about this addition. Screenshot feature was added just for convenience for my students, it's not expected to be enabled in production code. Actually, TakeScreenshot() function is provided to allow users to call it when required.
Adding SetScreenshotKey() could be confusing for many users in the case the internal screenshot mechanism was disabled, it will suppose a useless function and also an extra variable unused in the code.
I'm afraid I'm not merging this PR.


Clean way to check if a release exists

The cmd code for helm's upgrade -i contains this rather ugly solution to check if a release exists.
I'm using helm.Interface in a go project and want to use upgrade -i. Unfortunately, this means repeating that same messy check in my code. Is there a way to make it cleaner?
A few ideas:

an UpdateOrInstall option I can pass to UpdateRelease
a ReleaseExists function in helm.Interface
Tiller itself implements upgrade -i, so the client code doesn't have to scan error strings

The preferred way of finding if a release exists is to do what we do in Helm upgrade: check whether there is any history for a release with the given name.
The interface is frozen until Helm 3, and we are trying to freeze the gRPC API for the rest of the Helm 2.x lifecycle too. So it's unlikely that we'll add this in the near future. But I'm marking this for discussion in the Helm 3 planning cycle.

The preferred way of finding if a release exists is to do what we do in Helm upgrade: check whether there is any history for a release with the given name

If there isn't history, you get an error and have to scrape the error string to determine whether there actually isn't a release or whether some other error occurred. The 'preferred' approach feels hacky to me.
Thanks for considering it for helm 3 though. Even if the hackiness needs to stay, it would be nice to at least wrap it in an Exists method so users don't have to copy-paste it to their code.

The preferred way of finding if a release exists is to do what we do in Helm upgrade: check whether there is any history for a release with the given name.

It just occurred to me ... would the following be a cleaner way that doesn't involve error string scraping? Or is there some limitation I'm not seeing?
releases, err := svc.helm.ListReleases(
	helm.ReleaseListFilter(name),
	helm.ReleaseListLimit(1),
	helm.ReleaseListNamespace(namespace),
	helm.ReleaseListStatuses([]release.Status_Code{
		release.Status_UNKNOWN,
		release.Status_DEPLOYED,
		release.Status_DELETED,
		release.Status_DELETING,
		release.Status_FAILED,
	}),
)
return releases.Count > 0, err

I just discovered the hard way that helm.ReleaseListFilter(name) matches any part of the name, so my suggestion above doesn't work. Back to scraping strings ...

Just as a reference to the future me:
helm upgrade --install
This will install or upgrade...
https://helm.sh/docs/helm/helm_upgrade/
-i, --install                      if a release by this name doesn't already exist, run an install

It seems you can use helm status RELEASE-NAME in an if condition

status=$(helm status RELEASE_NAME  2>&1) && [[ "$status" != "Error: release: not found" ]] is still the best way to go.  You should also trap for a non-zero exit code in case the helm command fails


LibreVR/Revive = SteamVR Unresponsive - SteamVR-OSVR-Win-Build-v0.1-170-g09dc772-core-v0.6-1194-g0c54f5e

Hey guys,
Unfortunately, even though the new driver now works with the latest version of Steam, when trying to use Revive, SteamVR is going unresponsive and the OSVR display turns half light blue and half dark blue.

Could you explain what you're trying to achieve? What game are you trying to play? Is it a SteamVR game? Which HMD are you trying to use?
Thanks!

Sorry I didn't get back to you sooner.
I was trying to get War Thunder to work via Revive. It now does after the most recent update from you guys.
Fantastic job.

Glad to hear it! Thanks for letting me know.


⚠ Processors has degraded performance

In 51d0591, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 77 ms

Resolved: Processors performance has improved in 4f8a196.


How to use distributed models

Liking Ormar so far - thanks for finally trying to bridge the Pydantic gap!
I had a question about how to get a production-like FastAPI design working with Ormar. If I have a file structure such as the following:
.
├── Dockerfile
├── REQUIREMENTS.txt
├── alembic
│   ├── README
│   ├── env.py
│   ├── script.py.mako
│   └── versions
├── alembic.ini
└── app
    ├── api
    │   ├── category.py
    │   ├── health.py
    │   └── item.py
    ├── config.py
    ├── db
    │   └── models
    │       ├── category.py
    │       └── item.py
    └── main.py

Where main.py looks something like:
def get_db_uri(user, passwd, host, port, db):
    return f"postgres://{user}:{passwd}@{host}:{port}/{db}"

app = FastAPI(
    title=settings.APP_NAME,
    version=settings.APP_VERSION,
    description=settings.APP_DESCRIPTION,
)

db_url = get_db_uri(
    user=settings.POSTGRES_USER,
    passwd=settings.POSTGRES_PASSWORD,
    host=settings.POSTGRES_HOST,
    port=settings.POSTGRES_PORT,
    db=settings.POSTGRES_DB
)

metadata = sqlalchemy.MetaData()
database = databases.Database(db_url)
app.state.database = database

@app.on_event("startup")
async def startup() -> None:
    database_ = app.state.database
    if not database_.is_connected:
        await database_.connect()

@app.on_event("shutdown")
async def shutdown() -> None:
    database_ = app.state.database
    if database_.is_connected:
        await database_.disconnect()

<SNIP: See https://fastapi.tiangolo.com/tutorial/bigger-applications/ for an example>

In app/db/models/category.py I might have:
from typing import Optional
from enum import Enum
import ormar

class Category(ormar.Model):
    class Meta:
        tablename = "categories"
        metadata = metadata
        database = database

    id: int = ormar.Integer(primary_key=True)
    name: str = ormar.String(max_length=100)

How can I get the references to metadata and database? Do I need to init them in every model?
Is the database reference how Alembic should be learning about the models? Think I'm a bit confused as to how best to lay out the application state and pass the right objects around.

In a case like this you should move database initialization to one of the submodules.
Otherwise you would run into circular imports.
So you project structure should look something like:
.
├── Dockerfile
├── REQUIREMENTS.txt
├── alembic
│   ├── README
│   ├── env.py
│   ├── script.py.mako
│   └── versions
├── alembic.ini
└── app
    ├── api
    │   ├── category.py
    │   ├── health.py
    │   └── item.py
    ├── config.py
    ├── **[OPTION1] dependencies.py** <- put here the db and other global dependencies later
    ├── db
    │   ├──**[OPTION2] database.py** <- put here just the db declaration, other dependencies go somewhere else
    │   └── models
    │       ├── category.py
    │       └── item.py
    └── main.py

In this newly created file you should have the actual declarations for metadata and database, so this part:
# import settings here
# import ModelMeta (not required but better code completion in IDE and type checking)
from ormar import ModelMeta

def get_db_uri(user, passwd, host, port, db):
    return f"postgres://{user}:{passwd}@{host}:{port}/{db}"

db_url = get_db_uri(
    user=settings.POSTGRES_USER,
    passwd=settings.POSTGRES_PASSWORD,
    host=settings.POSTGRES_HOST,
    port=settings.POSTGRES_PORT,
    db=settings.POSTGRES_DB
)

metadata = sqlalchemy.MetaData()
database = databases.Database(db_url)

# declare a BaseMeta that you can inherit in Models to not repeat the code
class BaseMeta(ModelMeta):
    database = database
    metadata = metadata

As of now you need to pass db and metadata to each model as ormar can support several databases (so you have some models in one mysql db, other part of the app uses different postgress db etc.).
But the best practice is to subclass the meta in models to comply with DRY (don't repeat yourself) principle.
That way in your models files you can:
from typing import Optional
from enum import Enum
import ormar
# adjust accordingly to your new db file location, you import the same meta in all model files
from app.db.database import BaseMeta

class Category(ormar.Model):
    class Meta(BaseMeta):
        # now you can skip db and meta as it's inherited
        # if you accept default tablename (which is Model.__name__.lower() + 's') by default
        # you can omit the tablename too and just put pass
        tablename = "categories"

    id: int = ormar.Integer(primary_key=True)
    name: str = ormar.String(max_length=100)

Note that you have to subclass (inherit from) the BaseMeta. You cannot just use it as ormar sets a lot of internal variables/data on the Model's Meta class and those would get overwritten by each model.
Always when you need to use some dependency accross the app do not keep it in the main file as you will run into circural import.
The same (but simplified) approach is in the tutorial i.e. https://fastapi.tiangolo.com/tutorial/sql-databases/ where the db goes into database.py file.
.
└── sql_app
    ├── __init__.py
    ├── crud.py
    ├── database.py **<= here**
    ├── main.py **<= not here**
    ├── models.py
    └── schemas.py

Since this file does not import anything from your app it won't fall into loop when file1 imports from file2 and file2 imports from file1. That way in the main.py (or anywhere you need it) you can import the database instance.
Note that if you save it at app.state you can access db from there, or you can access it from any ormar.Model like Model.Meta.database or model_instance.Meta.database -> but you should be forced to do this only if you want to run some manual sql query etc.
# adjust accordingly to your new db file location
from app.db.database import database

# rest is as it was
app.state.database = database

@app.on_event("startup")
async def startup() -> None:
    database_ = app.state.database
    if not database_.is_connected:
        await database_.connect()

@app.on_event("shutdown")
async def shutdown() -> None:
    database_ = app.state.database
    if database_.is_connected:
        await database_.disconnect()

In fastapi tutorials it's often in the same file as the app itself (i.e. main.py) as those are simple/toy examples and the whole application is this main file alone.
As for the alembic you need to import the same metadata that you use for creating your models.
So in above example it would be:
# adjust accordingly to your new db file location
from app.db.database import metadata

If you place you alembic outside your app you might need to adjust your sys.path during migration run.
You can find sample env file for alembic in ormar docs in https://collerek.github.io/ormar/models/migrations/
Let me know if that helps.
P.S. If you like ormar consider staring the repo in github and spreading the news about it. The more people we get to use it the sooner we can catch all potential bugs and it will be easier to find contributors.

In a case like this you should move database initialization to one of the submodules.
Otherwise you would run into circular imports.
So you project structure should look something like:
.
├── Dockerfile
├── REQUIREMENTS.txt
├── alembic
│   ├── README
│   ├── env.py
│   ├── script.py.mako
│   └── versions
├── alembic.ini
└── app
    ├── api
    │   ├── category.py
    │   ├── health.py
    │   └── item.py
    ├── config.py
    ├── **[OPTION1] dependencies.py** <- put here the db and other global dependencies later
    ├── db
    │   ├──**[OPTION2] database.py** <- put here just the db declaration, other dependencies go somewhere else
    │   └── models
    │       ├── category.py
    │       └── item.py
    └── main.py

In this newly created file you should have the actual declarations for metadata and database, so this part:
# import settings here
# import ModelMeta (not required but better code completion in IDE and type checking)
from ormar import ModelMeta

def get_db_uri(user, passwd, host, port, db):
    return f"postgres://{user}:{passwd}@{host}:{port}/{db}"

db_url = get_db_uri(
    user=settings.POSTGRES_USER,
    passwd=settings.POSTGRES_PASSWORD,
    host=settings.POSTGRES_HOST,
    port=settings.POSTGRES_PORT,
    db=settings.POSTGRES_DB
)

metadata = sqlalchemy.MetaData()
database = databases.Database(db_url)

# declare a BaseMeta that you can inherit in Models to not repeat the code
class BaseMeta(ModelMeta):
    database = database
    metadata = metadata

As of now you need to pass db and metadata to each model as ormar can support several databases (so you have some models in one mysql db, other part of the app uses different postgress db etc.).
But the best practice is to subclass the meta in models to comply with DRY (don't repeat yourself) principle.
That way in your models files you can:
from typing import Optional
from enum import Enum
import ormar
# adjust accordingly to your new db file location, you import the same meta in all model files
from app.db.database import BaseMeta

class Category(ormar.Model):
    class Meta(BaseMeta):
        # now you can skip db and meta as it's inherited
        # if you accept default tablename (which is Model.__name__.lower() + 's') by default
        # you can omit the tablename too and just put pass
        tablename = "categories"

    id: int = ormar.Integer(primary_key=True)
    name: str = ormar.String(max_length=100)

Note that you have to subclass (inherit from) the BaseMeta. You cannot just use it as ormar sets a lot of internal variables/data on the Model's Meta class and those would get overwritten by each model.
Always when you need to use some dependency accross the app do not keep it in the main file as you will run into circural import.
The same (but simplified) approach is in the tutorial i.e. https://fastapi.tiangolo.com/tutorial/sql-databases/ where the db goes into database.py file.
.
└── sql_app
    ├── __init__.py
    ├── crud.py
    ├── database.py **<= here**
    ├── main.py **<= not here**
    ├── models.py
    └── schemas.py

Since this file does not import anything from your app it won't fall into loop when file1 imports from file2 and file2 imports from file1. That way in the main.py (or anywhere you need it) you can import the database instance.
Note that if you save it at app.state you can access db from there, or you can access it from any ormar.Model like Model.Meta.database or model_instance.Meta.database -> but you should be forced to do this only if you want to run some manual sql query etc.
# adjust accordingly to your new db file location
from app.db.database import database

# rest is as it was
app.state.database = database

@app.on_event("startup")
async def startup() -> None:
    database_ = app.state.database
    if not database_.is_connected:
        await database_.connect()

@app.on_event("shutdown")
async def shutdown() -> None:
    database_ = app.state.database
    if database_.is_connected:
        await database_.disconnect()

In fastapi tutorials it's often in the same file as the app itself (i.e. main.py) as those are simple/toy examples and the whole application is this main file alone.
As for the alembic you need to import the same metadata that you use for creating your models.
So in above example it would be:
# adjust accordingly to your new db file location
from app.db.database import metadata

If you place you alembic outside your app you might need to adjust your sys.path during migration run.
You can find sample env file for alembic in ormar docs in https://collerek.github.io/ormar/models/migrations/
Let me know if that helps.
P.S. If you like ormar consider staring the repo in github and spreading the news about it. The more people we get to use it the sooner we can catch all potential bugs and it will be easier to find contributors.

The more people we get to use it the sooner we [...cut...]

Also we can potentially get more support from 3rd-party projects. For example FastAPI Users supports SQLAlchemy async backend, MongoDB async backend, Tortoise ORM backend but not ormar, etc.

The more people we get to use it the sooner we [...cut...]

Also we can potentially get more support from 3rd-party projects. For example FastAPI Users supports SQLAlchemy async backend, MongoDB async backend, Tortoise ORM backend but not ormar, etc.

@collerek Perfect. Thank you for the help (and elaborative answer), looking forward to using Ormar more!

@collerek Perfect. Thank you for the help (and elaborative answer), looking forward to using Ormar more!

@paolodina Yeah I have it in my pipeline to look what's going in the FastapiUsers repo and add support for ormar but for now I still concentrate on two issues I need for my own (#74 - done, waiting for release, and #78 - to be done) and some refactoring in documentation to flatten the learning curve and reorganize into sections for easier search/navigation.

@paolodina Yeah I have it in my pipeline to look what's going in the FastapiUsers repo and add support for ormar but for now I still concentrate on two issues I need for my own (#74 - done, waiting for release, and #78 - to be done) and some refactoring in documentation to flatten the learning curve and reorganize into sections for easier search/navigation.


Error BPE tokenizer: tokenize.lua:87: attempt to concatenate upvalue 'line'

Hi, I am trying to tokenize a file using existing bpe file, however, it produces the error:
th tools/tokenize.lua -bpe_model $bpemodel < $DATA/$inputfile > $DATA/$inputfile.tok
Feel free to advise me what to do. Thanks!
No BPE options read from model, falling back to cmd or default options
/install/bin/luajit: ../install/share/lua/5.1/threads/threads.lua:183: [thread 1 callback] tools/tokenize.lua:87: attempt to concatenate upvalue 'line' (a nil value)
stack traceback:
tools/tokenize.lua:87: in function <tools/tokenize.lua:64>
[C]: in function 'xpcall'
/install/share/lua/5.1/threads/threads.lua:234: in function 'callback'
/install/share/lua/5.1/threads/queue.lua:65: in function </install/share/lua/5.1/threads/queue.lua:41>
[C]: in function 'pcall'
//install/share/lua/5.1/threads/queue.lua:40: in function 'dojob'
[string "  local Queue = require 'threads.queue'..."]:13: in main chunk
stack traceback:
[C]: in function 'error'
/install/share/lua/5.1/threads/threads.lua:183: in function 'dojob'
/install/share/lua/5.1/threads/threads.lua:264: in function 'synchronize'
tools/tokenize.lua:101: in main chunk
[C]: in function 'dofile'
/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50

Hi,
There is a typo in the code reporting the error. Can you try changing line to aline in tools/tokenize.lua:87?

Hi,
Thanks! I changed line to aline, and the error message is the unicode error, and Lua does not have any support for unicode (other than accepting any byte value in strings).
But my file contains languages like Turkish, which has a lot of special symbols.
What would you recommend me to do if I would like to BPE it using an existing BPE file?
Thanks!

Maybe try this tokenizer https://github.com/OpenNMT/Tokenizer


The whole UI is punctured when each frame below it is fetched

The whole UI is punctured when each frame below it is fetched

sorry i am not sure to understand


After 'wsl --update' : Debian 11 is still installed but expecting Debian12

Windows Version
Server 2022 : Version 10.0.20348.2762
WSL Version
WSL version: <IP_ADDRESS>
Are you using WSL 1 or WSL 2?

[x] WSL 2
[ ] WSL 1

Kernel Version
No response
Distro Version
Debian 11/12
Other Software
After upgrading WSL it still installs Debian 11 but expecting Debian 12 like other systems.
Is there a cache somewhere that needs to be cleaned?
I've tried to --unregister and --install again.
Deleted everything in %LOCALAPPDATA% that I could find.
Repro Steps
wsl --update
wsl --unregister debian
wsl --install debian
wsl
cat /etc/os-release
VERSION_ID=11
Expected Behavior
wsl --update
wsl --unregister debian
wsl --install debian
wsl
cat /etc/os-release
VERSION_ID=12
Actual Behavior
VERSION_ID=11
Diagnostic Logs
Just a cache issue need to understand.

/question

@pquiring it's not enough to unregister the distor only. You need to delete the appx package also.

Ok, where is the appx package stored?

PowerShell : Remove-AppxPackage

I've figured out how to create images with docker.  Going to use that instead.
Thanks!


AWS distribution of Kubeflow v1.3

Feature list:

[x] Cognito Integration
[x] RDS integration for pipelines
[x] RDS integration for Katib
[x] S3 integration for pipelines
[x] DLC in Jupyter Notebooks
[x] Secrets manager integration for credentials
[x] EFS
[x] FSx
[x] e2e testing framework
[x] #92
[x] Documentation for telemetry component #114
[x] Documentation Updates to website (Currently in distributions/aws/examples)

Please see instructions on how to deploy: https://github.com/awslabs/kubeflow-manifests/tree/v1.3-branch/distributions/aws/examples

Release tag is created and website has been updated
https://github.com/awslabs/kubeflow-manifests/releases/tag/v1.3.1-aws-b1.0.0
http://localhost:1313/docs/distributions/aws/


rPackages: Support building in parallel, do so by default

Some rPackages (e.g. duckdb) take a very long time to build without any parallelization.
Description of changes

Things done
Successfully built rPackages.tidyverse and rPackages.duckdb (total of 119 R packages in dep graph).

Built on platform(s)

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

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

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

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

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

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

[x] Fits CONTRIBUTING.md.

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

@ofborg build rPackages.duckdb


Bug: When Install fresh codeigniter 4 Project I am getting "does not comply with psr-4 autoloading standard"

PHP Version
8.3
CodeIgniter4 Version
4.5.2
CodeIgniter4 Installation Method
Composer (using codeigniter4/appstarter)
Which operating systems have you tested for this bug?
Windows
Which server did you use?
fpm-fcgi
Database
No response
What happened?
When I Install Fresh Codeigniter 4 Project using "composer create-project codeigniter4/appstarter ." I am getting warning in console like PSR-4 Standards. Here is my composer installation log

Creating a "codeigniter4/appstarter" project at "./"
Installing codeigniter4/appstarter (v4.5.2)
  - Installing codeigniter4/appstarter (v4.5.2): Extracting archive
Created project in C:\Users\Admin\Herd\stf\.
Loading composer repositories with package information
Updating dependencies
Lock file operations: 33 installs, 0 updates, 0 removals
  - Locking codeigniter4/framework (v4.5.2)
  - Locking fakerphp/faker (v1.23.1)
  - Locking laminas/laminas-escaper (2.13.0)
  - Locking mikey179/vfsstream (v1.6.11)
  - Locking myclabs/deep-copy (1.12.0)
  - Locking nikic/php-parser (v5.0.2)
  - Locking phar-io/manifest (2.0.4)
  - Locking phar-io/version (3.2.1)
  - Locking phpunit/php-code-coverage (10.1.14)
  - Locking phpunit/php-file-iterator (4.1.0)
  - Locking phpunit/php-invoker (4.0.0)
  - Locking phpunit/php-text-template (3.0.1)
  - Locking phpunit/php-timer (6.0.0)
  - Locking phpunit/phpunit (10.5.24)
  - Locking psr/container (2.0.2)
  - Locking psr/log (3.0.0)
  - Locking sebastian/cli-parser (2.0.1)
  - Locking sebastian/code-unit (2.0.0)
  - Locking sebastian/code-unit-reverse-lookup (3.0.0)
  - Locking sebastian/comparator (5.0.1)
  - Locking sebastian/complexity (3.2.0)
  - Locking sebastian/diff (5.1.1)
  - Locking sebastian/environment (6.1.0)
  - Locking sebastian/exporter (5.1.2)
  - Locking sebastian/global-state (6.0.2)
  - Locking sebastian/lines-of-code (2.0.2)
  - Locking sebastian/object-enumerator (5.0.0)
  - Locking sebastian/object-reflector (3.0.0)
  - Locking sebastian/recursion-context (5.0.0)
  - Locking sebastian/type (4.0.0)
  - Locking sebastian/version (4.0.1)
  - Locking symfony/deprecation-contracts (v3.5.0)
  - Locking theseer/tokenizer (1.2.3)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 33 installs, 0 updates, 0 removals
  - Installing psr/log (3.0.0): Extracting archive
  - Installing laminas/laminas-escaper (2.13.0): Extracting archive
  - Installing codeigniter4/framework (v4.5.2): Extracting archive
  - Installing symfony/deprecation-contracts (v3.5.0): Extracting archive
  - Installing psr/container (2.0.2): Extracting archive
  - Installing fakerphp/faker (v1.23.1): Extracting archive
  - Installing mikey179/vfsstream (v1.6.11): Extracting archive
  - Installing sebastian/version (4.0.1): Extracting archive
  - Installing sebastian/type (4.0.0): Extracting archive
  - Installing sebastian/recursion-context (5.0.0): Extracting archive
  - Installing sebastian/object-reflector (3.0.0): Extracting archive
  - Installing sebastian/object-enumerator (5.0.0): Extracting archive
  - Installing sebastian/global-state (6.0.2): Extracting archive
  - Installing sebastian/exporter (5.1.2): Extracting archive
  - Installing sebastian/environment (6.1.0): Extracting archive
  - Installing sebastian/diff (5.1.1): Extracting archive
  - Installing sebastian/comparator (5.0.1): Extracting archive
  - Installing sebastian/code-unit (2.0.0): Extracting archive
  - Installing sebastian/cli-parser (2.0.1): Extracting archive
  - Installing phpunit/php-timer (6.0.0): Extracting archive
  - Installing phpunit/php-text-template (3.0.1): Extracting archive
  - Installing phpunit/php-invoker (4.0.0): Extracting archive
  - Installing phpunit/php-file-iterator (4.1.0): Extracting archive
  - Installing theseer/tokenizer (1.2.3): Extracting archive
  - Installing nikic/php-parser (v5.0.2): Extracting archive
  - Installing sebastian/lines-of-code (2.0.2): Extracting archive
  - Installing sebastian/complexity (3.2.0): Extracting archive
  - Installing sebastian/code-unit-reverse-lookup (3.0.0): Extracting archive
  - Installing phpunit/php-code-coverage (10.1.14): Extracting archive
  - Installing phar-io/version (3.2.1): Extracting archive
  - Installing phar-io/manifest (2.0.4): Extracting archive
  - Installing myclabs/deep-copy (1.12.0): Extracting archive
  - Installing phpunit/phpunit (10.5.24): Extracting archive
11 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating optimized autoload files
Class Config\App located in ./app/Config/App.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Autoload located in ./app/Config/Autoload.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Cache located in ./app/Config/Cache.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\ContentSecurityPolicy located in ./app/Config/ContentSecurityPolicy.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Cookie located in ./app/Config/Cookie.php does not comply with psr-4 autoloading standard (rule: App\ =>
./app). Skipping.
Class Config\Cors located in ./app/Config/Cors.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\CURLRequest located in ./app/Config/CURLRequest.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Database located in ./app/Config/Database.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\DocTypes located in ./app/Config/DocTypes.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Email located in ./app/Config/Email.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Encryption located in ./app/Config/Encryption.php does not comply with psr-4 autoloading standard (rule:
App\ => ./app). Skipping.
Class Config\Exceptions located in ./app/Config/Exceptions.php does not comply with psr-4 autoloading standard (rule:
App\ => ./app). Skipping.
Class Config\Feature located in ./app/Config/Feature.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Filters located in ./app/Config/Filters.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\ForeignCharacters located in ./app/Config/ForeignCharacters.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Format located in ./app/Config/Format.php does not comply with psr-4 autoloading standard (rule: App\ =>
./app). Skipping.
Class Config\Generators located in ./app/Config/Generators.php does not comply with psr-4 autoloading standard (rule:
App\ => ./app). Skipping.
Class Config\Honeypot located in ./app/Config/Honeypot.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Images located in ./app/Config/Images.php does not comply with psr-4 autoloading standard (rule: App\ =>
./app). Skipping.
Class Config\Kint located in ./app/Config/Kint.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Logger located in ./app/Config/Logger.php does not comply with psr-4 autoloading standard (rule: App\ =>
./app). Skipping.
Class Config\Migrations located in ./app/Config/Migrations.php does not comply with psr-4 autoloading standard (rule:
App\ => ./app). Skipping.
Class Config\Mimes located in ./app/Config/Mimes.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Modules located in ./app/Config/Modules.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Optimize located in ./app/Config/Optimize.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Pager located in ./app/Config/Pager.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Paths located in ./app/Config/Paths.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Publisher located in ./app/Config/Publisher.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Routing located in ./app/Config/Routing.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Security located in ./app/Config/Security.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Services located in ./app/Config/Services.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Session located in ./app/Config/Session.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\Toolbar located in ./app/Config/Toolbar.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
Class Config\UserAgents located in ./app/Config/UserAgents.php does not comply with psr-4 autoloading standard (rule:
App\ => ./app). Skipping.
Class Config\Validation located in ./app/Config/Validation.php does not comply with psr-4 autoloading standard (rule:
App\ => ./app). Skipping.
Class Config\View located in ./app/Config/View.php does not comply with psr-4 autoloading standard (rule: App\ => ./app). Skipping.
26 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found.

Steps to Reproduce
composer create-project codeigniter4/appstarter .
Expected Output
Without PSR-4 Warnings
Anything else?
No response

Duplicate of #8951


Ass2

submission of<PHONE_NUMBER>2 for ass2

You changed other's file, your PR will no be merged unless you fix it.


ebv schema changes

 4D-Dataset laden

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

28 of 49 (57.14%)  changed or added relevant lines in 2 files are covered.
31 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.009%) to 85.27%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

services/src/handlers/ebv.rs
5
8
62.5%

services/src/datasets/external/netcdfcf/mod.rs
23
41
56.1%

Files with Coverage Reduction
New Missed Lines
%

services/src/handlers/workflows.rs
4
92.24%

services/src/handlers/wcs.rs
9
73.46%

operators/src/util/raster_stream_to_geotiff.rs
18
92.76%

Totals

Change from base Build<PHONE_NUMBER>:
-0.009%

Covered Lines:
29309

Relevant Lines:
34372

💛  - Coveralls

bors merge

bors merge

bors merge


2 new tests failed if CPU backed is not included

https://github.com/NervanaSystems/ngraph/blob/cce0c2249ca40e22a96fe91e46de76fb8ec4e95c/test/backend_test.in.cpp#L4671
This issue added by PR #1079 where I added small comments.
It looks like
auto cpu_results = execute(cpu_f, args, "CPU");
should be changed to
auto cpu_results = execute(cpu_f, args, "${BACKEND_NAME}");
Overwise, tests max_pool_3d and avg_pool_3d will not work if CPU backend has not been selected at compile stage.

Fixed in PR #1245


chore: upgrade deps and refactor vite plugin

[x] Updated vite and @jspm/generator to the latest versions
[x] Added a new debug flag to show messages about installation and resolving and downloading of deps
[x] Since @jspm/generator now supports version pinning and change of dpes from prod to dev. Users can pass inputMap with a development import-map. But when vite buil is running, the mode is set to production and import-map is updated to production.
[x] downloadDeps still works the same way. Downloads dependencies from import-map and bundles them
[x] Properly resolves the inputMap that is passed to the plugin and download any additational deps that are missing from the import-map.
[x] Need to resolve all deps at runtime if no inputMap is passed.
[x] Support for generating import-map even if no inputMap is passed.

@guybedford you can review and merge it now. It started as a small bug fix. But turned out a full refactor, update deps, update generator and then added new tests 😄
Tests are so much reliable now. The projects are build and loaded in puppeter

Really great to see!


Duplicate SOURCE CONTROL PROVIDERS header

Issue Type: Bug
My user settings include "scm.alwaysShowProviders": true
Since https://github.com/microsoft/vscode/issues/61491#issuecomment-586945696 the welcome experience on SCM (new window, no file or folder open) is producing a doubled header:

Tested with extensions disabled.
VS Code version: Code - Insiders 1.43.0-insider (9c341b3d8f2f41277be6dd59e7f4e847e6b594ac, 2020-02-20T05:39:38.179Z)
OS version: Windows_NT x64 10.0.18363

cc @joaomoreno


Enable static views

Trying to set a static view seems to be an issue, as the code assumes it's a variable:
<mwl-calendar
  view="'month'">

It works for me, a guess would be that you're missing the current-day or events attributes which are always required for the calendar to work.

I'm sorry, I wasn't complete. You're correct: it's possible. You'll just get an exception on the drill down, which makes sense, though expected behaviour might be not to try to update the view variable at all.


[Bug]: Website crashed https://rspack.dev/zh/config/module

System Info
none
Details

Reproduce link
No response
Reproduce Steps
https://rspack.dev/zh/config/module
https://rspack.dev/config/module

Thank you for the feedback, I will fix it later.


Allow urls to media to be the urls directly to the source, instead of redirect from Raytha

Currently, when a file is uploaded, either via the Attachments field type, or if uploaded within a long text / wysiwyg field, the url that is generated is always something like /raytha/media-items/objectkey/abc.
The good

If storage moves to a new location, the urls will still work so long as the object keys remain the same.
In theory, can easily require users to be logged in / have some authorization by adding [Authorize] attribute on the controller, etc.

The bad

It adds request load on the server, for example, if you have a gallery list view with 25 images, that is 25 requests to the web server that need to be redirected (browser caching might reduce this but still).

Proposal:
We add an environment variable under storage that, if turned on, will output the URLs to directly to the source storage. It will default to off though.

Decided to change the implementation here, simplified it, but I'm quite happy with the decision for now. This is now a choice for outputting the URL to the file via liquid filter.

Added a new filter attachment_redirect_url liquid filter which outputs the URL of /raytha/media-items/objectkey/{{ Target.PublishedContent.attachment.Value }} which is the same behavior as the current existing filter raytha_attachment_url.

Added a new filter attachment_public_url which will output the direct url to the blob on the file storage provider. A requirement of this method is that your bucket or container needs to have anonymous public-read access on the objects because it will not generate a presigned url or SaS url.

raytha_attachment_url is now deprecated. Consumers should switch to attachment_redirect_url in their templates to preserve the same behavior. To be removed in v1.0.6.


Create a Veracruz homepage/blog

Create a dedicated Veracruz homepage, distinct from the README.markdown file in the repository, as a proper landing page for the Veracruz project.  A blog featuring the latest Veracruz news may also be a good idea, following feedback from @geky on how effective this was for mbed.

An initial homepage for the project has been created at https://veracruz-project.github.io


Support quantize weights/bias only

I add support quantizing weights only in the post training quantization when a user set bits_activations=32. It directly uses quantize-dequantize operations on weights and keep activations fp32 and no warp on layer. I use literally 32 instead of None because it would conflict with this snippet https://github.com/NervanaSystems/distiller/blob/master/distiller/quantization/quantizer.py#L277
So now, i can't think of a better way to denote thought it may looks weird.

Yeah, thanks for your good advice. But the conflict is still there.
https://github.com/NervanaSystems/distiller/blob/master/distiller/quantization/quantizer.py#L278
Sorry for not elaborating on this. Now I explain it why.
for name, module in container.named_children():, In this for loop, the first time coming into loop , container equals whole Model, and it would never match this if current_qbits.acts is None and current_qbits.wts is None: and so it can go on recursively. It is OK. But things change when you would like to set activation bits to None. It would match that sentence since this sentence https://github.com/NervanaSystems/distiller/blob/master/distiller/quantization/quantizer.py#L187 and then it early exits this loop just one time, which could not replace module.
Now, I could not think of a better way except change this logic.

Hi @hunterkun, sorry again for the delayed response.
You're right, we weren't correctly handling the case where the user doesn't want to quantize activations by default. I pushed a PR to fix that - #345. While it's being reviewed, can you try merging it to your code and continue from there? I think that with this fix my initial comments will be valid again.

Sorry for deleting the old repo by mistake since i'm not familiar with git operation. I have reopened new pr.


Set package.json license to valid SPDX string

Per https://spdx.org/licenses/

Coverage decreased (-0.02%) to 93.456% when pulling aa87e499402e7c4fb41e11db756fe5d6d3b0fb81 on pdehaan:patch-1 into c805ed8bfcd459b74bc222b9642198e338f63120 on Netflix:master.


Quick Compile & Debug Files to Compile At First Run

DEVELOPMENT ENVIRONMENT DETAILS
VSCode Version:  1.31.1 (User Setup)
Nextgenactionscript Version: 0.17.2
OS: Windows 10 Pro 64bit
Apache Royale Version: 0.9.4 (JS & SWF)
Hello again. I think this is a bug. As you (Josh) know I'm working with Apache Royale.
ISSUE DESCRIPTION
I have to hit CNTRL + ENTER or select  Command Palette > Actionscript: Quick & Compile TWICE in order to get it to compile and reflect changes in code or in project files.

EXPECTED OUTCOME
Hitting CNTRL + ENTER or selecting  Command Palette > Actionscript: Quick & Compile ONLY ONCE, will compile the project and then debug it and reflect the changes in the project.

I wonder if this is related to some caching that the Royale compiler started doing in 0.9.4. For performance reasons, it stores certains objects in a cache. That works fine when compiling from the command line, but if the compiler is reused beyond a single session, the cache can get stale. I found that this broke code intelligence in VSCode under some circumstances. When using Quick Compile & Debug, the compiler is reused if the configuration has not changed because it can improve subsequent compile times. Unfortunately, this may be another situation where the cache is causing old data to be used.
I don't think that I can fix Quick Compile & Debug until Royale 0.9.6 is released.
To get the equivalent behavior, you should define a preLaunchTask for your debug configuration. Then, just start the debugger normally instead of using Ctrl+Enter. I think the keyboard shortcut is F5, but I may be wrong.

Thank you. That makes sense.
WORKAROUND
Setting preLaunchTask in asconfig.json to "build", and in the task.json setting the label attribute to "build", works as a workaround, so hitting F5 will compile and debug. We can edit the keyboard shortcut of F5 to point to CTRL + ENTER if we wish.
FINAL WORDS
However, I'll wait for the next version of Royale to get this fixed, so I can debug with F5 (faster) and wen I make some changes, then i hit CTRL + ENTER to compile & debug (slower).
Thank you very much Josh! Blessings.  😄

UPDATE
It's happening now on an AIR Workspace, with the AIR <IP_ADDRESS> SDK.
I hit CTRL + ENTER, don't see my recent changes in the code. Hit it again, then it compiles the changes.

That's very strange! I've been using Quick Compile & Debug with all of my AIR projects since I first introduced this feature almost a year ago. I have never encountered this issue.

@angelhdz In the GIF, I notice that your Main.as file still displays the modified dot next to its name after the project starts compiling. You modified the text, but you seem to have forgotten to save the file.

It looks like VSCode automatically saves all files before running any task, so I guess it would make sense to do the same for Quick Compile & Debug too.

I don't know if I'm just assuming that Quick Compile & Debug of your extension will save the files automatically the same way I'm a used to in Flash Develop and the same way the Pyton extensions I use save all the files before interpreting/debugging, but, I never save the files.
First time I hit CTRL + ENTER, there's no update. Second time i hit CTRL + ENTER, then there is update. That means, the second time I call the command, it also saves the files.
Why not the first time as well?
I'm new to this extension so I'm just trying to understand how it works and it's limitations.
Thank you for having patience.
Best regards!

First time I hit CTRL + ENTER, there's no update. Second time i hit CTRL + ENTER, then there is update. That means, the second time I call the command, it also saves the files.

Not exactly. When I was watching the GIF, it looked to me like VSCode also automatically saves all files when the debugger starts. So, your file doesn't get saved before the first compile, but then VSCode saves it when the debugger starts the first time.

In the next update, Quick Compile & Debug will save all files automatically before running the compiler.

Now that makes sense. I am also new to VSCode so I'm slowly trying to understand how it works. It took me a while to understand the asconfig.json, tasks.json, launch.json, Run Build Task, etc.
So, the files don't get saved when compiling. They get saved when debugging (before or after).
So I wonder... is possible to modify the extension to make VSCode save the files when compiling so you can improve in a future release?
In the meantime, I will stick to the preLaunchTask workaround. It seems to do the job. I can do any modifications in any file, an when hitting CTRL + ENTER it will save the files, then compile, then debug.
Note: Ha ha ha, while I was writing this response, I noticed your reply about  Quick Compile & Debug will save the files when compiling. Great!
I will donate again when I get paid in my landscaping job. Also will donate to Carlos from Royale.
Thank you for everything!

I will donate again

Thank you, @angelhdz!


allow whitespace in expressions not wrapped in parenthesis

This change allows whitespace in complex expressions such as the following:
<assign name=lastName.toUpperCase() + ', ' + firstName.toLowerCase()/>

While I think in many cases (especially when involving multiple attributes), the code would be easier to read if the developer were to still wrap more complex expressions in parenthesis, it shouldn't be necessary in all cases, and the above example is very clear and arguably
more readable without the wrapping parenthesis.
Operators that begin with > would still need to be wrapped - in face they already need to be wrapped even if there is no whitespace:
<test x=(1>2)/>

This is accomplished by looking ahead for binary operators.  There is a side-effect of this change: anything that is listed in the operators.js, essentially becomes a reserved word and cannot be used as an attribute name.  For symbolic operators, an attribute cannot even start with the operator.  So, in the case of <test a=1 +1=true/>, the attribute name +1 is not valid (in this context).
I think this is a fair trade-off and likely wouldn't affect anyone, but let's open this up for discussion as it could potentially break existing code.  Is anyone using attributes that don't follow the rules for javascript variable names (aside from dashes in-between words)?  If so, why and what for?
With the way things currently stand with this pull request, <test +1=true/> is actually still valid, if we decide to go this route, we should probably enforce the attribute name rule explicitly for all cases, rather than them sometimes working (if they're the first attribute, or follow an attribute without a value, or follow an argument).

For me, I actually like the enforcement of non-whitespace for each attribute. To me it makes it easy to distinguish between each attribute of a tag. Otherwise, I feel like I'd get caught up in trying to look for the next attribute, and working my way backward to find the end.
So, to me this is more readable in the template:
<assign name=(lastName.toUpperCase() + ', ' + firstName.toLowerCase()) age-in-years=(daysOld / 365)/>

Thinking about this more, though, is the idea of having semicolons to end statements, just as is done in JavaScript to signify a completed statement. What about something like this?:
<assign name=lastName.toUpperCase() + ', ' + firstName.toLowerCase(); age-in-years=daysOld / 365;/>

TL;DR I think there needs to be some distinguishing characteristics of a completed statement.


FIX: Correct entity names in YAML files

This corrects a problem with the CI identified in #719. In #610 we switched to using the entity names, rather than keys, in the datatype YAML files, while in #714 we changed those names for a couple of entities. As such, the old names are referenced in the datatype YAML files, which causes a conflict with the rendering code.

Can I ask, why did you switch from keys to entity names? I am asking because for me the old way was much better, as I was reading the schema files to check bidskeys. Do you know, how can I now translate the entity names back to keys?

From what I can recall, the main reasons are (1) the schema files are tool-centric, so it made sense to use the tool-centric variable names, and (2) we wanted the more explanatory names, but couldn't figure out a good name for the field. Using those names as the keys meant we didn't have to come up with a term for them.
In terms of translating the names back to keys, in our current code we just reference the "entity" field as we search through available entities, rather than using the keys. It makes the code slightly more complicated, but I think it's still solid.

I am not sure I can fully follow what you are saying but what I meant is that I used the datatype files to check that e.g. the required inv key-value pair is missing in sub-001_flip-<index>_MP2RAGE.nii. Now I need to translate inversion back to inv before I can check whether it is present in the filename

Is there a mapping somewhere that maps entity names to keys? To me using the key names to define whether the key is required or not seems the most logical thing to do.

Besides, the you don't use the entity name. See e.g. this snippet where the old inv is used instead of the new inversion:
inversion:
  name: Inversion Time
  entity: inv
  description: |
    If files belonging to an entity-linked file collection are acquired at different
    inversion times, the `_inv-<index>` key/value pair MUST be used to distinguish
    individual files.
    This entity represents the `InversionTime` metadata field. Please note that the `<index>`
    denotes the number/index (in the form of a nonnegative integer), not the `InversionTime`
    value which needs to be stored in the field `InversionTime` of the separate JSON file.
  format: index

Ah wait, now I see that the entityname is used in the top level of the entities.yaml file, right? So that is my mapping?

Yes, so the entities.yaml contains entity definitions that are indexed by a concept name. The entity field in this definition corresponds to the entity in the filename. So if you load entities.yaml into a python dict, you would say:
entities["inversion"]["entity"] == "inv"

Thanks! Not really important, but wouldn't it then be better to use key instead of entity to avoid confusion about what an entity is? E.g. like this
inversion:
  name: Inversion Time
  key: inv
  description: |
    [..]


Fetch Directed Instruction Prefetching for gem5

This is the development repository for Fetch Directed Instruction Prefetching (FDP) in gem5 also known as decoupled front-end. FDP was originally published in MICRO'99.
Today, FDP is the standard front-end design for high performance server CPU's including CPU's from Intel, IBM, AMD, and ARM.
The implementation is based on an industrial report and aims to establish a state-of-the-art front-end design comparable to modern servers in gem5.
gem5 integration status
The following list tries to track integrating the changes from the development repo into the main gem5:
Pre-requirement patches to the BPU/gem5 to support decoupling:

[x] arch: Add instruction size and PC set methods (#357)
[x] sim: Probe listener template with lambda (#356)
[x] cpu: Restructure BTB (#412)
[x] cpu: Restructure RAS (#428)
[x] cpu: Refactor indirect predictor (#429)
[x] cpu: Branch Predictor Refactoring (#455)
[x] cpu: Require BTB hit (#493)
[ ] cpu: BPU support for decoupled front-end including taken-only history (#499)

Actual decoupling (Adds new stage to O3 core)

[ ] cpu: Implement fetch target queue
[ ] cpu: Implement decoupled front-end

Add fetch-directed prefetcher.

[ ] cpu: Implement fetch-directed prefetcher

This needs to be improved.

In case there are problems, or for suggestions on improvements, please let me know.
Finally, this could not have done without the help from others!
HUGE thanks to @rjc-arch and @andysan for performing extensive testing on all changes and code reviewing!!
And @viditchopra1500 for extensive debugging the code for Arm implementations.

What is the status of this issue/feature? I'm experiencing low IPC in front-end bound benchmarks, and I can only apply small patches to my simulated code (Like extreme loop unrolling) to avoid branches.

Hi all,
I'm very interested in the this work. Please keep me posted on this progress. I can help with some testing works.


Failed to execute 'getImageData' when images are served cross-origin

Hello, firstly, thank you for your work on this project! I found this project somewhat randomly, searching on Github, so please bear with me.
I'm running into an issue when I started serving my images through S3, that hopefully has an easy fix.
Uncaught (in promise) DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.
    at parseStereo (https://cdn.skypack.dev/-/stereo-img@v1.2.0-SvezlHHBimxuzf5wxiFG/dist=es2019,mode=imports/optimized/stereo-img.js:84:128)
    at async HTMLElement.parse (https://cdn.skypack.dev/-/stereo-img@v1.2.0-SvezlHHBimxuzf5wxiFG/dist=es2019,mode=imports/optimized/stereo-img.js:220:25)
    at async HTMLElement.parseImageAndInitialize3DScene (https://cdn.skypack.dev/-/stereo-img@v1.2.0-SvezlHHBimxuzf5wxiFG/dist=es2019,mode=imports/optimized/stereo-img.js:275:5)
    at async HTMLElement.init (https://cdn.skypack.dev/-/stereo-img@v1.2.0-SvezlHHBimxuzf5wxiFG/dist=es2019,mode=imports/optimized/stereo-img.js:292:5)

I poked around a little bit, and apparently you can set an option to allow anonymous cross-origin on the canvas image: https://stackoverflow.com/questions/22097747/how-to-fix-getimagedata-error-the-canvas-has-been-tainted-by-cross-origin-data
Setting the headers as outlined in the answer there is easy to do on my end.
Perhaps there are alternative solutions as well?
Thanks for taking a look.

Thanks for reporting. I hadn't try to load an image from a different domain. It's be great to support that since that something regular  support.
I will take a closer look, but it seems the server needs to allow CORS and the code might need to be updated with image.crossOrigin = 'anonymous';

I reverted th change hoping it would fix an issue I see https://github.com/steren/stereo-img/issues/15 but it hasn't.
I'll reopen and resubmit the change for  crossorigin once https://github.com/steren/stereo-img/issues/15


[Feature] check current environment, add shortcut to setup environment

Currently SLURM env defaults to spikewrap if no env option is given. However, this is a little obscure / weird. Throw a clear error if this conditional path is taken but spikewrap cannot be found. Also, add a convenience function to manage conda environments (also, SLURM would be nice).

This should be done in command line

Need to a) check conda environment is called "spikewrap", if not the slurm argument must be used.


Do FrameShift (or StopGain) mutations affect splicing?

Naively, a frameshift can be fully translated into an amino acid sequence using the original exon boundaries of a transcript. However, since an early stop codon may trigger alternative splicing (http://www.sciencedirect.com/science/article/pii/S0968000408001436) we might not be able to rely on the given exon boundaries. Similar problem for StopGain mutations (but without the extra complexity of producing a novel amino acid sequence from a shifted ORF).

From a few literature searches I've gotten the impression that is is too rare to handle from within Varcode.


Bitstream Tools: Add UltraScalePlus support

This PR adds initial support for the UltraScale+ devices to the bitstream tools.
The bitstream used for testing the tools was for Zynq UltraScale+ XCZU7EV-2FFVC1156 MPSoC which is featured on the ZCU104 evaluation kit (https://www.xilinx.com/products/boards-and-kits/zcu104.html).
The bitstream generated by the patcher and frames2bit tools were both successfully tested on hardware.

@mithro
Definitely, I consider this change as a "cherry on top" type of commit, but will definitely create a PR with it once we merge all other PRs with adding new architectures to the bitstream tools.


test Linux ProjFS non-null availability in callbacks and placeholder update methods

Commit 2f1fe70 introduced a NullReferenceException when using MirrorProvider, because the MirrorProvider.FileSystemVirtualizer.TryStartVirtualizationInstance() method only sets its Enlistment variable after the platform-specific StartVirtualizationInstance() method returns, we as we wait for the FUSE mount to succeed in the Linux StartVirtualizationInstance() method, another process may pre-emptively attempt to hydrate the top-level directory, leading to an OnEnumerateDirectory() callback which fails when it tries to access the Enlistment variable in
MirrorProvider.FileSystemVirtualizer.GetFullPathInMirror():
Mounting /home/chrisd/TestRoot
OnEnumerateDirectory(0, '.', 2336, /usr/libexec/gvfs-udisks2-volume-monitor)

Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at MirrorProvider.FileSystemVirtualizer.GetFullPathInMirror(String relativePath) in .../VFSForGit/MirrorProvider/MirrorProvider/FileSystemVirtualizer.cs:line 26
   at MirrorProvider.FileSystemVirtualizer.DirectoryExists(String relativePath) in .../VFSForGit/MirrorProvider/MirrorProvider/FileSystemVirtualizer.cs:line 31
   at MirrorProvider.Linux.LinuxFileSystemVirtualizer.OnEnumerateDirectory(UInt64 commandId, String relativePath, Int32 triggeringProcessId, String triggeringProcessName) in .../VFSForGit/MirrorProvider/MirrorProvider.Linux/LinuxFileSystemVirtualizer.cs:line 66
   at PrjFSLib.Linux.VirtualizationInstance.HandleProjEvent(Event& ev) in .../VFSForGit/ProjFS.Linux/PrjFSLib.Linux.Managed/VirtualizationInstance.cs:line 400
./MirrorProvider_Mount.sh: line 13: 12765 Aborted                 dotnet $BUILDDIR/MirrorProvider.Linux.dll mount "$TEST_ROOT"

This PR therefore tries the alternative approach we discussed in #24, namely, checking for a null value of this.projfs in HandleProjEvent() in particular, and returning ENODEV in that case.  The other code changes are entirely defensive programming, and are not expected to actually be triggered under any circumstances, with the possible exception of the check in HandleNonProjEvent(), which does not use this.projfs but which could be asked to deliver an event to the provider before we have returned from StartVirtualizationInstance().

Rebased!

(Please feel free to merge if you're OK with this 👍)

Thanks!  :+1:  Will merge shortly, and probably also squash everything down to a single commit (for the sake of those reviewing microsoft/VFSForGit#1125).