Skip to content

Instantly share code, notes, and snippets.

@alexnask
alexnask / macd.py
Last active January 19, 2017 12:41 — forked from anesiadis/test2.py
class MACD(Indicator):
def __init__(self, strategy, pair, short_period=12, long_period=26, weight_period=9):
self._weight_period = weight_period
self._weight = 2.0 / (weight_period + 1.0)
self._short_ema = EMA(strategy, pair, period=short_period)
self._long_ema = EMA(strategy, pair, period=long_period)
self._data = pandas.DataFrame(columns=['Value', 'MACD_line', 'Signal_line'])
super(MACD, self).__init__("MACD", strategy, pair)
@alexnask
alexnask / gist:5356365
Last active December 16, 2015 01:38 — forked from anonymous/gist:5356358
public class MyUtils {
private static String Isearch;
public static void seqSearch(Book[] pin, int key){
for(int i=0; i<pin.length ;i++){
if(key==1){
if(Isearch==pin[i].getISBN()){
}
Book pin[]=new Book[10];
int ep=0;
int i=0;
boolean flag=true;
for( ;flag ; )
{
System.out.println(" Λίστα Επιλογών");
System.out.println("1. Εισαγωγή στοιχείων βιβλίου");
data:text/html,
<style type="text/css">
#e {
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
font-size:16px;
}
@alexnask
alexnask / gist:4611443
Last active December 11, 2015 13:59 — forked from ahfoukou/gist:4611376
void save_puzzle(unsigned char board[][9])
{
int i, j, k;
char path[50];
FILE *file; // Ante epidi thelis k C89 :P
clrscr();
printf("Insert the name of the file you want to save your sudoku puzzle \n");
scanf("%s", path);
k = strlen(path);
// OPTION 1
@alexnask
alexnask / min.c
Last active December 10, 2015 19:48
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int foo(int a[], int iter) {
int current = a[iter];
if(iter == 9) return current;
int restMin = foo(a, iter + 1);
if(current < restMin) {