Skip to content

Instantly share code, notes, and snippets.

@lhk
lhk / seven.ipynb
Created November 22, 2016 12:08
numpy array features
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lhk
lhk / 3Daugmentation.ipynb
Last active November 22, 2016 12:10
3D transformation and resampling
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lhk
lhk / 3d_volume_trafo
Created November 10, 2016 14:24
transform 3D volume with scipy/numpy
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
@lhk
lhk / lagrangian.ipynb
Created June 17, 2016 23:06
lagrangian double pendulum
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
@lhk
lhk / tictactoe.py
Last active November 13, 2015 20:49
python tictactoe with bruteforce minmax ai
import unittest
class Game:
def __init__(self):
self.field=[[0 for x in range(3)] for y in range(3)]
def print(self):
for line in self.field:
print(str(line[0])+" "+str(line[1])+" "+str(line[2]))
print("")
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lhk
lhk / PrimeBenchmark
Created December 21, 2014 12:52
A simple Benchmark based on Primes
//============================================================================
// Name : Benchmark.cpp
// Author : Lars Klein
// Version : 0.3
// Copyright : CC
// Description : A simple benchmark based on primes
//============================================================================
#include <iostream>
#include <math.h>