Skip to content

Instantly share code, notes, and snippets.

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © mildSnail31034
//@version=5
strategy("Pva levels strategy", overlay=true, margin_long=100, margin_short=100)
lenvolma = input.int(title="Volume MA",defval=3)
atrlen = input.int(title="ATR length" , defval=14)
atrmult = input.float(title="Body ratio",defval=0.8)
volma = ta.ema(volume,lenvolma)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © mildSnail31034
//@version=5
indicator("PVA levels",overlay=true)
lenvolma = input.int(title="Volume MA",defval=3)
atrlen = input.int(title="ATR length" , defval=14)
atrmult = input.float(title="Body ratio",defval=0.8)
volma = ta.ema(volume,lenvolma)
volmult = input(1.2,title="Vol Multiple of MA")
@smartvnm
smartvnm / Ppask.py
Last active December 2, 2020 07:10
import people_also_ask
term = input("Search query: ")
a = people_also_ask.get_related_questions(term)
b = people_also_ask.get_answer(term)
print(b)
for x in a:
print(x)
y = people_also_ask.get_answer(x)
@smartvnm
smartvnm / gscrap.py
Last active April 15, 2020 09:35
gscrasp
import os
from googlesearch import search
from goose3 import Goose
keyword=input("Enter Keyword:")
resno=int(input("Number of results to scrape:"))
for url in search(keyword, tld='com', stop= resno, user_agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36'):
g = Goose()
article = g.extract(url)
#print(article.cleaned_text)
filename=keyword+'.txt'
@smartvnm
smartvnm / HtmlToMarkdownJekyll.py
Created February 29, 2020 06:19
Jekyll posts from import HTML to Markdown
# Jekyll Blogger importer gave me a bunch of HTML files
# this is a quick hack to convert them to .md
# First, we need html2markdown
# pip install html2markdown
# Put this file in _posts directory and execute
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
import os
import sys