Can someone help a lost man?

Pre Steps
Hello,
I am trying to make homebridge work. I did a bunch of stuff going trough some pages on this github, I gotta say it's pretty hard to find what you need. Anyways i hope i get cen some help here.

Here's what i am trying to do :

Make homebridge work (add it to homekit)
Add 2 tuya smart plug

Where I'm at

I have a raspberry pi b+ running raspian.
I did all the steps to install homebridge and also the autoboot steps, but when i type
systemctl status homebridge
i get this :
root@raspberrypi:/home/pi/.homebridge# systemctl status homebridge
● homebridge.service - Node.js HomeKit Server
Loaded: loaded (/etc/systemd/system/homebridge.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Thu 2019-08-01 23:39:40 EDT; 2s ago
Process: 2253 ExecStart=/usr/local/bin/homebridge $HOMEBRIDGE_OPTS (code=exited, status=217/USER)
Main PID: 2253 (code=exited, status=217/USER)
That's issue # 1 id say.
Issue # 2
If i type homebridge
(to start homebridge i guess) I get  :
root@raspberrypi:/home/pi/.homebridge# homebridge
npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
[2019-08-01, 11:13:52 p.m.] config.json (/root/.homebridge/config.json) not found.
[2019-08-01, 11:13:53 p.m.] Loaded plugin: homebridge-tuya-web
[2019-08-01, 11:13:53 p.m.] Registering platform 'homebridge-tuya-web.TuyaWebPlatform'
[2019-08-01, 11:13:53 p.m.] ---
Load homebridge-tuya-web.TuyaWebPlatform
[2019-08-01, 11:13:53 p.m.] [homebridge-tuya-web.TuyaWebPlatform] No config found, disabling plugin.
Setup Payload:
X-HM://0023ISYWYN9B6
It says that i don't have a config.json file even though i see one when i go into the path.
I am kinda lost to what to tackle first and i feel like i should restart from scratch but i don't know how and i'd rather try to fix it instead.
Thank you!
Versions

Homebridge: homebridge --version
npm WARN npm npm does not support Node.js v10.15.2
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
0.4.50
Node:       node --version
v10.15.2
OS:
Raspian on pi b+

Configuration

{
  "bridge": {
    "name": "Homebridge",
    "username": "CC:22:3D:E3:CE:30",
    "port": 51826,
    "pin": "031-45-154"
  },

  "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",
  "ports": {
    "start": 52100,
    "end": 52150,
    "comment": "This section is used to control the range of ports that separate accessory (like camera or television) should be bind to."
  },
  "accessories": [
    {
      "accessory": "WeMo",
      "name": "Coffee Maker"
    }
  ],

  "platforms": [
    {
  "platform": "TuyaWebPlatform",
  "name": "TuyaWebPlatform",
  "options":
    {
      "username"<EMAIL_ADDRESS>      "password": "XXXXX",
      "countryCode": "1",
      "platform": "tuya",
      "pollingInterval": 10

   }
  ]
}

Homebridge Log / Command Output

You don’t want to start homebridge as user root.  Use pi instead.
I’m not sure about the npm warnings.  You might want to double-check how many versions of node and npm you have installed.  Update npm, normally through
$ sudo npm -g i npm

@ebaauw Thank you for the response! I will try that when i get back home! Do you know if this will fix the fact that homebridge does not see my config.json file?

@Haorak, Do not run as root. Log in as the user pi to do your normal work. Use the sudo command to do root level things. Start with that. Root is a separate super user from pi and its a totally different set of environment settings. If this does not make sense to you then Google these terms.

Thank you very much! It actually did work without being on root. I now have a working .json file aswell. Howerver still have issue with the autoboot function and my tuya-web-plugin (which i have an open item in that github). I am focusing on the plugins for now and will try the autoboot debugging later on. Thank you both for your responses!


CLOUD-50248 if security block is defined only change the type

@schfeca75

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/ambari-rest-client-pull-request/119/

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/ambari-rest-client-pull-request/120/


Side API

The Side API is simple enough that it needs no filtering and with only 2 sides, there is no paging.  :)
Until we add side info to any more types, this one is done.


Create an intro

Add an intro about myself: who am I, what is my strength.

Pumnia Mykhailo
My name is Mykhailo. I'm a student of Applied Math department of KPI. I have strong analytical and critical thinking. I'm a perfectionist.
I'm here to improve my soft and professional skills.


Update DSL

Vodafone has four different bank accounts for NZ customers (A, B, C and D)
We should update our DSL to account for this.
I am thinking we:

allow links in the utility description field so we can direct the user to more information (maybe we could automatically detect urls and automatically convert them into links that open in a new tab)
allow utilities to have a dropdown list to choose a different set of bankaccount + field descriptions:

we could do this by adding a "parent/child utility" relationship and so if a utlitly has children then we allow the user to select the payment details for one of the children (possibly difficult to apply relationship from flask admin gui?)
we could also do this by changing fields_description to bank_descriptions and moving bank account into that, then we basically make it a list of bank descriptions and if there is more then one we allow the user to select which one

http://help.vodafone.co.nz/app/answers/detail/a_id/17702/~/pay-your-bill-using-internet-banking
http://help.vodafone.co.nz/app/answers/detail/a_id/29688/~/should-i-choose-vodafone-a%2C-b%2C-c-or-d%3F

fixed in 5f91155

Issue: If I try to create any new utility company getting the following error:

So trying to edit the one that's already there will fail as well. How to fix that.

take a look at how the DSL has changed: https://github.com/zap-me/zap_bill_payment/blob/master/utility_form_dsl.md


'/' and '/index' don't both work and act differently on RHEL8 and CentOS8

Currently, the setup means '/' works on both to get to the landing page and '/index' works on neither. However, both app.route('/') and app.route('/index') are required decorators in app.py.
The ideal solution is to have both simultaneously working on both RHEL8 and CentOS8 or to be able to remove the '/index' path.

https://github.com/Southampton-RSG/wdra-extender/commit/18dcb5f4a2c4e7e78d487c3390e9c48faa5767c5

Fixed by moving the index to the top directory level file routes.py and out of app.py and assigning a new blueprint.


@orta => easily rest all user defaults

breaking my logout changes into small PRs so i don't make a mess.

test it ;)

@orta updated

accecee


[BUG] memory locking requested for opensearch process but memory is not locked

Describe the bug
[ERROR][o.o.b.Bootstrap          ] [] node validation exception
[1] bootstrap checks failed
[1]: memory locking requested for opensearch process but memory is not locked
To Reproduce
Switch to production usage (bind to non-localhost ip)
Bootstrap checks fails, because systemd unit file is missing
LimitMEMLOCK=infinity
Expected behavior
Service will start without editing systemd unit file.
Plugins
N/A
Screenshots
Host/Environment (please complete the following information):

OS: ubuntu
Version 20.04

Additional context

Whats the work around for this error ?

Whats the work around for this error ?

Until they fix that, you can create your own file on (in debian) /etc/systemd/system/opensearch.service.d/whatever.conf
with

in above override of default .service you should specify that it's a service
[Service]
LimitMEMLOCK=infinity

as default /usr/lib/systemd/system/opensearch.service ends with
[Install]
WantedBy=multi-user.target


trust-dns: 0.23.0 -> 0.24.0

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/bluejekyll/trust-dns/releases.
meta.description for trust-dns is: A Rust based DNS client, server, and resolver
meta.homepage for trust-dns is: https://trust-dns.org/
Updates performed

Rust version update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact

Checks done (click to expand)

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.24.0 with grep in /nix/store/fa13ikydvz733s42zz02c9vddcpmf16h-trust-dns-0.24.0
found 0.24.0 in filename of file in /nix/store/fa13ikydvz733s42zz02c9vddcpmf16h-trust-dns-0.24.0

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
trust-dns

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/fa13ikydvz733s42zz02c9vddcpmf16h-trust-dns-0.24.0 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A trust-dns https://github.com/r-ryantm/nixpkgs/archive/c71301070167e16735a1c4cc13bf2619aa03ed27.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/c71301070167e16735a1c4cc13bf2619aa03ed27#trust-dns

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/fa13ikydvz733s42zz02c9vddcpmf16h-trust-dns-0.24.0
ls -la /nix/store/fa13ikydvz733s42zz02c9vddcpmf16h-trust-dns-0.24.0/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

trust-dns

Maintainer pings
cc @uninsane for testing.

obsoleted by https://github.com/NixOS/nixpkgs/pull/263054


Create automatic backups

Rather than leaving it to the user to take manual backup, take automatic backups once in every 24 days (upon start).
We may need to register last backup date in the data file.

Done!


More precise Short explanation for prune

Remove unused images does not sound what the command does

- What I did
- How I did it
- How to verify it
- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "patch-1" git@github.com:funkydorian/docker-1.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.


[Request] Add CONTRIBUTING.md

Please add documentation explaining the standard procedures for contributing to this repository.
I'd expect information like how the expected git workflow, what you expect of bug reports, pull requests, commit messages, and so on. I also expect information on how to run tests, add documentation, and so on. I assume most of these things are fairly standard but for on-boarding, especially if you want community contributions, this is important.

I added an organization-wide pull request template.


Feature | integrate and improve automated validation tests script

What?

✅ Include and improve validation tests Leverage reference architecture script

Possible Checks

