External Intake database prework

Describe the task
Database work to support the external intake process.
Since the requirements for external intake are still being discovered, and the feature will be hidden behind a Growthbook flag for the foreseeable future, we would like to keep our DB work out of the sqitch.plan to avoid some sqitch immutability headaches. For now, we will do our application specific db work in schema/dev.

[ ] application table:

id pk not null
funding_stream_rfp_id int
legal_name varchar(1000)
facility_name varchar(1000)
project_name varchar(1000)
upsert the timestamp columns (select cif_private.upsert_timestamp_columns('cif', 'application');

[ ] application_attachment table:
id integer primary key generated always as identity,

id pk not null
file uuid,
description varchar(10000),
file_name varchar(1000),
file_type varchar(100),
file_size varchar(100),
application_id integer not null references cif.attachment(id),
uploaded_at timeztamptz, (with a trigger to set to now() on create)

Design in dev/design sync: applications will go into the project table

@pbastia @LindsayMacfarlane I am closing this ticket because we have decided not to use an 'application' table


feat: FIFA 21 update

I’ll review this evening (as long as I have access to the web app with my account). Thanks!

Hi @Mardaneus86, I have changed the files as you pointed out

LGTM! Thanks for your work @eimarfandino


use Gradle Daemon

Gradle daemon. The Daemon is a long-lived process that help to avoid the cost of JVM startup for every build. Since Gradle 3.0, Gradle daemon is enabled by default. For an older version, you should enable it by setting org.gradle.daemon=true.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Removing defunct properties, small item fixes.

Check each commit for details on what was changed.

thank you! saves me a ton of work.


Fix YoloV3/YoloV4 demos

Changed the openvino version to 2021.1. Showcased how to use the blob in gen2 (by modifying 22_1_tiny_yolo_v3 demo/22_2_tiny_yolo_v4).

Note: when we merge develop->main on depthai-python, we will break a link to the docs inside the notebook (currently the link is 22_tiny_yolo_v3, will be 22_1_tiny_yolo_v3)

Are we good to merge this @Erol444 ?  Was just about to link to it in an email asking about training.

@Luxonis-Brandon: @cafemoloko will re-check everything and we can merge it if everything is ok

I've commented this notebook: Easy_TinyYOLOv3_Object_Detector_Training_on_Custom_Data.ipynb


Install fails at opencollective module

Node: 8.10.0
NPM: 5.6.0
OS: RedHat 6.9 (Shared hosting)
Local Node Env:  NVM and Nodenv both produce the same result
Issue: When attempting to install Nuxt (either manually or using the vue-cli community starter template), the process fails at the opencollective module.
npm ERR! path /home/userx/nuxt/node_modules/opencollective/dist/bin/opencollective.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod '/home/userx/nuxt/node_modules/opencollective/dist/bin/opencollective.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

Any thoughts on what might be the hangup?
Thanks in advance for any help.

That is probably some network issue. But why would Nuxt need to install OpenCollective module?

Node: 8.9.1
NPM: 5.5.1
OS: ubuntu in a docker
Same issue. nuxt version ^1.4.0. Blew away my node_modules so now…I have a problem, since npm i can't finish.

@irrg As a workaround since I couldn't resolve the issue directly with the OpenCollective module, I installed Nuxt from a local version that excludes the OpenCollective dependency:

Cloned the Nuxt repo locally
Removed all references to OpenCollective in the repo's package.json (/path/to/local/nuxt/package.json)
Updated my project's package.json to install from the local Nuxt repo, and then ran npm install as normal (note that I believe you'll need NPM 2.0.0 or higher to use the file: option)

My project's updated Nuxt dependency in package.json
{
  "dependencies": {
    "nuxt": "file:/path/to/local/nuxt",
  },
}

For what it's worth, while troubleshooting the issue, I tried installing the OpenCollective module in a standalone test project and ran into the same error as originally reported (which I sort of expected) so the issue is not specific to Nuxt.
Best of luck!

@cscomfort Forking is an option. file: path is not really an option if you're building docker instances and such but I'll give it a go.

This should solve a lot of issues:
https://github.com/opencollective/opencollective-cli/issues/3#issuecomment-378039208
I'm trying it out on my 1.4.0 fork…

@M3kH Yeah, my PRs (#3178 and #3179) got stuck, and I'm not totally sure why. I literally pulled tags/v1.4.0 and dev and updated the package being used, then committed and created PRs. No one has commented on them. I don't have the time right now to look at the CI errors, but they can't really relate much to the two lines of code I changed.

@irrg Although clean your node_modules and recreate your package-lock.json solve this issue.


Unavailable entity

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
After click  I get error message

Steps To Reproduce
No response
Expected behaviour
To display  sensor.house_consumption
Card Version
3.12
Home Assistant Version
2023.11
Configuration
type: custom:sunsynk-power-flow-card
cardstyle: lite
panel_mode: false
large_font: true
title: Aktuální výroba - spotřeba
title_colour: grey
title_size: 24px
show_solar: true
show_battery: true
inverter:
  modern: true
  colour: grey
  autarky: energy
  three_phase: true
  model: goodwe_gridmode
battery:
  energy: 10650
  shutdown_soc: 20
  invert_power: false
  colour: var(--energy-battery-in-color)
  show_daily: true
  max_power: 5400
  full_capacity: 100
  empty_capacity: 20
  show_absolute: false
  auto_scale: true
solar:
  show_daily: true
  display_mode: 2
  mppts: 2
  animation_speed: 9
  max_power: 5400
  pv1_name: VÝCHOD
  pv2_name: ZÁPAD
load:
  show_daily: true
grid:
  show_daily_buy: true
  show_daily_sell: true
  show_nonessential: true
  nonessential_name: Doma
  invert_grid: false
  export_colour: green
entities:
  use_timer_248: 'no'
  priority_load_243: 'no'
  load_frequency_192: sensor.meter_frequency
  inverter_voltage_154: sensor.on_grid_l1_voltage
  inverter_voltage_L2: sensor.on_grid_l2_voltage
  inverter_voltage_L3: sensor.on_grid_l3_voltage
  inverter_current_164: sensor.on_grid_l1_current
  inverter_current_L2: sensor.on_grid_l2_current
  inverter_current_L3: sensor.on_grid_l3_current
  inverter_power_175: zero
  grid_connected_status_194: sensor.grid_mode_code
  day_battery_charge_70: sensor.today_battery_charge
  day_battery_discharge_71: sensor.today_battery_discharge
  battery_voltage_183: sensor.battery_voltage
  battery_soc_184: sensor.battery_state_of_charge
  battery_power_190: sensor.battery_power
  battery_current_191: sensor.battery_current
  grid_power_169: sensor.house_consumption
  day_grid_import_76: sensor.energy_buy_daily
  day_grid_export_77: sensor.energy_sell_daily
  grid_ct_power_172: sensor.active_power_l1
  grid_ct_power_L2: sensor.active_power_l2
  grid_ct_power_L3: sensor.active_power_l3
  day_load_energy_84: sensor.today_load
  essential_power: none
  nonessential_power: none
  aux_power_166: null
  day_pv_energy_108: sensor.today_s_pv_generation
  pv1_power_186: sensor.pv2_power
  pv2_power_187: sensor.pv1_power
  pv1_voltage_109: sensor.pv2_voltage
  pv1_current_110: sensor.pv2_current
  pv2_voltage_111: sensor.pv1_voltage
  pv2_current_112: sensor.pv1_current
  battery_temp_182: sensor.battery_temperature
  radiator_temp_91: sensor.inverter_temperature_radiator
  dc_transformer_temp_90: sensor.inverter_temperature_air
  energy_cost_buy: sensor.current_spot_electricity_price
  energy_cost_sell: sensor.current_spot_electricity_price
  pv_total: sensor.pv_power
  inverter_status_59: sensor.on_grid_mode_code
  remaining_solar: sensor.energy_production_today_total
  load_power_L1: sensor.load_l1
  load_power_L2: sensor.load_l2
  load_power_L3: sensor.load_l3
  battery_status: sensor.battery_mode_code
  total_pv_generation: sensor.total_pv_generation

Relevant log output
No response

That entity is calculated in one of two ways. You can either provide a sensor using the essential_power: or the card calculates this based on the formula essential = inverter_power_175 + grid_power_169 - aux_power_166. If you do not provide a sensor then there will be no popup or historical state information. Since you have set essential_power: none you are using the cards internal logic. You should supply your own sensor as you are using 3 phase power and to enable the more-info popup i.e. essential_power: sensor.total_essential_load

Yes, that's clear, but I'm getting an error popup. I would expect similar behavior to pv_total, where the entity is unclickable if calculated.

OK thanks. I found the problem. For now just delete the entry essential_power: none

Yep! That's OK. Thanks.

Fixed in 3.13.2


Highlight active line

Thank you for this wonderful Obsidian theme!
Is there a way to enable active line highlighting from the style settings of the theme?

Hey @Chris-mik great idea! I've added support for this feature via the Style Settings plugin. Update your theme to v2.1.2 and you can enable it under Style Settings > Things Theme > Features. Let me know if it works and if looks good, please close this issue. Thanks!

Thanks for this very nice theme.
Is there a way to change the CSS color of the narrow line (on the left) in the "active line" marker?
I found a way to change the background color of the active line. But I would like to change the narrow line, which appears to use something related to the Obsidian accent color.


Add Pixel 3, Pixel 2

This is an alternative to PR #45 which contains just the Pixel 3 and Pixel 2 additions.

Thanks @klausw!


My trained checkpoint doesn't work.

$ python3 tests/test_snapshot.py lsp out/lsp_alexnet_imagenet_small/checkpoint-370000.data-00000-of-00001

But it shows this error
Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator? Traceback (most recent call last):
DataLossError (see above for traceback): Unable to open table file out/lsp_alexnet_imagenet_small/checkpoint-370000.data-00000-of-00001: Data loss: not an sstable (bad magic number): perhaps your file is in a different file format and you need to use a different restore operator?

This question is better asked on  StackOverflow since it is not a  bug or feature request. There is also a larger community that reads questions there. Thanks!


Don't display debug bar when response body not has ""

For example: we set non html  in response in controller, e.g.:
	public function index()
	{
		return 'Hello World!';
	}

The debug bar should not be displayed.

But it should be displayed when returning JSON (since it will be formatted in JSON automatically), which doesn't have a  tag.
Can't accept this solution.


ValueError: Found input variables with inconsistent numbers of samples: [521040, 1]

I have sparse labels in the data with shapes for Xtrain and yTrain as (521040, 2) and (521040, 37). I am using the following code.
%Classifier
clf = BinaryRelevance(classifier = LogisticRegression() , require_dense = [True, False])
%Training Classifier
clf.fit(XTrain, yTrain)
I have tried SVC() and GaussianNB() too but I get the same error.  If I remove require_dense = [True, False], the classifier works well and gives no error.
Error
/usr/local/envs/py3env/lib/python3.5/site-packages/sklearn/utils/validation.py:578: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().
y = column_or_1d(y, warn=True)
ValueError                                Traceback (most recent call last)
 in ()
3
4 # Training Classifier
----> 5 clf.fit(XTrain, yTrain)
/usr/local/envs/py3env/lib/python3.5/site-packages/skmultilearn/problem_transform/br.py in fit(self, X, y)
69             y_subset = self.generate_data_subset(y, self.partition[i], axis=1)
70             classifier.fit(self.ensure_input_format(
---> 71                 X), self.ensure_output_format(y_subset))
72             self.classifiers.append(classifier)
73
/usr/local/envs/py3env/lib/python3.5/site-packages/sklearn/linear_model/logistic.py in fit(self, X, y, sample_weight)
1214
1215         X, y = check_X_y(X, y, accept_sparse='csr', dtype=dtype,
-> 1216                          order="C")
1217         check_classification_targets(y)
1218         self.classes = np.unique(y)
/usr/local/envs/py3env/lib/python3.5/site-packages/sklearn/utils/validation.py in check_X_y(X, y, accept_sparse, dtype, order, copy, force_all_finite, ensure_2d, allow_nd, multi_output, ensure_min_samples, ensure_min_features, y_numeric, warn_on_dtype, estimator)
581         y = y.astype(np.float64)
582
--> 583     check_consistent_length(X, y)
584
585     return X, y
/usr/local/envs/py3env/lib/python3.5/site-packages/sklearn/utils/validation.py in check_consistent_length(*arrays)
202     if len(uniques) > 1:
203         raise ValueError("Found input variables with inconsistent numbers of"
--> 204                          " samples: %r" % [int(l) for l in lengths])
205
206
ValueError: Found input variables with inconsistent numbers of samples: [521040, 1]

The default value for require_dense is [True, True] , set here
    if isinstance(self.classifier, MLClassifierBase):
            self.require_dense = [False, False]
    else:
            self.require_dense = [True, True]

Basically, if require_dense is True, X ( or y) is turned into an np array, before passing to the base classifier's fit method. Otherwise, it is passed as a CSR matrix. This conversion happens in the ensure_input(or output)_format methods...
classifier.fit(self.ensure_input_format(X), self.ensure_output_format(y_subset))

Now looking at the documentation for logistic regression,

X : {array-like, sparse matrix}, shape (n_samples, n_features)
Training vector, where n_samples is the number of samples and
n_features is the number of features.
y : array-like, shape (n_samples,)
Target vector relative to X.

You can see, it doesn't take sparse matrices for y. Hence the error when you specify require_dense=[True,False]. Actually, require_dense=[False,True] would work! When you don't specify require_dense, it defaults to [True, True], which is all good.
BONUS investigative results -
The warning and the error are related. Since you passed a CSR matrix for y, somewhere along the line (LogisticRegression.fit -> check_X_y ->  column_or_1d), sklearn tries to convert Y arrays of the type (n_samples,1) to (n_samples,).
But it isn't expecting sparse arrays at this point, so it totally mangles it by calling np.ravel() on it. Which converts the CSR matrix say y into [y]. Which leads to the weird error message, since length of the array becomes 1.
Maybe sklearn.LogisticRegression should be checking for a sparse y, and then supply a more meaningful error?
P.S. pdb is your friend :) . It didn't take me long to figure out the problem using pdb, just followed the trail up, to see what was happening to y.

