Skip to content

Instantly share code, notes, and snippets.

View tomas-rampas's full-sized avatar
🎯
Focusing

Tomas Rampas tomas-rampas

🎯
Focusing
  • Prague, Czech Republic
  • 07:07 (UTC +02:00)
View GitHub Profile
@tomas-rampas
tomas-rampas / OandaApiCalls.cs
Last active June 9, 2022 17:50
Oanda API sample calls Accounts, Products, and Streamer - quick sketchy sample
using System;
using System.IO;
using System.Net;
using System.Text.Json;
using System.Threading;
namespace OandaStreamingConsole
{
class Program
{
#include <iostream>
#include <csignal>
#ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
using namespace std;
@tomas-rampas
tomas-rampas / main.py
Last active March 25, 2021 15:55
QuantConnect stubs for VS and VSCode for better intellisense
# install stubs first
# pip install quantconnect-stubs
from QuantConnect import *
from QuantConnect.Parameters import *
from QuantConnect.Benchmarks import *
from QuantConnect.Brokerages import *
from QuantConnect.Util import *
from QuantConnect.Interfaces import *
from QuantConnect.Algorithm import *
from QuantConnect.Algorithm.Framework import *
#property strict
#include <mt4R.mqh>
extern string R_command = "D:\Program Files\R\R-3.3.1\bin\i386\Rterm.exe --no-save";
extern int R_debuglevel = 2;
int rhandle;
int OnInit()
@tomas-rampas
tomas-rampas / list.md
Created November 4, 2020 15:05 — forked from ih2502mk/list.md
Quantopian Lectures Saved
@tomas-rampas
tomas-rampas / shrimpy-request-sample.cs
Last active August 2, 2021 07:19
Shrimpy.io Signing Request Sample in C#
using System;
using System.Net.Http;
using System.Security.Cryptography;
using System.Text;
/*
* This gist shows a sample of signing a GET request for shrimpy.io
* based on Pyton sample on https://developers.shrimpy.io/docs/?python#creating-a-request
*/
#
# All credits of this source code to https://www.investingdev.com/en/statarb-in-forex/
#
########################################################################################
## Imports and set working directory ##
########################################################################################
require(tseries)
@tomas-rampas
tomas-rampas / JForexLibrariesDownloader.ps1
Last active January 1, 2018 20:08
Powershell script for downloading jForex libraries. Needs Powershell 3.0 and above.
Set-ExecutionPolicy -Scope "CurrentUser" -ExecutionPolicy "RemoteSigned"
$jforex3Jnlp = 'jforex_3.jnlp'
$baseURL = 'http://platform.dukascopy.com/demo_3/'
$sourceJnlpURL = "$baseURL$jforex3Jnlp"
$appFrameworkXPath = '//jnlp/resources/extension[@name="AppFramework"]'
$jarsXPath = '//jnlp/resources/jar'
$outFileJForex3Jnlp = "$PSScriptRoot\jforex_3.jnlp"
$outFileLibs3Jnlp = "$PSScriptRoot\libs_3.jnlp"
$localLibSubDir = "jforex3libs"
@tomas-rampas
tomas-rampas / keras_prediction.py
Created November 17, 2016 16:07 — forked from hnykda/keras_prediction.py
Predicting sequences of vectors (regression) in Keras using RNN - LSTM (danielhnyk.cz)
import pandas as pd
from random import random
flow = (list(range(1,10,1)) + list(range(10,1,-1)))*100
pdata = pd.DataFrame({"a":flow, "b":flow})
pdata.b = pdata.b.shift(9)
data = pdata.iloc[10:] * random() # some noise
import numpy as np
static void Main()
{
var server = new NamedPipeServerStream("NPtest");
Console.WriteLine("Waiting for connection...");
server.WaitForConnection();
Console.WriteLine("Connected.");
var br = new BinaryReader(server);
var bw = new BinaryWriter(server);