terraform fmt
terraform tflint
terraform validate
security (https://github.com/binbashar/le-tf-infra-aws/issues/73)
networking (overlapping, other validations?)

Why?

✅ Validate that the terraform code canonical format, layout and security enforcing best practices.
✅ Early phase error detection.

Reference
Current version is functional and could be found at the @bin folder in the Terraform Ref Arch repo.
╭─    ~/Binbash/repos/Leverage/ref-architecture/le-tf-infra-aws  on   master ····· ✔  at 12:32:08 
╰─ cd shared/base-network

╭─    ~/B/r/L/ref-architecture/le-tf-infra-aws/shared/base-network  on   master ·· ✔  at 12:32:13 
╰─ leverage validate_layout
[DEBUG] Found config file: /Users/exequielbarrirero/Binbash/repos/Leverage/ref-architecture/le-tf-infra-aws/shared/base-network/build.env
[DEBUG] Found config file: /Users/exequielbarrirero/Binbash/repos/Leverage/ref-architecture/le-tf-infra-aws/build.env
[ build.py - Starting task "_checkdir" ]
[ build.py - Completed task "_checkdir" ]
[ build.py - Starting task "validate_layout" ]
[INFO] CWD=/Users/exequielbarrirero/Binbash/repos/Leverage/ref-architecture/le-tf-infra-aws/shared/base-network
[INFO] REPO_DIR=/Users/exequielbarrirero/Binbash/repos/Leverage/ref-architecture/le-tf-infra-aws
[INFO] ACCOUNT_NAME: shared
[INFO] CATEGORY_NAME: base-network

[INFO] Checking if backend key starts with shared ...
[INFO]  -> OK
[INFO] Checking if backend key starts with shared and follows with base-network ...
[ERROR]  -> FAILED
[INFO] Checking if backend.config profile contains shared ...
[INFO]  -> OK
[INFO] Checking if backend.config bucket contains shared ...
[INFO]  -> OK
[INFO] Checking if backend.config dynamodb_table contains shared ...
[INFO]  -> OK
[INFO] Checking if base.config  contains shared ...
[INFO]  -> OK
[ build.py - Completed task "validate_layout" ]

@angelofenoglio @diego-ojeda-binbash as we've talked, I'm adding this new comment here to get this issue prioritized
TLDR

there should be a tf task to validate that the S3 state backend key is the correct one for the layer you are in.
this task should then be pre-task of the tf init, maybe of other tasks as well (to be defined).

CONSIDERATIONS

So If you are going to leverage tf apply locally we expect to have the pre-check validation automatically executed by default and interrupt the exec returning an error message.
We need the check to be run before a leverage tf [cmd] through the CLI, as it is a validation that the cli could easily do.
It could be run as a standalone command and at the same time before a tf init.
The more we shift left these type of validations the sooner we detect them, for instance before it is applied.
Consider ex-pynt allows us to do a task that is a pre-task of another one. Since we rely on this framework, the check command should be easy to develop and implement.

CC: @binbashar/leverage-ref-architecture-aws-admin @binbashar/leverage-ref-architecture-aws-dev


img.Download() error

我只要在img1.Allocate()后加上了img1.Download()这句话，运行起来就遇到段错误 (核心已转储)，不加上这句话获取不到关键点，是我GPU环境配置打问题吗

You should provide more information regarding your system and configuration or it will be hard to find out what is going on...


[openstack] get only user's projects not all of them

Change of trying to access each projects with accessing projects for user only when using keystone v3 with OpenStack Cloud provider.

@miq-bot add_label wip

@miq-bot remove_label wip

@miq-bot add_label darga/yes
https://bugzilla.redhat.com/show_bug.cgi?id=1343717

@petrblaho Looks good to me!
Just a link to Keystone API call which is used: http://developer.openstack.org/api-ref/identity/v3/index.html?expanded=list-projects-detail,list-projects-for-user-detail#list-projects-for-user

@aufi thanks for review and clarification of used API with link to docs.

:+1:

@miq-bot assign @chessbyte

Darga cherry-pick merge conflict:
$ git cherry-pick -x -m 1  ac70851
error: could not apply ac70851... Merge pull request #10090 from petrblaho/openstack-keystonev3-getting-projects
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'

$ git status
On branch darga
Your branch is up-to-date with 'upstream/darga'.
 as appropriate to mark resolution)

        both modified:   spec/vcr_cassettes/manageiq/providers/openstack/cloud_manager/refresher_rhos_icehouse.yml
        both modified:   spec/vcr_cassettes/manageiq/providers/openstack/cloud_manager/refresher_rhos_juno.yml
        both modified:   spec/vcr_cassettes/manageiq/providers/openstack/cloud_manager/refresher_rhos_kilo.yml
        both modified:   spec/vcr_cassettes/manageiq/providers/openstack/cloud_manager/refresher_rhos_kilo_keystone_v3.yml
        both modified:   spec/vcr_cassettes/manageiq/providers/openstack/cloud_manager/refresher_rhos_kilo_with_errors.yml
        both modified:   spec/vcr_cassettes/manageiq/providers/openstack/cloud_manager/refresher_rhos_liberty.yml
        deleted by us:   spec/vcr_cassettes/manageiq/providers/openstack/cloud_manager/refresher_rhos_liberty_keystone_v3.yml

Backported to Darga via #10924
$ git log
commit 4f1b1e2c991722adcf46ef2581e1d4262deb5ebd
Merge: 0d8a024 1247227
Author: Oleg Barenboim<EMAIL_ADDRESS>Date:   Wed Aug 31 20:31:52 2016 -0400

    Merge pull request #10924 from petrblaho/openstack-keystonev3-getting-projects-darga

    [DARGA] Backport ac70851: Get OpenStack Projects for current user


Using Ensembles with Swift project - Cloud data did download - But Data Doesn't Sync

I have posted a detailed question on Stack-overflow with all the steps I have taken http://stackoverflow.com/questions/36462771/how-to-use-ensembles-framework-in-swift-project .
Basically I have manually added Ensembles, updated the core data stack and added notifications.
I have two devices logged into the same iCloud account, and neither data is shared to the other device, or when deleting the app and reinstalling the data is not retrieved from the iCloud and saved to the persistent store.
I do get the following NSLog when 'sometimes' saving data or loading up the app.
2016-04-06 13:17:37.101 APPNAME[435:152241] Cloud data did download

This is the outcome for the following appDelegate notification function
func cloudDataDidDownload(notif: NSNotification) {
NSLog("Cloud data did download")
CoreDataStack.defaultStack.syncWithCompletion(nil)
}

The notification is sent from this function in the CoreDataStack for when changes are merged.
func persistentStoreEnsemble(ensemble: CDEPersistentStoreEnsemble!, didSaveMergeChangesWithNotification notification: NSNotification!) {
    CoreDataStack.defaultStack.managedObjectContext.performBlockAndWait({ () -> Void in
        CoreDataStack.defaultStack.managedObjectContext.mergeChangesFromContextDidSaveNotification(notification)
    })
    if notification != nil {
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(0.02 * Double(NSEC_PER_MSEC))), dispatch_get_main_queue(), {
            NSLog("Database was updated from iCloud")
            CoreDataStack.defaultStack.saveContext()
            NSNotificationCenter.defaultCenter().postNotificationName("DB_UPDATED", object: nil)
        })
    }
}

So everything seems like it should be working fine. I get no errors but the data is not syncing. I cannot tell if the problem is the data backing up to iCloud or retrieving from iCloud and merging with the persistent store. All I can tell is that data is not shared between devices using the same iCloud account and the app does not actually restore the data from the iCloud when reinstalling the app.
Where might I be going wrong ?
Might it have something to do with global identifiers, I am unsure how to use the identifiers for multiple entities. I have done the following for one of the entities.
func persistentStoreEnsemble(ensemble: CDEPersistentStoreEnsemble!, globalIdentifiersForManagedObjects objects: [AnyObject]!) -> [AnyObject]! {
    NSLog("%@", (objects as NSArray).valueForKeyPath("Entity1") as! [AnyObject])
    return (objects as NSArray).valueForKeyPath("Entity1") as! [AnyObject]
}

Are you reloading your UI when the changes get merged? Can you set a breakpoint in the did-save delegate method, and see if there are actually new or changed objects in the userInfo of the NSNotification object?
You could also use CDESetCurrentLogLevel to set the logging to verbose, and see what is happening.
How much data are you syncing? Begin with very little. iCloud can take a while to transfer it, so you sometimes have to  be patient. (CloudKit is much better.)
The Simple Sync in Swift example is a good one to see the steps needed in a very simple app.
In terms of global ids, I would say, welcome to the land of statically-typed pain. What an advancement this new approach is :)
In all seriousness, you will need a base class for your objects, or a protocol that your classes an conform to, and that has a uniqueIdentifier property or such.
BTW, the method you have now looks completely wrong, and could easily be why your are not seeing syncing. The method has to return unique ids for each of the objects that are passed in. Usually you store a UUID on each object. You cannot change this id after it is saved, or have two objects with the same id on the same device.
Drew

The notification for cloudDataDidDownload wasn't being called in my viewController only in my app delegate - the notification for cloudDataDidDownload has been unpredictable and often not being called.
How would i use CDESetCurrentLogLevel ? I cannot find an example of it.
Basically the project has 5 Entities with properties containing strings, numbers and relationships. I haven't changed anything within the classes.
I am unsure what the following code does, I tried converting your Objective-C code to Swift for my classes,
class func ValueTypeInManagedObjectContext(context: NSManagedObjectContext) -> Notebook {
    let fetch : NSFetchRequest = NSFetchRequest(entityName: "Notebook")
    var value : Notebook? = nil
    do {
        try value = context.executeFetchRequest(fetch).last as? Notebook
    } catch {
        value = nil
    }

    if value == nil {
        value = NSEntityDescription.insertNewObjectForEntityForName("Notebook", inManagedObjectContext: context) as? Notebook
        value!.index = NSNumber(bool: true)
    }

    return value!
}

I changed the iCloud container to a specific custom container and got the following error in the log,

Error in merge: Error Domain=DEErrorDomain Code=101 "(null)"

Then I remembered I also got this error for the previous container. Maybe this is an indication of what may be going wrong ?

The notification for cloudDataDidDownload wasn't being called in my viewController only in my app delegate - the notification for cloudDataDidDownload has been unpredictable and often not being called.

You shouldn’t rely entirely on the notifications. Best to sync at other times, perhaps setting up a timer every few minutes.
See our free book at http://leanpub.com/ensembles http://leanpub.com/ensembles

How would i use CDESetCurrentLogLevel ? I cannot find an example of it.

It's just a function. Searching the code should show how to do it. Might be in the book too.
    CDESetCurrentLoggingLevel(CDELoggingLevelVerbose);

Basically the project has 5 Entities with properties containing strings, numbers and relationships. I haven't changed anything within the classes.
I am unsure what the following code does, I tried converting your Objective-C code to Swift for my classes,
class func ValueTypeInManagedObjectContext(context: NSManagedObjectContext) -> Notebook {
let fetch : NSFetchRequest = NSFetchRequest(entityName: "Notebook")
var value : Notebook? = nil
do {
try value = context.executeFetchRequest(fetch).last as? Notebook
} catch {
value = nil
}
if value == nil {
    value = NSEntityDescription.insertNewObjectForEntityForName("Notebook", inManagedObjectContext: context) as? Notebook
    value!.index = NSNumber(bool: true)
}

return value!

}
You probably don’t need this. It is simple Core Data code, nothing to do with Ensembles. It is a method to try to fetch an object, and if it is not there, to create it. That’s all.

