- Pre-usage:
sudo apt-get update && sudo apt-get upgrade -y
- Add
ubuntu
or the user used tosudo
group:
from functools import wraps | |
from flask import Flask, g, session, request, abort, jsonify | |
from flask_migrate import MigrateCommand, Migrate | |
from flask_script import Manager | |
from flask_sqlalchemy import SQLAlchemy | |
flask_app = Flask(__name__, static_folder='./static') | |
db = SQLAlchemy() | |
migrate = Migrate() |
static var httpClient = new HttpClient(); | |
Future<File> _downloadFile(String url, String filename) async { | |
var request = await httpClient.getUrl(Uri.parse(url)); | |
var response = await request.close(); | |
var bytes = await consolidateHttpClientResponseBytes(response); | |
String dir = (await getApplicationDocumentsDirectory()).path; | |
File file = new File('$dir/$filename'); | |
await file.writeAsBytes(bytes); | |
return file; | |
} |
// URL for Jira's REST API for issues | |
var getIssueURL = "https://[Your Jira host]/rest/api/2/issue/"; | |
// Personally I prefer the script to handle request failures, hence muteHTTPExceptions = true | |
var fetchArgs = { | |
contentType: "application/json", | |
headers: {"Authorization":"Basic [Your BASE64 Encoded user:pass]"}, | |
muteHttpExceptions : true | |
}; |
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - | |
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list | |
sudo apt-get update | |
sudo apt-get install sublime-text |
// Unity C# Cheat Sheet | |
// I made these examples for students with prior exerience working with C# and Unity. | |
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting |
//AUTO : DEMAND AND SUPPLY ZONE | |
//BY : www.niftytradingacademy.net | |
//Date : 29th June 2017 | |
_SECTION_BEGIN("Demand"); | |
SetChartOptions(0,chartShowArrows|chartShowDates); | |
bk=ParamColor( "Bk col",ColorRGB(85,90,60)); | |
SetChartBkColor(bk); | |
amount = Param("Sensitivity", 0.5, 0.1, 2, 0.1 ); |
//AUTO : MACD Amibroker AFL | |
//BY : www.niftytradingacademy.net | |
//Date : 05th July 2017 | |
_SECTION_BEGIN("MACD SIGNAL"); | |
SetChartBkColor(ParamColor("Panel color ",colorBlack)); | |
r1 = Param( "Fast avg", 12, 2, 200, 1 ); | |
r2 = Param( "Slow avg", 26, 2, 200, 1 ); | |
r3 = Param( "Signal avg", 9, 2, 200, 1 ); | |
Plot( ml = MACD(r1, r2), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), ParamColor("MACD color", colorRed ), ParamStyle("MACD style") ); |
//AUTO : RSI : Over Bought & Over Sold | |
//BY : www.niftytradingacademy.net | |
//Date : 05th July 2017 | |
_SECTION_BEGIN("RSI"); | |
SetChartOptions(0,0,ChartGrid30|ChartGrid70,0,100); | |
periods = Param( "Periods", 14, 1, 200, 1 ); | |
z = RSI( periods); | |
RSILineColor = ParamColor("RSI Line Color",ColorRGB(127,0,83)); | |
RSIOverboughtColor = ParamColor("RSI Overbought Color",ColorRGB(127,0,83)); |
javascript:!function(){function d(){(window.myBookmarklet=function(){console.log("Open Breakout Code Started \n Created by Surjith S M \nhttp://surjithctly.in/"),console.log("scanning"),$("#dataTable tr").each(function(){$("td",this).css("background",""),$("td a",this).css("color","");var a=$("td:nth-child(4)",this).text().replace(/,/g,""),b=$("td:nth-child(5)",this).text().replace(/,/g,""),c=$("td:nth-child(6)",this).text().replace(/,/g,""),d=$("td:nth-child(1)",this).text();a==b&&($("td:nth-child(5), td:nth-child(1)",this).css({color:"white",background:"Red"}),$("td:nth-child(1) a",this).css({color:"white"}),console.log("Go Short Found: "+d)),a==c&&($("td:nth-child(6), td:nth-child(1)",this).css("background","Lime"),console.log("Go Long Found: "+d))}),console.log("finished scanning \nThank you!")})()}var a="1.3.2";if(void 0===window.jQuery||window.jQuery.fn.jquery<a){var b=!1,c=document.createElement("script");c.src="http://ajax.googleapis.com/ajax/libs/jquery/"+a+"/jquery.mi