This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3.10 | |
import csv | |
import argparse | |
from collections import defaultdict | |
BUY = "Buy" | |
SELL = "Sell" | |
class Transaction: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public static class IEnumerableExtension | |
{ | |
public static IEnumerable<(int index, T valuee)> Enumerate<T>(this IEnumerable<T> coll) | |
{ | |
return coll.Select((T val, int i) => (i, val)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<body> | |
<script> | |
function heidiDecode(hex) { | |
var str = ''; | |
var shift = parseInt(hex.substr(-1)); | |
hex = hex.substr(0, hex.length - 1); | |
for (var i = 0; i < hex.length; i += 2) { | |
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
</head> | |
<title>History</title> | |
<body> | |
<button id='btn'>Click</button> | |
<span id='txt'></span> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# Dispatch - synchronize two folders, the "left" being the source and the "right" being the target. | |
# Synchronization works only left to right. | |
import os | |
import filecmp | |
import shutil | |
from stat import * | |
class Dispatch: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import zmq | |
class ZmqClient (object): | |
def __init__(self, socket, logger): | |
super(ZmqClient, self).__init__() | |
self._logger = logger | |
self._socket = socket |