Skip to content

Instantly share code, notes, and snippets.

View jmerle's full-sized avatar

Jasper van Merle jmerle

View GitHub Profile
diff --git a/src/day03/part1.py b/src/day03/part1.py
index d1da5f3..e173a90 100644
--- a/src/day03/part1.py
+++ b/src/day03/part1.py
@@ -7,7 +7,7 @@ def main() -> None:
s = 0
for line in data.splitlines():
mid = int(len(line) / 2)
- a, b = line[:mid], line[mid:]
+ a, b = line[:mid], set(line[mid:])
{
// this configuration file works by first loading all top-level
// configuration items and then will load the specified environment
// on top, this provides a layering affect. environment names can be
// anything, and just require definition in this file. There's
// two predefined environments, 'backtesting' and 'live', feel free
// to add more!
// engine
"data-folder": "data",
{
"RollingWindow": {
"M1_20180131": {
"TradeStatistics": {
"StartDateTime": null,
"EndDateTime": null,
"TotalNumberOfTrades": 0,
"NumberOfWinningTrades": 0,
"NumberOfLosingTrades": 0,
"TotalProfitLoss": "0",
{
"RollingWindow": {
"M1_20210405": {
"TradeStatistics": {
"StartDateTime": null,
"EndDateTime": null,
"TotalNumberOfTrades": 0,
"NumberOfWinningTrades": 0,
"NumberOfLosingTrades": 0,
"TotalProfitLoss": "0",
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<dllmap dll="python3.6m" target="/home/jasper/.miniconda3/envs/qc/lib/libpython3.6m.so" os="!windows"/>
</configuration>
@jmerle
jmerle / build.yml
Created July 15, 2020 21:07
The GitHub Actions workflow I use in the ICFP Programming Contest 2020
name: Build
on:
push:
branches-ignore:
- submission
pull_request:
branches-ignore:
- submission
@jmerle
jmerle / .editorconfig
Created July 5, 2020 20:35
My general-purpose editorconfig
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
from typing import List, Optional, Tuple
from battlehack20.engine.game.game import *
def log(msg: str):
"""
Type-agnostic method.
Logs a message.