I changed the iCloud container to a specific custom container and got the following error in the log,
Error in merge: Error Domain=DEErrorDomain Code=101 "(null)"
Then I remembered I also got this error for the previous container. Maybe this is an indication of what may be going wrong ?

Have you registered your iCloud container in the developer portal?
And set it in your app settings?
Here is the Sample app in Swift: https://www.dropbox.com/s/qflbtokbe24noy8/Simple Sync in Swift.zip?dl=0 https://www.dropbox.com/s/qflbtokbe24noy8/Simple Sync in Swift.zip?dl=0
Drew

Thanks for the sample app project (and the book) they are great help.
I guess the problem I am having is due to the global identifiers - I am under the impression they are required as it ensures data does not get corrupted.
I am trying to work with existing data and a existing core data model, and trying to add ensembles to the project. Neither of the classes have a Unique Identifier property, and even if I migrate my core data model to add a UI property to the classes the old data still would not have identifiers.
Have you got any suggestions for this dilemma of  working with global identifiers for existing core data models of multiple entities ?

Yes, the best thing to do is read the chapter about Model in the book. It discusses different approaches to this.
Note that if you remove the global id delegate method, you should at least be able to test the sync a bit. It will generate its own global ids in that case. But you must completely remove that delegate method.
Drew

On 08 Apr 2016, at 00:03, jsingh<EMAIL_ADDRESS>wrote:
Thanks for the sample app project (and the book) they are great help.
I guess the problem I am having is due to the global identifiers - I am under the impression they are required as it ensures data does not get corrupted.
I am trying to work with existing data and a existing core data model, and trying to add ensembles to the project. Neither of the classes have a Unique Identifier property, and even if I migrate my core data model to add a UI property to the classes the old data still would not have identifiers.
Have you got any suggestions for this dilemma of working with global identifiers for existing core data models of multiple entities ?
—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub https://github.com/drewmccormack/ensembles/issues/223#issuecomment-207109261

I mentioned in the other thread once i used on two devices and updated my core data stack similar to your example app I got it working. Thanks @drewmccormack you have done a great job.
PS: I am looking to purchase the CloudKit version in the future, would there be problems going from using Ensembles 1 & iCloud to version 2 and CloudKit ? And would roughly what would it take, for e.g. creating the DB on CloudKit for each data type and their properties

It is fairly easy to move. Note that the old cloud data will not come into CloudKit. You start syncing over again.
To use CloudKit, you do some test syncing. That sets up the records in CloudKit. When you are ready, you put CloudKit in production mode and publish your app.
Kind regards,
Drew

On 09 Apr 2016, at 16:21, jsingh<EMAIL_ADDRESS>wrote:
I mentioned in the other thread once i used on two devices and updated my core data stack similar to your example app I got it working. Thanks @drewmccormack you have done a great job.
PS: I am looking to purchase the CloudKit version in the future, would there be problems going from using Ensembles 1 & iCloud to version 2 and CloudKit ? And would roughly what would it take, for e.g. creating the DB on CloudKit for each data type and their properties
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub


Wrangler fails with Error: spawnSync ENOENT on WSL2

🐛 Bug Report

Environment

operating system:

Windows WSL2 Ubuntu
Linux Lil-Lise 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

output of rustc -V:

zsh: command not found: rustc

output of node -v:

v14.3.0

output of wrangler -V:

Error: spawnSync /home/glen/.wrangler/bin/wrangler ENOENT
    at Object.spawnSync (internal/child_process.js:1070:20)
    at spawnSync (child_process.js:597:24)
    at Binary.run (/home/glen/.config/yarn/global/node_modules/binary-install/src/binary.js:131:20)
    at run (/home/glen/.config/yarn/global/node_modules/@cloudflare/wrangler/binary.js:39:10)
    at Object.<anonymous> (/home/glen/.config/yarn/global/node_modules/@cloudflare/wrangler/run-wrangler.js:4:1)
    at Module._compile (internal/modules/cjs/loader.js:1200:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10)
    at Module.load (internal/modules/cjs/loader.js:1049:32)
    at Function.Module._load (internal/modules/cjs/loader.js:937:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawnSync /home/glen/.wrangler/bin/wrangler',
  path: '/home/glen/.wrangler/bin/wrangler',
  spawnargs: [ '-V' ]
}

contents of wrangler.toml

N/A
Steps to reproduce
yarn global add @cloudflare/wrangler
wrangler -V

What did you expect to see?
Version number
What did you see instead?
Stack trace (see above).
Not sure if something is weird about my setup, this is a fairly fresh WSL2 installation but my first Rust tool I've tried.

Wow, just had the exact same issue with a fresh install on OSX:
> npm i @cloudflare/wrangler -g
/usr/local/bin/wrangler -><EMAIL_ADDRESS>
><EMAIL_ADDRESS>postinstall /usr/local/lib/node_modules/@cloudflare/wrangler
> node ./install-wrangler.js

Downloading release https://workers.cloudflare.com/get-npm-wrangler-binary/1.11.0/x86_64-apple-darwin
Error fetching release Request failed with status code 500
(node:58203) UnhandledPromiseRejectionWarning: Error: Request failed with status code 500
    at createError (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/axios/lib/core/settle.js:17:12)
    at RedirectableRequest.handleResponse (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/axios/lib/adapters/http.js:210:9)
    at RedirectableRequest.emit (events.js:314:20)
    at RedirectableRequest._processResponse (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/follow-redirects/index.js:269:10)
    at ClientRequest.RedirectableRequest._onNativeResponse (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/follow-redirects/index.js:50:10)
    at Object.onceWrapper (events.js:421:26)
    at ClientRequest.emit (events.js:314:20)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:640:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:58203) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:58203) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
+<EMAIL_ADDRESS>added 34 packages from 21 contributors in 4.435s

glen@vera
> wrangler -V                                                                            ~
Error: spawnSync /Users/glen/.wrangler/bin/wrangler ENOENT
    at Object.spawnSync (internal/child_process.js:1070:20)
    at spawnSync (child_process.js:602:24)
    at Binary.run (/usr/local/lib/node_modules/@cloudflare/wrangler/node_modules/binary-install/src/binary.js:131:20)
    at run (/usr/local/lib/node_modules/@cloudflare/wrangler/binary.js:39:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/@cloudflare/wrangler/run-wrangler.js:4:1)
    at Module._compile (internal/modules/cjs/loader.js:1251:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1272:10)
    at Module.load (internal/modules/cjs/loader.js:1100:32)
    at Function.Module._load (internal/modules/cjs/loader.js:962:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawnSync /Users/glen/.wrangler/bin/wrangler',
  path: '/Users/glen/.wrangler/bin/wrangler',
  spawnargs: [ '-V' ]
}

glen@vera
> uname -a
Darwin vera 19.6.0 Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64 x86_64

FYI: installed fine on an AWS EC2 instance
bitnami@glen:~$ npm i @cloudflare/wrangler -g
/opt/bitnami/nodejs/bin/wrangler -><EMAIL_ADDRESS>
><EMAIL_ADDRESS>postinstall /opt/bitnami/nodejs/lib/node_modules/@cloudflare/wrangler
> node ./install-wrangler.js

Downloading release https://workers.cloudflare.com/get-npm-wrangler-binary/1.11.0/x86_64-unknown-linux-musl
wrangler has been installed!
+<EMAIL_ADDRESS>added 34 packages from 21 contributors in 3.035s
bitnami@glen:~$ wrangler -V
👷 ✨  wrangler 1.11.0
bitnami@glen:~$ uname -a
Linux glen 4.4.0-1102-aws #113-Ubuntu SMP Wed Jan 29 14:54:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

So it appears to be aurora borealis at this time of year at this time of day localized entirely within my kitchen 🤷

I think it could be a Node version issue? I have v14.3.0 on my WSL2 installation and v14.8.0 on my Catalina macbook. The AWS ubuntu instance has v12.16.1.
For anyone else hitting this, I fixed it on both Node 14 machines by running:
# WSL2 only, just cause I hadn't used Rust before
sudo apt install build-essential
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
cargo install wrangler

glen@Lil-Lise
> wrangler -V                    /home/glen
👷 ✨  wrangler 1.11.0

On my mac, I already had Rust and Cargo, so I only needed to do:
cargo install wrangler

glen@vera
> wrangler -V                    ~
👷 ✨  wrangler 1.11.0

So I think this is probably a bug in the @cloudflare/wrangler JS for Node 14+, but using Cargo is fine for now. Hope this helps someone!

Have the same problem and I think the problem isn't about a Node version. I use docker and during the build process I can have the success build on one machine and error with the same Dockerfile but on a different machine

@geelen @viktor32 you should no longer encounter these errors when installing via npm, with the resolution of #1587. Please give it a try again at your convenience and let us know if this recurs!
@Electroid would you mind opening a new issue for more-gracefully handling errors fetching binaries? It's a great idea – but if we re-use this issue, the next person to come across it will be quite confused 😄

@ispivey seems that everything is ok now. Thank you, guys!

Experiencing the same issue on a clean NPM install on macOS.
brew install node

node -v
v17.4.0

npm -v
8.3.2

npm i @cloudflare/wrangler -g

added 22 packages, and audited 23 packages in 3s

wrangler -V
Error: spawnSync /Users/sshymko/.wrangler/bin/wrangler Unknown system error -86
    at Object.spawnSync (node:internal/child_process:1109:20)
    at spawnSync (node:child_process:814:24)
    at Binary.run (/opt/homebrew/lib/node_modules/@cloudflare/wrangler/binary-install.js:136:24)
    at run (/opt/homebrew/lib/node_modules/@cloudflare/wrangler/binary.js:45:10)
    at Object.<anonymous> (/opt/homebrew/lib/node_modules/@cloudflare/wrangler/run-wrangler.js:4:1)
    at Module._compile (node:internal/modules/cjs/loader:1097:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1149:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) {
  errno: -86,
  code: 'Unknown system error -86',
  syscall: 'spawnSync /Users/sshymko/.wrangler/bin/wrangler',
  path: '/Users/sshymko/.wrangler/bin/wrangler',
  spawnargs: [ '-V' ]
}

