Skip to content

Instantly share code, notes, and snippets.

View alwx's full-sized avatar

Alexander alwx

View GitHub Profile
@alwx
alwx / test_historical_conversations.py
Last active October 19, 2021 11:04
A script to run `rasa test` on historical conversations fetched from Rasa X
#!/usr/bin/env python3
"""Script to run `rasa test` on historic conversations.
This script extracts conversations from a Rasa Open Source tracker store or
Rasa X API and runs `rasa test core` on these conversations.
The script is intended to be run on conversations that were:
1. Originally processed by an assistant not trained with `UnexpecTEDIntentPolicy`
included the pipeline.
@alwx
alwx / StatusHTTP.md
Last active August 30, 2018 20:37
Status HTTP debug server description

General information

For debugging we use HTTP server that uses react-native-http-bridge. I've updated the version of it, and it now (since 0.5.0) also supports GET, POST, PUT and DELETE requests and can finally return responses with different status codes. Just because the server is very easy, there is almost no need in libraries like status-dev-cli now — clients can easily use any available library for client-server communication, send requests and get anything in response.

We decided to not work on network discovery at the current stage. All the discovery proposals are available here.

All the request examples below are given for HTTPie.

@alwx
alwx / discovery.md
Last active August 2, 2018 15:55
status-dev-cli 2.0: Discovery process

Let's suppose the debug server is basically an HTTP server which runs on your device. It means that we can send almost any data between our dev machine and Status running on a device. In this case by "sending data" we of course mean "executing HTTP requests".

The only problem here is to detect a device itself (or, technically speaking, we need an IP of this HTTP server).

Option 1: no discovery

We can easily get the IP of the device on the device itself. This is how it works in AirDroid (old screenshot, but the idea is still the same): https://cdn.slidehunter.com/wp-content/uploads/Connect-AirDroid.png

@alwx
alwx / android_instructions.md
Created July 18, 2018 14:07 — forked from patrickhammond/android_instructions.md
Easily setup an Android development environment on a Mac

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

The easiest way

1. Clone the repository

git clone https://github.com/status-im/status-react
cd status-react

2. Install the dependencies

@alwx
alwx / status-api-discussion.md
Last active September 25, 2017 15:45
Status API & tools
@alwx
alwx / .spacemacs
Created December 7, 2016 10:19
.spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
dotspacemacs-distribution 'spacemacs
package example.api;
import android.support.annotation.NonNull;
import retrofit2.Call;
import ru.quiick_commons.api.response.ErrorResponse;
import ru.quiick_commons.logger.Logger;
import okhttp3.ResponseBody;
[ui/view {:flex-direction "row"}
[ui/text {:flex 1
:style {:background-color "red"}}}
"1/3"]
[ui/text {:flex 2
:style {:background-color "blue"}}
"2/3"]]
(def storage
(.-AsyncStorage js/ReactNative))
(def transit-reader (t/reader :json))
(def transit-writer (t/writer :json))
;; the process of saving to database
(.setItem storage "dataset" data (fn [_]
(.log js/console "data saved!")))