the problem is that scikit-learn does not, generally in all of their classifiers, allow a sparse representation of y :( i've even filed a bug for it years a go: https://github.com/scikit-learn/scikit-learn/issues/8908
at some point I plan to get to submititng a patch to scikit-learn to fix this, but it is a very complex endeavor there, lot's of code to play with.


Codegen c-sharp generate duplicate class definition on Response

Which packages are impacted by your issue?
@graphql-codegen/c-sharp
Describe the bug
Which packages are impacted by your issue?
No response
Describe the bug
When im generated c-sharp types from graphql schema i got multiple class generation for same Response. Exemple, :
public class GearSetupTypeSelection {

          [JsonProperty("id")]
          public string id { get; set; }

          public class ItemTypeSelection {

            [JsonProperty("id")]
            public string id { get; set; }

          }

          [JsonProperty("primaryWeapon")]
          public ItemTypeSelection primaryWeapon { get; set; }

          public class ItemTypeSelection {

            [JsonProperty("id")]
            public string id { get; set; }

          }

          [JsonProperty("secondaryWeapon")]
          public ItemTypeSelection secondaryWeapon { get; set; }

          public class ItemTypeSelection {

            [JsonProperty("id")]
            public string id { get; set; }

          }

          [JsonProperty("classItem")]
          public ItemTypeSelection classItem { get; set; }
}

I just want to have one public class ItemTypeSelection { ... }
My graphql got fields like : primaryWeapon { ...ItemFields } secondaryWeapon { ...ItemFields} classItem {...ItemFields}
My nodejs codegen config is : ```
config: {
namespaceName: 'Eva.GG.Client',
typesafeOperation: true,
defaultScalarType: 'object',
},`

### Your Example Website or App

havent

### Steps to Reproduce the Bug or Issue

Have multiple identicals fragment on a query or mutation

### Expected behavior

Just have one class definition

### Screenshots or Videos

_No response_

### Platform

- OS: macOS
- NodeJS: 20.0.0
- `graphql` version: 12.0.11
- `@graphql-codegen/*` version(s): 3.1.0

### Codegen Config File

import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
schema:
'libs/shared/graphql/util-generator/src/lib/apps/backend/game/schema.graphql',
documents:
'libs/shared/graphql/util-generator/src/lib/apps/backend/game/operations/**/*.graphql',
generates: {
'libs/shared/graphql/util-generator/src/lib/apps/backend/game/output/Generated-v2.cs':
{
plugins: ['c-sharp-operations'],
config: {
namespaceName: 'Eva.GG.Client',
typesafeOperation: true,
defaultScalarType: 'object',
},
},
},
};
export default config;

### Additional context

_No response_

Hi @NicolasTarbouriech, I've transferred your issue here as this is the repo for the plugin/s in question


Who can help me to recover my Bitcoin?

I send my Bitcoin to myself Address.And the fees Is so high.Now this transaction has 1 confirm.Can I cancel this transaction？


Documented Additional Volumes field not supported by CRD.

Description
The documented Additional Volumes field is not working. The operator is unable to validate manifests containing additionalVolumes.
Steps to reproduce

Install the latest version of the operator.
Deploy the following YAML:

apiVersion: opensearch.opster.io/v1
kind: OpenSearchCluster
metadata:
  name: my-first-cluster
  namespace: default
spec:
  security:
    config:
      securityConfigSecret:
        ##Pre create this secret with required security configs, to override the default settings
        name: securityconfig-secret
    tls:
       http:
         generate: true
       transport:
         generate: true
         perNode: true
  general:
    httpPort: 9400
    serviceName: my-first-cluster
    version: 2.2.1
    pluginsList: ["repository-s3"]
    drainDataNodes: true
    additionalVolumes:
      - name: log4j2-properties
        path: /usr/share/opensearch/config/log4j2.properties
        configMap:
          name: log4j2-properties
        restartPods: true
  dashboards:
    tls:
      enable: true
      generate: true
    version: 2.2.1
    enable: true
    replicas: 1
    resources:
      requests:
         memory: "512Mi"
         cpu: "200m"
      limits:
         memory: "512Mi"
         cpu: "200m"
    additionalConfig:
      opensearch_security.auth.type: 'openid'
      opensearch_security.openid.connect_url: REDACTED'
      opensearch_security.openid.client_id: 'REDACTED'
      opensearch_security.openid.client_secret: 'REDACTED'
      opensearch_security.openid.base_redirect_url: 'REDACTED'
  nodePools:
    - component: masters
      replicas: 3
      resources:
         requests:
            memory: "4Gi"
            cpu: "1000m"
         limits:
            memory: "4Gi"
            cpu: "1000m"
      roles:
        - "data"
        - "cluster_manager"
      persistence:
         emptyDir: {}
---
apiVersion: v1
data:
  log4j2.properties: |-
    status = error

    appender.console.type = Console
    appender.console.name = console
    appender.console.layout.type = PatternLayout
    appender.console.layout.pattern = [%d{ISO8601}][%-5p][%-25c{1.}] [%node_name]%marker %m%n

    rootLogger.level = info
    rootLogger.appenderRef.console.ref = console
    sh-4.2$ readlink -f ./config/log4j2.properties
    /usr/share/opensearch/config/log4j2.properties
kind: ConfigMap
metadata:
  name: log4j2-properties
  namespace: default

Expected behaviour
I expected the operator to validate and create the resources above.
Actual behaviour
An error from the API
error: error validating "OpenSearchCluster.yaml": error validating data: ValidationError(OpenSearchCluster.spec.dashboards): unknown field "additionalVolumes" in io.opster.opensearch.v1.OpenSearchCluster.spec.dashboards; if you choose to ignore these errors, turn validation off with --validate=false

This looks like problem with helm chart crd template file . The template file is missing Additional Volumes field under general section .
general:
                description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
                  Important: Run "make" to regenerate code after modifying this file'
                properties:
                  additionalConfig:
                    additionalProperties:
                      type: string
                    description: Extra items to add to the opensearch.yml
                    type: object
                  defaultRepo:
                    type: string
                  drainDataNodes:
                    description: Drain data nodes controls whether to drain data notes
                      on rolling restart operations
                    type: boolean
                  httpPort:
                    default: 9200
                    format: int32
                    type: integer
                  image:
                    type: string
                  imagePullPolicy:
                    description: PullPolicy describes a policy for if/when to pull
                      a container image
                    type: string
                  imagePullSecrets:
                    items:
                      description: LocalObjectReference contains enough information
                        to let you locate the referenced object inside the same namespace.
                      properties:
                        name:
                          description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names
                            TODO: Add other useful fields. apiVersion, kind, uid?'
                          type: string
                      type: object
                    type: array
                  pluginsList:
                    items:
                      type: string
                    type: array
                  serviceAccount:
                    type: string
                  serviceName:
                    type: string
                  setVMMaxMapCount:
                    type: boolean
                  vendor:
                    enum:
                    - Opensearch
                    - Op
                    - OP
                    - os
                    - opensearch
                    type: string
                  version:
                    type: string
                required:
                - serviceName
                type: object

