code stringlengths 3 6.57k |
|---|
__init__(self, max_size=10) |
add(self, element) |
self.cache.append(element) |
mean(self) |
np.mean(np.array(self.cache) |
empty(self) |
get_size(self) |
get_last(self) |
print_cache(self) |
print(e) |
print('===Test Cache===') |
Cache(max_size=5) |
cache.add([5,4]) |
print(cache.get_size() |
print(cache.print_cache() |
cache.add([8,1]) |
cache.add([3,2]) |
cache.add([4,5]) |
cache.add([6,2]) |
print(cache.get_size() |
print(cache.print_cache() |
cache.add([1,4]) |
print(cache.get_size() |
print(cache.print_cache() |
print(cache.mean() |
Copyright (c) |
collect_excs() |
exceptions.__dict__.values() |
hasattr(e, '__bases__') |
len(e.__bases__) |
len(e.__bases__) |
ret.append( (e, supername) |
collect_excs() |
ExceptionInfo(object) |
__init__(self, name, clrException, args, fields, subclasses, silverlightSupported = True, baseMapping = None) |
ConcreteParent(self) |
PythonType(self) |
DynamicHelpers.GetPythonTypeFromType(typeof(%s) |
ClrType(self) |
ExceptionMappingName(self) |
self.baseMapping.rfind('.') |
DotNetExceptionName(self) |
self.clrException.rfind('.') |
InternalPythonType(self) |
BeginSilverlight(self, cw) |
cw.writeline('') |
cw.writeline('#if !SILVERLIGHT') |
EndSilverlight(self, cw) |
cw.writeline('#endif // !SILVERLIGHT') |
cw.writeline('') |
MakeNewException(self) |
s() |
s(PythonExceptions.%s) |
ExceptionInfo('GeneratorExit', 'IronPython.Runtime.Exceptions.GeneratorExitException', None, () |
ExceptionInfo('SystemExit', 'IronPython.Runtime.Exceptions.SystemExitException', None, ('code',) |
ExceptionInfo('KeyboardInterrupt', 'Microsoft.Scripting.KeyboardInterruptException', None, () |
ExceptionInfo('Exception', 'IronPython.Runtime.Exceptions.PythonException', None, () |
ExceptionInfo('StopIteration', 'IronPython.Runtime.Exceptions.StopIterationException', None, () |
ExceptionInfo('StandardError', 'System.ApplicationException', None, () |
ExceptionInfo('BufferError', 'IronPython.Runtime.Exceptions.BufferException', None, () |
ExceptionInfo('ArithmeticError', 'System.ArithmeticException', None, () |
ExceptionInfo('FloatingPointError', 'IronPython.Runtime.Exceptions.FloatingPointException', None, () |
ExceptionInfo('OverflowError', 'System.OverflowException', None, () |
ExceptionInfo('ZeroDivisionError', 'System.DivideByZeroException', None, () |
ExceptionInfo('AssertionError', 'IronPython.Runtime.Exceptions.AssertionException', None, () |
ExceptionInfo('AttributeError', 'IronPython.Runtime.Exceptions.AttributeErrorException', None, () |
ExceptionInfo('EnvironmentError', 'System.Runtime.InteropServices.ExternalException', None, ('errno', 'strerror', 'filename') |
ExceptionInfo('IOError', 'System.IO.IOException', None, () |
ExceptionInfo('OSError', 'IronPython.Runtime.Exceptions.OSException', None, () |
ExceptionInfo('WindowsError', 'System.ComponentModel.Win32Exception', None, ('winerror',) |
ExceptionInfo('EOFError', 'System.IO.EndOfStreamException', None, () |
ExceptionInfo('ImportError', 'IronPython.Runtime.Exceptions.ImportException', None, () |
ExceptionInfo('LookupError', 'IronPython.Runtime.Exceptions.LookupException', None, () |
ExceptionInfo('IndexError', 'System.IndexOutOfRangeException', None, () |
ExceptionInfo('KeyError', 'System.Collections.Generic.KeyNotFoundException', None, () |
ExceptionInfo('MemoryError', 'System.OutOfMemoryException', None, () |
ExceptionInfo('NameError', 'IronPython.Runtime.UnboundNameException', None, () |
ExceptionInfo('UnboundLocalError', 'IronPython.Runtime.UnboundLocalException', None, () |
ExceptionInfo('ReferenceError', 'IronPython.Runtime.Exceptions.ReferenceException', None, () |
ExceptionInfo('RuntimeError', 'IronPython.Runtime.Exceptions.RuntimeException', None, () |
ExceptionInfo('NotImplementedError', 'System.NotImplementedException', None, () |
ExceptionInfo('SyntaxError', 'Microsoft.Scripting.SyntaxErrorException', None, ('text', 'print_file_and_line', 'filename', 'lineno', 'offset', 'msg') |
ExceptionInfo('IndentationError', 'IronPython.Runtime.Exceptions.IndentationException', None, () |
ExceptionInfo('TabError', 'IronPython.Runtime.Exceptions.TabException', None, () |
ExceptionInfo('SystemError', 'System.SystemException', None, () |
ExceptionInfo('TypeError', 'IronPython.Runtime.Exceptions.TypeErrorException', None, () |
ExceptionInfo('ValueError', 'IronPython.Runtime.Exceptions.ValueErrorException', None, () |
ExceptionInfo('UnicodeError', 'IronPython.Runtime.Exceptions.UnicodeException', None, () |
ExceptionInfo('UnicodeDecodeError', 'System.Text.DecoderFallbackException', ('encoding', 'object', 'start', 'end', 'reason') |
ExceptionInfo('UnicodeEncodeError', 'System.Text.EncoderFallbackException', ('encoding', 'object', 'start', 'end', 'reason') |
ExceptionInfo('UnicodeTranslateError', 'IronPython.Runtime.Exceptions.UnicodeTranslateException', None, ('start', 'reason', 'object', 'end', 'encoding') |
ExceptionInfo('Warning', 'System.ComponentModel.WarningException', None, () |
ExceptionInfo('DeprecationWarning', 'IronPython.Runtime.Exceptions.DeprecationWarningException', None, () |
ExceptionInfo('PendingDeprecationWarning', 'IronPython.Runtime.Exceptions.PendingDeprecationWarningException', None, () |
ExceptionInfo('RuntimeWarning', 'IronPython.Runtime.Exceptions.RuntimeWarningException', None, () |
ExceptionInfo('SyntaxWarning', 'IronPython.Runtime.Exceptions.SyntaxWarningException', None, () |
ExceptionInfo('UserWarning', 'IronPython.Runtime.Exceptions.UserWarningException', None, () |
ExceptionInfo('FutureWarning', 'IronPython.Runtime.Exceptions.FutureWarningException', None, () |
ExceptionInfo('ImportWarning', 'IronPython.Runtime.Exceptions.ImportWarningException', None, () |
ExceptionInfo('UnicodeWarning', 'IronPython.Runtime.Exceptions.UnicodeWarningException', None, () |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.