Skip to content

Instantly share code, notes, and snippets.

View prof7bit's full-sized avatar

Bernd K. prof7bit

  • Hannover, Germany
View GitHub Profile
@prof7bit
prof7bit / benchmark-and-plot.py
Last active March 29, 2021 18:05
test app and benchmarking for wsgi/asgi servers
from subprocess import check_output
import matplotlib
import matplotlib.pyplot as plt
from time import sleep
TITLE = 'gunicorn/gevent 50ms'
SERVER = 'localhost'
PORT = 8888
@prof7bit
prof7bit / phase_error.ipynb
Last active May 16, 2024 13:14
phase_error
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@prof7bit
prof7bit / lazinstall.py
Last active September 11, 2018 06:47
Install fpc 3.0-fixes and Lazarus 1.6-fixes on Debian completely from Source
#!/usr/bin/python3
import os
LAZDIR = os.path.expanduser("~/lazsvn")
print(LAZDIR)
exit
def shell(cmd):
if os.system(cmd) != 0:
@prof7bit
prof7bit / psk31.c
Created January 10, 2015 20:49
psk31 demodulation on ATMega328 without any multiplikation
/*
* psk31.c
*
* Created on: 09.01.2015
* Author: bernd
*/
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
@prof7bit
prof7bit / crc16.pas
Created August 5, 2014 22:09
crc16 in Pascal
procedure CRC16_Update(var CRC: Word; Data: Byte);
var
I: Integer;
begin
CRC := CRC xor (Word(Data));
for I := 0 to 7 do begin
if (CRC and 1) <> 0 then
CRC := (CRC shr 1) xor $A001
else
CRC := CRC shr 1;
procedure CRC16_Xmodem_Update(var CRC: Word; Data: Byte);
var
I: Integer;
begin
CRC := CRC xor (Word(Data) shl 8);
for I := 0 to 7 do begin
if (CRC and $8000) <> 0 then
CRC := (CRC shl 1) xor $1021
else
CRC := CRC shl 1;
@prof7bit
prof7bit / geiger.py
Created July 13, 2013 15:28
Geiger counter for MtGox. This goxtool strategy module adds sound effects to goxtool.py. It makes a click sound for every depth message and a louder click for every trade.
"""
Geiger counter for MtGox.
This goxtool strategy module makes a click sound for every
depth message and a louder click for every trade.
You must have python-alsaaudio installed to use this.
usage:
save file as "geiger.py" in the goxtool folder and then:
@prof7bit
prof7bit / _stoploss.py
Created April 22, 2013 18:01
A simple stop loss bot. Adjust STOP_PRICE and STOP_VOLUME to your needs. The file can be reloaded after editing without restarting goxtool by simply pressing the l key.
"""
a simple stop loss bot.
adjust STOP_PRICE and STOP_VOLUME to your needs.
The file can be reloaded after editing without
restarting goxtool by simply pressing the l key.
"""
import strategy
import goxapi
# pylint: disable=C0301
@prof7bit
prof7bit / .gitignore
Last active March 17, 2022 09:13
The portfolio rebalancing bot will buy and sell to maintain a constant asset allocation ratio of exactly 50/50 = fiat/BTC
/.project
procedure TBuddy.OnProxyConnect(ASocket: TLSocket);
type
TSocksReqestHeader = packed record
Typ : Byte;
Cmd : Byte;
Port : Word;
Addr4 : DWord;
end;
var
ReqHeader: TSocksReqestHeader;