There is already issue #218 for this problem. I'm closing this one as a duplicate.


Update Configuration-Settings, NFS and fix all broken links

Fix merge conflict

@madanadit PTAL

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/4304/
Test FAILed.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/4307/
Test FAILed.

alluxio-bot, merge this please.


Add password and db to SentinelMonitoredRedisClientMasterSlaves

Hi! I used this library to select a database after creating the SentinelMonitoredRedisClientMasterSlaves. Unfortunately I noticed that the slaves ignore the db and auth value. This means that if I update something on my staging server (separate db) it is not changed on the database where I read from. This is slightly frustrating :).
The changes should not stand in anyones way and as far as my Scala knowledge goes this would solve my problem.

Coverage decreased (-0.06%) to 90.656% when pulling 6c776198219d7c71e6e3d756e58e8c7f4fb644cd on QwikSense:feature/add-db-auth-to-snetinelmonitoredredisclientmasterslaves into 55573df26adbe20be54291ffc67414af028bf889 on etaty:master.


farallon: List authenticated users

In the older setup
(https://github.com/2i2c-org/pangeo-hubs/blob/5115e56a60da49513891d362daf52933c7186698/deployments/farallon/config/common.yaml#L13),
we used a GitHub org to control who can login. Our auth0 support
does not support GitHub org based access control yet - so
they are listed here.
For now, new users will need to be added via the JupyterHub UI:
https://pilot.2i2c.org/en/latest/admin/howto/manage-users.html
Ref https://github.com/2i2c-org/pilot-hubs/issues/368

I've already deployed this!


BFV Encrypting immediately to a lower level modulus

Would it be feasible to encrypt a plaintext directly into a lower context data? This would be beneficial in combination with the seeded symmetric encryption, which to my understanding is not possible right now.

How about call the encrypt (encrypt_symmetric) then drop the modulus.
For seeded ciphertext, it might be also work because the seed is used to generate each RNS component in
modulus-first order.

I don't think this works... Here is a sample program. The output is:

Degree: 8192
Plain Modulus: 1032193
Parameter validation: valid
Key Switching enabled: true
Batching enabled: true
Encrypting 6 as 0x6
0x6 ...... Correct.
Size of original seeded ciphertext: 216367
Size of mod switched seeded ciphertext: 323749
Size of original public key ciphertext: 432519
Size of mod switched public key ciphertext: 323809

Note that the size of the mod switched seeded ciphertext is larger than that of the original seeded.
#include "seal/seal.h"
#include <iostream>
#include <sstream>

using namespace std;
using namespace seal;

std::string uint64_to_hex_string(std::uint64_t value)
{
    return seal::util::uint_to_hex_string(&value, std::size_t(1));
}

int main(int argc, char *argv[]){

    srand (time(NULL));

    uint32_t N = 8192;
    uint32_t logt = 20;

    //Initialize parameters
    EncryptionParameters params(scheme_type::bfv);
    params.set_poly_modulus_degree(N);
    params.set_coeff_modulus(CoeffModulus::BFVDefault(N));
    params.set_plain_modulus(PlainModulus::Batching(N, logt));

    uint64_t plain_modulus = params.plain_modulus().value();

    cout << "Degree: "  << N << endl;
    cout << "Plain Modulus: " << plain_modulus << endl;

    //Initialize context
    SEALContext context(params, true);
    cout << "Parameter validation: " << context.parameter_error_message() << endl;
    cout << "Key Switching enabled: " << boolalpha << context.using_keyswitching() << endl;
    cout << "Batching enabled: " << boolalpha << context.first_context_data()->qualifiers().using_batching << endl;

    //Initialize keys
    KeyGenerator keygen(context);
    PublicKey public_key;
    keygen.create_public_key(public_key);
    SecretKey secret_key = keygen.secret_key();

    //Initialize enc/eval/dec
    Encryptor encryptor(context, public_key);
    encryptor.set_secret_key(secret_key);
    Evaluator evaluator(context);
    Decryptor decryptor(context, secret_key);

    stringstream data_stream;

    uint64_t x = 6;
    Plaintext pt(uint64_to_hex_string(x));
    cout << "Encrypting " << x << " as 0x" << pt.to_string() << endl;

    Ciphertext ct;
    Ciphertext ct2;
    encryptor.encrypt_symmetric(pt, ct);
    encryptor.encrypt(pt, ct2);
    uint64_t size1 = encryptor.encrypt_symmetric(pt).save(data_stream);
    uint64_t size3 = encryptor.encrypt(pt).save(data_stream);

    evaluator.mod_switch_to_next_inplace(ct);
    evaluator.mod_switch_to_next_inplace(ct2);
    uint64_t size2 = ct.save(data_stream);
    uint64_t size4 = ct2.save(data_stream);

    Plaintext decrypted;
    decryptor.decrypt(ct, decrypted);
    cout << "0x" << decrypted.to_string() << " ...... Correct." << endl;

    cout << "Size of original seeded ciphertext: " << size1 << endl;
    cout << "Size of mod switched seeded ciphertext: " << size2 << endl;
    cout << "Size of original public key ciphertext: " << size3 << endl;
    cout << "Size of mod switched public key ciphertext: " << size4 << endl;

    return 0;
}

Good suggestion! I will add these new APIs to Encryptor in a future release. Let's keep the issue open until then.
At the moment, it has to be done in a hacky way. If you have an urgent need of this, please let me know, I might be able to (with 80% confidence) write a temporary workaround for you.

@abeams A quick solution is to re-use the underlying api
https://github.com/microsoft/SEAL/blob/main/native/src/seal/util/rlwe.cpp#L262


Integrated terminal freezes Code on Linux

While trying to use the integrated terminal, VS code frequently freezes. This has been something other Googlers have mentioned to me as well.
This issue is related, but closed and locked: https://github.com/Microsoft/vscode/issues/36913

VSCode Version:

Version 1.23.1
Commit d0182c3417d225529c6d5ad24b7572815d0de9ac
Date 2018-05-10T16:04:33.747Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

OS Version:

Debian rodete rodete x86-64
Linux Kernal: 4.9.0-6-amd64

Steps to Reproduce:

Clone the experimental branch from http://github.com/reactivex/rxjs
Open the integrated terminal and start npm run watch
Change files for a little while (5-10 minutes is usually enough time to see it)

Does this issue occur when all extensions are disabled?: Yes/No
Yes

@benlesh when this happens again can you run code --status in the terminal and paste in the process tree from the output?
If the problem is the terminal this could also work around the problem (but degrade the experience):
"terminal.integrated.rendererType": "dom"

This is new in the Insiders build though.

I'll give it a try.

@Tyriar, here is the output from right after a ui lock up.
Version:          Code 1.23.1 (d0182c3417d225529c6d5ad24b7572815d0de9ac, 2018-05-10T16:04:33.747Z)
OS Version:       Linux x64 4.9.0-6-amd64
CPUs:             Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz (12 x 3500)
Memory (System):  31.40GB (4.45GB free)
Load (avg):       1, 1, 0
VM:               0%
Screen Reader:    no
Process Argv:     /usr/share/code/code .
GPU Status:       2d_canvas:                    enabled
                  flash_3d:                     enabled
                  flash_stage3d:                enabled
                  flash_stage3d_baseline:       enabled
                  gpu_compositing:              enabled
                  multiple_raster_threads:      enabled_on
                  native_gpu_memory_buffers:    disabled_software
                  rasterization:                disabled_software
                  video_decode:                 unavailable_software
                  video_encode:                 enabled
                  vpx_decode:                   unavailable_software
                  webgl:                        enabled
                  webgl2:                       enabled

CPU %   Mem MB     PID  Process
    2      129  124587  code main
    0        0  124589     zygote
    5      322  124628       window (next.ts - rxjs - Visual Studio Code)
    0      129  124713         extensionHost
    0       32  125012           electron_node jsonServerMain.js
    6      225  125271           electron_node electronForkStart.js tsserver.js
    0       32  125288             electron_node typingsInstaller.js tsserver.js typesMap.js
    0       32  125273           electron_node tslintServer.js
    0      193  132402           extensionHost
    0      193  132442           extensionHost
    0      193  137334           extensionHost
    0       96  137621           extensionHost
    0       96  124714         watcherService
    0       32  124720         terminal
    0        0  124737           /bin/bash
    0        0  165623             bash /usr/bin/code --status
   18       32  165629               electron_node cli.js
   44       64  165636                 /usr/share/code/code --status
    3        0  165638                   zygote
    0       32  165663                   gpu-process
    0        0  165668                   /bin/ps -ax -o pid=,ppid=,pcpu=,pmem=,command=
    0       32  125005         searchService
    0       96  124632       shared-process
    3      161  124614     gpu-process

I'm not on the insiders build, so that setting didn't really make a difference.

@benlesh so it freezes the entire window? You can't close the terminal with ctrl+` or anything?

I think this will workaround the issue in 1.24:
"terminal.integrated.rendererType": "dom"

Please let me know of create another issue if you see it in 1.24 with this setting (coming next week).


add GoodDollar

To make a submission to the Dapps Page, please complete the task lists
below; otherwise remove them.

Your Dapp:

[x] connects to Valora via WalletConnect V1 or DAppKit;
[x] must be mobile-first or mobile responsive;
[x] is in one of the existing categories; and
[x] includes a link to user documentation.

Thank you @sirpy.
The Test might be failing if your IDE format/lint settings are conflicting with the ones in this repo.  you can run yarn lint && yarn format to automatically fix them.
We're excited to add GoodDollar!

@sirpy it looks like there's an issue with the asset sizing. The gooddollar.png assets should be 256px by 256px.

@MuckT done

Awesome, ty @sirpy :100: !


feat(HTTPSend): return response data from HTTP SendCommand action

About the Contributor

This PR is opened on behalf of TV 2 Norge.
Type of Contribution
This is a:

Feature
Current Behavior

SendCommand action of the HTTPSend device exists but does not provide any information about the received response.
New Behavior

If the request succeeds, SendCommand action provides a result including statusCode, headers and body of the response.
Testing Instructions

Other Information

Status

[x] PR is ready to be reviewed.
[ ] The functionality has been tested by the author.
[ ] Relevant unit tests has been added / updated.
[ ] Relevant documentation (code comments, system documentation) has been added / updated.

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

Please upload report for BASE (release51@1517e68). Learn more about missing BASE report.
Report is 7 commits behind head on release51.

Additional details and impacted files
@@              Coverage Diff              @@
##             release51      #334   +/-   ##
=============================================
  Coverage             ?   100.00%
=============================================
  Files                ?        43
  Lines                ?       671
  Branches             ?         3
=============================================
  Hits                 ?       671
  Misses               ?         0
  Partials             ?         0

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


Pubsub appears to be opening multiple streams and not closing them

On the preload nodes, I'm noticing ~500 connections to js-libp2p peers, but 22K open streams to these peers, most of them inbound pubsub streams. It looks like js-libp2p-pubsub is opening multiple streams per connection and not closing them.

Hm. This behavior appears to be limited to a few peers. But we should still verify that we're closing streams when done (@jacobheun couldn't find where this was happening).

