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 __future__ import absolute_import, division, print_function | |
from cryptography.bindings import _default_api | |
class BlockCipher(object): | |
def __init__(self, cipher, mode, api=None): | |
super(BlockCipher, self).__init__() | |
if api is None: |
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
_site/ | |
bower_components/ | |
.sass_cache/ | |
.ruby-version |
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 ctypes | |
# Create a function prototype for a 3-arg function | |
ternaryfunc = ctypes.CFUNCTYPE(ctypes.py_object, ctypes.py_object, | |
ctypes.py_object, ctypes.c_void_p) | |
# Define a new python type that's callable, via a ternaryfunc | |
class PyTypeObject(ctypes.Structure): |
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 os | |
import sys | |
from os.path import join | |
from fabric.api import local | |
BASE_DIR = os.path.realpath(os.path.dirname(__file__)) | |
BUILD_DIR = join(BASE_DIR, '_build') | |
SOURCE_DIR = join(BASE_DIR, 'source') | |
LOCALE_DIR = join(SOURCE_DIR, 'locale', |
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
# SOME DESCRIPTIVE TITLE. | |
# Copyright (C) 2012, OpenTechSchool and contributors | |
# This file is distributed under the same license as the Introduction to Programming with Python package. | |
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
# | |
#, fuzzy | |
msgid "" | |
msgstr "" | |
"Project-Id-Version: Introduction to Programming with Python 0.1\n" | |
"Report-Msgid-Bugs-To: \n" |
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
def up(a, b, n): | |
"""Calculates a ↑ⁿ b""" | |
if a == 1: | |
return 1 | |
elif b == 1: | |
return a | |
elif n == 1: | |
return a**b | |
else: | |
return up(a, up(a, b - 1, n), n - 1) |
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
<?php | |
/** | |
* @author Rick Wong <[email protected]> | |
* @contributor Matthew Iversen <[email protected]> | |
*/ | |
namespace Phur\Strategy; | |
/** | |
* The Strategy Pattern. It is used when your application needs to | |
* pick one business algorithm out of many. The behavior of your |
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
"""Modum | |
Usage: | |
modum [options] | |
modum -h | --help | |
modum -v | --version | |
Options: | |
-h --help Show this screen. | |
-v --version Show version. |
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 gevent import wsgi | |
def simple_app(environ, start_response): | |
headers = [('Content-Type', 'text/plain')] | |
start_response('200 OK', headers) | |
def content(): | |
# We start streaming data just fine. | |
yield 'The dwarves of yore made mighty spells,' | |
yield 'While hammers fell like ringing bells' |
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 python | |
# | |
# Copyright (C) 2011, 2012, 2013 Strahinja Val Markovic <[email protected]> | |
# | |
# This file is part of YouCompleteMe. | |
# | |
# YouCompleteMe is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. |