I'm seeing the same issue on a fresh mac osx machine.
kleeut@192-168-1-7 workers % node --version
v16.4.2
kleeut@192-168-1-7 workers % npm --version
7.18.1
kleeut@192-168-1-7 workers % npm i -g @cloudflare/wrangler@latest

changed 22 packages, and audited 23 packages in 2s

3 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
kleeut@192-168-1-7 workers % wrangler -v
Error: spawnSync /Users/kleeut/.wrangler/bin/wrangler Unknown system error -86
    at Object.spawnSync (node:internal/child_process:1086:20)
    at spawnSync (node:child_process:812:24)
    at Binary.run (/Users/kleeut/.nvm/versions/node/v16.4.2/lib/node_modules/@cloudflare/wrangler/binary-install.js:136:24)
    at run (/Users/kleeut/.nvm/versions/node/v16.4.2/lib/node_modules/@cloudflare/wrangler/binary.js:45:10)
    at Object.<anonymous> (/Users/kleeut/.nvm/versions/node/v16.4.2/lib/node_modules/@cloudflare/wrangler/run-wrangler.js:4:1)
    at Module._compile (node:internal/modules/cjs/loader:1095:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
    at Module.load (node:internal/modules/cjs/loader:975:32)
    at Function.Module._load (node:internal/modules/cjs/loader:816:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:79:12) {
  errno: -86,
  code: 'Unknown system error -86',
  syscall: 'spawnSync /Users/kleeut/.wrangler/bin/wrangler',
  path: '/Users/kleeut/.wrangler/bin/wrangler',
  spawnargs: [ '-v' ]
}
kleeut@192-168-1-7 workers %

@KleeUT same here.
Looks like nobody's looking at the closed issues.
We should probably submit a new issue for this.


mongoose-beautiful-unique-validation is not support mongoose.Model.create method

I want to mongoose-beautiful-unique-validation  support mongoose.Model.create method, if you have time ,please fix this. thanks a lot.

Working on this right now. I think this raises a couple of questions.

Model.create uses save internally so it should already work, except it doesn't.
Should we also support Model.insertMany, which doesn't use save internally?
Should we also support Model.update?

This could create a lot of duplicate code. Would be great to find a way to shortcut that. I'm going to create a pull request with tests.

I just learn MEAN from this demo: CRUD.NodeJSWithTypescriptAndMongoose.zip
I think his code indicates mongoose Model like a repository. should not call model.save directly.
I don't know how to say, if call model.save, it will make code ugly. at least is my thought.
I think we can leave Model.update, and do check in our business logic.
I will try Model.create in my project, thanks a lot.

but if support Model.update will be nice. can a switch offer to use update or not. it's very good. Do you think?

still can't work for me. it's kind of odd.

what is the status of this issue @matteodelabre ?

Hi @raitucarp, unfortunately I didn't have enough time to address this issue recently. I will look into it as soon as possible. Until then, pull requests are always welcome. ;)

This is now supported in 5.0.0! :tada:
@JeffreyChan @raitucarp

ok thanks


[ObjectDB] unecessary reload of lazyfields

The OObjectProxyMethodHandler reloads a field everytime if the version of the object changed.
Class A declares a field of the type Class B and we update A but the field of B doesn't changed, the object of the B-Field will be reloaded and a new object created.
This seems very unecessary to me. Also it destroys all references to this field content.
Are there some reasons for this behaviour ?

if the version is changed means that the data you have in the object is outdated, that's the reason for the reload of the filed.

The problem I see:
If B is a registered entiy than is there only one reason to update the field, if B will be replaced with null or an other db-entry of B. In any other case it isn't necessary to update the field and to reload B from Database and to create another proxied instance.
But actually this will be done everytime in case of an update of A and an invoke of the B-getter.
Every update in the object B itself, will be handled from B and has nothing to do with A.
So if the version of A changed, the field with B should only be reloaded if the database-entry isn't the same anymore. In any other case, it isn't necessary.
Could you please recheck my description ?

Hi,
I fixed some wrong reload of data in the object layer long time ago, closing this.
Regards


[HUDI-8468] use payload to do merging inside the expression payload

Change Logs
Use payload to do merging inside of expression payload.
If your tables payload was overwrite with latest, and you did MIT, it would use ordering field if defined. Now we will use the actual payload.
Impact
MIT is more correct
Risk level (write none, low medium or high below)
low
Documentation Update
N/A
Contributor's checklist

[ ] Read through contributor's guide
[ ] Change Logs and Impact were stated clearly
[ ] Adequate tests were added if applicable
[ ] CI passed

Folks, Jon is OOO and I'm taking care of this piece now. Let's review it here https://github.com/apache/hudi/pull/12242 as I cannot push to Jon's PR


Merge allOf definitions #174

This is my first draft of the feature to merge allOf definitions #174
I will work on the unit test part in the following days, but feel free to add some comments.

This feature will be implemented using the dedicated library:
https://www.npmjs.com/package/json-schema-merge-allof


add playwright and some tests

closes #494

@Robiquet - removed a waitForTimeout with setting different lcoators and waiting for networkidle load state.


docker image cannot pull

docker pull ghcr.io/aperim/nvidia-cuda-ffmpeg:latest
Error response from daemon: Head "https://ghcr.io/v2/aperim/nvidia-cuda-ffmpeg/manifests/latest": unauthorized

Thank's @jkl375 - The images are all public, I've created a ticket Github support to see what's going on.
Will update here when I get advice it's fixed.

The package had been changed to private. It is now public again, apologies for the issue @jkl375
I will close, but please re-open if you still can't pull.


Why IPv4 does not derive Integral?

IPv6 is deriving Integral and it is very useful for address computation.
But IPv4 does not derive Integral.  If IPv4 also derives Integral, it's very useful.

Ive never actually needed the num or integral instances for these types. Why are they useful? What does it mean to add two ip addresses? What does it mean to perform integral division on ip addresses?
To me, these instances should probably be removed, rather than added.

In https://github.com/andrewthad/haskell-ip/pull/58, the Integral instance for IPv6 has been removed. The bad thing about a Num instance for IPv4 (or IPv6) is that it makes it possible for the compiler to accept code with numeric literal in the wrong place. It's also not clear to me which method of Integral would be useful for IPv4 addresses. I'm closing this issue, but if you'd like to open another explaining the utility you find in div or mod that isn't covered by combinators in this library, I'm willing to try to come up with some monomorphic combinators that offer the same convenience.


Update the PulumiUP OpenGraph image

Fixes https://github.com/pulumi/marketing/issues/116.

@SaraDPH In a few minutes this PR will generate a preview that we should be able to use to verify that the image looks like what we expect.

@SaraDPH Here's how the Twitter and LinkedIn previews look:

Did you want to make any changes to the text copy as well? If so, you can make a suggestion directly in the GitHub UI by clicking the Files Changed tab (☝) and then dragging the plus icon and clicking the suggestion button:
https://user-images.githubusercontent.com/274700/158703604-5e5b2bfb-52eb-4612-9400-1b0416f1e74c.mov

@cnunciato the suggestion button doesn't appear to me... can I just write '''suggestion or it may break something?!

Chatted with Sara, this was because she was looking a code file outside of the context of the pr, once she went directly to the files changed tab of the pr she was able to interact with the suggested changes button.

The description looks good.
Did you see my suggestion for the Title? Please update as that is what it shows as a headline on search

@SaraDPH Yes! I committed your suggestion (thanks!), but it looks like it's got a minor syntax error. I'll fix that up and then we should be good to go.


Error when create raw transaction

I create raw transaction. All is OK until step sendrawtransaction. Response is 256: absurdly-high-fee.
Please help me.Thank you so much

Hi @hungdung1326 :
Maybe it can help you : https://github.com/OmniLayer/omnicore/wiki/Use-the-raw-transaction-API-to-create-a-Simple-Send-transaction  (see the point number 6 )

Hi @hungdung1326,
the warning is returned, when you are about to pay a lot of mining fees. There is a way around it, but let's first clarify: did you add a change output?


test.go: Add unit tests as a target in test/config.json.

@michael-berlin
Now there's just one command to run everything.
Also, unit tests will be re-run to check for flakiness.

LGTM :-)
The only thing left are the Java tests. I can add that later as a "Command" based test.


CURVE authentication - keys from env? (files are unsafe)

I have built a small server application that needs to work over the (corporate) network. The clients are cloud applications that are ran from a CI/CD pipeline. I don't like the fact that I need to include the keys as a file in my repo and then need to push these files to the cloud. I would much rather include them as environment variables. The documentation seems to suggest it's files only. But is it?
I have built the applications (both server and client side) using the Ironhouse example in which the server needs its own private and public keys but the client needs client private key, client public key but also server public key. So I'd think that just using zmq.curve_keypair() to generate the keys on the fly at the client side will not work?

Yup, you can do socket.curve_secretkey = os.getenv("CURVE_SECRETKEY").encode("ascii") and such, it should work fine.


proposal: testing: verbose output should print package path before printing test output

This makes it clear which package is being tested as the test output is printed.
For example, at the end of
=== RUN   TestFoo
--- PASS: TestFoo (0.00s)
PASS
ok  	example.com/foo	0.138s
=== RUN   TestBar

which package are we in? We don't know from the output. For large projects, where there are too many packages to memorize, especially their lexicographic order, this is valuable when you spot output you immediately want to investigate, but it takes a long time for the full package testing to finish, at which point the actual package path is printed out.
So, it would instead be something like
=== RUN   example.com/foo
=== RUN   TestFoo
--- PASS: TestFoo (0.00s)
--- PASS: example.com/foo	0.138s
=== RUN   example.com/bar
=== RUN   TestBar

Perhaps the new -fullpath flag added for #37708 covers your use case?
You've shown a passing test, but that's usually uninteresting.
With a failing test it would print
--- FAIL: TestXXX (0.00s)
    example.com/testrepo0295/main_test.go:6: it broke
FAIL
exit status 1
FAIL	example.com/testrepo0295	0.001s

I don't think we can change the default output, but we could add a new flag like -test.fullpath if that is not enough.

