Skip to content

Instantly share code, notes, and snippets.

View chew-z's full-sized avatar

Robert J. chew-z

  • Warsaw, Poland
View GitHub Profile
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
@chew-z
chew-z / Visa
Last active February 15, 2016 15:05
generates random Visa card number passing Luhn check (in Pythonista)
#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, ' ')
@chew-z
chew-z / PinBar2()
Last active August 29, 2015 14:08
my version of PinBar function
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ą
@chew-z
chew-z / Personal Journal Metadata
Last active August 29, 2015 14:03
New Personal Journal
---
title: 16-07
tags: ["podróż"]
notebook: Personal Journal
---
**2014-07-16 20:37** \-
@chew-z
chew-z / Trading Journal Metadata
Last active August 29, 2015 14:03
New Trading Journal
---
title: 16-07
tags: ["trading", "EURUSD"]
notebook: Trading Journal
---
**2014-07-16 20:37** \-