Skip to content

Instantly share code, notes, and snippets.

@Makman2
Makman2 / pairwise.jl
Created April 18, 2021 17:27
Pairwise iteration recipe for Julia (analogous to Python's itertools recipe "pairwise")
import Base: iterate, length, eltype
struct Pairwise{IterType}
iter::IterType
end
function iterate(pairwise::Pairwise)
next = iterate(pairwise.iter)
return iterate(pairwise, next)
end
@Makman2
Makman2 / main.py
Created August 13, 2018 20:16
Getting started Python main file
from argparse import ArgumentParser, Namespace
import sys
def main(args: Namespace):
pass
def create_argparser() -> ArgumentParser:
parser = ArgumentParser()
@Makman2
Makman2 / merge.sh
Last active December 13, 2017 20:00
Fast-forward merge script for GitHub PRs
#!/usr/bin/env bash
# How to use:
# bash merge.sh <PR-id>
set -e
git checkout master
git pull
@Makman2
Makman2 / maier.py
Created July 9, 2017 16:25
Maier initial stuff ;)
from random import randint
dices = 2
def wuerfeln():
return randint(1, 6)
def fusionieren(a, b):
sortierte_liste = sorted([a, b])
@Makman2
Makman2 / testlog.txt
Created August 8, 2016 20:44
Latest test run for coala on 8 August 2016 ~22:40 with recent master
D:\Users\MAK\Eigene Dokumente\GitHub\coala [Makman2/linter-update ≡ +3 ~0 -0 !]> py.test --cov --cov-report html
============================= test session starts =============================
platform win32 -- Python 3.4.3, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: D:\Users\MAK\Eigene Dokumente\GitHub\coala, inifile: setup.cfg
plugins: cov-2.2.1, env-0.6.0, mock-1.1, timeout-1.0.0, xdist-1.14
collected 549 items / 14 skipped
coalib\bearlib\naming_conventions\__init__.py ....
coalib\bears\Bear.py ..
coalib\bears\requirements\CondaRequirement.py .
@Makman2
Makman2 / README.md
Last active June 4, 2016 06:59
An animated cube in CE3D2!!!

Compile with

g++ -lCE3D2 --std=c++11 anim.cpp -o anim

Install CE3D2 before! :D

@Makman2
Makman2 / testfail.txt
Created May 5, 2016 14:28
coala master fails (5.5.2016)
============================= test session starts ==============================
platform linux -- Python 3.4.3, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /home/mak/dev/coala, inifile: setup.cfg
plugins: timeout-1.0.0, xdist-1.14, doc-0.0.1, env-0.6.0, cov-2.2.1
collected 549 items
coalib/bears/Bear.py .
coalib/collecting/Importers.py .
coalib/misc/Annotations.py .
coalib/misc/Decorators.py ..
mak@hp-elitebook:~/dev/coala (master)$ git pull
Already up-to-date.
mak@hp-elitebook:~/dev/coala (master)$ sudo pip3 install coala coala-bears --pre --upgrade
Requirement already up-to-date: coala in /usr/lib/python3.4/site-packages
Requirement already up-to-date: coala-bears in /usr/lib/python3.4/site-packages
Requirement already up-to-date: setuptools>=19.2 in /usr/lib/python3.4/site-packages (from coala)
Requirement already up-to-date: validators~=0.10 in /usr/lib/python3.4/site-packages (from coala)
Requirement already up-to-date: libclang-py3==0.2 in /usr/lib/python3.4/site-packages (from coala)
Requirement already up-to-date: PyPrint~=0.2.3 in /usr/lib/python3.4/site-packages (from coala)
Requirement already up-to-date: appdirs~=1.4.0 in /usr/lib/python3.4/site-packages (from coala)
Afterwork improvements:
- Catch regex.compile error and rethrow as ValueError?
- Implement GlobalBear support
- More intelligent metadata-merge that is not so merge-order-sensitive
- regex-output-format: Implement even more checks:
- Use of capturing groups
- Unknown named capturing groups
- prerequisite_check_command: Remove and let the user override it
himself + provide helper utilities (advanced custom command check,
derivations for specific stuff (java module check etc.)
@Makman2
Makman2 / Application.scala
Created March 14, 2016 00:47
My first try to get jmonkeyengine running with scala
package coz
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.math.ColorRGBA;
/** Sample 1 - how to get started with the most simple JME 3 application.