This project has moved to https://github.com/jonhoo/drwmutex so it can be imported into Go applications.
This file contains 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 | |
# encoding: utf-8 | |
""" | |
Boyer Moore Demo | |
Inspired by https://www.youtube.com/watch?v=PHXAOKQk2dw | |
Copyright (C) 2015 Meng Zhuo <[email protected]> | |
""" | |
def make_bad_match_table(pattern): |
This file contains 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 | |
# ftpserver.py | |
# | |
# pyftpdlib is released under the MIT license, reproduced below: | |
# ====================================================================== | |
# Copyright (C) 2007 Giampaolo Rodola' <[email protected]> | |
# | |
# All Rights Reserved | |
# | |
# Permission to use, copy, modify, and distribute this software and |
This file contains 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
class ApiClient(object): | |
default_retries = (1, 2, 5, 10, 20, 30) | |
def __retry(func): | |
@wraps(func) | |
def wrapper(self, *args, **kwargs): | |
retries = kwargs.pop('retries', self.default_retries) | |
try: | |
if kwargs.pop('reconnect', False): | |
self.__init__(self.ftp_uri, retries=()) |
This file contains 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
# vim: tabstop=4 shiftwidth=4 softtabstop=4 | |
# Copyright 2011 OpenStack LLC. | |
# Copyright 2010 United States Government as represented by the | |
# Administrator of the National Aeronautics and Space Administration. | |
# All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may | |
# not use this file except in compliance with the License. You may obtain | |
# a copy of the License at |