Skip to content

Instantly share code, notes, and snippets.

Christian Aichinger Grk0

Block or report user

Report or block Grk0

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
Grk0 /
Last active Feb 25, 2019
Embed images in HTML file as dataurl
import os
import argparse
import base64
import mimetypes
import re
RE = b'src="([^"]*)"'
Grk0 /
Created Jun 14, 2016
Functions for working with angles
import math
def average_angles(angles):
"""Average (mean) of angles
Return the average of an input sequence of angles. The result is between
``0`` and ``2 * math.pi``.
If the average is not defined (e.g. ``average_angles([0, math.pi]))``,
View gist:9b0805e66607177379e1
<form class="form-horizontal" id="comment-form" ng-show="CommentAPI.connected">
<legend>Post a comment</legend>
<div class="form-group">
<label for="postcomment-homepage" class="col-lg-2 control-label">Homepage</label>
<div class="col-lg-10">
<input class="form-control" id="postcomment-homepage" placeholder="Homepage" type="url"
maxlength="150" ng-model="comment.homepage">
View gist:dbeefd9936b97e50c5c5
let $LANG = 'en_US.UTF-8'
let $LC_MESSAGES = 'en_US.UTF-8'
set langmenu="en_US.utf-8"
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,latin1
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages available in Debian.
runtime! debian.vim
You can’t perform that action at this time.