This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: 16-07 | |
tags: ["trading", "EURUSD"] | |
notebook: Trading Journal | |
--- | |
**2014-07-16 20:37** \- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: 16-07 | |
tags: ["podróż"] | |
notebook: Personal Journal | |
--- | |
**2014-07-16 20:37** \- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double PinBar2(int minimumBar) { | |
double o=Open[1], c=Close[1]; | |
double h=High[1], l=Low[1]; | |
double b = MathAbs( o - c ); | |
if ((h-l) < minimumBar*pips2dbl) //ignoruj śmieci | |
return(0.0); | |
double wup = h - MathMax(o, c), wdn = MathMin(o, c) - l; | |
if (wup >= 2.0*b && wdn <= b) //długi górny wąs - sygnał na krótką | |
return (-wup/b); | |
if (wdn >= 2.0*b && wup <= b) //długi dolny wąs - sygnał na długą |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
# generates random Visa card number passing Luhn check | |
import clipboard | |
import numpy as np | |
from decimal import Decimal | |
def split_cc(ccnum): | |
cclist = list(str(ccnum)) | |
cclist.insert(4, ' ') | |
cclist.insert(9, ' ') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from operator import mul | |
import itertools | |
import numpy as np | |
import datetime | |
GAMMA = 0.57721566490153286061 | |
li2 = 1.045163780117492784844588889194 # Li(x) = li(x) - li(2) | |
def factors(n): | |
#with list |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
from operator import mul | |
import console | |
console.clear() | |
print 'Generating plot... (this may take a little while)' | |
import numpy as np | |
import matplotlib.pyplot as plt | |
GAMMA = 0.57721566490153286061 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://stackoverflow.com/questions/28252442/speeding-up-this-python-code-for-large-input/28261161#28261161 | |
from bitarray import BitArray | |
from random import randint | |
import numpy as np | |
def SplitArray(l, r): | |
while(l < r): | |
k = randint(l, r) | |
arr.set_bit(k) | |
return SplitArray(l, k-2) + [k] + SplitArray(k+2, r) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
#shortens urls from clipboard using bitly | |
import sys | |
import requests | |
import re | |
import clipboard | |
import keychain | |
def shorten(long_url, token): | |
if re.match('\w{40,40}', token): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding: utf-8 | |
#translates using Google Translate via web | |
import requests | |
import re | |
import clipboard | |
from bs4 import BeautifulSoup | |
def translate(phrase): | |
if phrase == '': | |
raise Exception('Nothing found in clipboard') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# The mkt parameter determines which Bing market you would like to | |
# obtain your images from. | |
# Valid values are: en-US, zh-CN, ja-JP, en-AU, en-UK, de-DE, en-NZ, en-CA. | |
# | |
# The idx parameter determines where to start from. 0 is the current day, | |
# 1 the previous day, etc. | |
#IDX=1 | |
for IDX in 0 1 2 |
OlderNewer