Skip to content

Instantly share code, notes, and snippets.

View tomas-rampas's full-sized avatar
💻
CMaking...

Tomas Rampas tomas-rampas

💻
CMaking...
  • Prague, Czech Republic
  • 03:04 (UTC +02:00)
View GitHub Profile
@tomas-rampas
tomas-rampas / iqfeed_hist.py
Last active September 16, 2023 14:32
IQFeed Historical data downloader
import socket
# https://ws1.dtn.com/IQ/Guide/
def read_historical_data_socket(sock, recv_buffer=4096):
"""
Read the information from the socket, in a buffered
fashion, receiving only 4096 bytes at a time.
@tomas-rampas
tomas-rampas / code-coverage.json
Last active March 30, 2024 17:21
code-coverage.json
{"schemaVersion":1,"label":"Unit Test Coverage","message":"22.79%","color":"brightgreen"}
@tomas-rampas
tomas-rampas / Linux_CLI_CheatSheet.md
Created August 6, 2022 17:24
List of some useful Linux CLI commands
Command Description
 man <tool> Opens man pages for the specified tool.
<tool> -h Prints the help page of the tool.
apropos <keyword> Searches through man pages' descriptions for instances of a given keyword.
cat Concatenate and print files.
whoami Displays current username.
id Returns users identity.
hostname Sets or prints the name of the current host system.
uname Prints operating system name.
@tomas-rampas
tomas-rampas / bi5translator.cs
Last active June 10, 2022 13:11
The bi5 translation to C# primitives
using System;
using System.Linq;
namespace Bi5Translator
{
class Program
{
static void Main(string[] args)
{
var bytes = new byte[]{ 0,29,177,144,0,0,48,57,0,0,48,58,63,147,51,51,64,19,51,51};
@tomas-rampas
tomas-rampas / LzmaCompressor.cs
Created June 10, 2022 12:28
Class that compress and decompress files and binary data. It uses LZMA SDK.
using System;
using System.IO;
using System.Runtime.CompilerServices;
namespace Bi5.Net.Utils
{
public static class LzmaCompressor
{
/// <summary>
/// Decompresses compressed file on given path
@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