Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@Timmeey
Timmeey / _ranger.py
Last active January 1, 2016 13:59 — forked from pira/_ranger.py
"""
The range trading bot would work on price swings in a preset range
IMPORTANT: You have to configure it to what you believe the trading corridor is!
DISCLAIMER: all losses or harm resulting from the use of this code is YOUR SOLE responsibility
2013-12-12 piramida, based on balancer bot by prof7bit
goxtool is property of prof7bit
"""
from datetime import datetime
@Timmeey
Timmeey / gitignore
Last active August 29, 2015 14:01 — forked from octocat/.gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@Timmeey
Timmeey / keybase.md
Created May 18, 2016 16:02
keybase.io/timmeey proof

Keybase proof

I hereby claim:

  • I am timmeey on github.
  • I am timmeey (https://keybase.io/timmeey) on keybase.
  • I have a public key whose fingerprint is 54BE 22C1 C9F3 664A 165F 30E0 4830 BC6B 84EE 75A5

To claim this, I am signing this object:

@Timmeey
Timmeey / notes.sh
Last active November 19, 2017 12:28
VERY simple and basic note taking script i use for myself. It can save "readLater" kind of notes or actual notes, always pullin/pushing it to a git repository
#!/bin/bash
ROOT=$HOME/notes
notes(){
(cd $ROOT
git pull
echo $1 >> notes
git add notes
git commit -m "new note"
git push
@Timmeey
Timmeey / checkstyle.xml
Created March 10, 2018 00:03
default checkstyle for Library projects
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html.
Checkstyle is very configurable. Be sure to read the documentation at
@Timmeey
Timmeey / sds011.py
Last active March 24, 2018 14:02 — forked from geoffwatts/sds011.py
Read an SDS011 Laser PM2.5 Sensor (Nova PM Sensor) with Python
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import serial, time, struct
ser = serial.Serial()
ser.port = "/dev/cu.wchusbserial1410" # Set this to your serial port
ser.baudrate = 9600
ser.open()
@Timmeey
Timmeey / gist:2f994844b17e40c1238bb988d44fbfc1
Last active July 14, 2018 12:28
StandardDHLFeedbackMessage
Ich habe vor kurzem einen Artikel bei ihnen bestellt, den sie per DHL verschickt haben.
Leider bekommt DHL es mal wieder nicht hin die bestellte und bezahlte Dienstleistung zu erbringen und die Sendung zuzustellen.
Zwar haben Sie keine Schuld an dem Problem, dennoch muss ich zweimal darüber nachdenken, ob ich wirklich bei ihnen bestelle, oder bei einem ihrer Konkurrenten, die dafür aber nicht mit DHL versenden.
Daher möchte ich ihnen gerne Feedback geben
und sie generell darum bitten doch in Zukunft über einen anderen Logistikanbieter wie z.b. DPD nachzudenken.
DPD hat bei mir immer eine spitzen Leistung geliefert.
Mit freundlichen Grüßen
@Timmeey
Timmeey / ListPermutations.kt
Created February 12, 2019 01:40
Reusable snippet to get permutations of a list real quick
import kotlin.streams.asStream
fun main(args: Array<String>) {
val listPermutations = ListPermutations(listOf("a", "b", "c", "d"), 2)
listPermutations.forEach { println(it) }
/* [a, b]
[b, a]
[c, a]
[d, a]
[a, c]
@Timmeey
Timmeey / ThreeDoorPuzzle.kt
Last active November 14, 2020 16:42
ThreeDoorPuzzle(ZONK), what happens if you have to chose 1 out of three doors? Only one is correct. Once you have chosen a door. The Showmaster is going to opens all the other doors, but the correct one, XOR (if you already chose the correct door) leaves one incorrect one closed.
import java.util.*
import kotlin.math.roundToInt
fun main(){
val intendedGames = 100000
var reconsidered=0
var games=0
var reconsideredCorrect=0
var notReconsideredCorrect=0