I did a small experiment with a test https://github.com/libp2p/js-libp2p/commit/9f07273d60c6527ac57aee117ac9a593803c9bef
It seems that the stream is being closed after sending messages in the current code for js <-> js with floodsub and gossipsub.
Having js older peers with bidirectional streams talking with js with unidirectional streams could cause issues, but on the preload nodes I still did not understand what might be the issue

It looks like it's just a few peers with a ton of streams. I'm not sure what's going on there. Could be an old bug, could be a malicious peer, could be anything.

@Stebalien do you have any logs or any other information that I can look at?

@vasco-santos my best guess is that for some reason we're getting multiple connect calls to a peer, https://github.com/libp2p/js-libp2p-pubsub/blob/v0.5.2/src/index.js#L194-L201, and instead of checking for an existing Peer/stream, we're creating a new one to them.
The particular version of libp2p might be hard to track down but we should make sure that pubsub doesn't create new streams for a peer if it already has one.

FYI, I created a PR to guarantee that we do not open a new stream if we already have one. However, we should guarantee that the onConnect is not called multiple times.

This should be fixed in the latest pubsub.


Allow for data

Hi!
I am trying to embed a pdf like this

<object data="site:arctifacts/my.pdf" style="width: 100%;height: 900px"></object>

Could you maybe try to modify theregex to add data to allow this?
Thank you!

Sure thing! I think I'll make the checked attributes configurable while at it, that way things get even more flexible 👍

There you go, should work now. I also added a docs site with an example page that now acts a bit as a test as well.


Cannot connect virtual gamepad

Pressing this button does nothing. Restart does not fix it.

Nothing is in the log window, either.
Windows 10. Parsec Soda x64 basic 1.1.0.

Just downloaded Parsec Soda (full) v1.1.0. The button still doesn't work.


can you change the gorm.Model definition？

gorm.Model
now:
type Model struct {
  ID        uint `gorm:"primary_key"`
  CreatedAt time.Time
  UpdatedAt time.Time
  DeletedAt *time.Time
}

