How to import code from private GitHub repo into snips? - voice-recognition

I understand that the normal way to use complex action code in Snips is to place the code in GitHub and pull it from there via Action Type "GitHub".
Is there any way to access a private GitHub repo for this purpose?
If this is not possible, what would be the normal way to use complex action code that cannot be published?
Regarding the "Code Snippets" the documentation says "It is meant for quick testing, or simple interactions." In what respect can Code Snippets support only "simple interactions" ?

You need to make your repo public in order to link it with your console assistant, and code snippets are limited to Python action code. If these are not an option for you you could also make your code run locally by either:
executing it manually (just launch your script, which listens to the MQTT communications via your code or by using Hermes)
placing it in /var/snips/skills and making it executable if you're on Linux. The snips-skill-server will look into this directory at boot and execute any executable file that starts with "action-". See the documentation

Related

Adding SSL parameters to pepper_box config in jmeter

I'm trying to test a kafka stream on jmeter using the pepper box config, but each time I try adding java request parameters it goes back to the default parameters without saving the ones I have added. I have tried the recommendations on here of adding the underscore, so _ssl.enabled, but the params are still disappearing. Any recommendations? Using jmeter5.3 and pepper-box1.0
I believe you need to put your SSL properties to the PepperBoxKafkaSampler directly, there are pre-populated placeholders which you can change and the changes persist.
The same behaviour is for Java Request Defaults
It might be the case your installation got corrupt somehow or there is a conflict with another JMeter Plugin, check jmeter.log file for any suspicious entries
In the meantime you may find Apache Kafka - How to Load Test with JMeter article useful
I had the same issue. I got around this issue by cloning the pepperbox repository https://github.com/GSLabDev/pepper-box and made changes to the PepperBoxKafkaSampler.java file, updated the setupTest() method with your props. You can also add the parameters making use of the .addArgument() method (used in PepperBoxKafkaSampler.java) to make the parameters available in jmeter.
Rebuild the repo using maven mvn clean install replace the old pepperbox jar in jmeter/lib/ext with your new built jar.

Where does `yarn run react` fit into the Relay workflow?

I'm trying to get Relay working with my React Native app and talking to my GraphQL server. I think I'm missing some pieces of understanding.
I'm following the instructions at https://facebook.github.io/relay/docs/relay-modern.html
It details the yarn commands to set up relay and the babel plugin. I added the "relay" script to my package.json like this:
"relay": "relay-compiler --src ./App --schema ./App/Data/schema.graphql"
But, when I run yarn run relay I get
Error: --schema path does not exist: /Users/user/dev/react-native-app/App/Data/schema.graphql.
Yeah. It doesn't exist. Isn't that what this command is supposed to generate? That documentation page doesn't explain what this command outputs, nor what it needs as input. How can I get this command working correctly? Do I really have to hand-write a schema when it already exists on the server?
EDIT, for php
Given that you are generating your schema on a PHP server, you can generate the .graphql file by creating a Node.js script to:
Send an introspection query to your /graphql endpoint
Pass the result to buildClientSchema
Call printSchema with it and write it on the disk
General usage with graphql-js
As far as I know, you effectively need your schema printed in GraphQL language. You can have a look at printSchema for this, to provide it to the relay-compiler.
printSchema will do the JS Object -> Schema Language conversion. If you already have your schema in Schema Language, this is what you need to provide to the relay-compiler.
It may be possible to use directly the JS Object schema, but I don't know how.
For a detailed explanation of the complete setup, you can look at my other answer here.

Running a JSON graph locally

I've been using Flowhub.io to do my development on the nodejs device. Now that the GUI-based design is done, I'm ready to take it offline and run the code via the command line. How would do I do this? I have the JSON file corresponding to the graph I created online, but not sure how to use the noflo nodejs module.
Could someone help me by showing me an example of how to load a graph using the noflo module, please? Thanks!
f you want to run an existing graph, you can use the --graph option.
noflo-nodejs --graph graphs/MyMainGraph.json
If you also want the process to exit when the network stops, you can pass --batch.
PS: I added this to the noflo-nodejs README.

Using IOSleep in socket filtering kernel extension

I'm developing a kernel extension which processes every socket is build on system and waits in user space to get confirmation from user to allow or deny that socket.
I'm using IOSleep to apply the wait i mentioned above but it gives this error when loading kernel extension.
"the following symbols are unresolved for this kext:
_IOSleep"
First of all , i want to know am i correct about using IOSleep to make waiting ?
If not , how should i apply desired waiting to cover time interval that i need to get user confirmation about allowing or rejecting a specific socket connection?
Thanks in advance for any useful response.
IOSleep is perfectly fine in a kernel extension. The error you see is because libraries are linked to kexts at load time, not compile time.
When you add functions to your code that require linking against new libraries, you must call kextlibs on the compiled binary in order to find out what you need to add to the plist file. This is explained in the Add Library Declarations section of the Generic Kernel Extension tutorial in the Mac Developer Library, but it's easy to forget to do this after the first time.
The basic steps are:
Build your kext
Run the command kextlibs -xml MyKext.kext in the Terminal
Replace the <key>OSBundleLibraries</key><dict>...</dict> part of your kext's Info.plist file with the printout from the above
Rebuild your kext
It should now link correctly when you load it with kextload.

Using IntelliJ Golang plugin, how to run entire Golang project instead of a single file?

I am using the latest (2014-01-03) Golang plugin for IntelliJ - for the first time.
Usually, my terminal workflow is to do go build && ./executable -args=1
So I am attempting to create a launch configuration to do the same thing, I took these actions:
Create a "Go Application" configuration
Fill in GOPATH/GOROOT environment variable
Fill in CLI arguments
Because there has to be a file to run, so I chose the one with func main()
Then there is a problem. When I run the configuration, the Golang plugin does not build the project, but instead builds the single script file with main method, then attempt to run it - obviously it does not work.
How to create a configuration equivelent of go build && ./executable -args=1?
Try to use the latest version from the official plugin manager.
If that doesn't work, please help us identify the issue by submitting a report here
Also, we are working hard to update the plugin with better type checks, debugging, go appengine support, improved formatter and much more but any help in improving the plugin is greatly appreciated.
Hope it helps.
However, I prefer to use goclipse which support auto-build, auto code completion and debug.