@seankhliao I think that would indeed solve the problem in most cases, but only if you think to use -fullpath in the first place. If the current verbose test output format won't be changed, then I suppose remembering to use -fullpath is no worse than remembering to use a new -printpkg flag for the proposed behavior.
One case where it wouldn't work is if t.FailNow() is used without other output, which is probably rare, but still possible:
=== RUN   TestCreate
--- FAIL: TestCreate (0.00s)
=== RUN   TestDelete
--- FAIL: TestDelete (0.00s)

I didn't understand from https://github.com/golang/go/issues/37708 the reason why changing the output format would break anyone. I could understand that position for changing the JSON format, but what would break if, say, a === RUN   pkg/path line was added?
I do like the symmetry of before/after package delimiters for package results, like we have for tests, but perhaps that's just me.

I just ran across a different case where this would be useful, and -fullpath doesn't help.
If a test hangs forever, you can get output like this (all tests are parallel):
[...snip...]
=== NAME  TestIntegrateRealQueueDeleteMessage
    integration_test.go:58: 2a
--- PASS: TestIntegrateRealQueueSendMessage (0.50s)
=== CONT  TestRetryQueueDeleteMessage
--- PASS: TestIntegrateRealServiceUserActive (1.46s)
=== CONT  TestRetryQueueReceiveMessage
--- PASS: TestRetryQueueDeleteMessage (0.05s)
=== CONT  TestRetry
--- PASS: TestRetry (0.00s)
--- PASS: TestRetryQueueReceiveMessage (0.05s)

There's no clear indication of what test is hanging. Nothing is logged, so -fullpath doesn't help.


Aggressive sanitizer

In a fancier version should have the whitelist be a list of regex to match against so that self. can work if the subreddit isn't politics but thats too much work.

Cannot find variable `sanitizeUrl`

162|     , Html.a [ class "storyLink", anim, style_, href sanitizeUrl post.url, title post.title ] [ text post.title ]

I think you want sanitizePost?

O/w looks cool. Ignore CI and merge when you're ready.


grafana started to listen globally by default instead of only on localhost (22.05 -> 22.11)

Issue description
#191768 changed on which address Grafana listens by default. Previously (under 22.05) it was localhost only and it was necessary to explicitly adjust this if so desired. Now (with 22.11) Grafana is listening on all IPs.
Previously:
https://github.com/NixOS/nixpkgs/blob/79e63f30ed2ff36cd0d9c2f7dadae5925c1a65db/nixos/modules/services/monitoring/grafana.nix#L293-L297
[root@stats:~]# ss -tlnp | grep -E "State|grafana"
State  Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
LISTEN 0      4096       <IP_ADDRESS>:3000      <IP_ADDRESS>:*    users:(("grafana-server",pid=774,fd=8))

New default is to listen on all IPs:
https://github.com/NixOS/nixpkgs/blob/becdf0edefcd52c13a60994f264f779b89bdf708/nixos/modules/services/monitoring/grafana.nix#L366-L370
[root@stats:~]# ss -tlnp | grep -E "State|grafana"
State  Recv-Q Send-Q Local Address:Port Peer Address:PortProcess
LISTEN 0      4096               *:3000            *:*    users:(("grafana-server",pid=286547,fd=11))

