Skip to content

Instantly share code, notes, and snippets.

View biggest rect.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@flying-sheep
flying-sheep / autobahn_web.py
Created Jan 23, 2014
Extension of the Autobahn|Python WebSocket server for HTTP
View autobahn_web.py
#!/usr/bin/env python3
#http://hg.python.org/cpython/file/default/Lib/test/test_asyncio
import sys
import mimetypes
from os import listdir, path as p
from argparse import ArgumentParser
from email.utils import formatdate
View testdir.py
import os.path
from base64 import b64decode
from PyQt4.QtCore import QDir
HOST_DB = os.path.expanduser('~/.dropbox/host.db')
def get_dropbox_dir():
@flying-sheep
flying-sheep / PKGBUILD
Created Mar 9, 2014
RetroArch-Phoenix PKGBUILD
View PKGBUILD
#Contributor Themaister <maister@archlinux.us>
pkgname=retroarch-phoenix-git
_gitname="RetroArch-Phoenix"
pkgver=20130131
pkgrel=1
pkgdesc='Simple launcher and configuration tool for RetroArch.'
url="http://github.com/Themaister/$_gitname"
arch=('i686' 'x86_64')
license=('GPL')
View PKGBUILD
#Maintainer ...
#Contributor "flying sheep" <flying-sheep@web.de>
pkgname=qtjambi
_pkgver_main=4.8.5
_pkgver_beta=_beta1
pkgver=$_pkgver_main$_pkgver_beta
pkgrel=1
arch=('i686' 'x86_64')
View hs_err_pid11171.log
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x00007faf88a69acd, pid=11171, tid=140392123442944
#
# JRE version: OpenJDK Runtime Environment (7.0_51-b31) (build 1.7.0_51-b31)
# Java VM: OpenJDK 64-Bit Server VM (24.51-b03 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C [libQtCore.so.4+0xbdacd] QChar::toLower() const+0xd
#
View odslicer.py
from collections import OrderedDict
from collections.abc import Iterable
class ModOD(OrderedDict):
def __repr__(self):
if not len(self):
return 'od()'
return 'od[' + ', '.join('{}: {}'.format(k, v) for k, v in self.items()) + ']'
od_syntax_error = SyntaxError('Allowed sytax: od[<k>: <v>(, <k>: <v>, …)] or od()')
@flying-sheep
flying-sheep / r4cpp.md
Last active Aug 29, 2015
rust for c++ programmers mirror
View r4cpp.md

Rust for C++ programmers

part 1: Hello world

This is the first in a series of blog posts (none written yet) which aim to help experienced C++ programmers learn Rust. Expect updates to be sporadic at best. In this first blog post we'll just get setup and do a few super basic things. Much better resources are at the tutorial and reference manual.

First you need to install Rust. You can download a nightly build from http://www.rust-lang.org/install.html (I recommend the nighlties rather than 'stable' versions – the nightlies are stable in that they won't crash too much (no more than the stable versions) and you're going to have to get used to Rust evolving under you sooner or later anyway). Assuming you manage to install things properly, you should then have a rustc command available to you. Test it with rustc -v.

Now for our first program. Create a file, copy

View 0001-Used-variable-in-source-jar-build.patch
From ae1badbc0513d17014e389c5511dae1981bcf251 Mon Sep 17 00:00:00 2001
From: Phil Schaf <flying-sheep@web.de>
Date: Wed, 4 Jun 2014 12:49:42 +0200
Subject: [PATCH] Used variable in source jar build
---
build.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.xml b/build.xml
View highlighter.htm
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="Generator" content="Kate, the KDE Advanced Text Editor">
<title>highlighter.cpp</title>
<style>
pre.kate {
color:#1f1c1b;
background-color:#ffffff;