new:
type Model struct {
	ID        uint       `gorm:"primary_key" json:"id"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt time.Time  `json:"updated_at"`
	DeletedAt *time.Time `json:"deleted_at"`
}

You don't have to use gorm.Model in your structs. gorm.Model isn't required and doesn't do anything apart from providing these fields. Instead, GORM looks for fields with the names "ID", "CreatedAt", and so on and updates them accordingly (relevant documentation).
This means that you can define your own "base model" struct:
type MyModel struct {
  ID        uint       `gorm:"primary_key" json:"id"`
  CreatedAt time.Time  `json:"created_at"`
  UpdatedAt time.Time  `json:"updated_at"`
  DeletedAt *time.Time `json:"deleted_at"`
}

and use it in your structs:
type User struct {
  MyModel

  Name string `json:"name"`
}

The fields from MyModel will be treated the same way as those defined in gorm.Model.


[FRONTEND] Fix handling of from m import x as y in CodeGenerator

Context: in CodeGenerator.__init__, globals for a given triton function are modified to handle remapping the libdevice module to cuda or hip (from https://github.com/triton-lang/triton/pull/4539). In particular, this logic:
for k, v in gscope.items():  # gscope is a dict of fn.__globals__
  ...
  self.gscope[k] = getattr(module_map[module_name], k)

was failing if you do this in the global scope: from triton.language.extras.libdevice import fast_dividef as my_fast_dividef.

@bertmaher @embg @aakhundov

Nice find!  Will cherry-pick this over to https://github.com/triton-lang/triton/tree/rc/3.2.x


CDS-93975-updated Go templating cURL commands

Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the CODEOWNERS.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://65fa9397e7e525393c76c658--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://65fb860769184a4d7183d605--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://65fb866e69184a4d5183e248--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://65fb882bf2e04f504c1daf2a--harness-developer.netlify.app


Matching event always occurs when username have a period in the user name

I have some user names like this -> john.smith
When I select those type of user names and try to type more stuff with out entering the delimiter it always pops open the modal. When I select a username with out a period then it works fine.

:+1: Had this issue too.
Changed the regex on line 51 from: \\w+ to [\\w\\.\\-]* to solve the problem.
Thanks @bigfetz

So many years, later, but this fix worked for me. Thank you!


New pass to patch model with unsupported ArgMax operator inputs

Describe your changes
New pass to patch model with unsupported ArgMax operator inputs
ArgMax doesn't support TensorProto.INT64 type as input. Insert a Cast
operator ahead of ArgMax to make the model usuable for inferencing.
Checklist before requesting a review

[x] Add unit tests for this change.
[x] Make sure all tests can pass.
[ ] Update documents if necessary.
[x] Format your code by running pre-commit run --all-files
[x] Is this a user-facing change? If yes, give a description of this change to be included in the release notes.

(Optional) Issue link

Closing in favor of #624


Prompt before removing Layer

Is there a way to intercept the RemoveLayer functionality before it actually gets removed? The point being, I would like to prompt the user with a confirmation dialog. I realize I can wire up the map.on("pm:remove", function (e) {} and manually re-add the removed layer after the fact, but that seems ugly. I was hoping for a BeforeLayerRemoved function or something like that so I could cancel.

You can overwrite the default behaviour:
var removeFnc = map.pm.removeLayer;
map.pm.removeLayer = (e)=>{
  const layer = e.target;
  const removeable =
      map.pm._isRelevantForRemoval(layer) && !layer.pm.dragging();
  if(removeable){
  	var ok = confirm('Delete Layer?');
    if(ok) {
    	removeFnc.call(map.pm, e);
    }
  }
};

Sweet! thanks. That was fast!!


Small refactors and improvements

Remove unused IMPLEMENTING parameter
Fix a comment
use ConsentStatus instead of _consentStatus within InitComplete() to make sure OnStatusChanged invokes on every change

Does the thrid change make sense? Or am I missing something?

Hi @amirhakimnejad,

The IMPLEMENTING directive is there for me when I develop the plugin. I use Rider as IDE and it makes the code grey and disable auto-completion and error checking when not in an active directive. So I added this IMPLEMENTING to be able to code normally (most of time I don't forget to undef it 😅). If you have an IMPLEMENTING directive defined in your project I can change the name to prevent conflicts, maybe UMP_IMPLEMENTING or something like this.
In the InitComplete() function, the _consentStatus is set directly to not have any OnStatusChanged called before the initialisation process is complete. You can then retrieve the consent status in the OnComplete callback or in the ConsentStatus variable after initialisation. I think it's cleaner that way.

I just pushed an update with a rename of the IMPLEMENTING define (now it's UMP_IMPLEMENTING) and some fix on documentations.
I close the pull request for now. Feel free to contact me if you have any other problem.

Thank you for the update and the answer


Update the version of Thermometer to the latest

Update the version of Thermometer to the latest, Which was not updated for a while

Go ahead.  :+1:

Thanks @rowandavies i will merge it once the Travis CI build completes


Review readme / doc files for upstreaming

Prior to upstreaming, make sure files such as NGRAPH_README.md are suitable for public release.

Completed as part of Upstream PR.


Expose Ollama Service to use it in Chrome Browser Extension

Hey guys,
can you show us, how we can actually use the provided Ollama API's in an chrome extension.
I tried it before, but I get an 403 - Forbidden error. I already looked in the ollama documentation but did not found anything useful.
Hopefully someone can show us how to use it properly. I opened a stackoverflow question before.
Best regards,
Chris

@DevChrisRoth
Is your Ollama instance being served on the same PC? If not, you may need to set the OLLAMA_HOST environment variable to an interface that allows external connections, and the OLLAMA_ORIGINS environment variable to allow cross-origin requests.
OLLAMA_HOST=<IP_ADDRESS> # Listen on all interfaces
I'm not exactly sure how the OLLAMA_ORIGINS environment variable works, try setting it to the machine you're running the chrome extension on.
https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-expose-ollama-on-my-network

@DevChrisRoth
Ollama uses the Gin CORS package to handle origin requests:
https://github.com/gin-contrib/cors?tab=readme-ov-file#canonical-example
The origin will be whatever domain or IP you're hosting the service that will be connecting to the Ollama API. For example, if you have a button on a website that sends data to the Ollama API, and the user will type "https://example.domain.com/ollama" to get to your website, then put "example.domain.com" in your OLLAMA_ORIGINS environment variable.
If you set OLLAMA_ORIGINS=<IP_ADDRESS>, your Ollama instance will allow connection requests originating from <IP_ADDRESS>, meaning you're hosting your user interface on that IP address. You can also set it to OLLAMA_ORIGINS=example.domain.com, <IP_ADDRESS>, and your Ollama instance will allow connection requests originating from both example.domain.com and the IP <IP_ADDRESS>.

Yeah, thanks for your comment but the issue that I have is, that I make that API call from a Chrome Browser Extension.
I have written a browser extension and when I click on the button of that little window, I make an API call to my local hosted Ollama instance on my pc
Here my Plugin:

...and my api call:

...and the required (I believe)
permissions in the manifest.json File

Maybe that information helps :)

I also set the OLLAMA_HOST=<IP_ADDRESS>

Can you confirm the API is working properly with a curl request from cli?
curl http://localhost:11434/api/generate -d '{ "model": "codellama",
"prompt": "Why is the sky blue?", "stream": false }'
Very Respectfully,
Jeremy Mickley (Olds)
(410) 349-7030
@.***
On Thu, Feb 1, 2024 at 10:03 AM Christoph Rothmann @.***>
wrote:

I also set the OLLAMA_HOST=<IP_ADDRESS>
—
Reply to this email directly, view it on GitHub
https://github.com/ollama/ollama/issues/2308#issuecomment-1921536449,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AZFJEIVGSDUCF3KDYCIEW7DYROVCPAVCNFSM6AAAAABCUS3MEOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRRGUZTMNBUHE
.
You are receiving this because you commented.Message ID:
@.***>

Hi @remy415 ,
yes I confirm that. I tested it with Postman. 😎😉
Maybe Ollama allows no request from an browser extension 😅.
Just to clarify, I did not clone the Ollama repo itself and run that. I run the Application downloaded from the official ollama.ai webpage. Should I try to clone and run that? Makes that a difference?
Best,
Chris

@DevChrisRoth
Building from src likely won't change the issue you're having, that's mostly just to change architectures or enable different CPU features (AVX512, etc) for the llama_cpp backend.
Can you enable debug on startup with OLLAMA_DEBUG=1 ollama serve and try the connect again, check your screen for the api requests and see what the server logs say when you connect

Also, some people on the below stackoverflow forum had problems with other extensions interacting with theirs. Try disabling all other extensions and see if that fixes it.

In my case it was done due to an extension that I had on Chrome, try disabling all extensions and then try again. This may help someone else. I was stuck 3 days on this one tried everything and in the end the issue was caused by extension... –
nikola3103
Feb 15, 2022 at 10:07

Have you double-checked that your extension code is good? Is your button sending the proper messages to trigger the extension eventListener?

Hey @remy415 ,
I started the ollama serve with your command and got following logging messages back:

I have not activated any other browser extensions, but thanks for your advice :)

Extensions have their own origin. For Chrome, this should be chrome-extension:// so you'll need this for OLLAMA_ORIGINS
OLLAMA_ORIGINS=chrome-extension://...

See gin-contrib/cors

@mxyng ,
so I have to execute following in the terminal?
launchctl setenv OLLAMA_ORIGIN "chrome-extension://" and then run ollama serve?
Sorry to ask such a stupid question, but I'm new to this :)

I have the same issue, due to CORS (everything work fine when using non-browser clients).
@DevChrisRoth I worked around it for now by adding the following in my service file:
[Service]
ExecStart=...
Environment="OLLAMA_ORIGINS=moz-extension://*,chrome-extension://*"

It allows me to test my extension locally, but seems very cumbersome, as each user would need to configure their ollama instance with a similar setting.
What I don't understand is that why this behavior occurs despite me setting the proper host_permissions  and calling from a background script. This is supposed to allow me to "access to those origins without cross-origin restrictions" (as per the doc linked).
I tried both with the host_permissions of manifest V3 and the old permissions setting of V2, but still get this behavior both in Firefox and Chromium.

@tomjorquera I'm not an expert on browser and CORS configurations, but generally speaking the way you configure your browser to allow specific cross-origin types doesn't override the remote server's configuration to allow types. In this situation, the Ollama service should be considered a "remote server" as it is not explicitly coupled to your local host and is not a "client application". Ollama itself has its own configuration, and if you don't tell it to allow specific cross-origins then it will return a 403 error, even if your browser is configured to allow it. The browser configuration just means which "cross-origins" are allowed to run in the browser, but the server still needs to support it and allow it.
TL;DR: the "host_permission" configuration in the browser is to make the browser allow your COR, but that doesn't override or affect the "remote server" being configured to support and allow your COR.

@remy415 I agree.
My question is : wouldn't it be better if the ollama server supported this use case without requiring specific configuration from the user?

Allowing various CORs by default would technically make the default installation less secure as the majority of users are just using "ollama run mistral", which doesn't require extension CORs be enabled.

I don't get why allowing access from a (properly configured) browser extension has different security implications than accessing ollama from any other local client installed by the user. Is there some technical limitation of CORs that allowing this would also open up others, less secure, uses also?
I'm genuinely interested in understanding which risks are mitigated by this restriction (taking in account the fact that the browser is already enforcing CORs, and that the extension has to explicitly ask for permission to access localhost from a background task in any case).

That's the key words there: properly configured. Yours might be properly configured, but that doesn't mean that every browser extension is properly configured or even non-malicious. "ollama serve" is its own service: it listens on a port for external traffic. By default it's configured to listen only on localhost (another "more secure" default setting). "ollama run" is a separate part of the ollama application, but it isn't required to interact with the service component. In this particular context, ollama is a service listening on a port, and your browser extension is a client application connecting externally, regardless of your own personal use-case where client and server are both run locally.
When you release an application for general use, it's generally better to only enable features that are required for basic use. When you are configuring "ollama serve" for an external service, there are many other settings that also have to be configured anyway, so it would make sense from a generalized standpoint to also require the server maintainer to enable additional CORS.
Again, we're talking about default settings here: it's generally better to release a product that doesn't enable an inherently insecure feature (because remember: we can't assume everyone properly configures their chrome extension, or that a chrome extension isn't malicious). If a user wants to expose their ollama service externally, they must make the conscious decision to enable external access to their service, which forces a thought process about security.
Remember: exposing services to external clients always has inherent security risks. The cybersecurity field is massive, and well beyond the scope of this forum. Including things such as authentication, authorization, input sanitization, firewalls, etc. are all factors every server owner should think about before deploying any service that is exposed externally.
Last, my own two cents so take it how you will: I don't think it's a big ask to have a developer set an environment variable to configure their service to allow things like browser extensions. It's also mentioned in their developers guide, which users should probably be reading if they intend on developing software to use with ollama.

Hey,
I agree with @remy415 on this point.
Nevertheless, I would strongly recommend including this information in the documentation. I'm sure I'm not the first and last person to have problems with CORS.

Two clarifications on my message :

By "properly configured", I meant that the extension declares in its manifest that it needs to be allowed to make background requests to "localhost" (using host_permissions in V3, or permissions in V2).
My goal here is not to for the users to use my ollama server, but for the users to be able to use my extension with their own local ollama instance. Meaning it's not just me that need to configure my service properly, but each user of my extension (or others).

So my question is in the context of allowing the user to use a browser extension to access ollama locally. It seems to me that, in the same way that I don't need any additional configuration on my ollama instance to interact with it using local clients (e.g. curl), I should be able to interact with it from an extension running locally in my browser.
I agree that it would definitively be weird for ollama to be configured by default to answer any requests from any origin  :smile:

By "properly configured", I meant that the extension declares in its manifest that it needs to be allowed to make background requests to "localhost" (using host_permissions in V3, or permissions in V2).

Keep in mind that ollama the service (ollama serve) and your extension that interacts with the API are two distinctly different things. By default, services usually come out the gate with minimal features enabled to keep things locked down. It's better to make a user enable services they need rather than make a user disable services they don't need because it's really easy for insecure options to be overlooked when setting up a new service. By forcing the user to enable them, it ensures things don't slip through the cracks. Imagine if you plugged in a new router on your home network, and it was configured to "allow any any"; you would have to then turn off the ports you don't want open rather than explicitly enabling the ports you do want open.

My goal here is not for the users to use my ollama server, but for the users to be able to use my extension with their own local ollama instance. Meaning it's not just me that need to configure my service properly, but each user of my extension (or others').

I would recommend adding in your extension's description that the extension requires a running ollama instance configured to allow CORS from Chrome, that the env variable would need to be set before starting the service, and then include a check in your code that if you get a 403 you can inform your users of the possibility that it's the CORS setting causing that error.
Conversely I would review the use-case of such an extension; essentially you are saying you're making an extension that only connects to a locally running instance of a 3rd party application that you have no control over. Maybe instead of an extension, you could create a locally running webpage (maybe via container) using ollama-js library, then make your extension interact with that as a plug-in to the webpage.
I did find something interesting in the cors library documentation:
Note: while Default() allows all origins, DefaultConfig() does not and you will still have to use AllowAllOrigins.
Also
Using all origins disables the ability for Gin to set cookies for clients. When dealing with credentials, don't allow all origins.
@DevChrisRoth Agreed, it should be in the documentation, and as I've said previously it is in the documentation. Maybe including a reference to the CORS library would be helpful?
https://github.com/ollama/ollama/blob/main/docs/development.md
Here's a repost of the documentation from the CORS library that ollama uses:
https://pkg.go.dev/github.com/gin-contrib/cors

Keep in mind that ollama the service (ollama serve) and your extension that interacts with the API are two distinctly different things.

I understand that :slightly_smiling_face: And I understand the advantage of minimizing the attack surface by default. But here I'm struggling to get what security need is addressed by enforcing this additional verification layer on top of the one the browser is providing.
The server is only available locally by default, and needs an explicit setting (OLLAMA_HOST) to be set in order to be reachable from the network. Would there be any security risk adding moz-extension://* and chrome-extension://* to the list of allowed origins? At least in the default case where it's bound to localhost?

I would recommend adding in your extension's description that the extension requires a running ollama instance configured to allow CORS from Chrome

This is what I will do if the limitation stays. But I would really like to understand what is the actual security use case (if any) covered by this limitation, as I really don't get why allowing to call a local instance from a browser extension would be less safe than from any local client.

Conversely I would review the use-case of such an extension

The goal of my extension is to provide in-browser functionalities to the user, so that they can call a LLM directly on the content of the pages they are visiting. I want to allow the user to choose among multiple "providers", such as a local ollama instance, OpenAI API etc.
I have considered the solution of using a local application "proxy", but doing that just for supporting ollama seems a little too much (and it seems worse from a security PoV to ask the user to install not only a browser extension but also a full-blown-not-sandboxed application).

Or maybe asked more succinctly: what is the use of enforcing a restricted set of origins when ollama is configured to be only accessible locally? :smile:

Overall, it seems that ollama defaults do the package's config := cors.DefaultConfig() with http & https API calls being allowed.

Reference documentation:
https://pkg.go.dev/github.com/gin-contrib/cors#readme-using-defaultconfig-as-start-point

The server is only available locally by default, and needs an explicit setting (OLLAMA_HOST) to be set in order to be reachable from the network. Would there be any security risk adding moz-extension://* and chrome-extension://* to the list of allowed origins? At least in the default case where it's bound to localhost?

In your particular use case, none. But changing the default deployment configuration of the application means that every user who downloads and installs ollama will be running with that default configuration. Probably better to leave it at "cors.DefaultConfig()". Again, I'm not an expert on Go or CORS, I'm just saying that in general it's better to have restrictive defaults than loose defaults.
And just because the default is to disable chrome extensions, doesn't mean you couldn't inform your users that if they're using ollama they would need to set that env variable and restart the service to allow your extension to connect. If you do this, don't forget to inform them that if they intend on making their ollama accessible from external sources they should research and implement proper security for their use-case.

Ok so from the discussing I gather that it's ultimately a choice for the ollama team whether to restrict origins when ollama is only accessible locally or not. I would be interested to have the word from the devs on that, but given the length of the (closed) ticket they may have moved on already :smile:
Maybe I will create a specific issue to discuss this proposal later on. In the meantime I will document the workaround.
Thanks for the chat @remy415

In the mean time, you could update your extension to say something like
“If you want to use this locally with ollama you can, but you have to update your command to say “OLLAMA_ORIGINS=chrome://* ollama serve”. Note that this will allow any chrome extension to connect and may have security implications if the ollama API is exposed to external clients”
I also recommend researching Zero Trust principles if you’re interested in developing security-conscious architectures, with the key principle is that you don’t implicitly trust anyone or anything, but rather explicitly trust things as you implement proper security mechanisms.

+1 on allowing chrome extensions in default CORS settings.

Hello everyone,
Its still not working for me

I tried allowing "chrome-extension://MY_EXTENSION_ID"
Also this "chrome-extension://*"
also this "<IP_ADDRESS>"
restarted Ollama everytime, did not work

1st request is from PostMan works good,
2nd and 3rd requests from Chrom Extention, get tags works but not generate "POST"

@krngd2 ,
did you try to start the ollama server like mentioned here?

@krngd2 , did you try to start the ollama server like mentioned here?

That actually worked, I forgot to update the thread. Thanks a lot

It appears that Windows Ollama is ignoring the ollama_origins=chrome-extension//* env variable, but not always. I'm using ollama windows ver. 0.1.46, and ollama-ui chrome extension (chrome-extension://cmgdpmlhgjhoadnonobjeekmfcehffco). If I load localhost and switch to the remote server ip, it actually loads the model list, but any inference call is responded with a 403. If I reload the page, the /api/tags endpoint also returns 403. My server.log file looks like this:
2024/06/26 17:52:07 routes.go:1064: INFO server config env="map[CUDA_VISIBLE_DEVICES: GPU_DEVICE_ORDINAL: HIP_VISIBLE_DEVICES: HSA_OVERRIDE_GFX_VERSION: OLLAMA_DEBUG:false OLLAMA_FLASH_ATTENTION:false OLLAMA_HOST:http://<IP_ADDRESS>:11434 OLLAMA_INTEL_GPU:false OLLAMA_KEEP_ALIVE: OLLAMA_LLM_LIBRARY: OLLAMA_MAX_LOADED_MODELS:1 OLLAMA_MAX_QUEUE:512 OLLAMA_MAX_VRAM:0 OLLAMA_MODELS:C:\\Users\\nikle\\.ollama\\models OLLAMA_NOHISTORY:false OLLAMA_NOPRUNE:false OLLAMA_NUM_PARALLEL:1 OLLAMA_ORIGINS:[chrome-extension://* http://localhost https://localhost http://localhost:* https://localhost:* http://<IP_ADDRESS> https://<IP_ADDRESS> http://<IP_ADDRESS>:* https://<IP_ADDRESS>:* http://<IP_ADDRESS> https://<IP_ADDRESS> http://<IP_ADDRESS>:* https://<IP_ADDRESS>:* app://* file://* tauri://*] OLLAMA_RUNNERS_DIR:C:\\Users\\****\\AppData\\Local\\Programs\\Ollama\\ollama_runners OLLAMA_SCHED_SPREAD:false OLLAMA_TMPDIR: ROCR_VISIBLE_DEVICES:]"
time=2024-06-26T17:52:07.097-04:00 level=INFO source=images.go:730 msg="total blobs: 34"
time=2024-06-26T17:52:07.098-04:00 level=INFO source=images.go:737 msg="total unused blobs removed: 0"
time=2024-06-26T17:52:07.100-04:00 level=INFO source=routes.go:1111 msg="Listening on [::]:11434 (version 0.1.46)"
time=2024-06-26T17:52:07.101-04:00 level=INFO source=payload.go:44 msg="Dynamic LLM libraries [cpu_avx2 cuda_v11.3 rocm_v5.7 cpu cpu_avx]"
time=2024-06-26T17:52:07.213-04:00 level=INFO source=types.go:98 msg="inference compute" id=GPU-aec9e7c7-4630-40d3-b4fa-378b759ffdec library=cuda compute=8.6 driver=12.5 name="NVIDIA GeForce RTX 3060" total="12.0 GiB" available="11.0 GiB"
[GIN] 2024/06/26 - 17:52:32 | 403 |            0s |    <IP_ADDRESS> | GET      "/api/tags" <-first attempt
[GIN] 2024/06/26 - 17:52:48 | 200 |      3.5745ms |    <IP_ADDRESS> | GET      "/api/tags" <-second attempt, it actually reads
[GIN] 2024/06/26 - 17:53:01 | 403 |            0s |    <IP_ADDRESS> | POST     "/api/generate" <-fails on generate
[GIN] 2024/06/26 - 17:53:41 | 200 |      4.0133ms |    <IP_ADDRESS> | GET      "/api/tags" <- changed to localhost, returns and loads
[GIN] 2024/06/26 - 17:53:52 | 403 |            0s |    <IP_ADDRESS> | POST     "/api/generate" <- fails anyways

on windows with the .exe installer i did this and was a more permanent solution.
$env:OLLAMA_ORIGINS="chrome-extension://*"
then
[System.Environment]::SetEnvironmentVariable('OLLAMA_ORIGINS', 'chrome-extension://*', [System.EnvironmentVariableTarget]::User)
then
ollama serve
and my chrome extension is now getting 200 and responses. Only issue is how can users of chrome extension do all this as majority won't be able to figure this out, I hope this gets fixed.


Add Klimatkollen

Insert URLs to the project here:
[https://github.com/Klimatbyran/klimatkollen]

[x] The projects is active, documented, open source licensed, shows usage from external parties and is directly targeting environmental sustainability. Find more details in the Contribution Guide.

All issues labeled as 'Good First Issue' of the project listed on OpenSustain.tech will be visible on ClimateTriage.com. This is a great way to welcome new community members to your project.

Thanks @elvbom for creating this great project and contributing it to OpenSustain.tech. I moved the project to the emissions section and had to remove the TOC changes you made. We rely heavily on this TOC format as we parse the project for various applications such as ClimateTriage.com.


Expose defaults object for modification

This PR exposes the defaults object as $.fn.addClear.defaults, so that an app can modify default options globally before usage.
I also exposed the Plugin class as $.fn.addClear.Constructor in case anyone wants to use this with instanceof (can be useful in unit tests).

Thanks for the PR!


how to get registration link

I installed and make it to work
However, i dont get the registration link.
How can i set this up or install to ignore log in
thanks

Hi,
Do you mean email with activation link for new user?
Thanks,
Anton

yes i dont get the email with the activation link,
probably some setings on my virtual machine allow to send eamails
Is there an option to skip this for testing pourposes, or other solution I missed
thanks

you can try to use test user.
user name<EMAIL_ADDRESS>pswd: test
Also we will add option to skip registration in next release.
For multi user access you need to setup SMTP server, we will update readme soon.

setup SMTP server:
https://github.com/SoftwareCountry/Perseus#configuring-smtp-server-settings


"donejs add app " generates application directory but puts the app files in the parent directory

How often can you reproduce it?

[X] Always
[ ] Sometimes
[ ] Rarely
[ ] Unable
[ ] I didn’t try

Description:
When running donejs add app APP_NAME from a given directory the APP_NAME directory is created and contains ONLY a node_modules directory and a package-lock.json file.  ALL of the application files exist in the parent directory (the directory the donejs command was executed from).
This also applies to creating the APP_NAME directory first, changing into that directory, and executing donejs add app.  The contents of the APP_NAME directory will be node_modules and package-lock.json, the parent directory will contain the application files.
Steps to reproduce:

mkdir TEST
cd TEST
donejs add app generator-fail --yes
ls (observe the application files in the TEST directory)
cd generator-fail (observe only node_modules and package-lock.json in app directory)
(in the TEST directory) rm -rf *
mkdir generator-fail
cd generator-fail
donejs add app --yes
ls (observe only node_modules and package-lock.json in current directory)
ls .. (observe the application files in the TEST directory)

Expected results:
All of the generated files should be contained within the generated application directory.

Actual results:
Refer to the steps to reproduce.

Environment:

Software
Version

donejs -V
2.1.0

npm ls generator-donejs
2.1.0

node -v
9.8.0

npm -v
5.7.1

Operating system
macOS 10.13.3

If you don’t have —yes, does it work? I did this 2 days ago without —yes.

It does not work with or without --yes
It also fails when creating a component (donejs add component)
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: Expected to find a package.json file at /Users/mark/Projects/WeMeetBetter/package.json but did not
    at Object.exports.getPkgOrBail (/Users/mark/Projects/WeMeetBetter/client-www/node_modules/generator-donejs/lib/utils.js:48:19)

Yes, I have tried it with and without --yes and it fails per the issue in both cases.

I wasn't able to recreate given those steps. Is it possible that you had some files in the TEST folder already? If so what were they?

pinging @mjstahl


Add a way to update the widget contents programmatically

Using model.updateBuffer() does not work because it gets blown away during the widget refresh.

I ended up using editor._editor.getDoc().setValue(contents); to hack it to work.


Chart digest generation is impacted if you run chart-verifier from within the same directory as the chart

What Happened
I noticed that chart-verifier was producing a report with .metadata.tool.digests.chart changing with every execution, despite pointing to the same location with no changes.
When executing it, I was in the chart directory running chart-verifier verify ..
This was producing the chartverifier/ directory which contained log files. With each iteration, a new log file would be produced in this directory.
These log files are getting picked up when the chart location is slurped up, and as a result, the sorted list of files contained in the chart was changing every execution, causing my calculated digest to change (ultimately failing certification as well).
Detail
The code snippet of concern is here:
https://github.com/redhat-certification/chart-verifier/blob/main/internal/chartverifier/reportBuilder.go#L196. The rawFiles parameter contains all files in that directory so those are all taken into account when calculating the hash.
The resolution would probably either need to decipher what's necessary and what isn't.
Version
v1.10.0
Workaround
It would seem that running chart-verifier in a different directory should produce an accurate hash. I'm still testing this now.

looking into this. would you mind assigning to me @komish ?


chore: node test migration and ts fix

Checklist

[ ] run npm run test and npm run benchmark
[ ] tests and/or benchmarks are included
[ ] documentation is changed or added
[ ] commit message and code follows the Developer's Certification of Origin
and the Code of conduct

I think .taprc needs to be removed as well?

yep done

oh well, not sure why tests are passing now 🤷


URI with filtering options does not load correctly

This is a bug
Steps to reproduce

Go to https://ccsearch.creativecommons.org
Search for cats (because that is what the internet is for of course)
Filter on CC BY-NC licenses
Change 'cats' to 'cat' and search again, notice that the address bar now states, also note that are no search results:
''''
https://ccsearch.creativecommons.org/search?q=cat&provider=&li=by-nc&lt=
''''
copy that URL and paste in a new tab.

Notice that the filter is not being set by the URI

@mzeinstra, thank you for creating this issue.  It should now be closed.


Hey Users, Does This Still Exist?

Terremark got gobbled up by Verizon awhile ago.  The terremark webpage redirects to verizon cloud.

Terremark is no longer a thing so we're closing out this repo


need for visibility_detector package upgrade to its latest version

getting a conflict issue with visibility_detector package need it to be upgraded to latest version to 0.4.0+2 .

New version uploaded, sorry for the wait guys


ipv6: Tests that use Fedora + dmidecode fail

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind enhancement

What happened:
When running on the ipv6 lane, tests labelled with "[rfe_id:2926]" fail.
What you expected to happen:
The tests to pass.
How to reproduce it (as minimally and precisely as possible):
export KUBEVIRT_PROVIDER=kind-k8s-1.17.0-ipv6 && make cluster-up && make functest
Anything else we need to know?:
For these tests, a dmidecode binary is downloaded first, as it's not included in the Fedora image.
The download silently fails on the ipv6 lane, but since it's written like curl [...] > dmidecode ; chmod +x dmidecode, an empty executable is created.
Then when the dmidecode output is grepped in the tests, nothing is found and the tests fail.
Environment:

KubeVirt version (use virtctl version): master (0.31)
Kubernetes version (use kubectl version): 1.17.0
VM or VMI specifications:
Cloud provider or hardware configuration:
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a): 5.7.10-201.fc32.x86_64
Install tools:
Others:

/close
The kind-k8s-1.17.0-ipv6 lane was removed.


Compile on save stopped working after VS2015 Update 3 installation

TypeScript Version:
1.8.6 (1.8.32 in Help / About).
typescript has been working wonderfully for me since I started using it, and compile on save has been working fine.  However, I updated VS2015 to the update 3 release the other day, and now returning to  my solution, nothing happens when I save a tsx file.
Building the solution will result in compiling the tsx files, but it is very slow as a solution.
My tsconfig.json had, and still has, the compileOnSave option set to true.

Looks like the same issue as https://github.com/Microsoft/TypeScript/issues/8835. we have a fix ready, and should be shipped out in the final Update 3 drop.


how should i use clearqueue?

I want to stop the pending tasks

I don't understand the question. I think the docs are pretty clear about it.

I don't understand the question. I think the docs are pretty clear about it.

I don't understand the question. I think the docs are pretty clear about it.

I have an variable named 'switch' and a vue watcher to watch 'switch' ; if 'switch'  is false,then I want to stop all the tasks pending in the limit queue.

I don't understand the question. I think the docs are pretty clear about it.

I have an variable named 'switch' and a vue watcher to watch 'switch' ; if 'switch'  is false,then I want to stop all the tasks pending in the limit queue.

but the tasks is still running to the end.

You cannot stop the "active" tasks. .clearQueue() only clears the pending (yet to run) tasks. This is a limitation of promises. Once a promise starts, it cannot be stopped/canceled from the outside.

but the tasks is still running to the end.

You cannot stop the "active" tasks. .clearQueue() only clears the pending (yet to run) tasks. This is a limitation of promises. Once a promise starts, it cannot be stopped/canceled from the outside.

but the tasks is still running to the end.

You cannot stop the "active" tasks. .clearQueue() only clears the pending (yet to run) tasks. This is a limitation of promises. Once a promise starts, it cannot be stopped/canceled from the outside.

Thanks for reply!!!
Yes! I just want to stop the pending tasks . As your example
const pLimit = require('p-limit');

const limit = pLimit(1);

const input = [
	limit(() => fetchSomething('foo')),
	limit(() => fetchSomething('bar')),
	limit(() => doSomething())
        // ......if there are 1000 functions
];

(async () => {
	// Only one promise is run at once
	const result = await Promise.all(input);
	console.log(result);
})();

if I have 1000 limit(() => myfunction())
then the code const result = await Promise.all(input); need time to finish.
In this period, may be there are 500 pending rasks, 1 running tasks, and 499 finished tasks. I just want to stop these 500 pending tasks when a variable called "switch" is true. But i don't know how to use limit.clearQueue()
if (this.switch) {
   this.limit.clearQueue()
}

Could U give me an example?

but the tasks is still running to the end.

You cannot stop the "active" tasks. .clearQueue() only clears the pending (yet to run) tasks. This is a limitation of promises. Once a promise starts, it cannot be stopped/canceled from the outside.

Thanks for reply!!!
Yes! I just want to stop the pending tasks . As your example
const pLimit = require('p-limit');

const limit = pLimit(1);

const input = [
	limit(() => fetchSomething('foo')),
	limit(() => fetchSomething('bar')),
	limit(() => doSomething())
        // ......if there are 1000 functions
];

(async () => {
	// Only one promise is run at once
	const result = await Promise.all(input);
	console.log(result);
})();

if I have 1000 limit(() => myfunction())
then the code const result = await Promise.all(input); need time to finish.
In this period, may be there are 500 pending rasks, 1 running tasks, and 499 finished tasks. I just want to stop these 500 pending tasks when a variable called "switch" is true. But i don't know how to use limit.clearQueue()
if (this.switch) {
   this.limit.clearQueue()
}

Could U give me an example?

You could do something like this:
const pLimit = require('p-limit');

const limit = pLimit(1);

const check = fn => {
	if (switch) {
	   limit.clearQueue();
	}

	fn();
};

const input = [
	limit(check(() => fetchSomething('foo'))),
	limit(check(() => fetchSomething('bar'))),
	limit(check(() => doSomething()))
        // ......if there are 1000 functions
];

(async () => {
	// Only one promise is run at once
	const result = await Promise.all(input);
	console.log(result);
})();

You could do something like this:
const pLimit = require('p-limit');

const limit = pLimit(1);

const check = fn => {
	if (switch) {
	   limit.clearQueue();
	}

	fn();
};

const input = [
	limit(check(() => fetchSomething('foo'))),
	limit(check(() => fetchSomething('bar'))),
	limit(check(() => doSomething()))
        // ......if there are 1000 functions
];

(async () => {
	// Only one promise is run at once
	const result = await Promise.all(input);
	console.log(result);
})();


Manually release brave-core which doesn't depend on io.zipkin.java:zipkin

The camel project is one of the few libraries still using brave-core. In order to reduce the collateral damage of not upgrading to recent brave apis, we need to release a version of brave-core that does not have a compile dependency on io.zipkin.java:zipkin, as this library will stop being published very quickly.
See https://github.com/apache/camel/pull/2373#issuecomment-397894089

cut a release manually off 4.13.x as 4.13.5
BINTRAY_USER=XX BINTRAY_KEY=XX ./mvnw --batch-mode -s ./.settings.xml -Prelease -nsu -pl -:brave-instrumentation-benchmarks -DskipTests deploy


cargo build fails under Windows

Building bgfx-sys v0.2 under Windows fails with the following error:
 bgfx/src/renderer_d3d11.cpp(3744): error C2065: 'BGFX_BUFFER_COMPUTE_FORMAT_MASK': undeclared identifier
  bgfx/src/renderer_d3d11.cpp(3744): error C2065: 'BGFX_BUFFER_COMPUTE_FORMAT_SHIFT': undeclared identifier
error occurred: Command "Z:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX64\\x64\\cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-I" "bx/include/compat/msvc" "-I" "bgfx/3rdparty/dxsdk/include" "-I" "bgfx/3rdparty/khronos" "-I" "bgfx/3rdparty" "-I" "bgfx/include" "-I" "bx/include" "-I" "bx/3rdparty" "-I" "bimg/include" "-I" "bimg/3rdparty" "-I" "bimg/3rdparty/iqa/include" "-I" "bimg/3rdparty/astc-codec/include" "-I" "bimg/3rdparty/tinyexr/deps/miniz" "-DBGFX_CONFIG_RENDERER_WEBGPU=0" "-DBGFX_CONFIG_RENDERER_GNM=0" "-DBIMG_DECODE_ASTC=0" "-DBGFX_CONFIG_RENDERER_VULKAN=1" "-DBGFX_CONFIG_RENDERER_DIRECT3D11=1" "-D_WIN32" "-D_HAS_EXCEPTIONS=0" "-D_SCL_SECURE=0" "-D_SECURE_SCL=0" "-D__STDC_LIMIT_MACROS" "-D__STDC_FORMAT_MACROS" "-D__STDC_CONSTANT_MACROS" "-D_CRT_SECURE_NO_WARNINGS" "-D_CRT_SECURE_NO_DEPRECATE" "-FoE:\\Development\\mmocraft\\target\\debug\\build\\bgfx-sys-c054bcc9fa70ed24\\out\\bgfx/src/renderer_d3d11.o" "-c" "bgfx/src/renderer_d3d11.cpp" with args "cl.exe" did not execute successfully (status code exit code: 2).

Thanks for the report! I will have a look

This should build fine now with bgfx-sys 0.3 and I have updated bgfx-rs to depend on the updated sys-package (so bgfx-rs is now version 0.4)


Update INA228.cpp

updated getShuntVoltage() to allow reading of negative currents

Please have a look at PR #7, there is similar work in progress

If I understand correctly this should allow the small negative range over the bus (and thus negative current for shunt)?
Datasheet 7.3.1
The supported common-mode voltage range at the input pins is –0.3 V to +85
V, which makes the device well suited for both high-side and low-side current measurements.
Next weekend I hope to have time to get hands on with hardware.

Have checked the data sheet and your code is an improvement however with minor points see above.
float INA228::getShuntVoltage()
{
  //  datasheet P25
  float LSB = 312.5e-9;  //  312.5 nV
  uint16_t config = _readRegister(INA228_CONFIG, 2);
  if (config & 0x0010)   //  ADCRANGE
  {
    LSB = 78.125e-9;     //  78.125 nV
  }

  //  remove reserved bits.
  int32_t value = _readRegister(INA228_SHUNT_VOLTAGE, 3) >> 4;
  if (value & 0x00800000)
  {
    value |= 0xFF000000;
  }
  return value * LSB;
}

renamed scale to LSB,
gave LSB the value as defined in the datasheet instead of scaling in return command
adjusted the mask for ADCRANGE
adjusted the mask for the SIGN bit test.

Please give it a try, thanks.

@markliquid1
better use this
float INA228::getShuntVoltage()
{
  //  datasheet P25
  float LSB = 312.5e-9;  //  312.5 nV
  if (getADCRange() == 1)
  {
    LSB = 78.125e-9;     //  78.125 nV
  }

  //  remove reserved bits.
  int32_t value = _readRegister(INA228_SHUNT_VOLTAGE, 3) >> 4;
  //  handle negative values
  if (value & 0x00800000)
  {
    value |= 0xFF000000;
  }
  return value * LSB;
}

Thanks, I'll give it a try today.  I'm new to programming, so mainly submitted this request as a way to point out the issue with negative current measurement.  The code I proposed was inspired by the Adafruit library for the INA228, and did seem to work, but certainly was not the cleanest way to do it, and not consistent with the rest of your library.

Then I will include it in my current develop branch which I'm working on.
There is still work todo before the library is functional complete.
Thanks for the clarification
Will close this as a PR.
If you have more remarks, please open an issue per topic.

Ok, I wasn't yet aware of the "Issue" functionality of github, so I will use that in the future.  Thanks for all your open source work on Arduino libraries.  I have benefited greatly as I learn, including this INA228.  I look forward to your updates.

Included getShuntVoltage() into my develop branch,
Thanks again for pointing out the negative values!


how do I get started on kind

[ ] prerequisites
[ ] installation
[ ] publishing (domains, load balancers, etc.)

@viccuad have you try it?

check if the article helps
https://medium.com/@jmpinto/deploying-cloudfoundry-on-a-local-kubernetes-9103a57bf713

fixes https://github.com/SUSE/kubecf-docs/pull/3


Implement a tool for compute bwa-mem mappability

Because the GATK team have a JNI for bwa-mem, we can now implement a custom pipeline similar to GEM-mappability and http://lh3lh3.users.sourceforge.net/snpable.shtml. The pipeline is the following (still work in progress):

Iterate over the reference genome by sliding window (provided by the user)
Convert this bases into reads and map with the bwa-mem JNI. We should allow custom parameters for the mapping algorithm for fine tuning.
Test if this reads are mappable or not. How to determine this requires more thinking. My first idea is to call non-mappable regions as the regions that does not map uniquely, or with very low quality. Other ideas are welcome.
Output this regions, as a bed file or interval list.
Optionally, output the generated reads as mapped SAM. This could include only the reads that are bad or all of them (maybe huge, depending on the genome).

Another idea is to output directly the mapped SAM, and parse it afterwards to determine the non-mappable regions.

Maybe the GATK's HashedListTargetCollectionmay be useful to store the non-mappable regions.

Using the bwa-JNI from the GATK's team is feasible, but it requires an index image that will make things more difficult for the user, requiring from them to 1) run bwa index with the same version of the tool, 2) create the index image with the GATK tool (or we can do it using the JNI, but they should provide a folder for that), 3) run the tool with the FASTA file and the index image (they should be in sync).
This is too much for a simple tool where the only requirement should be a FASTA file, so this should wait til there is some way to create the index with the JNI and avoid extra steps. Of course, we should also accept a pre-built index image for avoid recomputation, and create a tool to do it (or use the GATK one).

The JNI already includes the indexing code.

We require first #314 to be able to apply the pipeline as defined in SNPable.


add WDLs for alignment

For the download cache we can actually leverage our miniWDL batch job definition which already has this implemented. Here I am creating WDL versions of our alignment steps.

Cool! Will this mean we can get rid of the entrypoint.sh code that lives in the monorepo?

@rzlim08 yep and the docker files in there, this actually makes the whole thing cleaner I probably should have thought of this before

@rzlim08 yep and the docker files in there, this actually makes the whole thing cleaner I probably should have thought of this before

It looks good, only thing is the Diamond -> Minimap2 name change


Multiple connections

Unable to find whether or not this is possible. Can i connect at least two modules simultaneously to the dingle?
Cheers

The Bluegiga stack for BLExxx devices supports simultaneous connections with up to 8 slaves at the same time. This only applies to the device operating in master mode, i.e. the one initiating outgoing connection requests. A single slave can accept an incoming connection from only a single master, and cannot simultaneously connect with any other device. These are Bluetooth 4.0 LE devices which implement a typical star network topology.

Using the dongle, i am successfully able to connect to one module. So far i haven't been able to connect to a second module simultaneously. Is this possible with this library?

Continued in #30.


On multi-page setup, it is not possible to navigate to a subpage of the nested route

Describe the bug
I am following these in the docs docs:
https://vitejs.dev/guide/build.html#multi-page-app
I read the issue #1831, which was actually almost the same, but has no sub routes for the nested index.html, which is where the problem occurs. I have separate sets of routes for my root index.html, and my nested index.html. The routes look like this:
For root index.html:
/
/page1
For the nested index.html:
/nested
/nested/page2
Following @yyx990803 's advice in issue #1831, if I go to /nested/ (with an ending slash), I get the page for the first route for the nested index.html. However, I can't get to the second route on my nested index.html by entering it in the browser like this: "/nested/page2". No matter if I enter this route in the browser with or without an ending slash, I get the root index.html with a 404, and not the nested index.html to load page2 of the nested index.html.
On the other hand, if I load /nested/ first, and then I navigate to /nested/page2 by clicking a link on /nested/, then it works fine. I think that there is some kind of a bug there that I can't navigate to /nested/page2 by directly entering it into the browser.
Previously when I was doing this with vue-cli, I would set up "pages" in the vue.config.js file, with two separate entry files, two separate templates, and two build paths/filenames, and everything worked beautifully. However, I can not do this with Vite for some reason. Maybe I am missing something!?
Reproduction
Here is my setup:
├── src/package.json
├── src/vite.config.js
├── src/index.html
├── src/main.js
├── src/router.js
└── src/nested
├── index.html
├── main.js
└── router.js
System Info

vite version: v2.0.5
Operating System: Mac OS v11.2.2
Node version: 14.15.5
Package manager npm and version: 7.6.0

Nevermind, found the problem. Sorry to bother you.

hey @alexbet I'm having the same issue, can you describe what you did to solve the problem? Which index.html are you talking about, the root or the nested one?

@tsnobip if you want to have completely separate configurations for the two pages, you need to put the two different pages in their own separate folders. For example:
/src-main
/src-admin
and the index.html files will need to go inside those folders. Unfortunately, there is no way to do it like we used to do it with Webpack, at least for now.

@tsnobip if you want to have completely separate configurations for the two pages, you need to put the two different pages in their own separate folders. For example:
/src-main
/src-admin
and the index.html files will need to go inside those folders. Unfortunately, there is no way to do it like we used to do it with Webpack, at least for now.

This definitely needs some improvement.


OG-USA API progress

This issue is intended to keep track of progress with the refactoring of OG-USA to include a more intuitive API.  This work is on going in PR #392.
Model solves:

[x] in the steady-state
[x] over the time path

Tests refactored:

[x] test_aggregates.py
[x] test_firm.py
[x] test_tax.py
[x] test_household.py
[x] test_txfunc.py (no changes were necessary since txfunc.py has not changed)
[x] test_run_ogusa.py
[x] test_parameters.py (can be removed, parameters.py replaced by pb_api.py)
[x] test_data.py (no changes were necessary since get_micro_data.py has not changed)
[x] test_basic.py
[x] test_TPI.py
[x] test_SS.py
[x] test_startyears.py
[x] test_pb_api.py
[x] test_user_inputs.py

Also:

[x] Regression tests pass

After the above:

[ ] Clean up docstrings
[ ] PEP8 compliance
[ ] Add SS/TPI  j is None/not None cases to test_tax.test_ETR()
[ ] Use pytest.mark.parameterize in `test_aggregates.py1
[ ] Use pytest.mark.parameterize in test_firm.py
[ ] Use pytest.mark.parameterize in test_tax.test_replacement_vals()

Will leave docstring clean up for later...


[SPARK-38743][SQL][TEST] Test the error class: MISSING_STATIC_PARTITION_COLUMN

What changes were proposed in this pull request?

This PR aims to add a test for the error class MISSING_STATIC_PARTITION_COLUMN to QueryCompilationErrorsSuite.
Why are the changes needed?

The changes improve test coverage, and document expected error messages in tests.
Does this PR introduce any user-facing change?

No, test-only.
How was this patch tested?

By running new test:
$ build/sbt "sql/testOnly *QueryCompilationErrorsSuite*"

Hi @maxgekk
Could you please review this PR?

Can one of the admins verify this patch?

Hi @MaxGekk
Could you please review the PR?


Add validation to the name field in configuration.

The validation will warn users that the field can only be "type string,
alphanumeric and lowercase with dashes only" using the same RegEx as the backend
resolves #795 #775

Something to consider, environment names will be attached to worker names, in those cases we need to either validate the environment name in the same way or modify it programmatically.