Skip to content

Instantly share code, notes, and snippets.

nidkil nidkil

Block or report user

Report or block nidkil

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Last active Jan 31, 2018
Tradeview Pinescript to visualize ProfitTrailer EMASPREAD and SMASPREAD strategy.
study(title="EMA and SMA Spread", shorttitle="EMASMASPREAD", overlay=false)
// Parameters
param_buy_value_conservative = input(0.1)
param_buy_value_moderate = input(0.5)
param_buy_value_aggresive = input(0.25)
param_ema_fast = input(5)
param_ema_slow = input(20)
param_sma_fast = input(5)
Standalone test class that sets up a basic API that supports both JSON and XML. It is a single class setup so
that it is easy to follow.
Some quick pointers:
- If a multi line docstring is present in any function, it will be displayed in the Swagger UI as
"Implementation Notes". Use the Markdown syntax to format these notes, see
- Namespaces allow the API operations to be split into separate files, each defining a part of the API with a
different URL prefix.
from flask import Flask, Blueprint, url_for, jsonify
from flask_restplus import Api, Resource
from flask_marshmallow import Marshmallow, base_fields
from marshmallow import post_dump
# Setup Flask app
url_prefix = '/api/v4'
doc = '/apidoc/'
app = Flask(__name__)
nidkil / JsonTestServlet.scala
Created Dec 2, 2014
Halt does not work with JacksonJsonSupport trait mixed in
View JsonTestServlet.scala
package com.nidkil.jsontest
import org.json4s.{Formats, DefaultFormats}
import org.scalatra._
import org.scalatra.json._
import scalate.ScalateSupport
class JsonTestServlet extends ScalatraServlet with JacksonJsonSupport {
protected implicit val jsonFormats: Formats = DefaultFormats
You can’t perform that action at this time.