Skip to content

Instantly share code, notes, and snippets.

Bernd Kreuss prof7bit

  • Hannover, Germany
Block or report user

Report or block prof7bit

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View phase_error.ipynb
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 Sep 11, 2018
Install fpc 3.0-fixes and Lazarus 1.6-fixes on Debian completely from Source
View lazinstall.py
#!/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 Jan 10, 2015
psk31 demodulation on ATMega328 without any multiplikation
View psk31.c
/*
* psk31.c
*
* Created on: 09.01.2015
* Author: bernd
*/
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
@prof7bit
prof7bit / crc16.pas
Created Aug 5, 2014
crc16 in Pascal
View crc16.pas
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;
View crc16-xmodem.pas
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 Jul 13, 2013
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.
View geiger.py
"""
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 Apr 22, 2013
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.
View _stoploss.py
"""
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 May 12, 2019
The portfolio rebalancing bot will buy and sell to maintain a constant asset allocation ratio of exactly 50/50 = fiat/BTC
View gist:3086524
procedure TBuddy.OnProxyConnect(ASocket: TLSocket);
type
TSocksReqestHeader = packed record
Typ : Byte;
Cmd : Byte;
Port : Word;
Addr4 : DWord;
end;
var
ReqHeader: TSocksReqestHeader;
@prof7bit
prof7bit / gist:2967955
Created Jun 21, 2012
how is this supposed to work in 3.0.0, my private file descriptors are none of Pidgin's business!
View gist:2967955
/**
* Starts a file transfer.
*
* Either @a fd must be specified <i>or</i> @a ip and @a port on a
* file receive transfer. On send, @a fd must be specified, and
* @a ip and @a port are ignored.
*
* Prior to libpurple 2.6.0, passing '0' to @a fd was special-cased to
* allow the protocol plugin to facilitate the file transfer itself. As of
* 2.6.0, this is supported (for backward compatibility), but will be
You can’t perform that action at this time.