This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django_jinja import library | |
import logging as log | |
@library.filter | |
def debug(msg, *args): | |
""" | |
Usage: {{ 'Hello %s' | debug('world') }} | |
""" | |
log.debug(msg, *args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -------------------------------------------------------------------------- | |
// Reference implementation for rfc.zeromq.org/spec:32/Z85 | |
// | |
// This implementation provides a Z85 codec as an easy-to-reuse C class | |
// designed to be easy to port into other languages. | |
// -------------------------------------------------------------------------- | |
// Copyright (c) 2010-2013 iMatix Corporation and Contributors | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.algorithm.searching : find; | |
import std.container : DList; | |
import std.format : format; | |
import std.range :take; | |
import std.stdio; | |
class Point { | |
public: | |
int x, y; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.algorithm.iteration : map; | |
struct Foo { | |
int id; | |
string text; | |
private static Foo[] foos = [ | |
{ 0, "Blah" }, | |
{ 1, "Text" }, | |
{ 2, "Moar Text" }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module hex2rgb; | |
struct RGB { | |
ubyte r; | |
ubyte g; | |
ubyte b; | |
public this(ubyte r, ubyte g, ubyte b) { | |
this.r = r; | |
this.g = g; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ksh | |
# | |
# Copyright (c) 2010,2011,2012 Joachim de Groot <[email protected]> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import csv | |
import re | |
import sys | |
from xml.dom.minidom import getDOMImplementation | |
contacts = [] | |
# strip unwanted characters from strings |