Skip to content

Instantly share code, notes, and snippets.

View rinukkusu's full-sized avatar
🎯
in the pub

Max Riegler rinukkusu

🎯
in the pub
View GitHub Profile
#!/bin/bash
# Install Python 3.10 and replace original install
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install -y python3.10 python3.10-dev python3.10-venv
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 2
# Download and install SD
bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh)
@rinukkusu
rinukkusu / proquant_positions.csv
Last active December 9, 2020 13:23
QuantScript (ProQuant) to PineScript (TradingView) conversion
EntryTime Direction Quantity EntryPrice ExitTime ExitPrice Interest Result ReasonForClosing Balance
2020-12-07T09:35:00.000Z LONG 68.69 3681.2 0 -39.78 10422.52
2020-12-07T07:35:00.000Z SHORT 67.57 3688.2 2020-12-07T08:15:00.000Z 3685.5 0 150.95 Exit Rule 10462.3
2020-12-07T02:50:00.000Z LONG 68.32 3691.7 2020-12-07T07:25:00.000Z 3689.5 0 -124.37 Exit Rule 10311.35
2020-12-04T20:00:00.000Z LONG 68.29 3693.5 2020-12-04T20:45:00.000Z 3693.5 0 0 Exit Rule 10435.71
2020-12-04T19:35:00.000Z LONG 67.46 3689 2020-12-04T19:45:00.000Z 3691.5 0 139.54 Exit Rule 10435.71
2020-12-04T16:00:00.000Z SHORT 67.16 3689.5 2020-12-04T19:00:00.000Z 3688.7 0 44.46 Exit Rule 10296.17
2020-12-04T14:25:00.000Z LONG 66.3 3675.2 2020-12-04T14:40:00.000Z 3678.3 0 170.06 Exit Rule 10251.71
2020-12-04T09:25:00.000Z SHORT 66.14 3674 2020-12-04T13:55:00.000Z 3673.5 0 27.36 Exit Rule 10081.65
2020-12-04T06:25:00.000Z LONG 65.68 3673.7 2020-12-04T08:10:00.000Z 3675 0 70.65 Exit Rule 10054.29
@rinukkusu
rinukkusu / ZippedCsvReader.cs
Last active August 21, 2021 06:25
Helper class to read CSV files from a ZIP archive
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.IO.Compression;
using System.Net.Http;
using System.Threading.Tasks;
using CsvHelper; // see https://joshclose.github.io/CsvHelper/
namespace ZippediZap
#!/bin/bash
USER="root"
PASSWORD=""
OUTPUT="/tmp/dbbackup/"
DATE=`date +%Y-%m-%d_%H-%M`
FOLDER="$OUTPUT"
rm -rf "$FOLDER"
mkdir "$OUTPUT"
@rinukkusu
rinukkusu / index.html
Created November 21, 2018 13:54
Interop Example
<script>
window.callback = null;
function callCallback(e) {
callback(e);
}
</script>
<button onclick="callCallback()"></button>
@rinukkusu
rinukkusu / main.dart
Created June 28, 2018 11:27
inferred type
void main() {
List<int> list = new List();
list.add("c");
list.add(2);
print(list);
}
@rinukkusu
rinukkusu / main.dart
Created May 12, 2018 16:03
QuerySelectorTest
import 'dart:html';
void main() {
var elm = querySelector('html');
elm.style.backgroundColor = '#ff0000';
}
class Consumer {
String name;
String connectionName;
String consumerTag;
bool isAckRequired;
bool isExclusive;
Consumer.fromJson(Map<String, dynamic> map) {
name = map["name"];
connectionName = map["connectionName"];
import 'dart:html';
import 'package:angular/angular.dart';
import 'package:angular_components/src/components/glyph/glyph.dart';
@Component(
selector: 'toggleMenu',
directives: const [GlyphComponent],
template: r'''
<glyph [icon]="icon" size="x-large"></glyph>{{text}}
''',
@rinukkusu
rinukkusu / app_component.dart
Created December 30, 2016 19:21
Dart Routing
@Component(...)
@RouteConfig(const [
const Route( path: '/', name: 'Home', component: HomeView ),
const Route( path: '/search', name: 'Search', component: SearchView ),
const Route( path: '/error', name: 'Error', component: ErrorView ),
const Route( path: '/shop/...', name: 'Shop', component: ShopView ),
const Route( path: '/:slug', name: 'Page', component: PageView ),
])
class AppComponent {
// ...