Without enabled (and properly configured) firewall this could result in situations where people are exposing their Grafana installation unintentionally.
@offline @fpletz @willibutz @globin @ma27 @Frostman @KFearsoff
Technical details
[root@stats:~]# nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.15.77, NixOS, 22.11 (Raccoon), 22.11.1137.dac57a4eccf`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.11.1`
 - channels(root): `"nixos-22.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Without enabled (and properly configured) firewall this could result in situations where people are exposing their Grafana installation unintentionally.

but the default settings should suffice to catch this, right?

but the default settings should suffice to catch this, right?

Yes, I would think so. Therefore not really dramatic in most cases.


cgo: aa_change_hat with libapparmor shows inconsistent behaviour

Context: Trying to use libapparmor from Go using cgo (on Ubuntu 18.04/VirtualBox).
What version of Go are you using (go version)?
go version go1.10.1 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build813461694=/tmp/go-build -gno-record-gcc-switches"

What did you do?
I was hoping to use cgo to add support for AppArmor aa_change_hat API:
package main

/*
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/apparmor.h>

int apparmor_change_hat(char* hat_name, unsigned long token) {
	printf("Changing hat to: %s (token: %ld)\n", hat_name, token);
	int r = aa_change_hat(hat_name, token);
	printf("aa_change_hat returned : %d\n", r);
	return r;
}
*/
// #cgo LDFLAGS: -lapparmor
import "C"
import "unsafe"
import "log"

func aa_change_hat(hat string, token uint64) error {
	cs := C.CString(hat)
	defer C.free(unsafe.Pointer(cs))
	retval, err := C.apparmor_change_hat(cs, C.ulong(token))
	log.Printf("%d\n", retval)
	if retval != 0 {
		return err
	}

	return nil
}

func main() {
	err := aa_change_hat("lolhat", 1234)
	if err != nil {
		log.Fatal(err)
	}
}

What did you expect to see?
Since the hat lolhat does not exist and my binary is not even confined with AppArmor, I expect the aa_change_hat call fail and return -1 (according to its specification: http://manpages.ubuntu.com/manpages/bionic/man2/aa_change_hat.2.html) so, I was expecting this output:
Changing hat to: lolhat (token: 1234)
aa_change_hat returned : -1

from inside the C function, as it does if I compile the C part separately using gcc:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/apparmor.h>

int apparmor_change_hat(char* hat_name, unsigned long token) {
	printf("Changing hat to: %s (token: %ld)\n", hat_name, token);
	int r = aa_change_hat(hat_name, token);
	printf("aa_change_hat returned : %d\n", r);
	return r;
}

int main() {
	apparmor_change_hat("lolhat", 1234);
}

and I run it:
$ gcc tmp.c -o tmp -lapparmor
$ ./tmp
Changing hat to: lolhat (token: 1234)
aa_change_hat returned : -1

Notice that aa_change_hat returns -1 as it should.
What did you see instead?
If you run the go app, the output will be:
Changing hat to: lolhat (token: 1234)
aa_change_hat returned : 0
2018/08/11 15:43:58 0

which is incorrect: I would expect the call to the C function aa_change_hat behave the same way, so the return value should be -1 and errno should be set appropriately but that doesn't seem to happen.

@ianlancetaylor

I don't know what is happening here, but the output from your C code seems to show that it is happening entirely within C.  I don't know what AppArmor does or how it works.  It may be that it is somehow incompatible with Go, though I don't know why that would be.
I'm going to close this since I think it's unlikely to be fixed by any change to Go.


Proposal - don't verify local apollo-codegen

This task runs every build and wastes build time even though I've already explicitly told it I have a local installation. I'd like to basically have a "trust me" mode

After introducing new code generation engine this issue seems like obsolete, as apollo-codegen will be removed completely.


Dev webdashboard

Added a web dashboard to view the incidents through browsers.
See here: Dengue-stop Web

Preview

looks great


⚠ Bofrost.be has degraded performance

In 08a34cc, Bofrost.be (https://www.bofrost.be) experienced degraded performance:

HTTP code: 200
Response time: 1547 ms

Resolved: Bofrost.be performance has improved in a12a004 after 6 minutes.


ImportError: cannot import name 'choices'

@slavakurilyak thank you for your work.
When I try to run the app by docker-compose up  I get ImportError: cannot import name 'choices' error. Output is below. Do you have an idea why this is happening?
Terminal Output
Starting redis ... done
Starting db       ... done
Recreating ml      ... done
Recreating worker  ... done
Recreating web     ... done
Recreating updater ... done
Attaching to redis, db, worker, ml, updater, web
db         | 2019-03-15 18:34:48.991 UTC [1] LOG:  listening on IPv4 address "<IP_ADDRESS>", port 5432
db         | 2019-03-15 18:34:48.991 UTC [1] LOG:  listening on IPv6 address "::", port 5432
db         | 2019-03-15 18:34:49.000 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
redis      | 1:C 15 Mar 18:34:48.101 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis      | 1:C 15 Mar 18:34:48.101 # Redis version=4.0.5, bits=64, commit=00000000, modified=0, pid=1, just started
redis      | 1:C 15 Mar 18:34:48.101 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
redis      | 1:M 15 Mar 18:34:48.103 * Running mode=standalone, port=6379.
redis      | 1:M 15 Mar 18:34:48.103 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
redis      | 1:M 15 Mar 18:34:48.103 # Server initialized
redis      | 1:M 15 Mar 18:34:48.104 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.
redis      | 1:M 15 Mar 18:34:48.104 * DB loaded from disk: 0.000 seconds
redis      | 1:M 15 Mar 18:34:48.104 * Ready to accept connections
worker     | monitor.1 started (pid=8)
db         | 2019-03-15 18:34:49.032 UTC [18] LOG:  database system was shut down at 2019-03-15 18:29:43 UTC
db         | 2019-03-15 18:34:49.043 UTC [1] LOG:  database system is ready to accept connections
worker     | worker.1 started (pid=9)
web        | dev.1 started (pid=7)
worker     | [2019-03-15 18:34:53 +0000] [10] [INFO] Starting gunicorn 19.9.0
worker     | [2019-03-15 18:34:53 +0000] [10] [INFO] Listening at: http://<IP_ADDRESS>:8080 (10)
worker     | [2019-03-15 18:34:53 +0000] [10] [INFO] Using worker: sync
worker     | [2019-03-15 18:34:53 +0000] [19] [INFO] Booting worker with pid: 19
web        |  * Serving Flask app "autoapp.py" (lazy loading)
web        |  * Environment: docker-dev
web        |  * Debug mode: on
web        |  * Running on http://<IP_ADDRESS>:8080/ (Press CTRL+C to quit)
updater    | updater.1 started (pid=8)
updater    | Traceback (most recent call last):
updater    |   File "updater.py", line 10, in <module>
updater    |     from app.settings import get_from_datastore
updater    |   File "/app/app/settings.py", line 20, in <module>
updater    |     class Config(object):
updater    |   File "/app/app/settings.py", line 41, in Config
updater    |     CLIENT_ACCESS_TOKEN = get_from_datastore("CLIENT_ACCESS_TOKEN", "production")
updater    |   File "/app/app/settings.py", line 11, in get_from_datastore
updater    |     ds = datastore.Client()
updater    |   File "/usr/local/lib/python3.6/site-packages/google/cloud/datastore/client.py", line 205, in __init__
updater    |     project=project, credentials=credentials, _http=_http)
updater    |   File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 215, in __init__
updater    |     _ClientProjectMixin.__init__(self, project=project)
updater    |   File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 169, in __init__
updater    |     project = self._determine_default(project)
updater    |   File "/usr/local/lib/python3.6/site-packages/google/cloud/datastore/client.py", line 222, in _determine_default
updater    |     return _determine_default_project(project)
updater    |   File "/usr/local/lib/python3.6/site-packages/google/cloud/datastore/client.py", line 75, in _determine_default_project
updater    |     project = _base_default_project(project=project)
updater    |   File "/usr/local/lib/python3.6/site-packages/google/cloud/_helpers.py", line 179, in _determine_default_project
updater    |     _, project = google.auth.default()
updater    |   File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 294, in default
updater    |     credentials, project_id = checker()
updater    |   File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 165, in _get_explicit_environ_credentials
updater    |     os.environ[environment_vars.CREDENTIALS])
updater    |   File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 89, in _load_credentials_from_file
updater    |     'File {} was not found.'.format(filename))
updater    | google.auth.exceptions.DefaultCredentialsError: File /app/Kryptos-Staging-3deb8860d570.json was not found.
updater    | updater.1 stopped (rc=1)
web        |  * Restarting with stat
updater exited with code 1
worker     | [2019-03-15 18:34:56 +0000] [19] [ERROR] Exception in worker process
worker     | Traceback (most recent call last):
worker     |   File "/usr/local/lib/python3.6/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker     |     worker.init_process()
worker     |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 129, in init_process
worker     |     self.load_wsgi()
worker     |   File "/usr/local/lib/python3.6/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
worker     |     self.wsgi = self.app.wsgi()
worker     |   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/base.py", line 67, in wsgi
worker     |     self.callable = self.load()
worker     |   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
worker     |     return self.load_wsgiapp()
worker     |   File "/usr/local/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
worker     |     return util.import_app(self.app_uri)
worker     |   File "/usr/local/lib/python3.6/site-packages/gunicorn/util.py", line 350, in import_app
worker     |     __import__(module)
worker     |   File "/core/monitor.py", line 5, in <module>
worker     |     from kryptos.settings import REDIS_HOST, REDIS_PORT
worker     |   File "/core/kryptos/__init__.py", line 2, in <module>
worker     |     from .logger import logger_group, setup_logging, add_logger
worker     |   File "/core/kryptos/logger.py", line 16, in <module>
worker     |     cloud_client = google.cloud.logging.Client()
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/logging/client.py", line 104, in __init__
worker     |     project=project, credentials=credentials, _http=_http)
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 215, in __init__
worker     |     _ClientProjectMixin.__init__(self, project=project)
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 169, in __init__
worker     |     project = self._determine_default(project)
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 182, in _determine_default
worker     |     return _determine_default_project(project)
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/_helpers.py", line 179, in _determine_default_project
worker     |     _, project = google.auth.default()
worker     |   File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 294, in default
worker     |     credentials, project_id = checker()
worker     |   File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 165, in _get_explicit_environ_credentials
worker     |     os.environ[environment_vars.CREDENTIALS])
worker     |   File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 89, in _load_credentials_from_file
worker     |     'File {} was not found.'.format(filename))
worker     | google.auth.exceptions.DefaultCredentialsError: File Kryptos-Staging-3deb8860d570.json was not found.
worker     | [2019-03-15 18:34:56 +0000] [19] [INFO] Worker exiting (pid: 19)
worker     | Traceback (most recent call last):
worker     |   File "kryptos/worker/manager.py", line 18, in <module>
worker     |     from kryptos import logger_group, setup_logging
worker     |   File "/core/kryptos/__init__.py", line 2, in <module>
worker     |     from .logger import logger_group, setup_logging, add_logger
worker     |   File "/core/kryptos/logger.py", line 16, in <module>
worker     |     cloud_client = google.cloud.logging.Client()
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/logging/client.py", line 104, in __init__
worker     |     project=project, credentials=credentials, _http=_http)
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 215, in __init__
worker     |     _ClientProjectMixin.__init__(self, project=project)
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 169, in __init__
worker     |     project = self._determine_default(project)
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 182, in _determine_default
worker     |     return _determine_default_project(project)
worker     |   File "/usr/local/lib/python3.6/site-packages/google/cloud/_helpers.py", line 179, in _determine_default_project
worker     |     _, project = google.auth.default()
worker     |   File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 294, in default
worker     |     credentials, project_id = checker()
worker     |   File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 165, in _get_explicit_environ_credentials
worker     |     os.environ[environment_vars.CREDENTIALS])
worker     |   File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 89, in _load_credentials_from_file
worker     |     'File {} was not found.'.format(filename))
worker     | google.auth.exceptions.DefaultCredentialsError: File Kryptos-Staging-3deb8860d570.json was not found.
worker     | [2019-03-15 18:34:57 +0000] [10] [INFO] Shutting down: Master
worker     | [2019-03-15 18:34:57 +0000] [10] [INFO] Reason: Worker failed to boot.
worker     | monitor.1 stopped (rc=3)
worker     | sending SIGTERM to worker.1 (pid 9)
worker     | worker.1 stopped (rc=-15)
worker exited with code 3
web        |  * Debugger is active!
web        |  * Debugger PIN: 302-198-789
ml         | [2019-03-15 18:35:00.129441] INFO: ML_INDICATOR: Starting initial ML worker
ml         | /usr/local/lib/python3.6/site-packages/sklearn/ensemble/weight_boosting.py:29: DeprecationWarning: numpy.core.umath_tests is an internal NumPy module and should not be imported. It will be removed in a future NumPy release.
ml         |   from numpy.core.umath_tests import inner1d
web        | <IP_ADDRESS> - - [15/Mar/2019 18:35:39] "GET / HTTP/1.1" 500 -
web        | Traceback (most recent call last):
web        |   File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 325, in __call__
web        |     self._flush_bg_loading_exception()
web        |   File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 313, in _flush_bg_loading_exception
web        |     reraise(*exc_info)
web        |   File "/usr/local/lib/python3.6/site-packages/flask/_compat.py", line 35, in reraise
web        |     raise value
web        |   File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 302, in _load_app
web        |     self._load_unlocked()
web        |   File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 317, in _load_unlocked
web        |     self._app = rv = self.loader()
web        |   File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 372, in load_app
web        |     app = locate_app(self, import_name, name)
web        |   File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 242, in locate_app
web        |     '\n\n{tb}'.format(name=module_name, tb=traceback.format_exc())
web        | flask.cli.NoAppException: While importing "autoapp", an ImportError was raised:
web        |
web        | Traceback (most recent call last):
web        |   File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 235, in locate_app
web        |     __import__(module_name)
web        |   File "/app/autoapp.py", line 4, in <module>
web        |     from app.app import create_app
web        |   File "/app/app/app.py", line 11, in <module>
web        |     from app import api, bot, models, task
web        |   File "/app/app/bot/__init__.py", line 1, in <module>
web        |     from . import assistant
web        |   File "/app/app/bot/assistant.py", line 9, in <module>
web        |     from app.utils import build
web        |   File "/app/app/utils/build.py", line 9, in <module>
web        |     from app.utils import choices
web        | ImportError: cannot import name 'choices'
web        | <IP_ADDRESS> - - [15/Mar/2019 18:35:39] "GET /?__debugger__=yes&cmd=resource&f=style.css HTTP/1.1" 200 -
web        | <IP_ADDRESS> - - [15/Mar/2019 18:35:39] "GET /?__debugger__=yes&cmd=resource&f=debugger.js HTTP/1.1" 200 -
web        | <IP_ADDRESS> - - [15/Mar/2019 18:35:39] "GET /?__debugger__=yes&cmd=resource&f=jquery.js HTTP/1.1" 200 -
web        | <IP_ADDRESS> - - [15/Mar/2019 18:35:39] "GET /?__debugger__=yes&cmd=resource&f=ubuntu.ttf HTTP/1.1" 200 -
web        | <IP_ADDRESS> - - [15/Mar/2019 18:35:40] "GET /?__debugger__=yes&cmd=resource&f=console.png HTTP/1.1" 200 -

Flask output

flask.cli.NoAppException
flask.cli.NoAppException: While importing "autoapp", an ImportError was raised:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 235, in locate_app
    __import__(module_name)
  File "/app/autoapp.py", line 4, in <module>
    from app.app import create_app
  File "/app/app/app.py", line 11, in <module>
    from app import api, bot, models, task
  File "/app/app/bot/__init__.py", line 1, in <module>
    from . import assistant
  File "/app/app/bot/assistant.py", line 9, in <module>
    from app.utils import build
  File "/app/app/utils/build.py", line 9, in <module>
    from app.utils import choices
ImportError: cannot import name 'choices'

Traceback (most recent call last)
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 330, in __call__
rv = self._load_unlocked()
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 317, in _load_unlocked
self._app = rv = self.loader()
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 372, in load_app
app = locate_app(self, import_name, name)
File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 242, in locate_app
'\n\n{tb}'.format(name=module_name, tb=traceback.format_exc())
flask.cli.NoAppException: While importing "autoapp", an ImportError was raised: Traceback (most recent call last): File "/usr/local/lib/python3.6/site-packages/flask/cli.py", line 235, in locate_app __import__(module_name) File "/app/autoapp.py", line 4, in <module> from app.app import create_app File "/app/app/app.py", line 11, in <module> from app import api, bot, models, task File "/app/app/bot/__init__.py", line 1, in <module> from . import assistant File "/app/app/bot/assistant.py", line 9, in <module> from app.utils import build File "/app/app/utils/build.py", line 9, in <module> from app.utils import choices ImportError: cannot import name 'choices'

@canercak Thanks for bringing this issue to my attention! Here is a commit file to resolve this issue. You can find the latest code release on the develop branch.

thank you, I no longer get that error. However I'm getting this since I don't have the google cloud json. Will try to make it work without that.
google.auth.exceptions.DefaultCredentialsError
google.auth.exceptions.DefaultCredentialsError: File /app/Kryptos-Staging-3deb8860d570.json was not found.

Traceback (most recent call last)
File "/app/autoapp.py", line 4, in <module>
from app.app import create_app
File "/app/app/app.py", line 14, in <module>
from app.settings import DockerDevConfig, ProdConfig
File "/app/app/settings.py", line 20, in <module>
class Config(object):
File "/app/app/settings.py", line 41, in Config
CLIENT_ACCESS_TOKEN = get_from_datastore("CLIENT_ACCESS_TOKEN", "production")
File "/app/app/settings.py", line 11, in get_from_datastore
ds = datastore.Client()
File "/usr/local/lib/python3.6/site-packages/google/cloud/datastore/client.py", line 205, in __init__
project=project, credentials=credentials, _http=_http)
File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 215, in __init__
_ClientProjectMixin.__init__(self, project=project)
File "/usr/local/lib/python3.6/site-packages/google/cloud/client.py", line 169, in __init__
project = self._determine_default(project)
File "/usr/local/lib/python3.6/site-packages/google/cloud/datastore/client.py", line 222, in _determine_default
return _determine_default_project(project)
File "/usr/local/lib/python3.6/site-packages/google/cloud/datastore/client.py", line 75, in _determine_default_project
project = _base_default_project(project=project)
File "/usr/local/lib/python3.6/site-packages/google/cloud/_helpers.py", line 179, in _determine_default_project
_, project = google.auth.default()
File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 294, in default
credentials, project_id = checker()
File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 165, in _get_explicit_environ_credentials
Open an interactive python shell in this frameos.environ[environment_vars.CREDENTIALS])
File "/usr/local/lib/python3.6/site-packages/google/auth/_default.py", line 89, in _load_credentials_from_file
'File {} was not found.'.format(filename))
google.auth.exceptions.DefaultCredentialsError: File /app/Kryptos-Staging-3deb8860d570.json was not found.

@canercak did you try the command $ docker-compose up -d after running $ docker-compose build?
We are currently relying on Google Cloud Platform (GCP) for the deployment of this AI agent. We need to move away from GCP and implement a one-click deploy to Heroku. If anyone is up for the challenge, take a look at #39.

I tried. Getting the same result. I think not relying on deployment credentials just to see the system should be a bigger priority. And just want to add my idea because what you've done looks like nice and runs on proper foundations such as zipline/catalyst and I also want to apply alphazero or gym as you do. However I've run my own bot based on technical indicators and used almost all systems such as haas, gunbot, 3commas, cryptohopper, gekko, freqtrade just to lose money as all others do. Anyone who will get into this will understand that ml is the way to go but it's complicated so people need a simple bot who runs certain ml models. For example ml strategies in gekko work well but the bot is complicated, amateur and not-trustable (crashes, cannot buy bid/ask, cannot run multiple pairs with partial amounts, etc). People need something simple that they can control that doesn't rely on 16th century indicators. That's all. Otherwise no one will ever hand his cryptocurrency portfolio to a virtual assistant. I've handed several times and have seen what happens. Going to write my own bot anyway. Wish you good luck.

I think not relying on deployment credentials just to see the system should be a bigger priority

I agree. We need to move towards Heroku to simplify Kryptos. See: #39

And just want to add my idea because what you've done looks like nice and runs on proper foundations such as zipline/catalyst and I also want to apply alphazero or gym as you do.

Reinforcement learning has a lot of promise within Kryptos. See: #104

However I've run my own bot based on technical indicators and used almost all systems such as haas, gunbot, 3commas, cryptohopper, gekko, freqtrade just to lose money as all others do. Anyone who will get into this will understand that ml is the way to go but it's complicated so people need a simple bot who runs certain ml models. For example ml strategies in gekko work well but the bot is complicated, amateur and not-trustable (crashes, cannot buy bid/ask, cannot run multiple pairs with partial amounts, etc). People need something simple that they can control that doesn't rely on 16th century indicators. That's all. Otherwise no one will ever hand his cryptocurrency portfolio to a virtual assistant. I've handed several times and have seen what happens.

We believe that the only way to survive in the cryptocurrency-investment space is to use AI and machine learning. We began describing our visions for the application of these technologies here: machine learning, deep learning, data science, and reinforcement learning.
Thanks to the work completed by @bukosabino, we already use gradient tree boosting algorithms (XGBoost and LiteGBM) to perform machine learning strategies at Kryptos.


Operations between floats and ints

Is there any way to write something like this?
let x = 2.5;
let y = 1 + x;

This currently outputs:
[Type error] [2.11] + expected integers or floats, received: static(1) and float.
let z = 1 + x;
          ^

Why not turn 1 into 1.0? It doesn't make sense to add ints and floats.
I guess a different example where this might be needed is:
decl x: bit<32>
decl f: float
x + f

Yeah, it does seem like it will be handy (although not exactly research-y) to have lossless int->float conversions and rounding float->int conversions. Even making those conversions explicit, OCaml style, would be fine.

Should we consider explicit casts?
let f = 10.0
(f as bit<32>) + 10

Would that break numeric subtyping?

Explicit casts seem good, and they're unlikely to break subtyping (whereas implicit conversions could get confusing when they interact with subtyping).


Simple centreline example has duplicate geometries

Should it?
I think you created the file @wangzhao0217 so just wanted to check before removing them.

@Robinlovelace Hi Robin, feel free to remove the file

I'll update the file.


Add container query length units

This PR adds container query length units, as described on MDN's container query article.
I'm not sure if autocompletion should be added, but I noticed some units aren't even mentioned in the autocomplete file (such as lvmax) so I didn't add them. If adding them is preferred, please let me know where I should add them.

Where should I add those? Just add them to the list here?
https://github.com/ryboe/CSS3/blob/ce9188868f94c70d7ad1d8d359a1c3806f8bc430/completions/functions.py#L9-L12
Should I also add the other missing units? Or just the container query-related ones?

that's the spot i believe yeah 👍🏻
and whatever you notice is missing, bring it on! 🙏🏻


linting: add gometalinter to Makefile

introduces make metalinter and make metalinter_test. The latter should be phased out eventually when the code complies with --enable-all
only fixed the typos because I'm not sure what the status is on the code. (e.g., deadcode - will it be used?)

will re-implement with v2 when best practices are worked out


Support Agilent REG format

This is what the instrument telemetry data is stored in, e.g. pump pressures, etc.
See https://github.com/bovee/Aston/blob/master/aston/tracefile/agilent_extra_cs.py for an existing implementation in Python.

Closing in favor of #40 which has more details.


Example code needs modification to run

the recv.py example code will not run properly as is.
To fix this, change the following line:
await client.receive(on_event=on_event)
to
await client.receive(on_event=on_event, starting_position="-1")

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

ID: 00a30aef-5279-acde-6bc2-dc1f2720c179
Version Independent ID: 5e686a0a-28d4-c339-b185-da96940a980c
Content: Send or receive events from Azure Event Hubs using Python (latest)
Content Source: articles/event-hubs/get-started-python-send-v2.md
Service: event-hubs
GitHub Login: @spelluru
Microsoft Alias: spelluru

@noahc66260  Thanks for bringing this to our attention. Your feedback  has been shared with the content owner for further review.

In my case
await client.receive(on_event=on_event)
worked, perfectly. (Python 3.7)

I can second this, I am also facing the same issue. There seems to be a bug with the starting_position, if I don't specify the value as -1 the events are not received at all. Specifying starting_position=-1 is not ideal for any production application.

See the full code here. I have a link to it from the article. I will review and fix the article.
https://github.com/Azure/azure-sdk-for-python/blob/master/sdk/eventhub/azure-eventhub/samples/async_samples/recv_with_checkpoint_store_async.py
await client.receive(
    on_event=on_event,
    starting_position="-1",  # "-1" is from the beginning of the partition.
)

The code in this article isn't in sync with code in the GitHub samples repo.
There are more samples on GitHub:
https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/eventhub/azure-eventhub/samples/async_samples
Check them out

I already checked the full code but there is another bug with full code, it is missing the eventhub name which need to be supplied to make it work. You might want to test /fix that as well.

@rbhanot4739 - Thanks for the feedback. Our SDK devs create and test them before publishing.
The article uses connection string to the namespace, so the event hub name has to be explicitly specified.
The sample in the GitHub repo uses the connection string to the event hub (not the namespace). That's why an event hub name not specified.
BTW, if you see an issue with SDK samples, you can submit an issue in that repo itself.
Regards

Updated the code to include the starting position.
#please-close


how to add the version information of the workspace project to the yarn.lock file in the root directory

Hello, I am using yarn+lerna to implement monorepo.I want to generate the lock file in the workspace with the lock of the root directory.But I ran into a problem.
My workspace project A depends on B in the workspace, but the lock of the root directory does not contain the version information of project B. Caused me to execute in the workspace project A: generate-lockfile --lockfile ../../yarn.lock --package package.json An error was reported
Error: Error: Could not find<EMAIL_ADDRESS>(Package name of B project：@abc/lib)
The yarn.lock file in the root directory does not have the project information of @abc/lib, what should I do? For example, how to add the version information of the workspace project to the yarn.lock file in the root directory?
Thank you!

@nongcundeshifu This package only supports external dependencies. If you wish to lock a local package to a fixed version you will need to yarn install it pointing to your published package on your choice of registry instead of using package B locally in the monorepo.


docs: refine visualization.rst

explain the usage scenario for Pharos.
using BSTLD as an example.
replace image with BSTLD visualization result.

Pull Request Test Coverage Report for Build 856344712

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 80.819%

Totals

Change from base Build 856310654:
0.0%

Covered Lines:
4243

Relevant Lines:
5250

💛  - Coveralls


Add configuration section to jersey client docs

Thought I'd flesh out Jersey's Client documentation a bit more.
I welcome a second pair of eyes to make sure it is alright and makes sense.
I should note that it relies on the changes in #939 to be accurate.
Closes #960

Thanks for taking your time for writing that.
Commited to master with a couple of tweaks.

Great, thank you for the tweaks!


Benchmark for IPOP-CMA-ES

This PR depends on https://github.com/optuna/optuna/pull/1548.

https://bee22.com/resources/Liang CEC2014.pdf
https://github.com/sigopt/evalset

$ ./benchmark/runner.sh ackley ./tmp/kurobako.json
(ALL) [00:00:00] [STUDIES      0/40   0%] [ETA  0s]
Traceback (most recent call last):
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/benchmark/optuna_solver.py", line 66, in <module>
    runner.run()
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/venv/lib/python3.8/site-packages/kurobako/solver/__init__.py", line 172, in run
    while self._run_once():
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/venv/lib/python3.8/site-packages/kurobako/solver/__init__.py", line 182, in _run_once
    self._handle_create_solver_cast(message)
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/venv/lib/python3.8/site-packages/kurobako/solver/__init__.py", line 201, in _handle_create_solver_cast
    solver = self._factory.create_solver(random_seed, problem)
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/venv/lib/python3.8/site-packages/kurobako/solver/optuna.py", line 46, in create_solver
    study = self._create_study(seed)
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/benchmark/optuna_solver.py", line 49, in create_pycma_study
    sampler = optuna.integration.PyCmaSampler(
  File "/Users/a14737/src/github.com/pfnet/optuna/optuna/integration/__init__.py", line 82, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "/Users/a14737/src/github.com/pfnet/optuna/optuna/integration/__init__.py", line 95, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/Users/a14737/.pyenv/versions/3.8.2/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/a14737/src/github.com/pfnet/optuna/optuna/integration/cma.py", line 7, in <module>
    from optuna._deprecated import deprecated
  File "/Users/a14737/src/github.com/pfnet/optuna/optuna/_deprecated.py", line 3, in <module>
    from packaging import version
(ALL) [00:00:01] [STUDIES     40/40 100%] [ETA  0s] canceled
(STUDY) [00:00:00] [STEPS     51/300  17%] [ETA  1s] "ipop" "sigopt/evalset/Ackley(dim=5)"
(STUDY) [00:00:00] [STEPS     50/300  17%] [ETA  1s] "cmaes" "sigopt/evalset/Ackley(dim=5)"
(STUDY) [00:00:00] [STEPS      3/300   1%] [ETA  1s] "ipop" "sigopt/evalset/Ackley(dim=5)"
Traceback (most recent call last):
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/benchmark/optuna_solver.py", line 66, in <module>
    runner.run()
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/venv/lib/python3.8/site-packages/kurobako/solver/__init__.py", line 172, in run
    while self._run_once():
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/venv/lib/python3.8/site-packages/kurobako/solver/__init__.py", line 182, in _run_once
    self._handle_create_solver_cast(message)
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/venv/lib/python3.8/site-packages/kurobako/solver/__init__.py", line 201, in _handle_create_solver_cast
    solver = self._factory.create_solver(random_seed, problem)
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/venv/lib/python3.8/site-packages/kurobako/solver/optuna.py", line 46, in create_solver
    study = self._create_study(seed)
  File "/Users/a14737/src/github.com/CyberAgent/cmaes/benchmark/optuna_solver.py", line 49, in create_pycma_study
    sampler = optuna.integration.PyCmaSampler(
  File "/Users/a14737/src/github.com/pfnet/optuna/optuna/integration/__init__.py", line 82, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "/Users/a14737/src/github.com/pfnet/optuna/optuna/integration/__init__.py", line 95, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "/Users/a14737/.pyenv/versions/3.8.2/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/a14737/src/github.com/pfnet/optuna/optuna/integration/cma.py", line 7, in <module>
(ALL) [00:00:01] [STUDIES     43/40 100%] [ETA  0s] canceled

Error: InvalidInput (cause; EOF while parsing a value at line 1 column 0)
HISTORY:
  [0] at kurobako_core/src/epi/channel.rs:62 -- line=""
  [1] at kurobako_core/src/epi/solver/external_program.rs:164
  [2] at kurobako_core/src/solver.rs:176
  [3] at kurobako_core/src/solver.rs:176
  [4] at src/runner.rs:314
  [5] at src/runner.rs:271
  [6] at src/runner.rs:357
  [7] at src/runner.rs:136
  [8] at src/runner.rs:145
  [9] at src/main.rs:85

The problem is resolved at https://github.com/optuna/optuna/pull/1551

I pushed benchmark scripts into #50


Thanks Brandon Adam and LJ...

Sorry people, name should've been klass. Whooops.

@miq-bot assign @bdunne

@miq-bot add_reviewer @bdunne
@miq-bot add_reviewer @jrafanie
@miq-bot add_reviewer @agrare


Tickless Kernel on STM32H7 fails with Exception

Describe the bug
Running a tickless kernel on a STM32H7 produces the following error:
*** BootingE: ***** Reserved Exception ( -1) *****
E: r0/a1:  0x0800e9c8  r1/a2:  0x10000000  r2/a3:  0x00600010
E: r3/a4:  0x240031ac r12/ip:  0x00000000 r14/lr:  0x08004e83
E:  xpsr:  0x01000000
E: Faulting instruction address (r15/pc): 0x0800deb6
E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0
E: Current thread: 0x24000568 (main)
E: Halting system

To Reproduce
Steps to reproduce the behavior:

mkdir -p build
CONF_FILE=prj_tickless.conf west build -b stm32h735g_disco -s zephyr/tests/kernel/timer/timer_api -d build/timer_api
west flash -d build/timer_api
Enjoy the error!

Expected behavior
This output should be produced:
Running test suite timer_api
===================================================================
START - test_time_conversions
 PASS - test_time_conversions in 0.5 seconds
===================================================================
START - test_timer_duration_period
 PASS - test_timer_duration_period in 0.326 seconds
===================================================================
START - test_timer_restart
 PASS - test_timer_restart in 0.276 seconds
===================================================================
START - test_timer_period_0
 PASS - test_timer_period_0 in 0.202 seconds
===================================================================
START - test_timer_period_k_forever
 PASS - test_timer_period_k_forever in 0.202 seconds
===================================================================
START - test_timer_expirefn_null
 PASS - test_timer_expirefn_null in 0.326 seconds
===================================================================
START - test_timer_periodicity
 PASS - test_timer_periodicity in 0.251 seconds
===================================================================
START - test_timer_status_get
 PASS - test_timer_status_get in 0.1 seconds
===================================================================
START - test_timer_status_get_anytime
 PASS - test_timer_status_get_anytime in 0.326 seconds
===================================================================
START - test_timer_status_sync
 PASS - test_timer_status_sync in 0.351 seconds
===================================================================
START - test_timer_k_define
 PASS - test_timer_k_define in 0.701 seconds
===================================================================
START - test_timer_user_data
 PASS - test_timer_user_data in 0.301 seconds
===================================================================
START - test_timer_remaining
 PASS - test_timer_remaining in 0.51 seconds
===================================================================
START - test_timeout_abs
 PASS - test_timeout_abs in 0.1 seconds
===================================================================
START - test_sleep_abs
 PASS - test_sleep_abs in 0.6 seconds
===================================================================
Test suite timer_api succeeded
===================================================================
PROJECT EXECUTION SUCCESSFUL

Impact
It is not possible to use a tickless kernel, e.g. for power management, on a STM32H7.
Environment (please complete the following information):

Board: STM32H735G Discovery Kit
Zephyr Version e4481f82cb02afced321adc845f771e82a541e6e

Additional context
I stumbled upon this while investigating #41408. The error is actually not a real exception, there is just no interrupt handler for Systick installed in a tickless kernel, but the clock control still enables Systick.

Also passed on nucleo_h743zi with CONFIG_PM plus PR #https://github.com/zephyrproject-rtos/zephyr/pull/41692
tests/kernel/timer/timer_monotonic or tests/kernel/timer/timer_api or samples/boards/stm32/power_mgmt/blinky/


Pepr Load Test ( Reconcile()-based ) Nightly CI

Request
Add a nightly CI job to test Pepr controller's resource usage under moderate load.
Background
Relates #1350
Follow on work to run the new load test scripts in CI, nightly.
Definition of done

[ ] A nightly CI workflow
[ ] Workflow result includes artifacts containing load test data files & generated graphs
[ ] test graph displayed as part of  $GITHUB_STEP_SUMMARY (if possible).

test

Load test ran overnight and has generated an appropriate dataset + graph.
Have a snag on trying to get the graph png to render in GH UI via the $GITHUB_STEPS_SUMMARY facility though:  because the only persistent place the png lives is as a workflow artifact, and GH only exposes artifacts as .zips, I can't link to it as an image directly (i.e. '', or '<img src=''" />').
Also, looks like GH won't honor data URIs so I can't seem to find a way to sneak the picture into the output markdown, so... going to call this one as done as it can be.  Going to have to chat other ideas about for easily-accessible graphs through with the team.


pCacheFS freezes during a file copy to cache...

I'm trying to use pCacheFS with SSHFS, but I'm experiencing a lot of freezing during opening of large files.
In SSHFS, the filesystem access works normaly during a large file open... no problem!
But using pCacheFS over it, everything stops until the file is opened (finished transfer from the remote ssh server). Where "everything" means even a "ls" of a folder in the cached filesystem stays frozen until the transfer is finished.
I'm willing to fix it, so if you guys could explain a bit the code, I can give it a go!
I'm also interested in add parallel caching of different parts of a file, to increase throughput over SSHFS or any other filesystem used over WAN.
This would be particularly useful to use with google cloud computing VM's, since SSHFS seems to be limited to 1.5mb/sec on a single connection.
With multiple transfers over SSHFS, the overall speed is limited by the remote server upload bandwidth!
thanks lots!
-H

Thanks for your interest in this. I in fact scavenged this project when it was treated to be taken down from http://code.google.com/p/pcachefs/.
I modified a bit the code to make it simpler although I really think we can do better. Simplify code, make better utilities, rename things, etc.
The main class is PersistentCacheFs. The tests I added are in test/test_all.py. To understand what's going on, I would run pcachefs locally with the debug flag, look here for how to specify the directories.
If you can add tests in there for your use cases and add a fix, I'm down for it! Definitely having another thread doing the actual caching is necessary. I think that would be the first step to make the ls not hang and to have parallel caching of multiple parts of the file. Would be nice to have an argument specifying how many parallel threads the user would want.
Although I don't have time right now to make big changes on this project, I still have big plans for it.
Something I really would like is to be able to say "pcachefs, please cache this file/folder". So the /.pcachefs holds a mirror of the normal filesystem but files are replaced by directories containing metadata about the actual file and what is being cached. Say the normal filesystem holds:
/
    a
    b/
        c

The pcachefs one will hold the same tree plus the .pcachefs directory:
/
    .pcachefs/
        a/
            cached
            cache.date
        b/
            cached   # Note I didn't get to do it on directories yet, it's a TODO for now :/
            cache.date
            c/
                cached
                cache.date

See these tests to follow along. The idea is that the user could do ``

I added a makefile and a linter to makes things easier.